THIA: Accelerating Video Analytics using Early Inference and Fine-Grained Query Planning

Jiashen Cao, Ramyad Hadidi, Joy Arulraj, Hyesoon KimarXiv 2021

Introduction

The proliferation of video data from surveillance, traffic monitoring, and IoT devices has created a massive demand for efficient video analytics. However, the computational cost of running heavy Deep Neural Networks (DNNs) on every frame is often prohibitive. Traditional approaches to mitigate this cost generally fall into two categories: specialized models and filtering. Specialized models are lightweight versions of heavy DNNs trained for specific tasks (e.g., car counting), but they often fail on "hard" frames containing small or occluded objects. Filtering uses a tiny model to discard "empty" frames, but this strategy loses its effectiveness in high-traffic scenarios where events are frequent and few frames can be safely discarded.

Furthermore, existing systems that attempt to switch between models of varying sizes (model cascades) suffer from significant GPU memory footprints and high switching overhead. THIA addresses these challenges by introducing a unified architecture that leverages early inference and fine-grained planning to optimize both speed and accuracy.

The THIA Framework

THIA (Temporal-aware Hierarchical Inference Architecture) moves away from the multi-model paradigm. Instead, it utilizes a single object detection backbone instrumented with multiple "Exit Points" (EPs). This allows the system to dynamically adjust the depth of processing based on the complexity of the visual data.

The THIA architecture overview, highlighting fine-grained planning, the EP estimator, and the early inferencing backend.

Core Innovations

  1. Early Inference (EI): By using a single backbone (such as Faster-RCNN) with multiple exits, THIA shares parameters across different processing depths. If a frame is determined to be "easy," the model exits early; if it is "hard," it continues to deeper layers. This approach eliminates the overhead of loading and switching between different models and significantly reduces the GPU memory footprint (e.g., from 5GB down to 2GB).
  2. Fine-Grained Query Planning: Unlike systems that apply a uniform strategy to an entire video, THIA divides video streams into small "chunks." It dynamically selects the optimal EP for each chunk. This allows the system to exploit temporal locality—the fact that objects move and change in difficulty over time (e.g., a car becoming easier to detect as it approaches the camera).
  3. Exit Point Estimation (EP-Est): To minimize the overhead of the planning phase itself, THIA employs a lightweight, two-layer neural estimator. This component analyzes initial features from the backbone to predict the necessary EP for a given chunk, preventing the system from "overthinking" its execution strategy.

Comparison with State-of-the-Art

THIA represents a significant evolution over previous systems like PP and BlazeIt. While earlier systems focused primarily on model selection or filtering, THIA integrates early inference and fine-grained planning into a cohesive unit.

Comparison of THIA variants against baseline systems (Naive, PP, BlazeIt) across different optimization features.

As shown in the feature comparison above, THIA is the first system to combine Early Inference (EI) with an Exit Point Estimator (EP-Est) and Fine-Grained Planning (FP). This combination allows it to handle both rare and frequent events with high efficiency.

Evaluation and Key Results

The authors evaluated THIA using the UA-DETRAC and Jackson Town traffic datasets, focusing on vehicle detection queries. The results demonstrate that THIA achieves up to a 6.5x speedup over state-of-the-art methods while maintaining high accuracy (F-1 scores > 0.9).

Key insights from the evaluation include:

  • Handling Frequent Events: In scenarios where filters fail because objects are present in almost every frame, THIA still delivers a 4x speedup by utilizing shallow EPs for easy-to-detect frames.
  • Efficiency vs. Accuracy: THIA maintains the accuracy of heavy "Oracle" models because it can always fall back to deeper layers when the estimator detects complex scenes.
  • Training Strategy: To ensure the effectiveness of early exits, THIA uses a top-down training approach, optimizing the deepest layers first to ensure high-quality feature extraction before fine-tuning shallower exits.

Conclusion

THIA demonstrates that the key to accelerating video analytics lies in flexibility and fine-grained control. By replacing rigid model cascades with a single, multi-exit backbone and a smart neural estimator, THIA provides a scalable solution for real-time video processing. Future work will focus on expanding THIA to support more complex aggregate queries and exploring even lighter-weight statistical methods for exit point estimation.

Summary updated

BibTeX
@misc{cao2021thia,
  author = {Jiashen Cao and Ramyad Hadidi and Joy Arulraj and Hyesoon Kim},
  title = {{THIA: Accelerating Video Analytics using Early Inference and Fine-Grained Query Planning}},
  year = {2021},
  eprint = {2102.08481},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.08481},
}
Figure