XMem: Long-Term Video Object Segmentation with an Atkinson-Shiffrin Memory Model

Ho Kei Cheng, Alexander G. Schwing

Abstract

We present XMem, a video object segmentation architecture for long videos with unified feature memory stores inspired by the Atkinson-Shiffrin memory model. Prior work on video object segmentation typically only uses one type of feature memory. For videos longer than a minute, a single feature memory model tightly links memory consumption and accuracy. In contrast, following the Atkinson-Shiffrin model, we develop an architecture that incorporates multiple independent yet deeply-connected feature memory stores: a rapidly updated sensory memory, a high-resolution working memory, and a compact thus sustained long-term memory. Crucially, we develop a memory potentiation algorithm that routinely consolidates actively used working memory elements into the long-term memory, which avoids memory explosion and minimizes performance decay for long-term prediction. Combined with a new memory reading mechanism, XMem greatly exceeds state-of-the-art performance on long-video datasets while being on par with state-of-the-art methods (that do not work on long videos) on short-video datasets.

Introduction

Video Object Segmentation (VOS) is a fundamental computer vision task that requires a system to track and generate pixel-accurate masks for specific objects across a video sequence, typically initialized from a single annotated frame. To maintain accuracy, models must "remember" the object's appearance as it undergoes transformations, rotations, or temporary occlusions.

Existing state-of-the-art methods, such as Space-Time Memory (STM) networks, generally rely on a single feature memory store. This approach creates a significant bottleneck for long-form video: storing every past frame leads to a "memory explosion" that can exceed GPU capacity in less than a minute. Conversely, aggressively discarding or compressing old frames results in "accuracy decay," where the model loses the object's identity over time. XMem addresses this fundamental trade-off by drawing inspiration from cognitive psychology, specifically the Atkinson-Shiffrin memory model.

The XMem Architecture

XMem introduces a unified multi-store memory architecture that categorizes information based on its temporal relevance and required resolution.

Multi-Store Memory

The architecture is composed of three distinct yet deeply connected memory stores:

  • Sensory Memory: Implemented as a Gated Recurrent Unit (GRU), this store updates at every frame. It is responsible for maintaining temporal smoothness and handling low-level details, though it is susceptible to drift over long durations.
  • Working Memory: This high-resolution buffer stores features from a subset of recent frames. It provides the sharp spatial information necessary for accurate boundary segmentation.
  • Long-term Memory: This compact store allows XMem to retain information over thousands of frames. When the working memory reaches its capacity, XMem employs a Memory Potentiation algorithm to consolidate active features.
XMem provides robust, pixel-accurate segmentation masks across long video sequences by utilizing a hierarchical memory model.

Memory Management and Reading

A key innovation in XMem is the Memory Potentiation step. Instead of simple sub-sampling, which can cause aliasing and loss of detail, XMem aggregates information from neighboring features in a high-dimensional key space to create "prototypes." This acts as a form of anti-aliasing in feature space.

To retrieve information, XMem uses an Anisotropic L2 Similarity mechanism. This includes two scaling terms: shrinkage, which encodes element-level confidence, and selection, which controls the importance of specific feature channels. Finally, to prevent the long-term memory from growing indefinitely, a usage-based eviction policy tracks the frequency of memory element access and removes the least-frequently-used (LFU) elements.

Experimental Results

The authors evaluated XMem across several standard and long-term benchmarks, demonstrating its robustness and efficiency.

Performance Benchmarks

  • Long-Term Robustness: On the Long-time Video dataset (featuring sequences of 7,000+ frames), XMem achieved a 90.0 J&F score, significantly outperforming the previous state-of-the-art, STCN (84.6).
  • Short-Term Accuracy: XMem remains a top performer on standard benchmarks like DAVIS 2017 (86.2 J&F) and YouTubeVOS 2018 (85.7 G-score), proving that its long-term optimizations do not compromise short-term precision.

Efficiency and Scalability

XMem is designed for practical deployment. It operates at 22-30 FPS on standard hardware and maintains a bounded memory footprint. The model can process up to 34,000 frames on a 6GB GPU, with the long-term store consuming less than 1.4GB of RAM. This makes it viable for consumer-grade hardware and potentially mobile applications.

Conclusion

XMem successfully bridges the gap between short-term precision and long-term stability in video object segmentation. By mimicking the hierarchical nature of human memory, the framework avoids the memory explosion typical of previous methods while maintaining high accuracy. While future work is needed to address failures during extremely rapid motion or severe blur, XMem represents a significant step forward in enabling robust, long-form video understanding.

Summary updated

BibTeX
@inproceedings{cheng2022xmem,
  author = {Ho Kei Cheng and Alexander G. Schwing},
  title = {{XMem: Long-Term Video Object Segmentation with an Atkinson-Shiffrin Memory Model}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=NRU14tiJdP},
}
Figure