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.
| model | commercial | DIS-VD MAE ↓ | kernels time (ms), speed-up vs original | kernels peak memory (MiB, reserved), ratio to original |
|---|---|---|---|---|
ben2 | yes | 0.0403 | 104, 1.9x | 1698, 0.61x |
birefnet | yes | 0.0325 | 121, 1.9x | 1916, 0.99x |
birefnet-lite | yes | – | 48.1, 1.6x | 960, 0.99x |
inspyrenet | yes | – | – | – |
inspyrenet-fast | yes | – | – | – |
isnet | yes | – | 12.1, 3.2x | 522, 0.5x |
isnet-general-use | yes | – | 12.1, 3.2x | 522, 0.5x |
matanyone | no | – | – | – |
rmbg-2.0 | no | – | 121, 1.2x | 1936, 0.97x |
u2net | yes | – | 8.83, 1.8x | 260, 0.52x |
u2net-human-seg | yes | – | 9.05, 1.8x | 260, 0.52x |
u2netp | yes | – | 9.80, 1.5x | 172, 0.55x |
vitmatte-b | yes | – | 148, 1.7x | 1552, 0.3x |
vitmatte-s | yes | – | 84.1, 1.7x | 1404, 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).
| model | modes | code licence | weights licence | training data | commercial | outputs |
|---|---|---|---|---|---|---|
ben2 | portable, kernels | MIT | MIT | dis5k, prama-internal | yes | alpha |
birefnet | portable, kernels | MIT | MIT | dis5k, duts, hrsod, uhrsd, hrs10k, p3m-10k | yes | alpha |
birefnet-lite | portable, kernels | MIT | MIT | dis5k, duts, hrsod, uhrsd, hrs10k, p3m-10k | yes | alpha |
inspyrenet | portable, kernels | MIT | MIT | duts, hrsod, uhrsd, dis5k | yes | alpha |
inspyrenet-fast | portable, kernels | MIT | MIT | duts, hrsod, uhrsd, dis5k | yes | alpha |
isnet | portable, kernels | Apache-2.0 | Apache-2.0 | dis5k | yes | alpha |
isnet-general-use | portable, kernels | Apache-2.0 | Apache-2.0 | dis5k | yes | alpha |
matanyone | portable, kernels | LicenseRef-noncommercial | LicenseRef-noncommercial | vm800, composition-1k, distinctions-646, bg20k, dvm-background, coco, youtube-vis-2021, supervisely-person | no (code: LicenseRef-noncommercial (noncommercial); weights: LicenseRef-noncommercial) | alpha |
rmbg-2.0 | portable, kernels | MIT | CC-BY-NC-4.0 | bria-internal | no (weights: CC-BY-NC-4.0) | alpha |
u2net | portable, kernels | Apache-2.0 | Apache-2.0 | duts | yes | alpha |
u2net-human-seg | portable, kernels | Apache-2.0 | Apache-2.0 | supervisely-person | yes | alpha |
u2netp | portable, kernels | Apache-2.0 | Apache-2.0 | duts | yes | alpha |
vitmatte-b | portable, kernels | Apache-2.0 | Apache-2.0 | composition-1k | yes | alpha |
vitmatte-s | portable, kernels | Apache-2.0 | Apache-2.0 | composition-1k | yes | alpha |