AdaFrame: Adaptive Frame Selection for Fast Video Recognition

Zuxuan Wu, Caiming Xiong, Chih-Yao Ma, Richard Socher, Larry S. Davis

Abstract

We present AdaFrame, a framework that adaptively selects relevant frames on a per-input basis for fast video recognition. AdaFrame contains a Long Short-Term Memory network augmented with a global memory that provides context information for searching which frames to use over time. Trained with policy gradient methods, AdaFrame generates a prediction, determines which frame to observe next, and computes the utility, i.e., expected future rewards, of seeing more frames at each time step. At testing time, AdaFrame exploits predicted utilities to achieve adaptive lookahead inference such that the overall computational costs are reduced without incurring a decrease in accuracy. Extensive experiments on two large-scale video benchmarks, FCVID and ActivityNet, show that AdaFrame matches the performance of using all frames with only 8.21 and 8.65 frames, respectively. We further qualitatively demonstrate that learned frame usage indicates the difficulty of making classification decisions; easier samples need fewer frames while harder ones require more.

Introduction

Deep learning models for video recognition are notoriously computationally expensive. Standard approaches typically process every single frame or use uniform sampling, which is inefficient due to visual redundancy and variable difficulty across scenes. Recognizing a static "Cathedral" might only take one frame, whereas distinguishing "Drinking Coffee" from "Drinking Beer" requires observing specific temporal nuances. Most video datasets are "weakly labeled," meaning we lack ground-truth labels for which specific frames are most important. AdaFrame addresses this by learning an optimal, per-video "glimpsing" strategy without explicit supervision.

Methodology

The AdaFrame architecture centers on a Memory-Augmented LSTM that acts as an agent interacting with the video.

The AdaFrame architecture featuring a memory-augmented LSTM and global context.

Key components include:

  • Global Memory: A lightweight network (MobileNetV2) scans a downsampled version of the entire video to provide a "global context" that the LSTM can query.
  • Selection Network: Using policy gradients, this component predicts the index of the next frame to observe, allowing the model to "jump" forward or backward in time.
  • Utility Network: This "lookahead" mechanism calculates the expected future reward (improvement in confidence) of observing more frames.
  • Adaptive Lookahead Inference: At test time, if the predicted utility of seeing more frames falls below a threshold, the model exits early, significantly saving GFLOPs.

Experimental Results

AdaFrame was evaluated on the Fudan-Columbia Video Dataset (FCVID) and ActivityNet (v1.3). These benchmarks are challenging due to their length and the presence of "filler" content.

Performance comparison of AdaFrame against various baselines on FCVID and ActivityNet.

As shown in the performance curves, AdaFrame consistently outperforms uniform sampling (AvgPooling) and standard LSTMs. On FCVID, it matched full-frame accuracy using only 8.21 frames on average—a 58.9% reduction in computation. On ActivityNet, it achieved 71.5% mAP, surpassing a standard LSTM (70.4% mAP) using the same frame count. The margin parameter $\mu$ allows for flexible trade-offs between speed and accuracy.

Discussion

The success of AdaFrame stems from Context-Guided Search and Utility as a Stop Signal. By leveraging global context, the model identifies "money shots" more effectively. Using predicted utility rather than current confidence for stopping allows for Difficulty-Aware Processing. Static scenes are solved quickly, while complex tasks like "Making Egg Tarts" naturally trigger more extensive frame sampling.

Conclusion

AdaFrame offers a significant step toward efficient video recognition. While the global memory pass introduces some overhead, the overall computational savings are substantial. Future work could adapt this framework for streaming scenarios or extend it to Temporal Action Localization tasks.

Summary updated

BibTeX
@inproceedings{wu2019adaframe,
  author = {Zuxuan Wu and Caiming Xiong and Chih-Yao Ma and Richard Socher and Larry S. Davis},
  title = {{AdaFrame: Adaptive Frame Selection for Fast Video Recognition}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  url = {https://openreview.net/forum?id=XfBq_xjqPmM},
}
Figure