A Perspective on Deep Vision Performance with Standard Image and Video Codecs

Christoph Reich, Oliver Hahn, Daniel Cremers, Stefan Roth, Biplob Debnath · DOI

TL;DR

When edge devices stream video or images to the cloud for AI inference, they rely on standard codecs like JPEG and H.264 to save bandwidth. This paper reveals that such lossy compression severely degrades the accuracy of deep vision models, particularly for dense prediction and localization tasks (e.g., dropping semantic segmentation accuracy by over 80%). The findings highlight a critical misalignment between codecs optimized for human perception and the needs of machine vision.

What Problem Does This Paper Address?

Deep learning models are computationally heavy. Resource-constrained edge devices, like smartphones or IoT sensors, often offload inference to powerful cloud servers. To transfer image and video data over wireless networks with limited bandwidth, the data must be compressed using standard codecs like JPEG or H.264 to ensure interoperability and low cost.

However, these traditional codecs were designed decades ago to optimize perceptual quality for human eyes, discarding high-frequency details that humans don't easily notice. The authors address a crucial question: How does this lossy compression impact modern deep learning models across diverse vision tasks? While prior work mostly focused on image classification, this paper provides a comprehensive look at how compression affects spatially precise localization and dense prediction tasks.

Figure 1. Deep vision performance on standard coded images/videos. We demonstrate that using standard image and video coding can vastly deteriorate the accuracy of current deep vision models. We visualize the original (left) and coded (right) image/video and the respective models’ prediction. For optical flow estimation, we overlay the first and second frame. Best viewed in color; zoom in for details.

Methods

The authors systematically evaluated 23 popular, pre-trained deep vision models across four core tasks: image classification, object detection, semantic segmentation, and optical flow estimation.

To isolate the impact of compression from the models' inherent errors, they introduced a pseudo-ground truth evaluation approach. Instead of comparing predictions to human-annotated labels, they ran inference on the original, uncompressed data to establish a baseline prediction (the pseudo-label). They then measured how much the model's prediction changed when processing the compressed version of the same data.

They varied the compression rates systematically using standard codec parameters:

  • JPEG Quality: Scaled from 1 (maximum compression, highest distortion) to 99 (minimum compression).
  • H.264 Quantization Parameter (QP): Scaled from 0 (least compression) to 51 (strongest compression).

Datasets

The evaluation utilized three standard computer vision benchmarks:

  • Cityscapes: Used for evaluating semantic segmentation (validation set) and optical flow estimation (validation sequences).
  • COCO (Common Objects in Context): Used for object detection validation.
  • ImageNet-1k: Used for image classification validation.

Key Insights and Ideas

  • Humans vs. Machines: Codecs discard information that human eyes ignore, but deep vision models rely heavily on these fine-grained, local high-frequency features. An image can look perfectly acceptable to a human observer while being completely uninterpretable to a segmentation network.
  • Task Granularity Matters: Global tasks like image classification are surprisingly resilient to medium compression because global context is preserved. Spatially granular tasks—like semantic segmentation and optical flow—completely break down because compression obliterates local pixel relationships and boundaries.
  • Backbone Size Offers Limited Protection: While larger backbones (e.g., ResNet-101 vs. ResNet-18) offer a slight boost in robustness under mild compression, they still suffer catastrophic failures under high compression rates in dense prediction tasks.

Key Results

  • Semantic Segmentation: Under strong JPEG compression (quality = 1), mIoU accuracy dropped by over 80% relative to the baseline. Even moderate compression (JPEG quality 60) caused noticeable misclassifications, such as confusing sidewalks or poles for fences.
Qualitative semantic segmentation degradation as JPEG compression increases.
  • Object Detection: Performance for both DETR and Faster R-CNN variants plummeted below a 5% mAP score relative to the uncoded baseline under high compression rates (JPEG quality < 5).
  • Image Classification: While relatively stable at medium compression, performance dropped significantly under high compression; for instance, a Swin-B Transformer's absolute accuracy dropped from ~83% to below 20%.
  • Optical Flow: H.264 compression caused a linear deterioration in performance once the Quantization Parameter (QP) surpassed 15. Interestingly, unsupervised models (like SMURF) showed slightly better robustness than supervised ones (RAFT), which the authors attribute to the aggressive data augmentation used during unsupervised training.

Limitations and Future Work

The authors note several limitations and open paths forward:

  • Data Augmentation is a Band-Aid: While training models with compressed data (data augmentation) helps, it doesn't fully restore accuracy because critical information is fundamentally lost during the compression step.
  • Deep Codecs Lack Standardization: Learned "deep codecs" can optimize specifically for machine vision tasks, but they currently lack widespread hardware support, standardization, and computational efficiency on edge devices.
  • The Path Forward: The paper emphasizes the urgent need to design optimization methods that adjust standard codec parameters (like JPEG quantization tables) specifically to preserve features critical for deep vision models, without breaking standard interoperability.

Summary updated

BibTeX
@misc{reich2024perspective,
  author = {Christoph Reich and Oliver Hahn and Daniel Cremers and Stefan Roth and Biplob Debnath},
  title = {{A Perspective on Deep Vision Performance with Standard Image and Video Codecs}},
  year = {2024},
  eprint = {2404.12330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.12330},
}
Figure