SnapMat: Native-Resolution Video Matting via Context-Guided Sparse Refinement

Shijun Li, Yixin Yang, Yiheng Lin, Siyu Jiao, Zixin Ma, Yao Zhao, Yunchao WeiarXiv 2026

TL;DR

Cutting a person out of a 4K video—down to individual, wind-blown hair strands and translucent fabrics—usually forces an ugly choice between running out of GPU memory or settling for blurry, downsampled edges. SnapMat dodges this trade-off by letting a downsampled video model track who the subject is over time, while deploying ultra-lightweight sparse math to touch up only the tricky boundary pixels at full 4K resolution. Paired with a clever generative AI pipeline to create pixel-perfect training data, it runs at nearly 22 FPS in 4K while sipping just 2.11 GB of VRAM.

Figure 1. SnapMat recovers fine structures at native resolution. We show image matting and compositing (left), comparisons with existing methods (top right), and video matting results across multiple frames (bottom right).

What Problem Does This Paper Address?

Unlike binary segmentation (which just asks "is this pixel part of the person, yes or no?"), matting estimates continuous opacity—an alpha matte from 0 to 1—to capture wispy hair, lace, glass, and motion blur. Doing this across high-resolution video presents two massive headaches:

  1. The Compute Wall: Running dense neural networks across all 8.3 million pixels of a 4K frame destroys frame rates and blows up GPU memory. Downsampling the video saves compute, but permanently erases fine structures like eyelashes or tennis racket strings.
  2. Data Starvation: Manually painting ground-truth transparency values for individual hair strands across thousands of video frames is agonizingly expensive. Consequently, high-quality video matting datasets are tiny, often lack complex object interactions, or rely on artificial green-screen studio setups.

Methods

SnapMat’s core philosophy is simple: separate temporal tracking from spatial detail recovery. Why waste 4K compute on the middle of someone’s opaque jacket or the empty sky behind them?

Figure 2. Overview of SnapMat. SAM2 provides coarse alpha and temporal context. DICE fuses low-resolution context, and SHARP predicts native-resolution residuals at sparse locations selected from the coarse alpha.
  1. Adapted SAM2 Backbone: Starting with a first-frame mask, the authors fine-tune Meta’s Segment Anything Model 2 (SAM2) using continuous alpha supervision instead of binary masks. Operating on a fixed $1024 \times 1024$ grid, SAM2 handles temporal memory and outputs a coarse, low-resolution alpha matte.
  2. DICE (Dense Image-Context Encoding): A lightweight module that digests low-resolution image features, coarse alpha, and SAM2's historical memory so the refinement branch understands what belongs to the target foreground.
  3. SHARP (Sparse High-resolution Alpha Residual Prediction): Using the coarse matte, SnapMat builds a narrow "gate" around uncertain transition zones and sharp contours. SHARP looks only at these active pixels on the native 4K RGB image. Using 2D submanifold sparse convolutions (math that skips inactive pixels entirely), it fuses native RGB textures with DICE context to predict fine alpha corrections ($\Delta \alpha$).
Figure 3. Comparison of coarse and refined alpha mattes.

To solve data starvation, the authors also built a Reference-Guided Data Pipeline. Instead of annotating real photos, they feed real photos and 4-frame video shots into RGBA generative models (GPT Image 2.5 and Qwen-Image-2.1) to generate clean, transparent foreground layers and matching empty backgrounds, followed by automated and human quality control.

Datasets

  • Existing Training Data: VideoMatte240K, CRGNN, VM108 (videos); P3M-10K, AM-2K, Human-2K, RefMatte, AIM-500, Adobe Image Matting, PhotoMatte85, Transparent-460, RealWorldPortrait-636, PPM-100, Distinctions-646, and BG20K (images/backgrounds).
  • New Dataset — REALM (Reference-guided Alpha Layer Matting): Introduces 10,054 images and 1,007 four-frame video clips. Unlike green-screen datasets, REALM uses real-world scene references to maintain natural lighting and heavily features tricky person–object interactions (like holding plants, umbrellas, or rackets) and openwork fabrics.
  • Evaluation Benchmarks: YouTubeMatte, VideoMatte240K (plus a newly composited 4K test split, VM4K), and HHM2K (high-resolution portraits).

Key Insights and Ideas

  • 5% of the pixels hold 91% of the mistakes: On high-res HHM2K images, SnapMat’s sparse gate covers just 5.00% of the image area on average, yet captures 91.26% of the coarse model's L1 error. Focusing high-res compute strictly where uncertainty lives is massively efficient.
  • Keep temporal state small and spatial math 2D: Rather than writing 4K refined mattes back into video memory or using heavy 3D spatiotemporal convolutions, SnapMat keeps all temporal tracking on the low-res SAM2 grid. SHARP operates purely in 2D per frame, preventing memory bloat.
  • Short, diverse clips beat long, repetitive videos: When training on an equal budget of 4,000 frames, 1,000 four-frame REALM clips beat 40 hundred-frame studio videos—proving that diverse scene and object supervision matters enormously when adapting a pretrained video backbone.

Key Results

  • Speed & Memory: At 4K ($3840 \times 2160$), SnapMat hits 21.76 FPS on an RTX 5090 (16.57 FPS on an RTX 4090) while using just 2.11 GB of peak GPU memory. Competing method MatAnyone 2 runs out of memory at 4K (needing 17.35 GB just for 1440p), while MaGGIe + SAM2 crawls at 2.40 FPS using 14.50 GB.
  • Accuracy & Temporal Consistency: SnapMat achieves state-of-the-art results across YouTubeMatte, HHM2K, and VideoMatte240K. On 1080p YouTubeMatte, it cuts Mean Squared Error (MSE) more than in half compared to MatAnyone 2 (0.28 vs. 0.57) and drops temporal flicker error (dtSSD) from 1.55 to 1.22.
  • Native-Res Payoff: Running SnapMat at native resolution on HHM2K reduces gradient error by 22.41% compared to capping inputs at 1920p.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@misc{li2026snapmat,
  author = {Shijun Li and Yixin Yang and Yiheng Lin and Siyu Jiao and Zixin Ma and Yao Zhao and Yunchao Wei},
  title = {{SnapMat: Native-Resolution Video Matting via Context-Guided Sparse Refinement}},
  year = {2026},
  eprint = {2611.37667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37667},
}
Figure