Practical overview
When it fits
Use it when you can provide a separate captured background and need to extract a subject from images or video. It is also suitable for exploring webcam matting or model training; production video pipelines require additional engineering beyond the supplied inference script.
Who it is for
- Developers building image or video compositing workflows that can capture a clean background.
- Researchers and practitioners exploring foreground matting or training the model.
- Linux users interested in the separately documented webcam-to-virtual-camera demo.
Documented uses
- Generate a foreground matte from a directory of images.
- Process video with the model for matting.
- Experiment with webcam matting through the repository demo.
- Train the network using a configured dataset path.
Requirements & limits
The repository is public and the project is licensed under MIT.
- The model requires an additional captured background image.
- Reported performance is 4K at 30 fps and HD at 60 fps on an Nvidia RTX 2080 Ti; these figures are hardware-specific.
- The video inference script is not intended as a real-time production pipeline and does not use hardware-accelerated or parallel video encoding and decoding.
- The virtual-camera webcam plugin is a separate community project and is documented for Linux.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare inputs for BackgroundMattingV2
Capture the additional background image needed for background matting.
Before you start
- A scene for which a background image can be captured.
Steps
Capture an image of the background without the foreground subject.
Use the captured background image as the additional background input when preparing to use the model.
Expected outcome
A captured background image is ready as an input for the model.
Guide limitations
- The model requires an additional captured background image.
- The repository lists image, video, and webcam inference scripts, but their detailed usage instructions are in the model usage documentation.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- PeterL1n/BackgroundMattingV2 · Official homepage title · retained in its source language

