qmetrics.net

withoutBG Python

Python SDK for local and API background removal

withoutBG Python screenshot

withoutBG is a Python package to remove image backgrounds locally with open weights or via a cloud API. It returns RGBA images for scripts, notebooks, batches, and CLI use.

Overview

withoutBG provides background removal for Python workflows through one API that can run fully on your machine or call a hosted service. Local open-weights mode uses ONNX models without requiring a GPU by default, keeps images private, and can run offline after weights download. Cloud API mode sends images for higher edge quality on hair, fur, and fine detail at per-image cost.

Core methods return PIL images in RGBA. Batch processing reuses a single loaded model for efficiency. A smart brush edit path accepts keep and remove masks to refine mattes locally with a small stroke-edit network, with similar stroke input available through the API. A command-line interface mirrors single-image and batch flows for both modes.

The open-weights bundle routes each image to either a matting branch or a segmentation branch before upscaling alpha to native resolution. Optional NVIDIA CUDA acceleration swaps ONNX Runtime providers in memory. Environment variables configure API keys and local model paths for air-gapped or CI setups.

The package is the in-process embedding of withoutBG technology; related surfaces mentioned include a Mac desktop app and standalone cloud API for teams that do not want to run inference themselves.

Key features

  • Local ONNX open-weights inference
  • Optional cloud API for higher quality
  • PIL RGBA output and batch helpers
  • Smart brush mask refinement
  • CLI for local and API modes
  • Progress callbacks on processing
  • Optional CUDA acceleration
  • Environment-based API key config

Use cases

  • Batch product photo cutouts
  • Private offline background removal
  • Notebook and script automation
  • Refining mattes with brush masks
  • Compositing subjects onto new backgrounds

Tags

Similar software

FaceSwap

Local deep learning face replacement toolkit

Faceswap trains models to swap faces in images and videos on your own hardware. It provides extract, train, convert, and GUI workflows powered by TensorFlow and Keras.

★ 57.6k⟳ 3 months agoGPL-3.0

Video2X

Vulkan video upscaling and interpolation tool

Video2X enlarges or smooths video using Anime4K, Real-ESRGAN, Real-CUGAN, RIFE, and MPV-style GLSL shaders. Windows and Linux builds include a GUI installer; Docker images and Colab notebooks are also documented.

★ 22.9k⟳ 8 months agoAGPL-3.0

GoCV

Go language bindings for OpenCV computer vision

GoCV wraps OpenCV 4 for Go programs, covering capture, image processing, DNN, CUDA, OpenVINO, and contrib modules. It targets Linux, macOS, Windows, and Docker, with Android support in progress.

★ 7.5k⟳ 10 months agoApache-2.0

TensorFlow

End-to-end machine learning platform and tooling ecosystem

TensorFlow is a machine learning platform with Python and C++ APIs, optional GPU packages, and companion libraries for data, training, deployment, and visualization.

★ 201.8k⟳ todayApache-2.0

Ollama

Run open AI models locally or in the cloud

Ollama runs open language models such as Gemma, Qwen, DeepSeek and gpt-oss on macOS, Windows and Linux, locally or in the cloud. It offers a CLI, a REST API, and Python and JavaScript libraries.

★ 188.3k⟳ 2 days agoMIT
Open Source Alternative to:OpenAI API

Transformers

Shared model definitions for multimodal ML workloads

Transformers is a Python library that defines pretrained text, vision, audio, and multimodal models once in PyTorch for shared inference and training across the ecosystem.

★ 169.4k⟳ todayApache-2.0