wildoctopus commited on
Commit
4a4859d
1 Parent(s): 5d671e9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -1
README.md CHANGED
@@ -10,4 +10,42 @@ pinned: false
10
  license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: mit
11
  ---
12
 
13
+ # Huggingface cloth segmentation using U2NET
14
+
15
+ ![Python 3.8](https://img.shields.io/badge/python-3.8-green.svg)
16
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
17
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1LGgLiHiWcmpQalgazLgq4uQuVUm9ZM4M?usp=sharing)
18
+
19
+ This repo contains inference code and gradio demo script using pre-trained U2NET model for Cloths Parsing from human portrait.</br>
20
+ Here clothes are parsed into 3 category: Upper body(red), Lower body(green) and Full body(yellow). The provided script also generates alpha images for each class.
21
+
22
+
23
+ # Inference
24
+ - clone the repo `git clone https://github.com/wildoctopus/huggingface-cloth-segmentation.git`.
25
+ - Install dependencies `pip install -r requirements.txt`
26
+ - Run `python process.py --image 'input/03615_00.jpg' . **Script will automatically download the pretrained model**.
27
+ - Outputs will be saved in `output` folder.
28
+ - `output/alpha/..` contains alpha images corresponding to each class.
29
+ - `output/cloth_seg` contains final segmentation.
30
+ -
31
+
32
+ # Gradio Demo
33
+ - Run `python app.py'
34
+ - Navigate to local or public url provided by app on successfull execution.
35
+ ### OR
36
+ - Inference in colab from here [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1LGgLiHiWcmpQalgazLgq4uQuVUm9ZM4M?usp=sharing)
37
+
38
+ # Huggingface Demo
39
+ - Check gradio demo on Huggingface space from here [huggingface-cloth-segmentation](https://huggingface.co/spaces/wildoctopus/cloth-segmentation).
40
+
41
+ # Output samples
42
+ ![Sample 000](assets/1.png)
43
+ ![Sample 024](assets/2.png)
44
+
45
+
46
+ This model works well with any background and almost all poses.
47
+
48
+ # Acknowledgements
49
+ - U2net model is from original [u2net repo](https://github.com/xuebinqin/U-2-Net). Thanks to Xuebin Qin for amazing repo.
50
+ - Most of the code is taken and modified from [levindabhi/cloth-segmentation](https://github.com/levindabhi/cloth-segmentation)
51
+