TL;DR
The One-Trimap Video Matting network (OTVM) enables high-quality, temporally stable video matting using only a single user-annotated trimap at the first frame. By jointly modeling trimap propagation and alpha prediction through a recurrent refinement loop, OTVM prevents error accumulation and outperforms previous decoupled methods by over 56% in mean squared error (MSE).
What Problem Does This Paper Address?
Video matting is the process of extracting a precise alpha matte ($\alpha$) to separate a foreground object from its background across a video sequence. Because this problem is highly ill-posed—solving for foreground, background, and alpha values simultaneously from just RGB data—traditional methods rely on a trimap. A trimap segments an image into known foreground, known background, and an "unknown" transition region (like hair or motion blur).
Recent deep learning approaches have attempted to scale this to video by decoupling the task into two independent stages:
- Propagating a user-provided trimap across all video frames using visual correspondence.
- Predicting the alpha matte frame-by-frame based on those propagated trimaps.
However, this decoupled approach suffers from a fatal flaw: trimap drifting. As an object moves, regions labeled "unknown" in one frame might become solid foreground or background in the next (e.g., an eyelid closing). Purely visual propagation networks lack an understanding of the underlying alpha matte, causing errors to accumulate rapidly over time. To combat this, existing state-of-the-art methods require users to manually annotate multiple trimaps throughout a video, which is tedious and impractical.
Methods
OTVM solves the drifting problem by treating trimap propagation and alpha prediction as a joint, interdependent task. Instead of a linear pipeline, OTVM introduces a recurrent feedback loop that operates auto-regressively at each frame.
The architecture consists of three core components:
- Trimap Propagation Module: Inspired by Space-Time Memory (STM) networks, this module reads from a memory bank of past frames to predict the current frame's trimap.
- Alpha Prediction Module: Based on the FBA matting framework, this module takes the current RGB frame and the newly generated trimap to predict an initial alpha matte.
- Alpha-Trimap Refinement Module: A lightweight module consisting of two residual blocks. It takes the current RGB frame, the predicted trimap, the predicted alpha matte, and latent features from the alpha decoder to output a refined trimap, a refined alpha matte, and a 16-dimensional hidden feature map.
Crucially, the refined trimap, alpha matte, and hidden features are fed back into the trimap memory encoder. This ensures that the propagation module for the next frame benefits from the high-fidelity alpha information predicted in the current frame.
Stage-Wise Training
Because the modules are highly co-dependent, training the entire network from scratch leads to poor convergence. The authors design a 4-stage training strategy:
- Stage 1: Train the alpha matting and trimap propagation modules separately using ground-truth data.
- Stage 2: Freeze the propagation module; train the alpha and refinement modules together using noisy, propagated trimaps.
- Stage 3: Freeze the alpha and refinement modules; activate and train the propagation module using losses from both the trimap and alpha predictions.
- Stage 4: Fine-tune the entire network end-to-end on video datasets.
Datasets
The model leverages several datasets across its training stages:
- Pretraining: ImageNet (backbone initialization), various image/video object segmentation datasets (PASCAL VOC, MS COCO, DAVIS, YouTube-VOS), and the Adobe Image Matting (AIM) dataset.
- Evaluation & Fine-tuning: Evaluated on two recent video matting benchmarks:
- VideoMatting108: Features long video sequences (averaging 850 frames) evaluated with narrow, medium, and wide trimap dilations.
- Deep Video Matting (DVM): Consists of 248 composited test videos.
Key Insights and Ideas
- Alpha Mattes Guide Better Trimaps: An alpha matte inherently contains richer, continuous information than a discrete, three-class trimap. By using the predicted alpha matte to update the trimap before the next propagation step, the network effectively self-corrects, halting the feedback loop of error accumulation.
- The Power of Hidden Features: The 16-dimensional hidden feature map generated by the refinement module captures abstract semantic information that cannot be explicitly represented by a trimap or alpha matte alone. Visualizing these features via k-means clustering reveals that the network automatically learns to subdivide the "unknown" region into distinct structural levels and retains background context to aid future frames.
- Decoupled Propagation is Fundamentally Flawed: Purely tracking pixels across frames fails for trimaps because the semantic meaning of a pixel's trimap label changes dynamically based on visibility and pose.
Key Results
OTVM achieves massive performance gains over state-of-the-art video matting models in the practical one-trimap setting (where only the very first frame is annotated):
- VideoMatting108: OTVM improved the Mean Squared Error (MSE) by 56.7% compared to the previous best method (reproduced STM + FBA baseline).
- Deep Video Matting (DVM): OTVM achieved a 56.4% improvement in MSE.
- One Trimap vs. Full Trimaps: Remarkably, OTVM using only one initial trimap achieved comparable performance (SAD of 41.02) to the DVM framework utilizing full trimaps (SAD of 40.91), where every single frame was annotated.
Limitations and Future Work
The authors note that OTVM's performance is heavily reliant on the quality and content of the single user-provided trimap.
- Lack of Object Information: If the first frame's trimap contains very little information about the target object, the propagation module struggles to initialize correctly.
- Weak Foreground Signals: If the initial frame does not provide a strong, distinctive signal for the foreground object, the network can fail to track and matte the object accurately in subsequent, more challenging scenes.
Future work could explore integrating lightweight user interventions (like sparse scribbles) later in the video sequence to correct the model if it encounters extreme occlusions or scene cuts.
Summary updated