Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yjg30737/pyqt-remove-background-from-image

Python desktop app example of remove background from image with OpenCV, PyTorch
https://github.com/yjg30737/pyqt-remove-background-from-image

deeplabv3 image-processing image-segmentation opencv opencv-python pyqt pyqt5 pyqt5-desktop-application remove-background remove-background-image torch

Last synced: 8 days ago
JSON representation

Python desktop app example of remove background from image with OpenCV, PyTorch

Awesome Lists containing this project

README

        

# pyqt-remove-background-from-image
Python desktop app example of remove background from image with OpenCV, PyTorch

You need CUDA to run this.

## Requirements
* pillow - to save the image
* opencv-python - to handle the image file as numpy array and apply Gaussian Blur to make border smooth
* torch - to use CUDA
* torchvision - To use deeplab V3 (prominent image segmenation model made by Google)

## How to Run
1. clone this repo.
2. `pip install -r requirements.txt` to download necessary packages
3. python main.py

## After Running
![image](https://github.com/yjg30737/pyqt-remove-background-from-image/assets/55078043/5cbda5a8-31d3-4ca2-acbe-21f32b4fc1de)
1. First find the path which including images you want to remove the background.
- This package has the sample folder to make you get proper images (which is generated by Stable Diffusion) more conviniently.
2. Press "Remove Background and Save!" button. It will make a backup folder and save original images to it and remove the background from the images in folder.

## Result