--- id: rembg version: "2.0.78" license: MIT license_treatment: permissive maintenance: active --- # rembg — Remove image background License: permissive · Maintenance: active · Downloads: 3.7M/mo ## 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 above — verify before relying. Removes image backgrounds using deep learning models, available as a Python library, CLI tool, HTTP server, or Docker container. 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 pip install rembg uv add rembg poetry add rembg ## Installing rembg 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. 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) Requires Python >=3.11, <3.14. GPU support (NVIDIA/CUDA or AMD/ROCm) requires additional system-level dependencies; CPU-only mode works without them. 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_current - Install friction: low - Maintenance: active - Downloads: 3.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags remove image background, background removal deep learning, image segmentation library, batch background removal, background removal api, automated background stripping, image processing neural network, image-processing, deep-learning, batch-processing [View on SkillFed](https://skillfed.io/packages/rembg) · [View on PyPI](https://pypi.org/project/rembg/)