Home

Awesome

Introduction

This is the official code of Rethinking the Heatmap Regression for Bottom-up Human Pose Estimation. This paper has been accepted to CVPR2021.

This repo is built on Bottom-up-Higher-HRNet.

Main Results

Results on COCO val2017 without multi-scale test

MethodBackboneInput size#ParamsGFLOPsAPAp .5AP .75AP (M)AP (L)
HigherHRNetHRNet-w3251228.6M47.967.186.273.061.576.1
HigherHRNet + SWAHRHRNet-w3251228.6M48.068.987.874.963.077.4
HigherHRNetHRNet-w4864063.8M154.369.987.276.165.476.4
HigherHRNet + SWAHRHRNet-w4864063.8M154.670.888.576.866.377.4

Results on COCO val2017 with multi-scale test

MethodBackboneInput size#ParamsGFLOPsAPAp .5AP .75AP (M)AP (L)
HigherHRNetHRNet-w3251228.6M47.969.987.176.065.377.0
HigherHRNet + SWAHRHRNet-w3251228.6M48.071.488.977.866.378.9
HigherHRNetHRNet-w4864063.8M154.372.188.478.267.878.3
HigherHRNet + SWAHRHRNet-w4864063.8M154.673.289.879.169.179.3

Results on COCO test-dev2017 without multi-scale test

MethodBackboneInput size#ParamsGFLOPsAPAp .5AP .75AP (M)AP (L)
OpenPose*----61.884.967.557.168.2
HourglassHourglass512277.8M206.956.681.861.849.867.0
PersonLabResNet-152140168.7M405.566.588.072.662.472.3
PifPaf----66.7--62.472.9
Bottom-up HRNetHRNet-w3251228.5M38.964.186.370.457.473.9
HigherHRNetHRNet-w3251228.6M47.966.487.572.861.274.2
HigherHRNet + SWAHRHRNet-w3251228.6M48.067.988.974.562.475.5
HigherHRNetHRNet-w4864063.8M154.368.488.275.164.474.2
HigherHRNet + SWAHRHRNet-w4864063.8M154.670.289.976.965.277.0

Results on COCO test-dev2017 with multi-scale test

MethodBackboneInput size#ParamsGFLOPsAPAp .5AP .75AP (M)AP (L)
HourglassHourglass512277.8M206.963.085.768.958.070.4
Hourglass*Hourglass512277.8M206.965.586.872.360.672.6
PersonLabResNet-152140168.7M405.568.789.075.464.175.5
HigherHRNetHRNet-w4864063.8M154.370.589.377.266.675.8
HigherHRNet + SWAHRHRNet-w4864063.8M154.672.090.778.867.877.7

Results on CrowdPose test

MethodAPAp .5AP .75AP (E)AP (M)AP (H)
Mask-RCNN57.283.560.369.457.945.8
AlphaPose61.081.366.071.261.451.1
SPPE66.0.84.271.575.566.357.4
OpenPose---62.748.732.3
HigherHRNet65.986.470.673.366.557.9
HigherHRNet + SWAHR71.688.577.678.972.463.0
HigherHRNet*67.687.472.675.868.158.9
HigherHRNet + SWAHR*73.890.579.981.274.764.7

'*' indicates multi-scale test

Installation

The details about preparing the environment and datasets can be referred to README.md.

Downlaod our pretrained weights from BaidunYun(Password: 8weh) or GoogleDrive to ./models.

Training and Testing

Testing on COCO val2017 dataset using pretrained weights

For single-scale testing:

python tools/dist_valid.py \
    --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml \
    TEST.MODEL_FILE models/pose_coco/pose_higher_hrnet_w32_512.pth

By default, we use horizontal flip. To test without flip:

python tools/dist_valid.py \
    --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml \
    TEST.MODEL_FILE models/pose_coco/pose_higher_hrnet_w32_512.pth \
    TEST.FLIP_TEST False

Multi-scale testing is also supported, although we do not report results in our paper:

python tools/dist_valid.py \
    --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml \
    TEST.MODEL_FILE models/pose_coco/pose_higher_hrnet_w32_512.pth \
    TEST.SCALE_FACTOR '[0.5, 1.0, 2.0]'

Training on COCO train2017 dataset

python tools/dist_train.py \
    --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml 

By default, it will use all available GPUs on the machine for training. To specify GPUs, use

CUDA_VISIBLE_DEVICES=0,1 python tools/dist_train.py \
    --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml 

Testing on your own images

python tools/dist_inference.py \
    --img_dir path/to/your/directory/of/images \
    --save_dir path/where/results/are/saved \
    --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml \
    TEST.MODEL_FILE models/pose_coco/pose_higher_hrnet_w32_512.pth \
    TEST.SCALE_FACTOR '[0.5, 1.0, 2.0]'

Citation

If you find this work or code is helpful in your research, please cite:

@inproceedings{LuoSWAHR,
  title={Rethinking the Heatmap Regression for Bottom-up Human Pose Estimation},
  author={Zhengxiong Luo and Zhicheng Wang and Yan Huang and Liang Wang and Tieniu Tan and Erjin Zhou},
  booktitle={CVPR},
  year={2021}
}