Finding Interesting Frames in Deep Video Analytics: a Top-K Approach

Ziliang Lai, Chenxia Han, Chris Liu, Pengfei Zhang, Eric Lo, Ben KaoarXiv 2020

TL;DR

Everest is the first video analytics system designed specifically for efficient and accurate Top-K queries (e.g., "find the top 10 frames with the most cars"). By treating deep learning model uncertainty as a first-class citizen and using an intelligent "online data cleaning" loop, Everest delivers rigorous probabilistic guarantees while achieving a 14.3× to 20.6× speedup over standard brute-force video scanning.

What Problem Does This Paper Address?

Deep Convolutional Neural Networks (CNNs) excel at extracting rich semantics from video data, such as counting objects or estimating depth. However, running state-of-the-art models on every frame of a video is computationally crushing—often running several times slower than real-time video playback.

To bypass this bottleneck, existing video analytics systems use "CNN specialization," training a lightweight, query-specific model to quickly filter out irrelevant frames before passing a small subset to an expensive, highly accurate "oracle" model. While this works well for simple selection queries (e.g., "find frames containing a bus"), it fails for Top-K queries.

Determining whether a frame belongs in the Top-K requires comparing its score against all other frames in the video. You cannot simply short-circuit the evaluation of an individual frame in isolation. Furthermore, existing systems discard the rich uncertainty information (like softmax probability distributions) generated by lightweight models, throwing away data that could help optimize these global comparisons.

Methods

Everest solves this challenge using a two-phase framework that bridges the gap between uncertain data management and deep computer vision.

Figure 1: System Overview

Phase 1: Building the Uncertain Relation

First, a difference detector filters out highly similar consecutive frames to ensure data independence. The remaining unique frames are passed to a specialized Convolutional Mixture Density Network (CMDN). Instead of predicting a single point-estimate score, the CMDN outputs a continuous probability distribution (a Gaussian mixture) representing the estimated score and its uncertainty. This distribution is quantized to form an initial uncertain relation database.

Figure 2: Everest uses a Convolutional Mixture Density Network as a proxy scorer

Phase 2: Oracle-in-the-Loop Data Cleaning

Using the uncertain database, Everest calculates the probability of the current top-ranked frames being the true Top-K. If this confidence score falls below a user-defined threshold (e.g., 90%), Everest enters an intelligent cleaning loop:

  1. Candidate Selection: It calculates which uncertain frame, if verified, would most significantly boost the overall confidence score.
  2. Oracle Verification: It runs the expensive, ground-truth oracle model (e.g., YOLOv3) on that specific frame to eliminate its uncertainty.
  3. Certain-Result Condition: Crucially, Everest enforces that any frame returned in the final Top-K must be verified by the oracle. This prevents returning a "probabilistic" top frame that actually contains zero objects upon visual inspection.

This loop repeats iteratively until the system can mathematically guarantee that the Top-K results meet the user's confidence threshold.

Datasets

The authors evaluated Everest using three distinct types of video data:

  • Real-World Fixed Cameras: Traffic and surveillance footage including Archie (cars), Grand-Canal (boats), and Taipei-bus (cars).
  • Real-World Moving Cameras: YouTube footages Daxi-old-street (pedestrians) and Irish-Center (cars).
  • Dashcam Videos: Dashcam-California and Dashcam-Greenport, used to evaluate a 3D-depth estimation task for tailgating detection.
  • Synthetic Benchmark: Videos generated using the Visual Road benchmark, allowing the authors to precisely control and test the impact of varying object densities.

Key Insights and Ideas

  • Uncertainty is an Asset, Not a Liability: Traditional systems discard the probability distributions from lightweight models, keeping only the most likely answer. Everest proves that treating these distributions as first-class citizens allows database algorithms to calculate exact confidence bounds and minimize expensive oracle calls.
  • The Exponential Confidence Jump: The mathematical formulation reveals that the system's confidence in its Top-K selection scales exponentially with the number of frames cleaned. In practice, it takes 99% of the iterations to cross a 50% confidence threshold, but only 1% more to shoot up to a 99% confidence threshold. This means users get high-certainty guarantees almost for free once the baseline work is done.
  • Window-Based Aggregation: The authors extended their probabilistic model from single frames to "tumbling windows" (e.g., 5-second clips). By leveraging the Central Limit Theorem, they successfully approximated window scores as independent Gaussian distributions, making window-based Top-K queries highly efficient.

Key Results

  • Massive Speedups: Everest achieved 14.3× to 20.6× higher efficiency than the naive scan-and-test baseline across all real-world datasets.
  • High Accuracy: The system consistently met or exceeded user expectations. For a target threshold of 0.9 ($thres=0.9$), the actual query precision was reliably above 90%, paired with exceptionally low rank distances and score errors.
  • Baseline Domination: Everest vastly outperformed alternative approaches. Traditional computer vision methods (like HOG) and lightweight-only models (like TinyYOLOv3) yielded near-zero precision because their score errors ruined relative rankings. Adapting existing selection-only systems (like NoScope) via a range-query workaround proved impractical and just as slow as a full scan.

Limitations and Future Work

Currently, Everest operates as a standalone system focused exclusively on ranking and Top-K operations. The authors note that a natural next step is integrating Everest's probabilistic engine into more expressive, declarative video query languages and libraries like FrameQL or Rekall. Additionally, they plan to scale the system out using distributed big data frameworks like Apache Spark and explore extending the underlying logic to support complex skyline queries over uncertain video data.

Summary updated

BibTeX
@misc{lai2020finding,
  author = {Ziliang Lai and Chenxia Han and Chris Liu and Pengfei Zhang and Eric Lo and Ben Kao},
  title = {{Finding Interesting Frames in Deep Video Analytics: a Top-K Approach}},
  year = {2020},
  eprint = {2003.00773},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.00773},
}
Figure