All Projects → PeikeLi → Self Correction Human Parsing

PeikeLi / Self Correction Human Parsing

Licence: mit
An out-of-box human parsing representation extractor.

Projects that are alternatives of or similar to Self Correction Human Parsing

Spacenet building detection
Project to train/test convolutional neural networks to extract buildings from SpaceNet satellite imageries.
Stars: ✭ 83 (-73.98%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Multi Task Refinenet
Multi-Task (Joint Segmentation / Depth / Surface Normas) Real-Time Light-Weight RefineNet
Stars: ✭ 139 (-56.43%)
Mutual labels:  jupyter-notebook, semantic-segmentation
3dunet abdomen cascade
Stars: ✭ 91 (-71.47%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Deeplabv3 Plus
Tensorflow 2.3.0 implementation of DeepLabV3-Plus
Stars: ✭ 32 (-89.97%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Deep Learning In Production
Develop production ready deep learning code, deploy it and scale it
Stars: ✭ 216 (-32.29%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Multiclass Semantic Segmentation Camvid
Tensorflow 2 implementation of complete pipeline for multiclass image semantic segmentation using UNet, SegNet and FCN32 architectures on Cambridge-driving Labeled Video Database (CamVid) dataset.
Stars: ✭ 67 (-79%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Unet
Generic U-Net Tensorflow 2 implementation for semantic segmentation
Stars: ✭ 100 (-68.65%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Pytorch Unet
Simple PyTorch implementations of U-Net/FullyConvNet (FCN) for image segmentation
Stars: ✭ 470 (+47.34%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Kili Playground
Simplest and fastest image and text annotation tool.
Stars: ✭ 166 (-47.96%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Keras Segmentation Deeplab V3.1
An awesome semantic segmentation model that runs in real time
Stars: ✭ 156 (-51.1%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Kaggle Carvana Image Masking Challenge
Top 15% ranked solution to the Carvana Image Masking Challenge on Kaggle
Stars: ✭ 13 (-95.92%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Human Segmentation Pytorch
Human segmentation models, training/inference code, and trained weights, implemented in PyTorch
Stars: ✭ 289 (-9.4%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Deeplab v3
Tensorflow Implementation of the Semantic Segmentation DeepLab_V3 CNN
Stars: ✭ 768 (+140.75%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Unet Tgs
Applying UNET Model on TGS Salt Identification Challenge hosted on Kaggle
Stars: ✭ 81 (-74.61%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Pytorch 3dunet
3D U-Net model for volumetric semantic segmentation written in pytorch
Stars: ✭ 765 (+139.81%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Deep Residual Unet
ResUNet, a semantic segmentation model inspired by the deep residual learning and UNet. An architecture that take advantages from both(Residual and UNet) models.
Stars: ✭ 97 (-69.59%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Steal
STEAL - Learning Semantic Boundaries from Noisy Annotations (CVPR 2019)
Stars: ✭ 424 (+32.92%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Probabilistic unet
A U-Net combined with a variational auto-encoder that is able to learn conditional distributions over semantic segmentations.
Stars: ✭ 427 (+33.86%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Fcn For Semantic Segmentation
Implemention of FCN-8 and FCN-16 with Keras and uses CRF as post processing
Stars: ✭ 155 (-51.41%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Pytorch tiramisu
FC-DenseNet in PyTorch for Semantic Segmentation
Stars: ✭ 267 (-16.3%)
Mutual labels:  jupyter-notebook, semantic-segmentation

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:

  • [x] Out-of-box human parsing extractor for other downstream applications.
  • [x] Pretrained model on three popular single person human parsing datasets.
  • [x] Training and inferecne code.
  • [x] 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

The easiest way to get started is to use our trained SCHP models on your own images to extract human parsing representations. Here we provided state-of-the-art trained models on three popular datasets. Theses three datasets have different label system, you can choose the best one to fit on your own task.

LIP (exp-schp-201908261155-lip.pth)

  • mIoU on LIP validation: 59.36 %.

  • LIP is the largest single person human parsing dataset with 50000+ images. This dataset focus more on the complicated real scenarios. LIP has 20 labels, including 'Background', 'Hat', 'Hair', 'Glove', 'Sunglasses', 'Upper-clothes', 'Dress', 'Coat', 'Socks', 'Pants', 'Jumpsuits', 'Scarf', 'Skirt', 'Face', 'Left-arm', 'Right-arm', 'Left-leg', 'Right-leg', 'Left-shoe', 'Right-shoe'.

ATR (exp-schp-201908301523-atr.pth)

  • mIoU on ATR test: 82.29%.

  • ATR is a large single person human parsing dataset with 17000+ images. This dataset focus more on fashion AI. ATR has 18 labels, including 'Background', 'Hat', 'Hair', 'Sunglasses', 'Upper-clothes', 'Skirt', 'Pants', 'Dress', 'Belt', 'Left-shoe', 'Right-shoe', 'Face', 'Left-leg', 'Right-leg', 'Left-arm', 'Right-arm', 'Bag', 'Scarf'.

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'.

Choose one and have fun on your own task!

To extract the human parsing representation, simply put your own image in the INPUT_PATH folder, then download a pretrained model and run the following command. The output images with the same file name will be saved in OUTPUT_PATH

python simple_extractor.py --dataset [DATASET] --model-restore [CHECKPOINT_PATH] --input-dir [INPUT_PATH] --output-dir [OUTPUT_PATH]

[Updated] Here is also a colab demo example for quick inference provided by @levindabhi.

The DATASET command has three options, including 'lip', 'atr' and 'pascal'. Note each pixel in the output images denotes the predicted label number. The output images have the same size as the input ones. To better visualization, we put a palette with the output images. We suggest you to read the image with PIL.

If you need not only the final parsing images, but also the feature map representations. Add --logits command to save the output feature maps. These feature maps are the logits before softmax layer.

Dataset Preparation

Please download the LIP dataset following the below structure.

data/LIP
|--- train_imgaes # 30462 training single person images
|--- val_images # 10000 validation single person images
|--- train_segmentations # 30462 training annotations
|--- val_segmentations # 10000 training annotations
|--- train_id.txt # training image list
|--- val_id.txt # validation image list

Training

python train.py 

By default, the trained model will be saved in ./log directory. Please read the arguments for more details.

Evaluation

python evaluate.py --model-restore [CHECKPOINT_PATH]

CHECKPOINT_PATH should be the path of trained model.

Extension on Multiple Human Parsing

Please read MultipleHumanParsing.md for more details.

Citation

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

@article{li2019self,
  title={Self-Correction for Human Parsing},
  author={Li, Peike and Xu, Yunqiu and Wei, Yunchao and Yang, Yi},
  journal={arXiv preprint arXiv:1910.09777},
  year={2019}
}

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].