Deep Feature Flow for Video Recognition

Xizhou Zhu, Yuwen Xiong, Jifeng Dai, Lu Yuan, Yichen Wei

Abstract

Deep convolutional neural networks have achieved great success on image recognition tasks. Yet, it is non-trivial to transfer the state-of-the-art image recognition networks to videos as per-frame evaluation is too slow and unaffordable. We present deep feature flow, a fast and accurate framework for video recognition. It runs the expensive convolutional sub-network only on sparse key frames and propagates their deep feature maps to other frames via a flow field. It achieves significant speedup as flow computation is relatively fast. The end-to-end training of the whole architecture significantly boosts the recognition accuracy. Deep feature flow is flexible and general. It is validated on two recent large scale video datasets. It makes a large step towards practical video recognition.

Introduction

While Deep Convolutional Neural Networks (CNNs) have revolutionized image recognition, applying them to video remains a massive computational challenge. Most state-of-the-art models process videos "per-frame," which is redundant and slow because video content changes gradually. Previous attempts to exploit this temporal redundancy either increased the computational burden (by adding complex temporal layers) or suffered from significant accuracy drops (by simply "copying" features from previous frames without accounting for motion).

Deep Feature Flow (DFF) addresses this by finding a way to make video recognition fast enough for real-time applications, like autonomous driving, without sacrificing the high-level semantic understanding provided by deep CNNs.

Methodology

The core idea of DFF is to decompose a standard recognition network into two parts: a heavy feature network ($N_{feat}$) and a lightweight task network ($N_{task}$).

  1. Key Frame Processing: For a designated key frame, the model runs the full pipeline ($N_{feat}$ followed by $N_{task}$).
  2. Feature Propagation: For subsequent non-key frames, the model doesn't run $N_{feat}$. Instead, it uses a fast flow network ($F$) to estimate the motion (optical flow) between the key frame and the current frame.
  3. Spatial Warping: The feature maps from the key frame are "warped" using the estimated flow to align with the current frame.
  4. Scale Field: To handle inaccuracies in flow or occlusions, a learned "scale field" modulates the propagated features.
  5. End-to-End Training: Crucially, the flow network and the recognition networks are trained together. This ensures the flow is optimized specifically to move semantic features correctly, rather than just matching pixels.
Visualization of the estimated flow field used for feature propagation.

Key Insights

  • Features are Warpable: Deep feature maps preserve spatial correspondences. Just as you can warp pixels to account for motion, you can warp high-level features. Because these features are at a lower resolution than the input image, the warping process is extremely cheap.
  • The "Task" is Light: In modern architectures like ResNet, the vast majority of computation happens in the early and middle layers ($N_{feat}$). The final layers ($N_{task}$) are often very thin. DFF exploits this by only skipping the "heavy" part.
  • Task-Oriented Flow: By training a flow network end-to-end with the recognition task, the model learns a "semantic flow" that is both faster and more effective for recognition than traditional methods.
Deep feature maps for different semantic categories (e.g., cars and pedestrians) demonstrate how the network captures high-level information that can be propagated across frames.

Evaluation and Results

The authors evaluated DFF on two major benchmarks: Cityscapes (semantic segmentation) and ImageNet VID (object detection). The Flying Chairs dataset was used for pre-training the flow network.

  • Massive Speedup: DFF achieves unprecedented speeds. On ImageNet VID, using a ResNet-101 backbone, the system jumped from 4.05 fps (per-frame) to over 20 fps (with a key-frame interval of 10), a 5x increase. With lighter flow networks, speedups reached 10x.
  • Graceful Degradation: The accuracy loss is remarkably low. For semantic segmentation on Cityscapes, the mIoU only dropped from 71.1% to 69.2% while running significantly faster.
  • Joint Training is Essential: Training the flow and recognition networks together significantly outperforms using fixed, pre-computed flow.

Conclusion and Future Work

DFF represents a significant step toward practical video recognition. However, some limitations remain. The current version uses a fixed key-frame interval; an adaptive scheduler that triggers new key frames based on scene changes would be more efficient. Additionally, the system is limited by the flow network's ability to handle complex motions over long intervals. Future work could explore semi-supervised ways to improve flow estimation in contexts where ground truth is unavailable.

Summary updated

BibTeX
@inproceedings{zhu2017deep,
  author = {Xizhou Zhu and Yuwen Xiong and Jifeng Dai and Lu Yuan and Yichen Wei},
  title = {{Deep Feature Flow for Video Recognition}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=BJbTBpZdbS},
}
Figure