rembg
Remove image background
Decision gist · record as of 2026-08-14
Yes. Actively maintained, no known vulnerabilities, low install friction, and flexible deployment options (library, CLI, server, Docker). MIT license is permissive. Choose it for local background removal with optional GPU acceleration; consider the withoutBG cloud API integration if you prefer managed processing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.11, <3.14.
- GPU support (NVIDIA/CUDA or AMD/ROCm) requires additional system-level dependencies; CPU-only mode works without them.
- Low install friction with a pure-Python wheel.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
last release 2026-08-06 (8 days) · last repo commit 2026-08-06 · 24,254 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,741,705 downloads/mo, #2,509 on PyPI
Alternatives
Verify before relying
pip install "rembg[cpu]"
from rembg import remove
with open('input.png', 'rb') as i:
with open('output.png', 'wb') as o:
input_data = i.read()
output = remove(input_data)
o.write(output)- Model download and caching behavior (pooch is a dependency but caching strategy not specified)
- Performance characteristics and memory requirements for different image sizes
- Accuracy and speed comparisons across supported model variants
What it is and what it does
This package is a background removal tool built on deep learning models that strips backgrounds from images and returns them with transparency. It works with multiple input formats—bytes, NumPy arrays via scipy/scikit-image, or file paths—and can be used as a Python library, command-line tool, HTTP server, or Docker container. The package depends on core image processing libraries (pillow, scikit-image, scipy, numpy) and uses pooch for model management and tqdm for progress reporting.
The library supports multiple backends: CPU-only for universal compatibility, NVIDIA/CUDA for GPU acceleration on compatible systems, and AMD/ROCm for Radeon GPUs. It also integrates with the withoutBG cloud API as an alternative to local processing. Batch processing with session reuse is recommended for performance when handling multiple images. jsonschema is used for configuration validation.
Use it for
- Remove backgrounds from product photos for e-commerce listings or catalog preparation
- Batch process entire folders of images with watch mode for automated workflows
- Serve background removal as an HTTP API endpoint for web applications or backends
- Extract foreground objects from images for compositing or further manipulation
- Process video frames via FFmpeg piping for background removal in video workflows
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Actively maintained, no known vulnerabilities, low install friction, and flexible deployment options (library, CLI, server, Docker). MIT license is permissive. Choose it for local background removal with optional GPU acceleration; consider the withoutBG cloud API integration if you prefer managed processing.
Install
rembg on PyPI
Before you install
Low install friction with a pure-Python wheel. Active maintenance—released 8 days ago with 24254 GitHub stars. Requires Python >=3.11, <3.14. Optional GPU acceleration (NVIDIA/CUDA or AMD/ROCm) requires system-level dependencies; CPU-only installation is straightforward.
Requires Python >=3.11, <3.14. GPU support (NVIDIA/CUDA or AMD/ROCm) requires additional system-level dependencies; CPU-only mode works without them.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install "rembg[cpu]"
from rembg import remove
with open('input.png', 'rb') as i:
with open('output.png', 'wb') as o:
input_data = i.read()
output = remove(input_data)
o.write(output)
Verify before relying
- Model download and caching behavior (pooch is a dependency but caching strategy not specified)
- Performance characteristics and memory requirements for different image sizes
- Accuracy and speed comparisons across supported model variants
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesjsonschemanumpypillowpoochpymattingscikit-imagescipytqdm |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,741,705 / month, #2,509 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: rembg-2.0.78-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “remove image background”
- rembgRemoves image backgrounds using deep learning models, available as a…
- transparent-backgroundRemoves backgrounds from images and videos using a deep learning…
- runwareClient library for the Runware inference API, enabling image…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also deskew · PyMatting · nvidia-cudnn-cu11 · realesrgan · transparent-background · nudenet · audio-separator · nvidia-cuda-runtime · tensorflow · nvidia-cuda-runtime-cu11