Execute the following command with the weight parameter file and the image file as arguments for estimating pose. The resulting image will be saved as result.jpg.
This is a training procedure using COCO 2017 dataset.
Download COCO 2017 dataset
cd data
bash getData.sh
If you already downloaded the dataset by yourself, please skip this procedure and change coco_dir in entity.py to the dataset path that was already downloaded.
Setup COCO API
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI/
make
python setup.py install
cd ../../
Mask images are created in order to filter out people regions who were not labeled with any keypoints. vis option can be used to visualize the mask generated from each image.
python gen_ignore_mask.py
Train with COCO dataset
For each 1000 iterations, the recent weight parameters are saved as a weight file model_iter_1000.
python train.py
More configuration about training are in the entity.py file
Please cite the original paper in your publications if it helps your research:
@InProceedings{cao2017realtime,
title = {Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields},
author = {Zhe Cao and Tomas Simon and Shih-En Wei and Yaser Sheikh},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2017}
}