Rembg
Rembg is a tool to remove images background.
If this project has helped you, please consider making a donation.
Sponsor
PhotoRoom Remove Background API
https://photoroom.com/api
Fast and accurate background remover API
Requirements
python: >3.7, <3.13
Installation
CPU support:
pip install rembg # for library
pip install "rembg[cli]" # for library + cli
GPU support:
First of all, you need to check if your system supports the onnxruntime-gpu
.
Go to https://onnxruntime.ai and check the installation matrix.
If yes, just run:
pip install "rembg[GPU]" # for library
pip install "rembg[gpu,cli]" # for library + cli
Usage as a cli
After the installation step you can use rembg just typing rembg
in your terminal window.
The rembg
command has 4 subcommands, one for each input type:
-
i
for files -
p
for folders -
s
for http server -
b
for RGB24 pixel binary stream
You can…