rembg
Rembg is a tool to remove images background
File Explorer
Download Latest Version (.zip)- bug_report.md
- feature_request.md
- close_inactive_issues.yml
- lint_python.yml
- publish_docker.yml
- publish_pypi.yml
- windows_installer.yml
- FUNDING.yml
- animal-1.jpg
- animal-1.out.png
- animal-2.jpg
- animal-2.out.png
- animal-3.jpg
- animal-3.out.png
- anime-girl-1.jpg
- anime-girl-1.out.png
- anime-girl-2.jpg
- anime-girl-2.out.png
- anime-girl-3.jpg
- anime-girl-3.out.png
- car-1.jpg
- car-1.out.png
- car-2.jpg
- car-2.out.png
- car-3.jpg
- car-3.out.png
- food-1.jpg
- food-1.out.alpha.jpg
- food-1.out.jpg
- girl-1.jpg
- girl-1.out.png
- girl-2.jpg
- girl-2.out.png
- girl-3.jpg
- girl-3.out.png
- plants-1.jpg
- plants-1.out.png
- rembg.1
- __init__.py
- b_command.py
- d_command.py
- i_command.py
- m_command.py
- p_command.py
- s_command.py
- __init__.py
- base.py
- ben_custom.py
- birefnet_cod.py
- birefnet_dis.py
- birefnet_general.py
- birefnet_general_lite.py
- birefnet_hrsod.py
- birefnet_massive.py
- birefnet_portrait.py
- bria_rmbg.py
- dis_anime.py
- dis_custom.py
- dis_general_use.py
- sam.py
- silueta.py
- u2net.py
- u2net_cloth_seg.py
- u2net_custom.py
- u2net_human_seg.py
- u2netp.py
- withoutbg.py
- __init__.py
- bg.py
- cli.py
- matting.py
- session_factory.py
- anime-girl-1.jpg
- car-1.jpg
- cloth-1.jpg
- plants-1.jpg
- anime-girl-1.birefnet-cod.png
- anime-girl-1.birefnet-dis.png
- anime-girl-1.birefnet-general-lite.png
- anime-girl-1.birefnet-general.png
- anime-girl-1.birefnet-hrsod.png
- anime-girl-1.birefnet-massive.png
- anime-girl-1.birefnet-portrait.png
- anime-girl-1.isnet-anime.png
- anime-girl-1.isnet-general-use.png
- anime-girl-1.sam.png
- anime-girl-1.silueta.png
- anime-girl-1.u2net.png
- anime-girl-1.u2net_cloth_seg.png
- anime-girl-1.u2net_human_seg.png
- anime-girl-1.u2netp.png
- test_decontaminate.py
- test_matting.py
- test_migrate.py
- test_model_home.py
- test_remove.py
- test_withoutbg.py
- .dockerignore
- .editorconfig
- .gitattributes
- .gitignore
- .markdownlint.yaml
- .python-version
- _build-exe.ps1
- _modpath.iss
- _setup-cpu.iss
- _setup-gpu.iss
- CITATION.cff
- docker-compose.yml
- Dockerfile
- Dockerfile_nvidia_cuda_cudnn_gpu
- LICENSE.txt
- logo.png
- MANIFEST.in
- onnxruntime-installation-matrix.png
- pyproject.toml
- pytest.ini
- README.md
- rembg.ipynb
- rembg.py
- rembg.spec
- USAGE.md
# Installation Guide
git clone https://github.com/danielgatis/rembg
Downloads the entire project code from GitHub to your computer.
cd rembg
Moves into the project folder you just downloaded.
2. Official Install Script
Easy Recommended- Python 3 Python is required to use pip.
pip install "rembg[cpu]" # for library
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[cpu,cli]" # for library + cli
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[gpu]" # for library
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[gpu,cli]" # for library + cli
Installs the package published on PyPI directly β no need to clone the source.
Pulled directly from this repo's README.
3. Docker
Easy- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker run -v .:/data danielgatis/rembg i /data/input.png /data/output.png
Runs the built image as an actual container.
docker build -t rembg-nvidia-cuda-cudnn-gpu -f Dockerfile_nvidia_cuda_cudnn_gpu .
Builds a runnable image based on the Dockerfile.
sudo docker run --rm -it --gpus all -v /dev/dri:/dev/dri -v $PWD:/data rembg-nvidia-cuda-cudnn-gpu i -m birefnet-general /data/input.png /data/output.png
Runs the built image as an actual container.
Pulled directly from this repo's README.
4. Python
Easypip install "rembg[cpu]" # for library
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[cpu,cli]" # for library + cli
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[gpu]" # for library
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[gpu,cli]" # for library + cli
Installs the package published on PyPI directly β no need to clone the source.
pip install "rembg[rocm]" # for library
Installs the package published on PyPI directly β no need to clone the source.
Pulled directly from this repo's README.
