Scaling Video Matting via a Learned Quality Evaluator
1S-Lab, Nanyang Technological University
2SenseTime Research, Singapore
†Project lead
MatAnyone 2 is a practical human video matting framework that preserves fine details by avoiding segmentation-like boundaries, while also shows enhanced robustness under challenging real-world conditions.
:movie_camera: For more visual results, go checkout our
project page
---
## 📮 Update
- [2026.03] Release inference codes, evaluation codes, and gradio demo.
- [2025.12] This repo is created.
## 🏄🏻♀️ TODO
- [x] Release inference codes and gradio demo.
- [x] Release evaluation codes.
- [ ] Release training codes for video matting model.
- [ ] Release checkpoint and training codes for quality evaluator model.
- [ ] Release real-world video matting dataset **VMReal**.
## 🔎 Overview

## 🔧 Installation
1. Clone Repo
```bash
git clone https://github.com/pq-yang/MatAnyone2
cd MatAnyone2
```
2. Create Conda Environment and Install Dependencies
```bash
# create new conda env
conda create -n matanyone2 python=3.10 -y
conda activate matanyone2
# install python dependencies
pip install -e .
# [optional] install python dependencies for gradio demo
pip3 install -r hugging_face/requirements.txt
```
## 🔥 Inference
### Download Model
Download our pretrained model from [MatAnyone 2](https://github.com/pq-yang/MatAnyone2/releases/download/v1.0.0/matanyone2.pth) to the `pretrained_models` folder (pretrained model can also be automatically downloaded during the first inference).
The directory structure will be arranged as:
```
pretrained_models
|- matanyone2.pth
```
### Quick Test
We provide some examples in the [`inputs`](./inputs) folder. **For each run, we take a video and its first-frame segmenatation mask as input.**