Abstract
Resource-constrained hardware, such as edge devices or cell phones, often rely on cloud servers to provide the required computational resources for inference in deep vision models. However, transferring image and video data from an edge or mobile device to a cloud server requires coding to deal with network constraints. The use of standardized codecs, such as JPEG or H.264, is prevalent and required to ensure interoperability. This paper aims to examine the implications of employing standardized codecs within deep vision pipelines. We find that using JPEG and H.264 coding significantly deteriorates the accuracy across a broad range of vision tasks and models. For instance, strong compression rates reduce semantic segmentation accuracy by more than 80% in mIoU. In contrast to previous findings, our analysis extends beyond image and action classification to localization and dense prediction tasks, thus providing a more comprehensive perspective.
Introduction: The Perception Gap
In the era of "AI at the edge," offloading inference to cloud servers is a common strategy for resource-constrained devices. This process necessitates the use of standard lossy codecs like JPEG and H.264 to manage bandwidth. However, these codecs were designed decades ago to optimize for the Human Visual System (HVS), discarding information that humans typically do not perceive, such as high-frequency textures.
This study investigates whether what is "good enough" for human eyes remains sufficient for deep neural networks. The findings reveal a significant "perception gap": the artifacts introduced by standard coding—such as blocking in JPEG or blurring in H.264—can be catastrophic for the feature extractors used in modern AI models. For example, compression grids can be misinterpreted as edges or textures, leading to incorrect classifications.
Methodology
The researchers conducted a comprehensive "stress test" across 23 state-of-the-art deep vision models covering four core tasks:
- Image Classification: Evaluated using ResNet, ViT, and Swin Transformer on ImageNet-1k.
- Object Detection: Evaluated using Faster R-CNN and DETR on COCO.
- Semantic Segmentation: Evaluated using DeepLabV3 and UPerNet on Cityscapes.
- Optical Flow Estimation: Evaluated using RAFT and SMURF on Cityscapes.
To isolate the impact of coding from inherent model errors, the authors employed a "pseudo-label" approach. They compared model predictions on compressed data against the same model's predictions on the original, uncompressed data. This methodology quantifies the performance loss attributable solely to the compression process.
Key Results and Insights
The study demonstrates that "dense" prediction tasks, such as semantic segmentation and optical flow, are far more fragile under compression than "global" tasks like classification. While a model might correctly identify a "dog" in a heavily compressed image, it often fails to accurately delineate its boundaries or track its motion.
The Fragility of Semantic Segmentation
Semantic segmentation proved particularly sensitive. Under strong JPEG compression, the mean Intersection over Union (mIoU) plummeted by over 80%. Even at moderate quality levels that appear acceptable to humans, models began to hallucinate incorrect labels for critical regions like roads and sidewalks. Interestingly, while larger backbones (e.g., ResNet-101 vs. ResNet-18) provide a slight boost in robustness, they still suffer massive performance drops under high compression.
Broader Performance Impact
- Image Classification: A Swin-B Transformer's accuracy on ImageNet-1k dropped from ~83% to below 20% under heavy JPEG compression.
- Object Detection: For DETR and Faster R-CNN, the mean Average Precision (mAP) fell below 5% relative to the baseline at extreme compression levels (JPEG Quality < 5).
- Optical Flow: In H.264 video, the End-Point Error (EPE) increased linearly as the Quantization Parameter (QP) rose above 15, indicating that even high-quality video settings can degrade motion tracking.
Conclusion and Future Directions
The results highlight that standard codecs act as a "silent performance killer" for deep vision. The paper suggests several paths forward for the community to bridge this gap:
- Codec-Aware Training: Incorporating compression artifacts into data augmentation during training so models learn to ignore them.
- Domain Adaptation: Designing models that can process compressed frequency data (e.g., DCT coefficients) directly, bypassing decompression.
- Machine-Centric Codecs: Developing new compression standards optimized for machine perception rather than human aesthetics.
Addressing these challenges is essential for the reliable deployment of cloud-based AI inference in real-world, bandwidth-constrained environments.
Summary updated