Official pytorch Code for CVPR2019 paper "Fast Human Pose Estimation" https://arxiv.org/abs/1811.05419
This is an official pytorch implementation of Fast Human Pose Estimation.
In this work, we focus on the two problems
In our paper
The results on the MPII dataset demonstrate the effectiveness of our approach. We re-implemented the FPD using the HRNet codebase and provided extra evaluation on the COCO dataset. Our method (FPD) can work without ground-truth labels, it can utilize unlabeled images.
For the MPII dataset
For the COCO dataset
If you want to further improve the performance of the student model.You can remove the supervision of ground-truth label in the FPD when there are unlabeled images.
Arch | Head | Shoulder | Elbow | Wrist | Hip | Knee | Ankle | Mean | [email protected] |
---|---|---|---|---|---|---|---|---|---|
hourglass_teacher | 97.169 | 96.382 | 90.830 | 86.466 | 90.012 | 86.802 | 82.664 | 90.520 | 38.275 |
hourglass_student | 96.828 | 95.194 | 87.728 | 82.919 | 87.900 | 82.551 | 78.270 | 87.934 | 34.634 |
hourglass_student_FPD* | 96.385 | 94.905 | 87.847 | 81.875 | 87.225 | 81.906 | 78.955 | 87.598 | 34.359 |
hourglass_student_FPD | 96.930 | 95.550 | 89.040 | 84.444 | 88.939 | 84.021 | 80.703 | 89.040 | 36.144 |
Note:
Arch | Input size | #Params | GFLOPs | AP | Ap .5 | AP .75 | AP (M) | AP (L) | AR | AR .5 | AR .75 | AR (M) | AR (L) |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pose_hrnet_w48_teacher | 256x192 | 63.6M | 14.6 | 0.750 | 0.906 | 0.824 | 0.713 | 0.819 | 0.803 | 0.941 | 0.867 | 0.760 | 0.866 |
pose_hrnet_w32_student | 256x192 | 28.5M | 7.1 | 0.744 | 0.905 | 0.819 | 0.708 | 0.810 | 0.798 | 0.942 | 0.865 | 0.757 | 0.858 |
pose_hrnet_w32_student_FPD | 256x192 | 28.5M | 7.1 | 0.751 | 0.906 | 0.823 | 0.714 | 0.820 | 0.804 | 0.943 | 0.869 | 0.762 | 0.865 |
Note:
The code is developed using python 3.5 on Ubuntu 16.04. NVIDIA GPUs are needed. The code is developed and tested using 4 TITAN XP GPU cards. Other platforms or GPU cards are not fully tested.
For the MPII dataset, the original annotation files are in matlab format. We have converted them into json format, you also need to download them from OneDrive or GoogleDrive.
Extract them under {POSE_ROOT}/data
, your directory tree should look like this:
${POSE_ROOT}/data/mpii
├── images
└── mpii_human_pose_v1_u12_1.mat
|—— annot
| |—— gt_valid.mat
└── |—— test.json
| |—— train.json
| |—— trainval.json
| |—— valid.json
└── images
|—— 000001163.jpg
|—— 000003072.jpg
For the COCO dataset, your directory tree should look like this:
${POSE_ROOT}/data/coco
├── annotations
├── images
│ ├── test2017
│ ├── train2017
│ └── val2017
└── person_detection_results
Your directory tree should look like this:
$HOME/models
├── pytorch
│ ├── imagenet
│ │ ├── hrnet_w32-36af842e.pth
│ │ ├── hrnet_w48-8ef0771d.pth
│ │ └── resnet50-19c8e357.pth
│ ├── pose_coco
│ │ ├── pose_hrnet_w32_256x192.pth
│ │ └── pose_hrnet_w48_256x192.pth
│ └── pose_mpii
│ ├── bs4_hourglass_128_4_1_16_0.00025_0_140_87.934_model_best.pth
│ ├── bs4_hourglass_256_8_1_16_0.00025_0_140_90.520_model_best.pth
│ ├── pose_hrnet_w32_256x256.pth
│ └── pose_hrnet_w48_256x256.pth
└── student_FPD
├── hourglass_student_FPD*.pth
├── hourglass_student_FPD.pth
└── pose_hrnet_w32_student_FPD.pth
Setting the parameters in the file prepare_env.sh
as follows:
# DATASET_ROOT=$HOME/datasets
# COCO_ROOT=${DATASET_ROOT}/MSCOCO
# MPII_ROOT=${DATASET_ROOT}/MPII
# MODELS_ROOT=${DATASET_ROOT}/models
Then execute:
bash prepare_env.sh
If you like, you can prepare the environment step by step
For MPII dataset: [GoogleDrive] [BaiduDrive]
hourglass student model
hourglass teacher model
For COCO dataset: [GoogleDrive] [BaiduDrive]
HRNet-W32 student model
HRNet-W48 teacher model
# COCO dataset training
cd scripts/fpd_coco
bash run_train_hrnet.sh
# MPII dataset training
cd scripts/fpd_mpii
bash run_train_hrnet.sh # using hrnet model
bash run_train_hg.sh # using hourglass model
# General training methods, we also provide script shell
cd scripts/mpii
bash run_train_hrnet.sh # using hrnet model
bash run_train_hg.sh # using hourglass model
bash run_train_resnet.sh # using resnet model
cd scripts/coco
bash run_train_hrnet.sh # using hrnet model
bash run_train_hg.sh # using hourglass model
bash run_train_resnet.sh # using resnet model
For MPII dataset:
hourglass student FPD model
For COCO dataset:
HRNet-W32 student FPD model
Note:
coco_hrnet_w48_fpd_w32_256x256: pose_hrnet_w32_student_FPD model training resutls.
mpii_hourglass_8_256_fpd_hg_4_128_not_pretrained: hourglass_student_FPD* model training resutls.
mpii_hourglass_8_256_fpd_hg_4_128_pretrained: hourglass_student_FPD model training resutls.
If you use our code or models in your research, please cite with:
@InProceedings{Zhang_2019_CVPR,
author = {Zhang, Feng and Zhu, Xiatian and Ye, Mao},
title = {Fast Human Pose Estimation},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}
Fast_Human_Pose_Estimation_Pytorch
Thanks for the open-source HRNet