Skip to content

CameronCSS/background-removal-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


✂️ Background Removal Tool

A simple tool that removes backgrounds from images using the rembg library. Built with Flask and deployed on Docker.

TRY IT OUT

✨ Features

  • 🖼️ 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

🛠️ Technology Stack

  • Backend: Python/Flask

  • Image Processing: rembg, Pillow

  • Frontend: HTML5, CSS, JavaScript

  • File Handling: BytesIO for stream processing

  • Everything deployed with Docker

📋 Prerequisites

  • Python 3.7+
  • rembg Installed
  • Pillow Installed

(back to top)

🚀 Installation

  1. Clone the repository:
git clone https://github.com/cameroncss/background-removal-tool.git
  1. Create and activate a virtual environment (recommended):
python -m venv venv
venv\Scripts\activate
  1. Install the required packages:
pip install flask rembg Pillow

💻 Usage

  1. Start the Flask server:
# Make sure you are in the correct directory
flask run
  1. Open your web browser and navigate to:
http://localhost:5000
  1. 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)

🔧 Configuration

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)

📁 Filetype Handling

  • The application validates file types and sizes before processing
  • Supported formats: PNG, JPEG, WebP

🚧 Limitations

  • 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

👥 Credits

  • Original idea and tool developed by Fireship
  • Background removal powered by rembg
  • Built with Flask
  • Image processing with Pillow

📄 License

This project is licensed under the MIT License

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors