MatAnyone 2: Scaling Video Matting via a Learned Quality Evaluator

Peiqing Yang, Shangchen Zhou, Kai Hao, Qingyi Tao

TL;DR

MatAnyone 2 tackles the chronic data scarcity in video matting by introducing a learned Matting Quality Evaluator (MQE) that assesses alpha matte quality without requiring ground-truth labels. By leveraging MQE as both an online training guide and an offline data curator, the authors automatically constructed VMReal—the first massive, real-world video matting dataset containing 2.4 million frames. Combined with a novel long-range reference-frame training strategy, MatAnyone 2 sets a new state-of-the-art standard for extracting fine boundary details like hair while maintaining robust temporal consistency.

What Problem Does This Paper Address?

Video matting—the process of precisely extracting a foreground object with fractional alpha values to account for semi-transparent boundaries like hair or motion blur—is highly dependent on high-quality training data. However, manually annotating pixel-accurate alpha mattes across millions of video frames is prohibitively expensive and practically impossible at scale.

Consequently, existing models rely on small, synthetic datasets created by pasting foregrounds onto random backgrounds. This creates a severe domain gap, causing models to fail under real-world lighting and complex environments. To bypass this, recent methods have tried incorporating large-scale video object segmentation (VOS) datasets. The catch? Segmentation data only provides binary (0 or 1) masks. Jointly training on this data inadvertently forces models to lose fine boundary details, degrading high-fidelity matting into coarse, "segmentation-like" outputs.

Methods

The authors introduce MatAnyone 2, which scales up video matting through a learned quality evaluator and a dual-branch data engine.

1. Matting Quality Evaluator (MQE)

The core innovation is the MQE, a model trained to predict whether each pixel of a predicted alpha matte is "reliable" or "erroneous" without needing ground truth. It takes a tuple of the video frame, the predicted alpha matte, and a coarse segmentation mask as inputs. Built on a self-supervised DINOv3 encoder and a Dense Prediction Transformer (DPT) decoder, it outputs a pixel-wise binary evaluation map.

The MQE network architecture uses DINOv3 and DPT to predict a pixel-wise evaluation map.

2. Online Guidance

During training on unlabeled videos, the MQE acts as an on-the-fly supervisor. Its predicted error probability map is converted into a dynamic loss function ($L_{eval}$), serving as a penalty mask that forces the matting network to correct errors in both semantic and boundary regions.

3. Offline Data Curation Engine

To automatically generate high-quality training data, the authors designed a dual-branch annotation pipeline that exploits the complementary strengths of two distinct model types:

  • Video Matting Branch ($B_V$): Provides excellent temporal stability and structural consistency but lacks fine boundary details.
  • Image Matting Branch ($B_I$): Guided by per-frame segmentation masks, it extracts sharp boundary details (like individual hair strands) but suffers from severe temporal flickering and semantic drift.

The MQE acts as an automated arbiter, evaluating both branches and pixel-wise fusing them. It takes the stable video matting output as a base and selectively integrates sharp details from the image matting branch only where the video branch fails and the image branch succeeds.

The automated dual-branch annotation pipeline uses MQE to pixel-wise fuse the strengths of video and image matting models.

4. Reference-Frame Strategy for Long Videos

In long videos, subjects often reveal previously unseen parts (e.g., turning around to show a backpack). Standard memory-propagation models fail here because they only look at a short local window during training due to memory constraints. MatAnyone 2 introduces a strategy that samples long-range reference frames from across the entire video into the memory bank without increasing memory overhead, paired with a random patch dropout augmentation to simulate appearance variations.

Datasets

  • VMReal (New): The first large-scale, real-world video matting dataset, curated using the MQE pipeline. It contains 28K clips and 2.4M frames. This includes a high-quality subset of 4.5K 1080p clips featuring rich hair details, alongside a diverse human-centric subset filtered from the SA-V dataset.
  • P3M-10k: A privacy-preserving portrait matting image dataset used to train the MQE model by generating pseudo-ground-truth error maps via patch-level discrepancy scoring.
  • Evaluation Benchmarks: The model was validated on synthetic benchmarks (VideoMatte and YoutubeMatte) and the real-world CRGNN dataset (which features manual annotations every 10 frames).

Key Insights and Ideas

  • Error Detection Without Ground Truth: The paper proves that deep features from self-supervised vision transformers (DINOv3), when conditioned on coarse segmentation masks, can implicitly understand what a "good" matting boundary looks like, allowing pixel-level error detection without target labels.
  • Fusing Complementary Failures: Instead of trying to engineer a single model that excels at both temporal consistency and fine-detail extraction, the authors realized they could use two flawed models with opposite failure modes and use the MQE to harvest the best parts of both.
  • Escaping the Segmentation Trap: By replacing raw segmentation data supervision with MQE-curated real-world matting data, the model avoids learning blocky, segmentation-like boundaries, allowing pure matting losses to be computed strictly over high-confidence, reliable pixels.

Key Results

MatAnyone 2 achieves state-of-the-art performance across all synthetic and real-world benchmarks, outperforming both auxiliary-free and mask-guided methods.

Qualitative comparison showing MatAnyone 2 preserving fine details and avoiding segmentation-like boundaries compared to prior methods.
  • Synthetic Benchmarks: On YoutubeMatte (1920×1080), MatAnyone 2 reduces the semantic error (MAD) from 1.99 (MatAnyone baseline) to 1.61 and detail error (Grad) from 8.91 to 7.14.
  • Real-World Generalization: On the CRGNN real-world benchmark, MatAnyone 2 significantly outperforms the baseline, reducing the Gradient metric (detail fidelity) from 15.55 to 11.74 and improving temporal coherence (dtSSD) from 5.44 to 4.54.
  • Qualitative Superiority: As shown in real-world testing, the model successfully extracts complex, wind-blown hair strands and maintains high semantic stability even under challenging backlit conditions where prior methods suffer from severe boundary blurring or missing regions.

Limitations and Future Work

The primary limitation is that the automated data curation pipeline is fundamentally bounded by the upper-limit performance of its constituent parts (the image and video matting branches). If both branches fail simultaneously in a highly complex scene, the MQE cannot synthesize a correct matte out of thin air.

Future Work: The authors propose evolving this framework into a closed-loop "refinement flywheel." In this setup, progressively improved video matting models would act as the annotation branch, iteratively refining the dataset quality, which in turn would be used to train even stronger matting models.

Summary updated

BibTeX
@inproceedings{yang2026matanyone,
  author = {Peiqing Yang and Shangchen Zhou and Kai Hao and Qingyi Tao},
  title = {{MatAnyone 2: Scaling Video Matting via a Learned Quality Evaluator}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=oRkaXuiihc},
}
Figure