Introduction
The explosion of video data in autonomous driving and surveillance has shifted the primary consumer of video from humans to AI models. Traditional video codecs like H.264 are optimized for human perceptual quality, often sacrificing details in regions that are critical for computer vision tasks, such as distant objects or specific textures. RL-RC-DoT (Reinforcement Learning Rate Controller for Downstream Tasks) addresses this by introducing a task-aware compression strategy that optimizes video for machine consumption.
The Challenge of Task-Aware Compression
Standard compression techniques treat all pixels with similar importance based on human visual saliency. For a car-detection algorithm, however, maintaining clarity on a distant vehicle is far more important than preserving the texture of the asphalt. While existing task-aware solutions exist, they often require the heavy downstream AI model to be active during the encoding process, making them unsuitable for low-power edge devices. RL-RC-DoT overcomes this by using lightweight encoder statistics to drive a reinforcement learning agent that operates in real-time.
System Architecture and Methodology
The core of RL-RC-DoT is a reinforcement learning agent trained using Proximal Policy Optimization (PPO). Unlike standard rate controllers that set a single Quantization Parameter (QP) for an entire frame, this agent operates at the macro-block level (16x16 pixel patches).
As shown in Figure 1, the system workflow involves:
- State Representation: The agent receives "per-patch statistics" and a "global statistics vector" directly from the video encoder.
- Action Space: The agent outputs a $\Delta$ QP map, adjusting the compression level for each macro-block.
- Self-Supervised Reward: During training, the reward is calculated by comparing the downstream task's performance on the raw frame versus the reconstructed (compressed) frame. This "pseudo-ground-truth" approach eliminates the need for manual labels.
- Inference Efficiency: At runtime, the agent does not require the downstream AI model. It relies solely on internal codec data, allowing it to process video at 250 FPS.
Experimental Results
The researchers evaluated RL-RC-DoT using the BDD100K dataset, focusing on challenging driving scenarios. The agent was trained to optimize for a YOLOv5 car detector.
Key Findings:
- Significant Bit-rate Savings: For car detection tasks, RL-RC-DoT achieved a 24.7% reduction in BD-rate. This means the system can maintain the same detection accuracy as standard x264 while using approximately 25% less bandwidth.
- Task Generalization: Interestingly, a policy trained for YOLOv5 also improved performance for other detectors like SSD and different tasks like semantic segmentation. This suggests the agent learns universal visual features important for computer vision.
- Human Interpretability: While optimized for machines, the visual quality (PSNR) remains high enough for human debugging and data collection, as seen in Figure 4(c).
- Real-time Performance: The RL overhead is minimal (approx. 4ms per frame), making it highly suitable for high-speed streaming applications.
Conclusion and Future Directions
RL-RC-DoT demonstrates that reinforcement learning can effectively bridge the gap between traditional video compression and modern AI requirements. By operating at the macro-block level and utilizing internal codec statistics, it provides a scalable, real-time solution for task-aware compression.
Future work includes adapting the agent for more modern codecs like H.265 (HEVC), which use more complex coding structures, and addressing the challenges of generalizing policies across different video resolutions.
Summary updated