Abstract
Standard video compression is designed for human eyes, often discarding the subtle data that machine learning models need to perform tasks like object detection. This paper introduces CDRE (Compression Distortion Representation Embedding), a framework that identifies machine-relevant distortion in the feature domain and sends a tiny auxiliary bitstream to the downstream model. This "cheat sheet" allows the model to compensate for compression artifacts, significantly boosting accuracy with negligible overhead.
Introduction
Most video codecs, such as H.264/AVC and H.265/HEVC, are optimized for the Human Visual System (HVS). They prioritize visual quality by smoothing textures or discarding high-frequency data that humans typically do not notice. However, Video Coding for Machines (VCM) is a growing field where the primary "viewer" is an AI. Machine vision models are sensitive to different types of degradation than humans are. Standard pixel-domain metrics like PSNR (Peak Signal-to-Noise Ratio) often fail to correlate with how accurately a model can detect a car or segment a pedestrian.
Existing solutions typically attempt to "restore" the image—which is computationally expensive—or retrain models on compressed data, which lacks the flexibility to account for the specific distortion of a unique frame. CDRE addresses this by treating compression distortion as a "prompt" to inform the downstream model of where information has been lost.
The CDRE Framework
The authors propose a three-component architecture designed to bridge the gap between compressed video and machine vision performance:
- Compression-Sensitive Extractor: Instead of operating in the pixel domain, this module compares the features of original and compressed frames across multiple scales. By using cosine similarity in the feature domain, it pinpoint exactly where machine-relevant information was degraded.
- Lightweight Distortion Codec: To maintain a low bitrate, the framework uses a VAE-like (Variational Autoencoder) structure to compress the resulting distortion map. It utilizes binary quantization to turn values into a compact stream of 0s and 1s, minimizing transmission overhead.
- Multi-Scale Embedding Module: On the decoder side, this information is progressively fused into the backbone of the downstream model (supporting both CNNs like ResNet and Transformers like Swin). This allows the model to adjust its internal representations based on the known degradation of specific input regions.
Key Insights
- Feature Domain Superiority: Distortion is more identifiable and compensable in the feature domain than in the pixel domain. At specific scales, the distance between original and compressed features is amplified, making it easier for the model to "see" what is missing.
- The "Prompt" Analogy: Rather than attempting to fix the image (restoration), CDRE provides the model with metadata about errors. This is inspired by prompt learning, where small amounts of auxiliary information guide large pre-trained models.
- Efficiency: By using binary quantization and a shallow encoder (only 18K parameters), the system adds only ~6ms of latency on an RTX 3090, making it viable for real-time applications.
Experimental Results
The framework was evaluated on industry-standard benchmarks including MS-COCO 2017 (object detection) and YouTubeVIS 2019 (video instance segmentation) across various codecs like H.265/HEVC and modern neural-based codecs.
The primary metric, BD-rate, measures the bitrate savings required to reach the same level of task accuracy. Key findings include:
- Massive Bitrate Savings: CDRE achieved a 66.88% BD-rate reduction for object detection and 53.68% for video instance segmentation compared to standard anchors.
- Minimal Overhead: The additional bitstream for distortion information is approximately 20 KBps for a 720p 30fps video.
- Superiority to Restoration: CDRE significantly outperformed "all-in-one" restoration models like PromptIR. Restoration models often prioritize HVS aesthetics, which can sometimes increase the required bitrate for machine vision tasks without providing proportional accuracy gains.
Conclusion and Future Work
CDRE demonstrates that embedding distortion information directly into model backbones is a highly efficient way to handle compressed video in machine vision pipelines. While the current framework requires some tailoring to specific model backbones (CNN vs. Transformer), its transferability across different codecs is a significant strength. Future research may explore the end-to-end joint optimization of video codecs and distortion embedding modules to further push the boundaries of Video Coding for Machines.
Summary updated