withoutBG Snap (legacy)

Use withoutBG Open Weights v4 instead. Snap is the first generation of the free withoutBG models. It is kept here for older code that still downloads these files. For new work, use withoutbg/withoutbg-openweights-onnx: a routed pipeline (withoutBG matting + BiRefNet), native resolution up to 4096 px, and the interactive Smart brush. On withoutBG Bench v0 (60 real photos with ground-truth mattes) it scores MAE 0.0292 against 0.0426 for BiRefNet General, and it still runs on CPU with ONNX Runtime.

pip install -U withoutbg
from withoutbg import WithoutBG

model = WithoutBG.open_weights()  # downloads the v4 bundle on first use
model.remove_background("photo.jpg").save("result.png")

Try it in the browser: withoutbg/withoutbg Space. Current withoutbg releases load the v4 bundle, not the files in this repository.

What is in this repository

Three ONNX models (FP32, about 140 MB in total), CPU or CUDA through ONNX Runtime:

Stage File Input Output License
Depth depth_anything_v2_vits_slim.onnx RGB, 518ร—518 inverse depth map Apache 2.0
Matting snap_matting_0.1.0.onnx RGB + depth (4 channels), 256ร—256 initial alpha (A1) Apache 2.0
Refiner snap_refiner_0.1.0.onnx RGB + depth + A1 (5 channels), original size refined alpha (A2) Apache 2.0

The depth model is Depth Anything V2 ViT-S.

If you still need these exact files, pin them to a commit of this repository and load them with ONNX Runtime directly. Older withoutbg releases that expected them are no longer the supported path, and the SnapModel helper that earlier versions of this card showed is not part of current releases.

License

Apache 2.0, free for commercial and non-commercial use.

Links

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support