Abstract
Deep-learning-based video processing has yielded transformative results in recent years. However, the video analytics pipeline is energy-intensive due to high data rates and reliance on complex inference algorithms, which limits its adoption in energy-constrained applications. Motivated by the observation of high and variable spatial redundancy and temporal dynamics in video data streams, we design and evaluate an adaptive-resolution optimization framework to minimize the energy use of multi-task video analytics pipelines. Instead of heuristically tuning the input data resolution of individual tasks, our framework utilizes deep reinforcement learning to dynamically govern the input resolution and computation of the entire video analytics pipeline. By monitoring the impact of varying resolution on the quality of high-dimensional video analytics features, hence the accuracy of video analytics results, the proposed end-to-end optimization framework learns the best non-myopic policy for dynamically controlling the resolution of input video streams to globally optimize energy efficiency. Governed by reinforcement learning, optical flow is incorporated into the framework to minimize unnecessary spatio-temporal redundancy that leads to re-computation, while preserving accuracy. The proposed framework is applied to video instance segmentation which is one of the most challenging computer vision tasks, and achieves better energy efficiency than all baseline methods of similar accuracy on the YouTube-VIS dataset.
Introduction
Deep learning-based video analytics, such as real-time object detection and segmentation, are notoriously power-hungry. This poses a significant hurdle for "edge" devices—such as drones, smart cameras, and IoT sensors—that operate under strict battery constraints. Conventional systems often process every frame at a fixed, high resolution, ignoring the inherent spatial and temporal redundancy in video streams. This research introduces an end-to-end reinforcement learning (RL) framework designed to slash energy consumption by dynamically adjusting resolution without sacrificing accuracy.
The MaskTrackFlow R-CNN Framework
To address these inefficiencies, we developed MaskTrackFlow R-CNN, a framework governed by a Double Deep Q-Network (DDQN).
The framework employs several key strategies to optimize the pipeline:
- Adaptive Resolution via RL: Instead of static rules, resolution selection is modeled as a Markov Decision Process (MDP). An RL agent analyzes current frame features and historical decisions to choose between full resolution ($W \times H$) or downsampled scales ($1/2$, $1/4$, or $1/8$).
- Temporal Bypassing with Optical Flow: Full-resolution frames serve as "key frames." For lower-resolution "non-key frames," the system utilizes Optical Flow (FlowNetC) to propagate high-quality features from the preceding key frame. This allows the system to maintain accuracy while skipping expensive high-resolution processing for the majority of frames.
- Hardware-Aware Reward Function: The RL agent is trained to maximize a reward that balances mean Average Precision (mAP) against energy consumption, modeled on real-world hardware like the Raspberry Pi 3.
Evaluation and Insights
The framework was evaluated using the YouTube-VIS (Video Instance Segmentation) dataset, which requires simultaneous object detection, classification, and pixel-level segmentation.
A critical observation of this work is task-specific sensitivity. While object detection is relatively robust to low resolution, semantic segmentation is highly sensitive. By using RL, the system learns a "non-myopic" policy—it doesn't just optimize for the current frame but understands how a resolution decision now affects the accuracy and energy of future frames.
Key Results
- Massive Energy Savings: The framework achieved an 84.0% reduction in energy consumption compared to processing everything at full resolution.
- Minimal Accuracy Trade-off: This energy saving resulted in only a marginal 0.3% drop in mAP (41.4% vs. 41.7% for the baseline).
- Superiority over Heuristics: The RL-based approach consistently outperformed fixed-interval downsampling and "Digital Foveation" strategies across all energy-accuracy trade-off points.
- Efficiency of the Agent: The RL policy network itself is extremely lightweight, accounting for only about 4.2% of the total energy consumption.
Conclusion
By leveraging reinforcement learning and optical flow, MaskTrackFlow R-CNN provides a scalable solution for energy-efficient video analytics on edge devices. While the current model is grounded in Raspberry Pi hardware, the approach demonstrates that high-resolution features and temporal awareness can effectively replace the need for high-resolution pixels in the majority of video frames.
Summary updated