Practical overview
When it fits
Use it when you need model-based image matting and can meet the documented software, GPU-memory and model-license requirements.
Who it is for
- Developers adding image matting to image-processing workflows.
- Computer-vision practitioners who want to run the model for inference.
- Notebook users exploring foreground, background and alpha predictions.
Documented uses
- Generate foreground, background and alpha predictions from an image.
- Use the model as an image-matting stage in an editing or processing workflow.
- Explore inference in a Jupyter notebook or through the provided demo script.
Requirements & limits
- Inference requirements include PyTorch 1.4 or later, NumPy and OpenCV; the notebook additionally lists Matplotlib and gdown.
- The repository specifies at least 11 GB of GPU memory for the Adobe Composition-1K test set and generally for resolutions above 1920×1080.
- The released model is covered by the Adobe Deep Image Matting Dataset License Agreement and is limited to noncommercial use and distribution.
- Training code is not released; the repository documents inference rather than model training.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare the FBA Matting inference environment
Install the listed packages and meet the stated GPU-memory guidance before using the repository’s inference demo or notebook.
Before you start
- Python environment for PyTorch-based inference.
- torch >= 1.4, numpy, and opencv-python.
- For the Jupyter notebook: matplotlib and gdown.
- GPU memory >= 11 GB for inference on Adobe Composition-1K testing set; the README gives the same guidance more generally for images above 1920×1080.
Steps
Install torch >= 1.4, numpy, and opencv-python in the environment.
If using the Jupyter notebook, also install matplotlib and gdown; the README notes gdown is used to download the model inside the notebook.
Review the model-use restriction before proceeding: the README says the model is covered by the Adobe Deep Image Matting Dataset License Agreement and may only be used and distributed for noncommercial purposes.
Expected outcome
An environment with the listed inference dependencies and the stated GPU-memory guidance is prepared for the documented inference materials.
Guide limitations
- The README does not provide package-install commands or a complete environment specification.
- The stated 11 GB figure is specified for Adobe Composition-1K testing and, more generally, resolutions above 1920×1080; it does not establish requirements for every image or setup.
- The model is restricted to noncommercial use and distribution under the cited dataset agreement.
- Training code is not released.
Use the repository’s documented image-matting inference options
Obtain foreground, background, and alpha predictions using the repository’s demo script or Jupyter notebook.
Before you start
- A prepared inference environment with torch >= 1.4, numpy, and opencv-python; notebook use additionally requires matplotlib and gdown.
- The repository provides
demo.pyand a Jupyter notebook for predictions. - For the model, the README states noncommercial-use and distribution restrictions.
Steps
Choose the repository’s
demo.pyscript or its Jupyter notebook as the documented inference option.Use the chosen option to produce the model’s foreground, background, and alpha predictions for an image.
If using the notebook, consult its torchscript section for the documented model-conversion example.
Expected outcome
The documented inference options provide foreground, background, and alpha predictions; the notebook also demonstrates converting the model to TorchScript.
Guide limitations
- Test-time augmentation code is described as forthcoming.
- The model is restricted to noncommercial use and distribution under the cited dataset agreement.
- Training code is not released.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- MarcoForte/FBA_Matting · Official homepage title · retained in its source language

