Coder Social home page Coder Social logo

ce2p's Introduction

CE2P

This respository includes a PyTorch implementation of CE2P that won the 1st places of single human parsing in the 2nd LIP Challenge. The M-CE2P used for multiple human parsing is provided in https://github.com/RanTaimu/M-CE2P.

The code is based upon https://github.com/speedinghzl/pytorch-segmentation-toolbox, and the data processing is based upon https://github.com/Microsoft/human-pose-estimation.pytorch

Requirements

python 3.6

PyTorch 0.4.1

To install PyTorch, please refer to https://github.com/pytorch/pytorch#installation.

Or using anaconda: conda env create -f environment.yaml

Or to use Pytorch 1.0, just replace 'libs' with 'modules' in https://github.com/mapillary/inplace_abn, and rename it to 'libs'.

Compiling

Some parts of InPlace-ABN have a native CUDA implementation, which must be compiled with the following commands:

cd libs
sh build.sh
python build.py

The build.sh script assumes that the nvcc compiler is available in the current system search path. The CUDA kernels are compiled for sm_50, sm_52 and sm_61 by default. To change this (e.g. if you are using a Kepler GPU), please edit the CUDA_GENCODE variable in build.sh.

Dataset and pretrained model

Note that the left and right label should be swapped when the label file is flipped.

Plesae download LIP dataset and create symbolic links: ln -s YOUR_LIP_DATASET_DIR dataset/LIP

The contents of LIP Dataset include:

├── train_images

├── train_segmentations

├── val_images

├── val_segmentations

├── test_images

├── train_id.txt

├── val_id.txt

├── test_id.txt

Please download imagenet pretrained resent-101 from baidu drive or Google drive, and put it into dataset folder.

Training and Evaluation

./run.sh

To evaluate the results, please download 'LIP_epoch_149.pth' from baidu drive or Google drive, and put into snapshots directory.

./run_evaluate.sh

The parsing result of the provided 'LIP_epoch_149.pth' is 53.88 without any bells and whistles, 53.88

If this code is helpful for your research, please cite the following paper:

@inproceedings{ruan2019devil,
  title={Devil in the details: Towards accurate single and multiple human parsing},
  author={Ruan, Tao and Liu, Ting and Huang, Zilong and Wei, Yunchao and Wei, Shikui and Zhao, Yao},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={33},
  pages={4814--4821},
  year={2019}
}

ce2p's People

Contributors

liutinglt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.