Python SDK for local and cloud background removal using open weights or cloud API
Switch between free local open weights and a sharp cloud API with a single line of code
withoutbg-python is a Python SDK for removing image backgrounds using either local open-weights ONNX models or a cloud API. It suits developers building automated scripts, notebooks, backends, or batch jobs that need flexible execution options.
The tool provides a unified API to run background removal locally using a router between DINOv3-fused matting and BiRefNet segmentation, or route requests to a cloud API. It returns a PIL Image in RGBA format and supports batch processing with custom progress callbacks.
It suits Python developers and technical photographers building custom image processing pipelines or batch workflows. It does not suit non-technical users looking for a standalone desktop application without writing code.
Switch between local open weights and the cloud API with a single line of code.
Process multiple images efficiently while keeping the model loaded in memory.
Track processing progress with custom callback functions for long-running jobs.
Intelligently routes images between matting and segmentation models based on content.
The Python SDK and local open weights are free to use under the Apache 2.0 license, while the optional cloud API requires paying per image processed.
768 open remote AI-training roles, updated November 14, 2026; most pay $20–$175 an hour. Zekai lists them free; the application goes to the employer’s platform.
These reviewed AI tools do the same job instantly — from our scored directory.
Yes, once the initial 1.5 GB model weights are downloaded from Hugging Face, local open-weights mode runs entirely offline.
The SDK returns a PIL Image in RGBA format, which can be saved as PNG or WebP to preserve transparency.
Initialize the model once outside your loop and use remove_background_batch() to avoid reloading weights for every image.
See Zekai first in Google