Efficient Video Object Segmentation via Modulated Cross-Attention Memory

Abdelrahman M. Shaker, Syed Talal Wasim, Martin Danelljan, Salman H. Khan, Ming-Hsuan Yang, Fahad Shahbaz Khan

Abstract

Semi-supervised Video Object Segmentation (VOS) has seen significant advancements with Transformer-based architectures. However, these models often suffer from a "memory explosion" problem where GPU memory requirements scale linearly with video length, leading to "Out of Memory" (OOM) errors on long sequences. This paper presents MAVOS, which introduces a Modulated Cross-Attention (MCA) memory mechanism. By utilizing a bounded, dynamic memory update, MAVOS maintains a constant memory footprint and high inference speed regardless of video length. Experimental results show that MAVOS achieves a 7.6× speedup and an 87% reduction in GPU memory usage compared to previous state-of-the-art methods while maintaining top-tier accuracy on benchmarks like DAVIS, LVOS, and LTV.

Introduction

The primary challenge in semi-supervised VOS is tracking and masking specific objects across a video given only the initial frame's mask. While Transformer-based models excel at modeling long-range dependencies, their reliance on ever-expanding memory banks makes them impractical for long-form content. For instance, models like DeAOT-L can see VRAM usage jump from 2 GB to over 24 GB for a 500-frame video. MAVOS addresses this by reimagining how temporal information is stored and retrieved, focusing on efficiency as a primary design goal.

Methods

MAVOS is built upon the Efficient Long Short-Term Transformer (E-LSTT) block. The core innovation is the Modulated Cross-Attention (MCA) memory mechanism. Unlike standard approaches that append every new keyframe to a list, MAVOS maintains a fixed-size memory. It employs a dynamic update rule to integrate new information into the existing long-term memory, effectively summarizing past frames rather than hoarding them.

The MCA module further enhances performance by combining Cross-Attention for global context with Focal Modulation for local, fine-grained details. This dual aggregation allows the model to maintain spatially precise and temporally consistent object representations without the computational overhead of an expanding memory.

MAVOS Architecture Overview: (a) Overall Architecture, (b) E-LSTT Block, and (c) Modulated Cross-Attention (MCA) Memory.

Key Results

The efficiency of MAVOS was evaluated on DAVIS 2017 (short-term), LVOS (long-range), and Long-Time Video (LTV) datasets. On the LVOS dataset, MAVOS operates at 37-40 FPS on a single V100 GPU, significantly outperforming DeAOT-L which runs at approximately 5 FPS. On ultra-long videos, MAVOS reduces GPU memory consumption by 87%, avoiding the OOM errors that plague other models.

Performance comparison of MAVOS against state-of-the-art methods in terms of FPS, GPU memory usage, and accuracy across different video lengths.

In terms of accuracy, MAVOS remains competitive, achieving an 87.4% J&F score on the LTV dataset. Qualitative analysis further indicates that MAVOS is robust to occlusions, maintaining object identity even when targets disappear and reappear. This makes it highly suitable for real-world applications like autonomous driving or long-form movie editing.

Conclusion

MAVOS demonstrates that a bounded, evolving memory is sufficient for high-quality video object segmentation. By prioritizing efficiency alongside accuracy, it provides a practical solution for real-time applications in long-form video processing. Future work will focus on improving robustness against identical-looking objects and extreme, prolonged occlusions, as well as exploring lighter backbones for mobile deployment.

Summary updated

BibTeX
@inproceedings{shaker2025efficient,
  author = {Abdelrahman M. Shaker and Syed Talal Wasim and Martin Danelljan and Salman H. Khan and Ming-Hsuan Yang and Fahad Shahbaz Khan},
  title = {{Efficient Video Object Segmentation via Modulated Cross-Attention Memory}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
  doi = {10.1109/wacv61041.2025.00841},
}
Figure