python == 3.8.8, pytorch == 1.7.1, torchvision == 0.8.2, networkx == 2.6.2
Download the pretrained model here and put it to the pretrained
folder, then simply run:
cd inference
bash demo.sh
To test on your own data, just refer to the structure of the demo_imgs
folder and the inference/demo.sh
file respectively for data preparation and model running. Guess it would be very easy to get start by replacing them with your own data / bash script :).
Below is the person part index (i.e. pixel value) of the parsing result:
Part | index | Part | index |
---|---|---|---|
background | 0 | neck | 10 |
hat | 1 | scarf | 11 |
hair | 2 | - | 12 |
- | 3 | face | 13 |
sunglass | 4 | left arm | 14 |
shirt | 5 | right arm | 15 |
dress | 6 | left leg | 16 |
coats | 7 | right leg | 17 |
- | 8 | left shoe | 18 |
pant | 9 | right shoe | 19 |
The code and pretrained model in this repo are provided through the courtesy of Bowen Wu. Thanks for his effort at making this easy-to-use human parsing codebase.