Single-Human-Parsing-LIP
PSPNet implemented in PyTorch for single-person human parsing task, evaluating on Look Into Person (LIP) dataset.
Model
The implementation of PSPNet is based on HERE.
Trained model weights can be downloaded from Google Drive or Baidu Drive (ๆๅ็ ๏ผ43cu).
Environment
- Python 3.6
- PyTorch == 1.1.0
- torchvision == 0.3.0
- matplotlib
Dataset
To use our code, firstly you should download LIP dataset from HERE.
Then, reorganize the dataset folder as below:
myLIP
โ
โโโโtrain
โ โ id.txt
โ โ
โ โโโโimage
โ โ โ 77_471474.jpg
โ โ โ 113_1207747.jpg
โ โ โ ...
โ โ
โ โโโโgt
โ โ โ 77_471474.png
โ โ โ 113_1207747.png
โ โ โ ...
โ
โโโโval
โ โ id.txt
โ โ
โ โโโโimage
โ โ โ 100034_483681.jpg
โ โ โ 10005_205677.jpg
โ โ โ ...
โ โ
โ โโโโgt
โ โ โ 100034_483681.png
โ โ โ 10005_205677.png
โ โ โ ...
โ
โโโโtest
โ โ id.txt
โ โ
โ โโโโimage
โ โ โ 100012_501646.jpg
โ โ โ ...
Usage
python3 train.py --data-path PATH-TO-LIP --backend [resnet50 | densenet | squeezenet]
python3 eval.py --data-path PATH-TO-LIP --backend [resnet50 | densenet | squeezenet] [--visualize]
python3 inference.py demo/test.jpg --backend [resnet50 | densenet | squeezenet]
Evaluation
model | overall acc. | mean acc. | mean IoU |
---|---|---|---|
resnet50 | 0.792 | 0.552 | 0.463 |
resnet101 | 0.805 | 0.579 | 0.489 |
densenet121 | 0.826 | 0.606 | 0.519 |
squeezenet | 0.786 | 0.543 | 0.450 |
Visualization
>> python3 eval.py --data-path PATH-TO-LIP --visualize
>> python3 inference.py demo/test.jpg