DFA: Dynamic Feature Aggregation for Efficient Video Object Detection

Yiming CuiarXiv 2022 · DOI

Introduction

Video object detection (VOD) presents unique challenges compared to static image detection, primarily due to temporal artifacts such as motion blur, camera jitter, and out-of-focus frames. To mitigate these issues, state-of-the-art VOD frameworks typically employ feature aggregation, a technique where features from neighboring frames are integrated to enhance the representation of the current frame.

However, current aggregation methods are computationally inefficient because they utilize a fixed temporal window (e.g., 30 neighboring frames) regardless of the video content. This "one-size-fits-all" approach ignores the inherent redundancy in video data; for instance, a slow-moving object requires significantly less temporal context than a fast-moving or blurred one. This paper introduces Dynamic Feature Aggregation (DFA), a plug-and-play module designed to adaptively determine the optimal number of frames for aggregation, significantly improving inference speed with minimal impact on accuracy.

Methodology

The core innovation of DFA lies in its ability to recognize that different objects and motion profiles require varying levels of temporal context. The authors propose two primary versions of the module and a specialized training objective:

1. Vanilla DFA

This version categorizes frames into discrete "buckets" (e.g., slow, medium, or fast) based on predicted motion speed. A lightweight mini-network predicts the motion category for a given frame and selects a corresponding number of frames ($k_v$) for aggregation.

2. Deformable DFA

To address the limitations of discrete bucketing, Deformable DFA utilizes a continuous score ($s$) derived from both motion speed and object size. Small objects are often more susceptible to noise and require more context than large, clear objects. This score is projected via a mapping function to determine the specific frame count. A key advantage of this approach is its reconfigurability: the speed/accuracy trade-off can be adjusted at inference time via configuration files without requiring the model to be retrained.

3. Inplace Distillation Loss

To maintain high performance even when the model selects a low frame count, the authors implement an Inplace Distillation Loss. During training, the model acts as both teacher and student; the "student" (using fewer frames) is forced to mimic the feature representations of the "teacher" (using the full set of frames), ensuring robust feature extraction across all dynamic settings.

Experimental Setup

The DFA module was evaluated using standard benchmarks in the VOD field:

  • ImageNet VID: The primary dataset for video object detection performance.
  • ImageNet DET: Used during training to enhance static feature extraction capabilities.

The module was integrated into several prominent VOD frameworks, including SELSA, FGFA, and Temporal ROI Align, to demonstrate its versatility as a plug-and-play component.

Key Insights

  • Computational Redundancy: The research demonstrates that for slow-moving objects, the cosine similarity between aggregated and non-aggregated features is as high as 0.9819. This confirms that heavy temporal aggregation is often redundant for stable video segments.
  • The Role of Object Size: Unlike previous methods that focused solely on motion, DFA incorporates object size. This is crucial because small objects benefit significantly from increased temporal context to overcome resolution and blur issues.
  • Deployment Flexibility: Because Deformable DFA separates the prediction of motion/size from the decision-making mapping function, the same model can be deployed across different hardware tiers (e.g., high-end GPUs vs. mobile processors) simply by adjusting the mapping parameters.

Results

Integration of DFA led to substantial improvements in inference efficiency on the ImageNet VID validation set:

  • Inference Speedups: The SELSA framework saw a 76% increase in speed (from 5.0 to 9.4 FPS), while FGFA achieved a 31% increase (from 5.8 to 7.9 FPS).
  • Accuracy Preservation: These gains were achieved with negligible loss in Mean Average Precision (mAP). For example, FGFA + Deformable DFA maintained a 46.6 mAP, nearly identical to the original 46.7 mAP.
  • Small Object Accuracy: By specifically accounting for object size, the model showed improved performance on small objects ($AP_s$) compared to baseline versions.

Conclusion and Future Work

DFA provides a highly effective solution for the computational bottlenecks in video object detection. By dynamically scaling temporal context, it eliminates redundant processing while maintaining high detection accuracy.

One identified limitation is a slight performance dip (approximately 0.4%) in "medium" motion scenarios, likely due to complex edge cases like occlusions or rare poses being miscategorized. Future research may explore more sophisticated heuristics beyond motion and size to better handle these ambiguous frames.

Summary updated

BibTeX
@misc{cui2022dfa,
  author = {Yiming Cui},
  title = {{DFA: Dynamic Feature Aggregation for Efficient Video Object Detection}},
  year = {2022},
  eprint = {2210.00588},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.00588},
}
Figure