MatAnyone: Stable Video Matting with Consistent Memory Propagation

Peiqing Yang, Shangchen Zhou, Jixin Zhao, Qingyi Tao, Chen Change Loy · DOI · OpenReview

TL;DR

MatAnyone tackles the challenge of stable video matting by introducing a novel memory propagation mechanism that adaptively fuses information from previous frames, ensuring semantic consistency in core regions and fine details at object boundaries. This is complemented by a new, larger dataset and a training strategy that leverages segmentation data for improved robustness, leading to state-of-the-art performance in diverse real-world scenarios.

What Problem Does This Paper Address?

Video matting, the process of extracting a precise foreground object from a video, is notoriously difficult, especially when dealing with complex or ambiguous backgrounds. Auxiliary-free methods, which rely only on input frames, often struggle with these challenges, leading to noisy or incomplete results. Existing approaches often fail to maintain temporal consistency, resulting in flickering or object drift. Furthermore, the scarcity of high-quality, diverse video matting datasets and the difficulty of annotating them pose significant hurdles for training robust models. This paper addresses these issues by proposing a method that can reliably produce high-quality alpha mattes for a specified target object throughout a video, even in challenging conditions.

Methods

The core of MatAnyone is its Consistent Memory Propagation (CMP) module. This module builds upon a memory-based paradigm, common in video object segmentation, but enhances it for matting. Key innovations include:

  • Region-Adaptive Memory Fusion: Instead of treating all parts of an image equally, MatAnyone distinguishes between "core" regions (where semantic stability is crucial) and "boundary" regions (where fine details like hair are important). It adaptively fuses memory from previous frames based on whether a region is likely to have changed significantly (boundary) or remained stable (core). This is achieved through a lightweight "change probability" prediction module.
  • Alpha Memory Bank: Unlike previous methods that might store segmentation masks or trimaps in memory, MatAnyone stores the alpha matte itself. This direct storage of the matting output is believed to improve stability.
  • Object Transformer: To group pixel memories by object-level semantics and improve robustness against noise, an object transformer (inspired by Cutie) is employed.
  • Enhanced Decoder: The decoder is enriched with more upsampling layers to better capture fine boundary details, which are critical for matting.
  • Novel Training Strategy: To overcome data limitations, MatAnyone uses a two-pronged approach:
  • Core-area Supervision: It leverages large-scale real segmentation data (COCO, SPD, YouTubeVIS) to supervise the matting head directly, improving semantic accuracy and robustness. This is achieved using a scaled DDC loss for boundary regions, which is an adaptation of a previous method to better suit matting.
  • Recurrent Refinement: During inference, an optional module iteratively refines the first frame's alpha matte, improving robustness to initial mask quality and enhancing details.

Datasets

  • VM800 (New Training Dataset): This dataset is introduced to address the limitations of existing video matting datasets. It is described as twice as large, more diverse (in terms of foregrounds, sources, and motion), and of higher quality than VideoMatte240K.
  • YouTubeMatte (New Test Dataset): A new synthetic benchmark created from YouTube videos, it is significantly larger and more diverse than existing benchmarks, featuring higher resolution and more challenging harmonized backgrounds.
  • VideoMatte240K [32]: Used for training and comparison.
  • Real-world benchmarks: A subset of 25 real-world videos from [33] are used for evaluation, with frame-wise segmentation masks generated by VOS methods serving as ground truth for core regions.

Key Insights and Ideas

  • The importance of distinguishing core vs. boundary regions: Treating these regions differently in memory fusion is key to achieving both semantic stability and fine detail.
  • Directly leveraging segmentation data for matting supervision: Instead of using segmentation as a separate auxiliary task, integrating it directly into the matting loss (especially for core regions) significantly boosts semantic accuracy and robustness.
  • Alpha mattes as memory: Storing the alpha matte directly in the memory bank, rather than intermediate representations like trimaps, appears to be more effective for temporal consistency in matting.
  • The limitations of synthetic data: The paper highlights issues with existing synthetic datasets (like VideoMatte240K) regarding reflective regions and inhomogeneous core regions, underscoring the need for higher quality data and careful manual selection.

Key Results

  • Quantitative Performance: MatAnyone achieves state-of-the-art results across various benchmarks, including VideoMatte and YouTubeMatte. It demonstrates superior performance in metrics like MAD (mean absolute difference) and dtSSD (temporal coherence), indicating both spatial accuracy and temporal stability. For instance, on the YouTubeMatte (1920x1080) benchmark, it achieves the best MAD (2.37) and dtSSD (1.19).
  • Qualitative Performance: Visual comparisons show MatAnyone significantly outperforming existing methods (RVM, FTP-VM, MaGGIe) in detail extraction and semantic accuracy. It excels at tracking objects stably, even in complex scenes with fast motion or similar foreground/background colors, and handles challenging cases like multiple objects effectively. The recurrent refinement also produces results comparable to image matting methods.

Limitations and Future Work

  • Limitations: The paper acknowledges that while their new dataset VM800 is an improvement, the scarcity of real-world video matting data remains a challenge. The method relies on a first-frame segmentation mask, which, while easier to obtain than full video annotation, still requires an initial step.
  • Future Work: The paper suggests that their framework provides a solid foundation for future research in memory-based video processing. The effectiveness of their training strategy and dataset could be further explored and applied to other video-related tasks. The recurrent refinement mechanism also offers potential for further improvements in detail generation.

Summary updated

BibTeX
@inproceedings{yang2025matanyone,
  author = {Peiqing Yang and Shangchen Zhou and Jixin Zhao and Qingyi Tao and Chen Change Loy},
  title = {{MatAnyone: Stable Video Matting with Consistent Memory Propagation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00684},
}
Figure