https://github.com/balewgize/background-remover-django
Remove background from images using pre-trained ML models. (Django)
https://github.com/balewgize/background-remover-django
ai background-image background-removal django
Last synced: about 1 year ago
JSON representation
Remove background from images using pre-trained ML models. (Django)
- Host: GitHub
- URL: https://github.com/balewgize/background-remover-django
- Owner: balewgize
- License: mit
- Created: 2023-03-14T13:40:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T06:43:05.000Z (over 3 years ago)
- Last Synced: 2023-12-14T01:53:48.005Z (over 2 years ago)
- Topics: ai, background-image, background-removal, django
- Language: Python
- Homepage:
- Size: 1.59 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About The Project
[](#)
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 :)
### Deployment
**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
### Features
- Downloadable final result
- Transparent background
- Production ready
### Built With
- Python/Django
- Bootstrap
- rembg
- Dropbox
## Getting Started
To get a local copy up and running follow these simple steps.
### Prerequisites
* Django
### Installation
1. Clone the repo and navigate to ```background-remover-django``` directory
```
git clone https://github.com/balewgize/background-remover-django.git
```
```
cd background-remover-django
```
2. Install required packages (virtual environments recommended)
```
python3 -m venv venv && source venv/bin/activate
```
```
pip install -r requirements/local.txt
```
3. Provide credentials in ```.env``` (example in .env.dev file)
```
DJANGO_SECRET_KEY=
```
Use this command to generate strong ```SECRET_KEY```
```
python3 -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
```
4. Apply migrations and start the server
```
python manage.py migrate
```
```
python manage.py runserver
```
5. Goto http://127.0.0.1:8000 on your browser
Thanks!