Deep image matting in the browser

Trimap-based alpha matting with a lightweight model (EfficientNet-B0 encoder, U-Net-style decoder, 4.3M parameters, trained on AM-2k), compared against the VGG-16 Deep Image Matting baseline in the project repository. The model runs entirely in your browser with ONNX Runtime Web: your images are never uploaded.

Try an example:
Input
Trimap used
Alpha matte
Composite preview

Example photos are from the AM-2k dataset (Li et al., IJCV 2021; MIT-licensed release, image copyrights belong to their original owners).