Remove the background from image

Requirements

Rembg requires at least Python 3.7

Install

1
2
3
# work on virtual environment is recommended
python -m venv /home/don/PythonCoding
python -m pip install rembg

Remove background

First time it is run, it downloads a pattern recognition model.

1
rembg i d_original.jpg d_noback.jpg

Flags

  • rembg i: image files.
  • rembg p: image folders.
  • rembg s: images HTTP server.