资源算法Pytorch0.4.1_Openpose

Pytorch0.4.1_Openpose

2020-03-06 | |  161 |   0 |   0

Pytorch0.4.1_Realtime_Multi-Person_Pose_Estimation

This is an implementation of Realtime Multi-Person Pose Estimation with Pytorch. The original project is here.

This repo is mainly based on the Chainer Implementation from DeNA.

This project is licensed under the terms of the license

Some contributions are:

  1. Switching the Chainer backbone to Pytorch

  2. Pretrained models in pytorch are provided

  3. Chinese comments to better understanding the method

Content

  1. Converting caffe model

  2. Testing

  3. Training

Test using the trained model

Download the following pretrained models to models folder

posenet.pth : @Google Drive @One Drive

facenet.pth : @Google Drive @One Drive

handnet.pth : @Google Drive @One Drive

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.

python pose_detect.py models/posenet.pth -i data/football.jpg

Similarly, execute the following command for face estimation. The resulting image will be saved as result.png.

python face_detector.py models/facenet.pth -i data/face.png

Similarly, execute the following command for hand estimation. The resulting image will be saved as result.jpg.

python hand_detector.py models/handnet.pth -i data/hand.jpg

Train your model

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 ../../

Download VGG-19 pretrained model to models folder

Generate and save image masks

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

Related repository

Citation

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}
  }


上一篇:openpose-docker

下一篇:OpenPose_PythonOpenCV

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...