This is a simple Flask web application that removes the background from images using the Rembg library.
- Python 3.x
- Flask
- rembg
- PIL (Python Imaging Library)
-
Clone this repository:
git clone https://github.com/vaibhav-rm/rmbg-flask-app.git
-
Install the required Python packages:
pip install flask rembg pillow
-
Navigate to the project directory:
cd rmbg-flask-app
-
Run the Flask app:
python app.py
-
Open your web browser and go to
http://localhost:5000
to access the application.
- Upload an image with the background you want to remove.
- Wait for the processing to finish.
- Download the processed image without the background.
You can also run the application using Docker.
-
Build the Docker image:
docker build -t rmbg-flask-app .
-
Run the Docker container:
docker run -p 5000:5000 rmbg-flask-app
-
Open your web browser and go to
http://localhost:5000
to access the application.
- This application is for demonstration purposes only and may not provide accurate results in all scenarios.
- For production use, consider deploying the application on a production server with proper security measures.
- Remember to replace 'your_secret_key_here' in
app.py
with a strong secret key for session management. - Ensure that your image files have one of the following extensions:
png
,jpg
,jpeg
,gif
.
This project is licensed under the MIT License - see the LICENSE file for details.