xiehaizheng / Convolutional-Pose-Machines-Pytorch

Pytroch version of Convolutional Pose Machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convolutional-Pose-Machines-Pytorch

This is a pytroch version of Convolutional Pose Machines, you can find more details in the original paper Convolutional Pose Machines

Results

a

b

c

y

The result is generated by the model, which has trained 100 epoches.

Requirements

  • Python 2.7
  • PyTorch 0.3.0
  • torchvision 0.2.0
  • OpenCv > 2.4.9

The data set

  • Download the data set for training LSPet
  • (Alternative) Download the data set for validation LSP
  • When you want to train some other datasets, please change the code to correspond to your datasets.

Usage

Train

  • Set the train parameters in " config/config.yml ".
  • Go to the "train_val" folder cd train_val.
  • with val

python cpm_train.py --gpu 0 1 --train_dir ../dataset/train/lspet_dataset --val_dir ../dataset/val/lsp_dataset --config ../config/config.yml
  • without val

python cpm_train.py --gpu 0 1 --train_dir ../dataset/train/lspet_dataset --config ../config/config.yml
  • You can also train the model like
sudo sh cpm_train.sh

Test

  • Go to the "test" folder cd test.
python cpm_test.py

Pre-trained model

Notice

  • The code of test is just used for visualization,you can change the code to test your own image on condition that you have trained another model "person-center-network"(similar to CPMs).
  • I hope that'll be helpful for you.

About

Pytroch version of Convolutional Pose Machines


Languages

Language:Python 99.1%Language:Shell 0.9%