As surveillance systems continue to evolve, the demand for efficient video compression becomes more critical. These systems capture a significant amount of data, making it essential to reduce file sizes without compromising the quality required for video analysis. However, striking a balance between compression and performance can be tricky. A recent study explores how video compression affects the performance of an object detection system, focusing on the popular YOLOv5 model.

Understanding the Study

The study examines how the widely-used H.264 video compression codec impacts the ability of YOLOv5, an object detection network, to recognize people, bikes, and vehicles in surveillance footage. The experiment involved compressing 50 surveillance videos at various compression levels and analyzing how detection performance is influenced by these changes.

Compression Levels and Detection Performance

The videos were compressed using five different quality settings (measured by a parameter called Constant Rate Factor, or CRF). The lower the CRF, the higher the video quality (but with a larger file size). The researchers tested the system at CRF values of 22, 32, 37, 42, and 47 to cover a range of quality levels.

Interestingly, the study found that detection performance remained robust at moderate compression levels. For instance, using a CRF value of 37 resulted in significantly smaller file sizes without a noticeable decrease in detection accuracy. However, when the compression was ramped up (CRF values above 37), detection performance declined, particularly for small or fast-moving objects.

Why Does Compression Matter?

Video compression is essential for surveillance systems to manage large amounts of data efficiently. However, over-compressing footage can degrade its quality to the point that critical details are lost, affecting the ability to detect objects. For instance, in this study, smaller and more intricate objects like bikes were particularly affected by higher compression settings, leading to detection failures.

The effect of compression was even more pronounced in scenes with poor lighting or fast-moving objects. When objects were larger and more easily distinguishable, such as vehicles, detection performance was less affected, even at higher compression levels.

Can Retraining Help?

To combat the loss in performance at higher compression levels, the researchers experimented with retraining the YOLOv5 model using compressed images. By augmenting the training dataset with images that mimicked compressed footage, the model saw a slight performance improvement of up to 1% in F1 scores when applied to highly compressed videos.

While the improvement was modest, it shows potential for future research. As surveillance footage often comes in less-than-ideal conditions, retraining object detection models using data that better reflects real-world scenarios could yield better results.

Figure 6 from the paper showing detection in very high compression

Figure 2: Shows the impact of over compression on video. Top row is at a normal compression level (CRF = 22) and below are excessively compressed (CRF = 47). Using the standard YOLO algorithm, objects are successfully detected in minimally compressed scenes, while YOLO had false detections in the corresponding scenes with excessive compression

Key Takeaways for the Surveillance Industry

  1. Moderate Compression Works: The study shows that moderate video compression (up to CRF 37) can reduce file sizes without significantly affecting object detection performance. This is important for surveillance systems, where storage and transmission efficiency are critical.
  2. Beware of Over-Compression: Higher levels of compression (CRF 42 and above) start to degrade detection accuracy, particularly for small or fast-moving objects. Surveillance systems should avoid excessive compression in scenes with challenging conditions, such as poor lighting or rapid movement.
  3. Retraining Models on Compressed Data: Training object detection models on datasets that include compressed images can improve performance in real-world surveillance scenarios, though more research is needed to fully realize the benefits.

Conclusion

As video surveillance systems evolve, understanding the relationship between video compression and object detection is essential. This study provides valuable insights, showing that while moderate compression can maintain detection performance, higher levels of compression can be detrimental, especially in complex scenarios. Retraining models using compressed data offers a potential solution to improve detection accuracy, paving the way for more efficient and effective surveillance systems.

For businesses and developers working with surveillance technology, these findings emphasize the importance of balancing compression settings with detection performance to ensure optimal results.

Based on the research paper by

O’Byrne, Michael & Vibhoothi, & Sugrue, Mark & Kokaram, Anil. (2022). Impact of Video Compression on the Performance of Object Detection Systems for Surveillance Applications. 10.48550/arXiv.2211.05805.