rembg
What it is
rembg is a free MIT-licensed tool for removing image backgrounds. It can run as a command-line program, Python library, HTTP server, or Docker container, with API access and batch processing. Command-line modes handle single images, folders, watch mode, and RGB24 streams, while PNG is the listed export format. Models cover general images, portraits, clothing, anime, and object segmentation; bria-rmbg is the default local model. Edge refinement options include color decontamination, alpha matting, and ViTMatte. Documentation shows integrations with FFmpeg RGB24 output, OpenCV, PIL, NumPy, Docker, and the HTTP API. Installation instructions cover CPU, NVIDIA CUDA GPU, and AMD ROCm backends. Python versions >=3.11 and <3.14 are required. Local ONNX models download on first use into the rembg models directory. An optional withoutBG backend sends images to its servers and has a documented 20 MB upload limit. Model weights have separate licenses, and commercial use of RMBG-2.0 under the BRIA license requires a paid agreement.
For and against
For
- Free MIT-licensed tool
- Command line, library, server, and Docker options
- Batch folder processing and API access
- Multiple models and edge-refinement methods
- CPU and GPU installation paths
Against
- PNG is the listed export format
- Requires Python 3.11 through below 3.14
- Commercial RMBG-2.0 use requires paid agreement
- withoutBG uploads are limited to 20 MB
The verdict
rembg offers flexible local and programmable background removal with batch, API, and model choices. Users should review separate model licenses and the commercial requirement for RMBG-2.0.
Who it suits
rembg suits developers and image-processing workflows that need local, scripted background removal. It supports Linux, self-hosted deployments, and API-based processing.
Plans and prices
rembg
MIT-licensed tool · local models downloaded on first use
Read 9 Oct 2026 · github.com
On the record
- API access
- Yesgithub.com · read 23 Sep 2026
- Batch processing
- Yesgithub.com · read 23 Sep 2026
- Cloud option
- The optional withoutBG backend sends images to withoutBG servers and has a documented maximum upload size of 20 MB.github.com · read 9 Oct 2026
- Commercial-use limit
- The README says the BRIA license for RMBG-2.0 requires a paid agreement for commercial use.github.com · read 9 Oct 2026
- Compute options
- Installation instructions cover CPU, NVIDIA CUDA GPU, and AMD ROCm backends.github.com · read 9 Oct 2026
- Edge refinement
- Edge options include color decontamination, alpha matting, and ViTMatte for refining soft edges.github.com · read 9 Oct 2026
- Export formats
- PNGgithub.com · read 23 Sep 2026
- Integrations
- The documentation shows using rembg with FFmpeg RGB24 output, OpenCV, PIL, NumPy, Docker, and its HTTP API.github.com · read 9 Oct 2026
- Licensing
- rembg is licensed under MIT, while model weights have separate licenses that may affect commercial use.github.com · read 9 Oct 2026
- Local storage
- Local ONNX models download on first use and are stored under the rembg models directory.github.com · read 9 Oct 2026
- Models
- Available models include options for general images, portraits, clothing, anime, and object segmentation; bria-rmbg is the default local model.github.com · read 9 Oct 2026
- Processing
- The command line supports single images, batch folder processing, watch mode, and RGB24 streams.github.com · read 9 Oct 2026
- Purpose
- rembg is a tool for removing image backgrounds.github.com · read 9 Oct 2026
- Replacement backgrounds
- Nogithub.com · read 23 Sep 2026
- Runtime requirements
- The project lists Python versions >=3.11 and <3.14 as requirements.github.com · read 9 Oct 2026
- Security detail
- Downloaded models have hash verification, which can be disabled with the MODEL_CHECKSUM_DISABLED environment variable.github.com · read 9 Oct 2026
- Support
- The README invites users to support the project by buying the maintainer a coffee or beer.github.com · read 9 Oct 2026
- Ways to use
- It can be used as a command-line tool, Python library, HTTP server, or Docker container.github.com · read 9 Oct 2026