Official repository for the paper Real-Time High-Resolution Background Matting. Our model requires capturing an additional background image and produces state-of-the-art matting results at 4K 30fps and HD 60fps on an Nvidia RTX 2080 TI GPU.
- [Jan 09 2021] PhotoMatte85 dataset is now published.
- [Dec 21 2020] We updated our project to MIT License, which permits commercial use!
- HD videos (by Sengupta et al.) (Our model is more robust on HD footage)
- 4K videos and images
- VideoMatte240K (Coming soon)
- PhotoMatte85
We provide several scripts in this repo for you to experiment with our model. More detailed instructions are included in the files.
inference_images.py
: Perform matting on a directory of images.inference_video.py
: Perform matting on a video.inference_webcam.py
: An interactive matting demo using your webcam.
Additionally, you can try our notebooks in Google Colab for performing matting on images and videos.
We provide a demo application that pipes webcam video through our model and outputs to a virtual camera. The script only works on Linux system and can be used in Zoom meetings. For more information, checkout:
Developers in the community has helped us build a web demo. See Community Projects section below.
You can run our model using PyTorch, TorchScript, TensorFlow, and ONNX. For detail about using our model, please check out the Usage / Documentation page.
Training code will be released upon acceptance of the paper.
- Shanchuan Lin*, University of Washington
- Andrey Ryabtsev*, University of Washington
- Soumyadip Sengupta, University of Washington
- Brian Curless, University of Washington
- Steve Seitz, University of Washington
- Ira Kemelmacher-Shlizerman, University of Washington
* Equal contribution.
This work is licensed under the MIT License. If you use our work in your project, we would love you to include an acknowledgement and fill out our survey.
A list of projects built by third-party developers in the community. If you have a project to share, fill out this survey.
- Web Demo by Gradio: Matting your own images from your browser.