A simple tool that removes backgrounds from images using the rembg library. Built with Flask and deployed on Docker.
- 🖼️ Instant background removal from images
- 📋 Drag-and-drop allowed (Depending on browser support)
- 📎 Copy/Paste from Clipboard
- 💾 Automatic download of processed image
- 🚀 Support for PNG, JPEG, and Webp formats
-
Backend: Python/Flask
-
Image Processing: rembg, Pillow
-
Frontend: HTML5, CSS, JavaScript
-
File Handling: BytesIO for stream processing
-
Everything deployed with Docker
- Python 3.7+
- rembg Installed
- Pillow Installed
- Clone the repository:
git clone https://github.com/cameroncss/background-removal-tool.git- Create and activate a virtual environment (recommended):
python -m venv venv
venv\Scripts\activate- Install the required packages:
pip install flask rembg Pillow- Start the Flask server:
# Make sure you are in the correct directory
flask run- Open your web browser and navigate to:
http://localhost:5000
- Use the tool by either:
- Dragging and dropping an image into the "drop zone"
- Clicking the "Upload File" button to select an image
- Pasting an image from your clipboard (Ctrl+V)
The application runs with these default settings:
- Host: 0.0.0.0 (accessible from any network interface)
- Port: 5000
- Debug mode: Enabled
To modify these settings, edit the following line in app.py:
app.run(host='0.0.0.0', debug=True, port=5000)- The application validates file types and sizes before processing
- Supported formats: PNG, JPEG, WebP
- Maximum file size: 10MB
- Processing time depends on image size and complexity
- Requires active internet connection
- Best results with clear subject-background separation
- Debug mode should probably be disabled in production
- Original idea and tool developed by Fireship
- Background removal powered by rembg
- Built with Flask
- Image processing with Pillow
This project is licensed under the MIT License