Self-hosted background removal that stays on your network#
You need cutouts without uploading photos to a third-party cloud. Compliance, air-gapped networks, or cost at volume all point the same way: run inference on hardware you control.
When this applies#
- Images must not leave your VPC, laptop, or studio
- You want unlimited local processing at no per-image cost
- You already run Docker, Python jobs, or Apple Silicon Macs
- You may still call a managed API later for harder edges (hair, fur, products)
Which path to use#
| If you… | Use |
|---|---|
| Desktop batch on Apple Silicon, offline | withoutBG for Mac |
| Scripts, notebooks, batch folders | Python package (open_weights) |
| Team server, CI, or Linux GIMP plugin backend | Docker service or app image |
| Hair, fur, catalog edges, managed SLA | Pro Model API (same endpoint shape) |
How withoutBG fits#
- Open Weights are Apache-2.0. Commercial use, modification, and redistribution are allowed.
- Local inference never calls the cloud. No API key for open_weights mode.
- Docker headless service exposes /v1.0/image-without-background on your host, matching the Pro Model API path so you can switch later without rewriting clients.
- Pro Model API (when you need it): processed in Frankfurt, DE. RAM-only processing; uploads are not retained for training.
Local options compared#
Alpha-matte error on Bench v0 (60 real photos, ground-truth mattes, 1024 px shorter side). Lower is better. withoutBG models route each image to a matting model or to BiRefNet; see the benchmark for the split.
| Option | License | MAE | MGE | Run |
|---|---|---|---|---|
| withoutBG Pro Model Self-Host | Commercial self-host license (commercial license) | 0.028 | 0.037 | Docker image (commercial license) |
| withoutBG Open Weights | Apache-2.0 (open weights) | 0.029 | 0.045 | pip install withoutbg |
| BiRefNet General | MIT (open weights) | 0.043 | 0.049 | rembg i -m birefnet-general in.jpg out.png |
| BiRefNet General Lite | MIT (open weights) | 0.052 | 0.054 | rembg i -m birefnet-general-lite in.jpg out.png |
| BiRefNet DIS | MIT (open weights) | 0.057 | 0.058 | rembg i -m birefnet-dis in.jpg out.png |
| BiRefNet Massive | MIT (open weights) | 0.071 | 0.056 | rembg i -m birefnet-massive in.jpg out.png |
| BiRefNet Portrait | MIT (open weights) | 0.071 | 0.065 | rembg i -m birefnet-portrait in.jpg out.png |
| IS-Net | Apache-2.0 (open weights) | 0.094 | 0.061 | rembg i -m isnet-general-use in.jpg out.png |
| BiRefNet HRSOD | MIT (open weights) | 0.107 | 0.071 | rembg i -m birefnet-hrsod in.jpg out.png |
| U²-Net | Apache-2.0 (open weights) | 0.128 | 0.080 | rembg i -m u2net in.jpg out.png |
| Silueta | Apache-2.0 (open weights) | 0.134 | 0.085 | rembg i -m silueta in.jpg out.png |
| U²-NetP | Apache-2.0 (open weights) | 0.140 | 0.080 | rembg i -m u2netp in.jpg out.png |
Python (open weights, runs locally)
pip install withoutbg
from withoutbg import WithoutBG
model = WithoutBG.open_weights()
model.remove_background("input.jpg").save("output.png")FAQ#
Is self-hosting really free?#
Yes for Open Weights. You pay for your own CPU/GPU and electricity. The model license is Apache-2.0. Pro cloud credits are optional when local quality is not enough.
Do my images leave the machine?#
Not in local Open Weights mode (Python, Docker, Mac). Pro Model API uploads go to Frankfurt, DE over TLS, are processed in RAM, and are discarded after the response.
Can I keep the same client code for local and cloud?#
Yes for HTTP clients against the Docker Local API or Mac Local API: the path matches the cloud Pro Model API. The Python SDK switches with open_weights() vs api().
What about GDPR?#
Local processing keeps personal images on systems you control. For the cloud API, processing is in the EU (Frankfurt) with no training on customer uploads. See the privacy policy for details.
How accurate are the self-hosted options?#
Bench v0 scores 60 real photos against ground-truth alpha mattes at a 1024 px shorter side; lower is better. withoutBG Open Weights MAE 0.029, MGE 0.045; withoutBG Pro Model Self-Host MAE 0.028, MGE 0.037. Open Weights is Apache-2.0 and free; Pro Model Self-Host is a commercial license (€3,600 + VAT, one-off) that runs on your own CPU servers.
Next steps#
Pick an entrypoint. All product paths are linked from the use cases hub.