ApproxNet: Content and Contention Aware Video Analytics System for the Edge

Ran Xu, Jinkyu Koo, Rakesh Kumar, Peter Bai, Subrata Mitra, Ganga Maghanath, Saurabh Bagchi

Introduction

Deploying state-of-the-art Deep Neural Networks (DNNs) on edge devices—such as smartphones and IoT cameras—presents a significant challenge. These models are often computationally intensive, leading to high latency and rapid battery depletion. While approximate computing techniques have been proposed to mitigate these issues, existing solutions often suffer from high switching overheads when transitioning between different models in an ensemble. Furthermore, many systems fail to dynamically adapt to varying video content complexity or fluctuating hardware resource contention caused by background processes.

ApproxNet addresses these limitations by introducing a specialized video object classification system that utilizes a single, adaptive neural network. By incorporating "tuning knobs" for image resolution and model depth, ApproxNet can adjust its execution path in real-time, balancing accuracy and efficiency based on environmental conditions.

The ApproxNet Architecture

The foundation of ApproxNet is a single-model adaptive DNN, based on the ResNet-34 architecture, which supports two primary approximation knobs:

  1. Input Shape (Resolution): The system can dynamically downsample input frames to various sizes, ranging from 224x224 to 80x80.
  2. Outport Depth (Early Exits): The model includes six "outports" at different layers, allowing it to provide a prediction early if the content is simple or resources are constrained.

To enable these features within a single set of weights, ApproxNet employs several key components:

  • Spatial Pyramid Pooling (SPP): This layer allows the network to process different input resolutions without architectural redesign.
  • Frame Complexity Estimator (FCE): A lightweight module that uses edge maps and scene change detection to estimate the difficulty of classifying a given frame.
  • Resource Contention Estimator (RCE): This component monitors the latency of recent frames to infer background system load without requiring deep OS-level access.
  • Scheduler: An online optimizer that selects the optimal combination of resolution and depth to meet user-defined performance targets, such as a specific frame rate or accuracy threshold.
Figure 1: ApproxNet adapts its resolution and depth based on content complexity. Simple frames (a) can be correctly classified even at lower resolutions and earlier layers, whereas complex frames (b) require higher fidelity and deeper processing.

Key Insights

A critical realization in the design of ApproxNet is that content matters. As illustrated in Figure 1, simple frames (e.g., a clear shot of a helicopter) can be accurately classified using lower resolutions and early exits. In contrast, complex frames (e.g., animals in a natural environment) require the full depth and resolution of the model. By exploiting this variance, ApproxNet saves significant computational resources.

Furthermore, by using a single model rather than an ensemble, ApproxNet eliminates the "loading penalty" associated with switching weights in memory. Transitions between configurations occur in milliseconds, ensuring stable performance. The system also leverages temporal continuity in video; it only re-evaluates frame complexity when a scene change is detected, further reducing overhead.

Evaluation and Results

ApproxNet was evaluated using the ImageNet VID and ImageNet IMG datasets, along with real-world YouTube case studies. Key performance metrics include:

  • Real-Time Throughput: The system consistently achieved 30 FPS on an NVIDIA Jetson TX2, even under significant CPU/GPU contention.
  • Efficiency and Speed: ApproxNet demonstrated a 7.0x to 8.2x speedup over MCDNN (a multi-model system) and consumed approximately 15% less memory by avoiding backbone duplication.
  • Stability: Unlike competing systems that exhibit latency spikes during mode switches, ApproxNet maintained predictable and stable latency.

Conclusion and Future Work

ApproxNet represents a significant step forward in edge-based video analytics, providing a robust framework for content- and contention-aware approximation. While the current implementation focuses on object classification, future work aims to extend this architecture to object detection (ApproxDet) and explore the use of reinforcement learning for even more sophisticated scheduling. Despite the increased training complexity required for an "all-in-one" model, the resulting gains in efficiency and stability make it a compelling solution for resource-constrained environments.

Summary updated

BibTeX
@article{xu2022approxnet,
  author = {Ran Xu and Jinkyu Koo and Rakesh Kumar and Peter Bai and Subrata Mitra and Ganga Maghanath and Saurabh Bagchi},
  title = {{ApproxNet: Content and Contention Aware Video Analytics System for the Edge}},
  journal = {ACM Trans. Sens. Networks},
  year = {2022},
  url = {https://openreview.net/forum?id=YHYmTvZqfG},
}
Figure