Spatial-Temporal Memory Networks for Video Object Detection

Fanyi Xiao, Yong Jae Lee

Abstract: We introduce Spatial-Temporal Memory Networks for video object detection. At its core, a novel Spatial-Temporal Memory module (STMM) serves as the recurrent computation unit to model long-term temporal appearance and motion dynamics. The STMM's design enables full integration of pretrained backbone CNN weights, which we find to be critical for accurate detection. Furthermore, in order to tackle object motion in videos, we propose a novel MatchTrans module to align the spatial-temporal memory from frame to frame. Our method produces state-of-the-art results on the benchmark ImageNet VID dataset, and our ablative studies clearly demonstrate the contribution of our different design choices.

Introduction

Detecting objects in video sequences presents unique challenges compared to static image detection. While modern convolutional neural networks (CNNs) excel at identifying objects in clear, high-resolution photos, video frames are frequently degraded by motion blur, low resolution, and unusual object poses.

Standard image detectors treat each video frame as an isolated event. This lack of temporal context leads to "flickering" detections—where a bounding box disappears and reappears—or total failures when an object is momentarily obscured or blurred. Previous attempts to solve this often relied on slow post-processing techniques to link boxes across time or utilized Recurrent Neural Networks (RNNs) that struggled to maintain spatial detail or leverage the power of pre-trained image models. Spatial-Temporal Memory Networks (STMN) address these issues by integrating temporal information directly into the feature-learning process.

Methodology

The STMN architecture is built upon two primary innovations integrated into a standard detection backbone like ResNet or R-FCN:

Spatial-Temporal Memory Module (STMM)

The STMM is a convolutional recurrent unit designed specifically for video object detection. Unlike standard RNNs (such as LSTMs or GRUs) that use Sigmoid or Tanh activation functions, the STMM utilizes ReLU nonlinearities. This design choice is critical because it ensures compatibility with the weights of pre-trained image detectors, allowing the model to benefit from massive static image datasets. To manage the gating mechanism effectively, the authors introduced a modified BatchNorm ($BN^*$) to squash values into a $[0, 1]$ range, enabling the network to selectively "remember" or "forget" features across frames.

MatchTrans Module

Because objects move between frames, a static memory would lead to misaligned features, causing "ghosting" artifacts. The MatchTrans module solves this by computing local affinities (similarities) between the current frame and the previous one. It then warps and aligns the memory to match the current object positions. MatchTrans serves as a lightweight and efficient alternative to heavy optical flow engines, running approximately 10x faster than dedicated networks like FlowNet.

Bi-directional Processing

To maximize accuracy, the network processes video sequences bi-directionally. By aggregating information from both past and future frames, the system can resolve ambiguities in a single frame using context from the entire sequence.

Experimental Results

The model was evaluated on the ImageNet VID dataset, the industry standard for video object detection. To establish a strong visual foundation, the models were pre-trained on the ImageNet DET static image dataset before fine-tuning on video data.

Comparison between STMN and a static-image detector. STMN maintains consistent detection and classification (hamster) while the static detector fluctuates and misidentifies the object as a dog due to motion blur and pose.

Performance Metrics

  • State-of-the-Art Accuracy: STMN achieved 80.5% mAP (mean Average Precision) on the ImageNet VID validation set using a ResNet-101 backbone.
  • Improvement over Baseline: Compared to a static R-FCN detector, the STMN provided a significant +7.1% improvement in accuracy.
  • Ablation Studies: Removing the MatchTrans alignment module resulted in a 1.7% drop in mAP, confirming that spatial alignment is vital for maintaining feature integrity over time.

Key Insights and Conclusion

A central finding of this research is that weight transfer is paramount. Because consecutive video frames are highly redundant, video datasets often lack the visual diversity found in large-scale static image sets. The ability to "plug in" weights from models trained on millions of diverse images is more beneficial than complex recurrent structures that must be trained from scratch.

Furthermore, the qualitative results demonstrate that STMN is remarkably robust. The model successfully detects objects even when they are almost entirely blurred or turned away from the camera by "remembering" their appearance from clearer, preceding frames. While challenges remain for extremely fast-moving or deforming objects (like squirrels or snakes), STMN represents a significant step forward in efficient, end-to-end video object detection.

Summary updated

BibTeX
@inproceedings{xiao2018spatial,
  author = {Fanyi Xiao and Yong Jae Lee},
  title = {{Spatial-Temporal Memory Networks for Video Object Detection}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  url = {https://openreview.net/forum?id=rkg8YKZd-B},
}
Figure