RanTaimu / M-CE2P

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

M-CE2P

The codes for generating masks and boxes for MHP v2.0 are now updated in code_for_maskrcnn folder. The process for CIHP dataset is similar with that for MHP v2.0.

Introduction

This respository includes a PyTorch implementation of M-CE2P that won the 1st places of Multi-Person Human Parsing Challenge(track2) and Fine-Grained Multi-Human Human Parsing Challenge(track5) in the 2nd LIP Challenge.

The code is based upon CE2P.

Requirements

  • Pytorch 0.3.1
  • tqdm
  • Pillow
  • python-opencv
  • other packages required by CE2P

Basic Setup

Just do what CE2P requires to do :)

Dataset and Model

Please download CIHP and MHP v2.0. In the meanwhile, create a folder named weights in root folder of this project, download trained model(which are also used in our paper) from Baidu Drive(Code: yq8f) or Google Drive and put them into weights.

Training

To train the model, please modify ./code_for_maskrcnn/MHP_infer_simple_train.py to fit your requirement and follow the step introduced in CE2P.

Evaluation

Human Mask and Bounding Box Generation

We use Mask R-CNN in Detectron to generate human masks and bounding boxes associated with an input image, and use the default configuration introduced in Quick Start.

For the convenience of users, we also provide the masks and boxes in Baidu Drive and Google Drive, which are generated on validation sets of the two datasets. You can also use script ./code_for_maskrcnn/MHP_infer_simple_test.py to generate by yourself.

Run Inference

  1. Modify USE_CIHP_DATA to run specific dataset.
  2. Modify dataset related paths in M-CE2P-test.py.
  3. Simply run python M-CE2P-test.py to generate the results(stored in outputs as default).

Evaluation

metrics folder contains all the metric codes used in our papar.

About


Languages

Language:Python 89.3%Language:Cuda 5.1%Language:C++ 3.4%Language:Shell 1.1%Language:C 1.1%