Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhishtagatya/backsub-cv
🌇 Background Substitution using Classical Method
https://github.com/abhishtagatya/backsub-cv
Last synced: about 11 hours ago
JSON representation
🌇 Background Substitution using Classical Method
- Host: GitHub
- URL: https://github.com/abhishtagatya/backsub-cv
- Owner: abhishtagatya
- Created: 2024-04-11T18:34:51.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-04-28T12:08:39.000Z (7 months ago)
- Last Synced: 2024-05-08T00:12:28.057Z (6 months ago)
- Language: Python
- Size: 764 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BackSub CV
> Background Substitution using Python's OpenCV![Background Substitution](docs/GradientMixing.png)
### Quick Usage
Install requirements.
```shell
pip install -r requirements.txt
```Experimentation may include the use of your own dataset. For verification, use the [Supervisely Segmentation Sample Dataset](https://drive.google.com/file/d/1biTZkShX_LxtIuuEKTV_mbyuUd-23oD6/view?usp=sharing)
and the [WikiArt Dataset](https://www.kaggle.com/datasets/ikarus777/best-artworks-of-all-time).#### Run Single Task
Run Single Backgorund Substitution Task on an Image and a desired Backgorund
```shell
python3 run.py --blend_mode=
```
- model : Model of Image Segmentation ('contourmask', 'grabcut', 'watershed')
- image_file : Path to Image File (image.png)
- background_file : Path to Substitute Background File (background.png)
- (Optional) blend_mode : Image Blending Mode ( "gradient_mix", "balance", "hist_match_s", "hist_match_t", "none")
- (Optional) file_out : Output File (result.png)#### Run Evaluation of Model
Run an evaluation of the model for IoU and Pixel Accuracy metric
```shell
python3 run.py
```
- model : Model of Image Segmentation ('contourmask', 'grabcut', 'watershed')
- image_path : Path to Images (images/)
- mask_path : Path to Ground Truth Masks (masks/)
- backgorund_file : Path to Substitute Background (background.png)