This project is an end-to-end image background removal web application.
The development followed the pipeline below, simulating an actual client deliverable. Requirements, planning and deliverable documents can be found here. Development inspired by computervisioneng
Deployed with Streamlit, the web app lets users upload image files and download the same image with no background.
The backbone for the background removal algorithm was develpoed by rembg.
The project is comprehensive, open-source and available as a Python package.
Installation:
pip install rembg
Implementation :
from rembg import remove
input_path = 'input.png'
output_path = 'output.png'
with open(input_path, 'rb') as i:
with open(output_path, 'wb') as o:
input = i.read()
output = remove(input)
o.write(output)
To get started, you'll need to clone this repository and set up a new virtual environment:
git clone https://github.com/lucasdevit0/Background-Removal
cd Background-Removal
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt