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, offlinewithoutBG for Mac
Scripts, notebooks, batch foldersPython package (open_weights)
Team server, CI, or Linux GIMP plugin backendDocker service or app image
Hair, fur, catalog edges, managed SLAPro 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.

OptionLicenseMAEMGERun
withoutBG Pro Model Self-HostCommercial self-host license (commercial license)0.0280.037Docker image (commercial license)
withoutBG Open WeightsApache-2.0 (open weights)0.0290.045pip install withoutbg
BiRefNet GeneralMIT (open weights)0.0430.049rembg i -m birefnet-general in.jpg out.png
BiRefNet General LiteMIT (open weights)0.0520.054rembg i -m birefnet-general-lite in.jpg out.png
BiRefNet DISMIT (open weights)0.0570.058rembg i -m birefnet-dis in.jpg out.png
BiRefNet MassiveMIT (open weights)0.0710.056rembg i -m birefnet-massive in.jpg out.png
BiRefNet PortraitMIT (open weights)0.0710.065rembg i -m birefnet-portrait in.jpg out.png
IS-NetApache-2.0 (open weights)0.0940.061rembg i -m isnet-general-use in.jpg out.png
BiRefNet HRSODMIT (open weights)0.1070.071rembg i -m birefnet-hrsod in.jpg out.png
U²-NetApache-2.0 (open weights)0.1280.080rembg i -m u2net in.jpg out.png
SiluetaApache-2.0 (open weights)0.1340.085rembg i -m silueta in.jpg out.png
U²-NetPApache-2.0 (open weights)0.1400.080rembg 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.