rembg
Automatically remove the background from photos.

rembg cuts out people, products and animals and saves a PNG with a transparent background. It also runs without a graphics card.
How to try it
Commands from the official guides – just copy them.
Google Colab
- Download the notebook: colab.ipynb
- Open colab.research.google.com → File → Upload notebook
- Runtime → Change runtime type → GPU (T4)
- Runtime → Run all
Linux
# One-time setup: install uv (package manager for Python, no sudo needed)
curl -LsSf https://astral.sh/uv/install.sh | sh && source $HOME/.local/bin/env
uvx --python 3.12 --from "rembg[cpu,cli]" rembg i -m birefnet-general foto.jpg foto_freigestellt.png
# Result: foto_freigestellt.png with a transparent background (the first run downloads a model of about 1 GB)
macOS
# One-time setup: install uv (package manager for Python, no sudo needed)
curl -LsSf https://astral.sh/uv/install.sh | sh && source $HOME/.local/bin/env
uvx --python 3.12 --from "rembg[cpu,cli]" rembg i -m birefnet-general foto.jpg foto_freigestellt.png
# Result: foto_freigestellt.png with a transparent background (the first run downloads a model of about 1 GB)
Windows (PowerShell)
# One-time setup: install uv (package manager for Python)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path = "$HOME\.local\bin;$env:Path"
uvx --python 3.12 --from "rembg[cpu,cli]" rembg i -m birefnet-general foto.jpg foto_freigestellt.png
# Result: foto_freigestellt.png with a transparent background (the first run downloads a model of about 1 GB)
Ask the AI assistant
Questions about rembg, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.