Models

Matting models

14 matting models. Each section says what the model is, whether it may be used commercially and how fast it is; licences and checks are under Details.

Input: one RGB image (trimap-guided models also a trimap: background / unknown / foreground). Output: an alpha matte [H, W] in [0, 1] at the input size: 1 = foreground (background removal, dichotomous / salient object segmentation).

Measured on RTX 5060 Ti, torch 2.14.1+cu130; fastforks bench MODEL --size HxW measures yours. The summary uses one input, 1080x1920: kernels time with its speed-up over the faster original run, and kernels peak reserved memory with its ratio to the smaller original one. Where measured (one variant per family), a variant's table also lists portable under torch.compile and the fp16 TensorRT engine of portable (export; memory: the engine's device memory + torch's peak). – = not measured; no kernels = the family has no kernels backend (reason under its table). Reserved memory is the allocator's cache: kernels (CUDA graphs, cuDNN workspaces) can reserve a few percent to some tens of percent more than portable at the same allocated peak. The accuracy column is lower-is-better (DIS-VD MAE).

Other devices: Apple M1 Pro 16 GB, NVIDIA L4, NVIDIA L40S, NVIDIA A10, NVIDIA A100-SXM4-40GB, NVIDIA RTX PRO 6000; across devices.

modelcommercialDIS-VD MAE ↓kernels time (ms),
speed-up vs original
kernels peak memory (MiB, reserved),
ratio to original
ben2yes0.0403104, 1.9x1698, 0.61x
birefnetyes0.0325121, 1.9x1916, 0.99x
birefnet-liteyes–48.1, 1.6x960, 0.99x
inspyrenetyes–––
inspyrenet-fastyes–––
isnetyes–12.1, 3.2x522, 0.5x
isnet-general-useyes–12.1, 3.2x522, 0.5x
matanyoneno–––
rmbg-2.0no–121, 1.2x1936, 0.97x
u2netyes–8.83, 1.8x260, 0.52x
u2net-human-segyes–9.05, 1.8x260, 0.52x
u2netpyes–9.80, 1.5x172, 0.55x
vitmatte-byes–148, 1.7x1552, 0.3x
vitmatte-syes–84.1, 1.7x1404, 0.54x

All models

Modes, licences, training data and outputs per model

Commercial status per variant: yes if the code and the weights licence both allow commercial use (the training data is listed but does not change it; weights without a licence of their own are assumed to carry the code licence); no if either forbids it; unclear for custom licence terms (treat as no).

modelmodescode licenceweights licencetraining datacommercialoutputs
ben2portable, kernelsMITMITdis5k, prama-internalyesalpha
birefnetportable, kernelsMITMITdis5k, duts, hrsod, uhrsd, hrs10k, p3m-10kyesalpha
birefnet-liteportable, kernelsMITMITdis5k, duts, hrsod, uhrsd, hrs10k, p3m-10kyesalpha
inspyrenetportable, kernelsMITMITduts, hrsod, uhrsd, dis5kyesalpha
inspyrenet-fastportable, kernelsMITMITduts, hrsod, uhrsd, dis5kyesalpha
isnetportable, kernelsApache-2.0Apache-2.0dis5kyesalpha
isnet-general-useportable, kernelsApache-2.0Apache-2.0dis5kyesalpha
matanyoneportable, kernelsLicenseRef-noncommercialLicenseRef-noncommercialvm800, composition-1k, distinctions-646, bg20k, dvm-background, coco, youtube-vis-2021, supervisely-personno (code: LicenseRef-noncommercial (noncommercial); weights: LicenseRef-noncommercial)alpha
rmbg-2.0portable, kernelsMITCC-BY-NC-4.0bria-internalno (weights: CC-BY-NC-4.0)alpha
u2netportable, kernelsApache-2.0Apache-2.0dutsyesalpha
u2net-human-segportable, kernelsApache-2.0Apache-2.0supervisely-personyesalpha
u2netpportable, kernelsApache-2.0Apache-2.0dutsyesalpha
vitmatte-bportable, kernelsApache-2.0Apache-2.0composition-1kyesalpha
vitmatte-sportable, kernelsApache-2.0Apache-2.0composition-1kyesalpha

Training datasets

iddatasetlicencecommercial use
cocoCOCO 2017 (train, instance annotations)CC-BY-4.0unclear
dis5kDIS5K (dichotomous image segmentation)LicenseRef-noncommercialno
dutsDUTS (salient object detection)not statedunclear
hrsodHRSOD (high-resolution salient object detection)not statedunclear
uhrsdUHRSD (ultra-high-resolution salient object detection)not statedunclear
hrs10kHRS10K (high-resolution salient object detection)not statedunclear
p3m-10kP3M-10k (privacy-preserving portrait matting)MITyes
prama-internalPrama LLC proprietary segmentation datanot statedunclear
bria-internalBRIA proprietary background-removal datanot statedunclear
composition-1kComposition-1k (Adobe Deep Image Matting)LicenseRef-research-onlyno
supervisely-personSupervisely Person Dataset (human segmentation)LicenseRef-noncommercialno
vm800VM800 (MatAnyone video matting foregrounds)not statedno
distinctions-646Distinctions-646 (image matting)not statedunclear
bg20kBG-20k (background images)MITyes
dvm-backgroundDVM background set (video backgrounds)not statedunclear
youtube-vis-2021YouTube-VIS 2021 (video instance segmentation)not statedunclear