Beyond Boxes: Mask-Guided Spatio-Temporal Feature Aggregation for Video Object Detection

Khurram Azeem Hashmi, Talha Uddin Sheikh, Didier Stricker, Muhammad Zeshan Afzal

Introduction

Detecting objects in video is significantly more challenging than in static images due to motion blur, rare poses, and frequent occlusions. To mitigate these issues, researchers typically employ "temporal aggregation"—leveraging information from surrounding frames to enhance the detection of an object in the current frame.

The prevailing paradigm has been to aggregate features from region proposals, typically defined by bounding boxes. However, bounding boxes are inherently "noisy," often encompassing significant background pixels (e.g., a bear in a forest). Aggregating these boxes across multiple frames compounds this background noise, leading to high intra-class variance where features for the same object type vary wildly due to changing surroundings.

Comparison of feature aggregation paradigms: (a) Box-level, (b) Frame-level, (c) Proposal-level, and (d) the proposed Instance Mask-level aggregation.

The FAIM Framework

Researchers from DFKI have introduced FAIM (Feature Aggregation by leveraging Instance Mask features), a novel framework that shifts the focus from bounding boxes to instance masks. By aggregating features based on the precise boundaries of an object, FAIM suppresses background noise and achieves a superior speed-accuracy trade-off: 87.9% mAP at 33 FPS on a single 2080Ti GPU.

Core Modules

FAIM, built upon the YOLOX detector, introduces three key components:

  1. Instance Feature Extraction Module (IFEM): A lightweight module that projects video features into a space optimized for instance masks.
  2. Feature Prediction Selection Module (FPSM): Filters low-confidence proposals and uses Non-Maximum Suppression (NMS) to select the most relevant $n$ proposals for aggregation, ensuring computational efficiency.
  3. Temporal Instance Classification Aggregation Module (TICAM): The central module that utilizes multi-head attention to aggregate classification and instance mask features across a temporal window.

Overcoming Data Scarcity with Pseudo-Masks

A significant challenge for mask-based VOD is the lack of mask annotations in standard datasets. FAIM addresses this by utilizing pseudo-ground truth masks generated by off-the-shelf models like SAM (Segment Anything Model) or Box2Mask during training. This allows the model to learn mask-guided features without requiring manual labeling.

Key Results and Insights

FAIM demonstrates that instance masks act as effective spatial filters. By suppressing background features during the aggregation step, the model produces much "cleaner" clusters in the feature space.

Performance Benchmarks

  • State-of-the-Art Accuracy: FAIM-X achieved 87.9% mAP on the ImageNet VID benchmark, outperforming the previous state-of-the-art by 0.7% while maintaining real-time performance.
  • Robustness to Occlusion: On the occlusion-heavy OVIS dataset, FAIM-X showed a significant gain of +1.9 points in AP50 over the baseline, proving the value of mask-guidance when objects are partially hidden.
  • Versatility: The mask-guided aggregation is method-agnostic; integrating it into other frameworks like SELSA or TROIA provided consistent performance boosts (>1% mAP). Furthermore, it improved Multi-Object Tracking Accuracy (MOTA) by up to 1.7 points when integrated with algorithms like ByteTrack.

Conclusion and Future Work

FAIM proves that high-quality mask-based feature aggregation is possible with negligible impact on inference speed (approx. 0.3ms increase). While the current self-attention mechanism in TICAM has quadratic complexity—limiting the number of aggregated proposals—it sets a new standard for efficient VOD. Future research may explore unified frameworks that fully integrate detection, tracking, and segmentation, particularly for scenarios where mask data is entirely unavailable.

Summary updated

BibTeX
@inproceedings{hashmi2025beyond,
  author = {Khurram Azeem Hashmi and Talha Uddin Sheikh and Didier Stricker and Muhammad Zeshan Afzal},
  title = {{Beyond Boxes: Mask-Guided Spatio-Temporal Feature Aggregation for Video Object Detection}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
  doi = {10.1109/wacv61041.2025.00788},
}
Figure