Home

Awesome

Regularizing Vector Embedding in Bottom-Up Human Pose Estimation

[Regularizing Vector Embedding in Bottom-Up Human Pose Estimation],
Haixin Wang, Lu Zhou, Yingying Chen, Ming Tang, jinqiao Wang
In: European Conference on Computer Vision (ECCV), 2022

Introduction

This is the official code of Regularizing Vector Embedding in Bottom-Up Human Pose Estimation.
In this paper, we probe the limitation of keypoint grouping in Associative Embedding \cite{newell2017associative} and find that different dimensions of embeddings in an image are highly linearly correlated. To address this issue, we propose a novel keypoint grouping method named Coupled Embedding for bottom-up human pose estimation. Our method imposes an additional constraint on embeddings to learn sparse multidimensional embeddings and improve heatmap regression with the embedded scale information. Our method achieves outstanding performance on CrowdPose Test and COCO Test-dev. We conduct a series of experiments and the results show that our model has significant advantages in complex scenes.

Main Results

Results on COCO test-dev2017

ModelInput sizeMulti-Scale TestAPAP .5AP .75AP (M)AP (L)
ce_hrnet_w3251267.088.973.760.476.4
ce_hrnet_w4864068.488.775.563.875.9
ce_hrhrnet_w3251268.890.375.262.977.1
ce_hrhrnet_w4864071.190.877.866.478.0
ce_hrhrnet_w4864072.891.279.968.379.3

Results on CrowdPose test

MethodInput sizeMulti-Scale TestAPAP .5AP .75AP (E)AP (M)AP (H)
ce_hrnet_w3251268.989.074.276.369.560.8
ce_hrnet_w4864070.189.875.577.570.862.2
ce_hrhrnet_w3251269.689.774.976.970.361.6
ce_hrhrnet_w4864070.589.976.077.771.162.4
ce_hrhrnet_w4864071.690.177.379.072.263.3
ce_hrhrnet_w48+64072.989.578.879.673.764.5
ce_hrhrnet_w48+64074.591.180.281.375.466.2

Note: Flipping test is used. + indicates the model is pretrained on COCO.

Model Zoo

Please download models from Google Drive or Baidu Netdisk (password: 7amz)

Data preparation

For COCO data, please download from COCO, 2017 Train/Val is needed for COCO keypoints training and validation. For CrowdPose data, please download from CrowdPose, Train/Val is needed for CrowdPose keypoints training. Extract them under ${YOUR_DATA_DIR}, and make them look like this:

${YOUR_DATA_DIR}
    |-- coco
    `-- |-- annotations
        |   |-- person_keypoints_train2017.json
        |   |-- person_keypoints_val2017.json
        |   `-- image_info_test-dev2017.json
        |-- train2017
        |-- val2017
        `-- test2017
            
    |-- crowdpose
    `-- |-- json
        |   |-- crowdpose_train.json
        |   |-- crowdpose_val.json
        |   |-- crowdpose_trainval.json (generated by tools/crowdpose_concat_train_val.py)
        |   `-- crowdpose_test.json
        `-- images

Quick start

  1. Clone this repo, and your directory tree should look like this:

    CoupledEmbedding
    ├── config
    ├── datasets
    ├── models
    ├── pretrained
    ├── README.md
    ├── requirements.txt
    ├── test.py
    ├── train.txt
    └── utils.py
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Download pretrained backbone from openmmlab:

    wget https://download.openmmlab.com/mmpose/pretrain_models/hrnet_w32-36af842e.pth
    wget https://download.openmmlab.com/mmpose/pretrain_models/hrnet_w48-8ef0771d.pth
    

    The directory should look like this:

    CoupledEmbedding
    |-- pretrained
    `-- |-- hrnet_w32-36af842e.pth
        `-- hrnet_w48-8ef0771d.pth
    
  4. Training with multiple gpus (take COCO as the example):

    python train.py \
        config/coco/hrnet32_512.py --num_gpus ${NUM_GPUS} --distributed True --work_dir ${YOUR WORK DIR}
    
  5. Testing with single gpu on validation set:

    python test.py \
        config/coco/hrnet32_512.py ${YOUR WORK DIR}/coco/ce_hrnet_w32.pth --set val
    
  6. Testing with single gpu on test set:

    python test.py \
        config/coco/hrnet32_512.py ${YOUR WORK DIR}/coco/ce_hrnet_w32.pth --set test
    
  7. Testing with multiple gpus:

    python test.py \
        config/coco/hrnet32_512.py ${YOUR WORK DIR}/coco/ce_hrnet_w32.pth --set test --num_gpus ${NUM_GPUS} --distributed True