Remove background from images using pre-trained AI model.
View Demo »
A web app built with Python/Django that enables users to remove background from images using pre-trained AI model. It allows users to download the final result image with a transparent background.
It does well for most images that doesn't have messy background but I'm sure you won't expect photoshop like results :)
Note: The project is production ready and can be easily deployed. But it requires good amount of resource to run ML models used by rembg in the cloud. At the moment, I'm unable to deploy the django version for free.
So I used Streamlit
to deploy the main script with enchanced functionality. Check here
- Downloadable final result
- Transparent background
- Production ready
- Python/Django
- Bootstrap
- rembg
- Dropbox
To get a local copy up and running follow these simple steps.
- Django
- Clone the repo and navigate to
background-remover-django
directorygit clone https://github.com/balewgize/background-remover-django.git
cd background-remover-django
- Install required packages (virtual environments recommended)
python3 -m venv venv && source venv/bin/activate
pip install -r requirements/local.txt
- Provide credentials in
.env
(example in .env.dev file)Use this command to generate strongDJANGO_SECRET_KEY=
SECRET_KEY
python3 -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
- Apply migrations and start the server
python manage.py migrate
python manage.py runserver
- Goto http://127.0.0.1:8000 on your browser
Thanks!