Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Image Background Remover

A small Python utility that strips the background from an image using rembg and Pillow, producing a transparent PNG.

Requirements

  • Python 3.9+

Installation

git clone https://github.com/CodeWithCrescent/python_image_bg_remover.git
cd python_image_bg_remover

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

Usage

  1. Drop the image you want to process into the inputs/ folder.

  2. Update the filename in main.py to point to your image:

    input = Image.open("inputs/your_image.jpg")
  3. Run the script:

    python3 main.py
  4. The background-removed image is saved to outputs/output.png.

Project structure

.
├── inputs/         # Source images
├── outputs/        # Generated, background-removed images
├── main.py         # Entry point
└── requirements.txt

License

Licensed under the MIT License.

About

A simple Python utility that removes image backgrounds using rembg and Pillow, producing transparent PNG images. Easy to set up and run locally with a straightforward input/output workflow.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages