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.
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.
- Pytorch 0.3.1
- tqdm
- Pillow
- python-opencv
- other packages required by CE2P
Just do what CE2P requires to do :)
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
.
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.
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.
- Modify
USE_CIHP_DATA
to run specific dataset. - Modify dataset related paths in
M-CE2P-test.py
. - Simply run
python M-CE2P-test.py
to generate the results(stored inoutputs
as default).
metrics
folder contains all the metric codes used in our papar.