0xflotus / rembg

Rembg is a tool to remove images background. That is it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rembg

Rembg is a tool to remove images background. That is it.

Installation

Install it from pypi

    pip install rembg

Usage as a cli

Remove the backaground from a remote image

    curl -s http://input.png | rembg > output.png

Remove the backaground from a local file

    rembg -o path/to/output.png paht/to/input.png

Remove the backaground from all images in a folder

    rembg -p path/to/inputs

Usage as a server

Start the server

    rembg-server

Open your browser to

    http://localhost:5000?url=http://image.png

Usage as a library

In app.py

import sys
from rembg.bg import remove

sys.stdout.buffer.write(remove(sys.stdin.buffer.read()))

Then run

    cat input.png | python app.py > out.png

References

License

Copyright (c) 2020-present Daniel Gatis

Licensed under MIT License

About

Rembg is a tool to remove images background. That is it.

License:MIT License


Languages

Language:Python 100.0%