bg.cut is a powerful and intuitive image processing tool designed to simplify background removal from images while providing users with the flexibility to choose specific objects to retain. The application combines YOLO v8 for detecting object bounding boxes that are then passed off to MobileSAM for fast and accurate instance segmentation. Additionally, OpenCV is incorporated for efficient mask data handling and manipulation.
- Background Removal: Easily eliminate backgrounds from images.
- Selective Object Retention: Choose specific objects to retain in the image.
- YOLO v8 Integration: Utilizes YOLO v8 for robust object detection and bounding box generation.
- MobileSAM Instance Segmentation: Implements MobileSAM for fast and accurate instance segmentation, ensuring detailed object boundaries.
- OpenCV Handling: OpenCV integrated for efficient mask data processing and manipulation.
- Modern UI: Features a modern and user-friendly interface for a easy editing experience.
- Web Technologies: Developed using Flask, pywebview (for desktop app functionality), HTML, JavaScript, and CSS.
- Animations: Smooth transitions powered by animate.css.
To get started with bg.cut, follow these steps:
- Clone the repository.
git clone https://github.com/JRBonilla/bg.cut.git
cd bg.cut
- Install dependencies by running the following command in your terminal:
pip install -r requirements.txt
This will ensure Flask, pywebview, OpenCV, and Ultralytics are installed on your system.
- Run the application.
python App.py
This will launch a new pywebview window with the application.
- Choose an image by selecting or dragging and dropping it onto the application..
- Select the objects you want to keep in the image and click "Cut".
- (Optional) Trim any excess background from the image.
- Save the edited image to your computer.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Developed by Jonathan Bonilla.