Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-remove-background-from-image
- Owner: yjg30737
- License: mit
- Created: 2023-08-14T00:20:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-14T02:06:42.000Z (over 1 year ago)
- Last Synced: 2024-01-26T10:12:40.764Z (10 months ago)
- Topics: deeplabv3, image-processing, image-segmentation, opencv, opencv-python, pyqt, pyqt5, pyqt5-desktop-application, remove-background, remove-background-image, torch
- Language: Python
- Homepage:
- Size: 5.34 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-remove-background-from-image
Python desktop app example of remove background from image with OpenCV, PyTorchYou 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