A Video Analysis Method on Wanfang Dataset via Deep Neural Network

Jinlong Kang, Jiaxiang Zheng, Heng Bai, Xiaoting Xue, Yang Zhou, Jun Guo

Abstract

While deep learning has significantly advanced object detection, video-based analysis still faces challenges like "detection jitter"—the unstable flickering of object counts between frames—and inaccuracies in high-density or overlapping scenes. This paper introduces YOLOv3-ANV (Abnormal Number Version), a framework designed to stabilize multi-object detection in video streams. By integrating a "judge" method that switches between standard detection and pixel-based density estimation, and an optimization algorithm for temporal smoothing, the proposed method achieves a 5.4% average accuracy improvement over existing models on the Wanfang sports competition and NWU campus datasets.

Introduction

Modern convolutional neural networks (CNNs) like YOLO and Faster R-CNN excel at detecting objects in static images. However, when applied to video, slight variations in lighting, motion blur, or occlusion can cause the model to drop or add objects inconsistently across consecutive frames. This phenomenon, known as detection jitter, makes it difficult to accurately calculate pedestrian flow or monitor athlete behavior in real-time. Furthermore, standard bounding-box detectors often fail in crowded environments where objects are small and highly overlapping. This research addresses these issues by proposing a two-stage framework that ensures both temporal stability and counting accuracy in dense scenes.

Methodology

The YOLOv3-ANV framework employs a hybrid approach to handle varying scene densities and temporal inconsistencies.

The complete workflow of the YOLOv3-ANV system, from video frame input to population density output.

1. The "Judge" Method (Hybrid Detection)

To optimize for different scenarios, the system uses a threshold-based switch (set at $N=25$).

  • Low Density: When the detected object count is below the threshold, the system relies on YOLOv3, which provides high-precision bounding boxes for sparse scenes.
  • High Density: If the count exceeds the threshold, the system switches to a pixel-based population density estimation algorithm. This path uses background subtraction to perform foreground segmentation, identifying "motion prospects."
Example of foreground segmentation used in the high-density estimation path.

Features such as perimeter and area are extracted from these segments and passed through a linear regression model to estimate the total count. This method is significantly more robust than bounding-box detection in highly crowded environments.

2. The Optimization Method (Jitter Prevention)

To eliminate temporal instability, the authors implemented a smoothing algorithm. The system defines an "error correction region" (a temporal window) equivalent to 1/3 of the video's frame rate. If a frame's detection count deviates significantly from its neighbors, the algorithm replaces that value with the maximum count found within the local window. This heuristic assumes that "leakage" (missing an object) is a more frequent error than false positives, effectively stabilizing the detection sequence.

Experimental Results

The proposed model was evaluated using the Wanfang Sports Competition Dataset (covering rugby, hockey, basketball, and horse racing) and a custom NWU Campus Dataset for pedestrian monitoring.

  • Accuracy Improvements: YOLOv3-ANV achieved an average improvement of 5.4% over standard methods. In specific tasks like Rugby competition monitoring, accuracy reached 80.71%, compared to 71.57% for standard YOLOv3.
  • Pedestrian Monitoring: On the NWU campus dataset, the model reached a high accuracy of 90.11%, demonstrating its effectiveness for security and flow analysis.
  • Stability: The optimization algorithm successfully smoothed the output sequences, providing a reliable basis for "abnormal number" alerts in security contexts.

Conclusion

YOLOv3-ANV provides a robust solution for real-time multi-object detection in video. By combining the spatial precision of YOLOv3 with the crowd-resilience of pixel-based density estimation and a temporal smoothing layer, the framework effectively mitigates detection jitter. Future work will focus on expanding training data diversity and optimizing the model for lower-power edge devices.

Summary updated

Abstract

The topic of object detection has been largely improved recently, especially with the development of convolutional neural network. However, there still exist a lot of challenging cases, such as small object, compact and dense or highly overlapping object. Existing methods can detect multiple objects wonderfully, but because of the slight changes between frames, the detection effect of the model will become unstable, the detection results may result in dropping or increasing the object. In the pedestrian flow detection task, such phenomenon can not accurately calculate the flow. To solve this problem, in this paper, we describe the new function for real-time multi-object detection in sports competition and pedestrians flow detection in public based on deep learning. Our work is to extract a video clip and solve this frame of clips efficiently. More specfically, our algorithm includes two stages: judge method and optimization method. The judge can set a maximum threshold for better results under the model, the threshold value corresponds to the upper limit of the algorithm with better detection results. The optimization method to solve detection jitter problem. Because of the occurrence of frame hopping in the video, and it will result in the generation of video fragments discontinuity. We use optimization algorithm to get the key value, and then the detection result value of index is replaced by key value to stabilize the change of detection result sequence. Based on the proposed algorithm, we adopt wanfang sports competition dataset as the main test dataset and our own test dataset for YOLOv3-Abnormal Number Version(YOLOv3-ANV), which is 5.4% average improvement compared with existing methods. Also, video above the threshold value can be obtained for further analysis. Spontaneously, our work also can used for pedestrians flow detection and pedestrian alarm tasks.
BibTeX
@inproceedings{kang2019video,
  author = {Jinlong Kang and Jiaxiang Zheng and Heng Bai and Xiaoting Xue and Yang Zhou and Jun Guo},
  title = {{A Video Analysis Method on Wanfang Dataset via Deep Neural Network}},
  booktitle = {Icvip},
  year = {2019},
  doi = {10.1145/3376067.3376075},
}
Figure