• Stars
    star
    153
  • Rank 241,845 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PSPNet implemented in PyTorch for single-person human parsing task, evaluating on Look Into Person (LIP) dataset.

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