Skip to content

kcyt/Self-Correction-Human-Parsing

 
 

Repository files navigation

Self Correction for Human Parsing

Python 3.6 License: MIT

An out-of-box human parsing representation extractor.

Our solution ranks 1st for all human parsing tracks (including single, multiple and video) in the third LIP challenge!

lip-visualization

Features:

  • Out-of-box human parsing extractor for other downstream applications.
  • Pretrained model on three popular single person human parsing datasets.
  • Training and inferecne code.
  • Simple yet effective extension on multi-person and video human parsing tasks.

Requirements

conda env create -f environment.yaml
conda activate schp
pip install -r requirements.txt

Simple Out-of-Box Extractor

IntegratedPIFu uses this extractor to get the pseudo groundtruth human parsing maps.

Pascal-Person-Part (exp-schp-201908270938-pascal-person-part.pth)

  • mIoU on Pascal-Person-Part validation: 71.46 %.

  • Pascal Person Part is a tiny single person human parsing dataset with 3000+ images. This dataset focus more on body parts segmentation. Pascal Person Part has 7 labels, including 'Background', 'Head', 'Torso', 'Upper Arms', 'Lower Arms', 'Upper Legs', 'Lower Legs'.

Model Preparation

Make a checkpoints directory: mkdir checkpoints

Then, download the trained model (trained on the pascal dataset) from https://drive.google.com/uc?id=1E5YwNKW2VOEayK9mWCS3Kpsxf-3z04ZE

Put the downloaded file (exp-schp-201908270938-pascal-person-part.pth) into the checkpoints folder.

Running to generate human parsing maps for IntegratedPIFu

python simple_extractor.py --integratedpifu-dir [PATH_TO_IntegratedPIFu Folder]

Citation

Please cite our work if you find this repo useful in your research.

@article{li2020self,
  title={Self-Correction for Human Parsing}, 
  author={Li, Peike and Xu, Yunqiu and Wei, Yunchao and Yang, Yi},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  year={2020},
  doi={10.1109/TPAMI.2020.3048039}}

Visualization

  • Source Image. demo
  • LIP Parsing Result. demo-lip
  • ATR Parsing Result. demo-atr
  • Pascal-Person-Part Parsing Result. demo-pascal
  • Source Image. demo
  • Instance Human Mask. demo-lip
  • Global Human Parsing Result. demo-lip
  • Multiple Human Parsing Result. demo-lip

Related

Our code adopts the InplaceSyncBN to save gpu memory cost.

There is also a PaddlePaddle Implementation of this project.

About

An out-of-box human parsing representation extractor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 56.6%
  • Python 38.7%
  • Cuda 2.8%
  • C++ 1.6%
  • Shell 0.3%
  • Dockerfile 0.0%