Remove image backgrounds locally ā no API key, no internet, no login required. Built for Python beginners. Works on Windows, Mac & Linux.
This project gives you 4 different ways to remove the background from any image using Python ā pick the one that suits you best:
| Script | Interface | Best For |
|---|---|---|
bg_remove_normal.py |
Terminal (type path) | Quick single image |
bg_remover.py |
Terminal (type or browse) | CLI power users |
bg_removes_interactive.py |
GUI window | Click-and-go, single image |
bg_removes.py |
GUI window | Single or batch (multiple images) |
Download Python from python.org if you don't have it.
Check your version:
python --version
git clone https://github.com/ivengexnce/python-background-remover.git
cd python-background-removerpip install -r requirements.txt
ā³ First run will download the AI model (~170MB). This only happens once.
Option 1 ā Simple terminal tool (just type your image path):
python bg_remove_normal.py
Option 2 ā Terminal with browse option:
python bg_remover.py
Option 3 ā GUI window (click to select one image):
python bg_removes_interactive.py
Option 4 ā GUI window (single or batch processing):
python bg_removes.py
rembg
Pillow
tkintercomes pre-installed with Python on most systems.
python-background-remover/
ā
āāā bg_remove_normal.py # Simple CLI tool
āāā bg_remover.py # CLI with browse support
āāā bg_removes_interactive.py # Basic GUI tool
āāā bg_removes.py # Full GUI with batch mode
āāā requirements.txt
āāā README.md
.png .jpg .jpeg .webp
This tool uses rembg, which runs a deep learning model (U²-Net) locally on your machine to detect and remove image backgrounds ā completely offline.
- Add a drag-and-drop interface
- Add a before/after image preview
- Save outputs to a custom folder
- Add support for transparent background colors
MIT License ā free to use, modify, and share.
Pull requests and suggestions are welcome!
If you're a beginner and want to contribute your first PR, this is a great project to start with. š
š§ [email protected]
If this project helped you, give it a star ā ā it helps others find it too!
Made with ā¤ļø for Python beginners everywhere. '''