Skip to content

manalik/car_image_cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car Image Cleaner

A Python tool for detecting cars in images and removing their backgrounds. This tool uses YOLOv8 for car detection and rembg for background removal.

Features

  • Car detection using YOLOv8
  • Background removal using rembg
  • Support for multiple image formats (JPG, JPEG, PNG)
  • Automatic gradient background generation
  • Batch processing of multiple images

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/car_image_cleaner.git
cd car_image_cleaner
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Place your images in the input directory
  2. Run the script:
python src/image_cleaner.py
  1. Find the processed images in the output directory

Project Structure

car_image_cleaner/
├── input/              # Input images directory
├── output/             # Output images directory
├── src/                # Source code
│   ├── image_cleaner.py    # Main implementation
│   └── v2/                 # Version 2 (in development)
├── tests/              # Test files
├── requirements.txt    # Project dependencies
└── README.md          # This file

Dependencies

  • opencv-python>=4.8.1
  • ultralytics>=8.0.0
  • rembg>=2.0.0
  • numpy>=1.24.0
  • pillow>=10.0.0
  • pytest>=7.4.0
  • black>=23.7.0
  • flake8>=6.1.0
  • python-dotenv>=1.0.0

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • YOLOv8 for car detection
  • rembg for background removal
  • OpenCV for image processing

About

Car Image Cleaner using

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages