lyc8503 c095a7e3ca fk filelock 3 anni fa
..
bak b69fbade49 adapt origin model to new backend 4 anni fa
cap_file b69fbade49 adapt origin model to new backend 4 anni fa
log b69fbade49 adapt origin model to new backend 4 anni fa
run b69fbade49 adapt origin model to new backend 4 anni fa
src b69fbade49 adapt origin model to new backend 4 anni fa
src1 b69fbade49 adapt origin model to new backend 4 anni fa
video_pose c095a7e3ca fk filelock 3 anni fa
13.processed.mov 680ecde4ad switch to 25-point model and debugging. 4 anni fa
Dockerfile b69fbade49 adapt origin model to new backend 4 anni fa
README.md b69fbade49 adapt origin model to new backend 4 anni fa
_iamge 680ecde4ad switch to 25-point model and debugging. 4 anni fa
advice.py b69fbade49 adapt origin model to new backend 4 anni fa
analyse_by_npy.py b69fbade49 adapt origin model to new backend 4 anni fa
analyse_func.py b69fbade49 adapt origin model to new backend 4 anni fa
analyse_jump.py af7452c74c transfer codes. 4 anni fa
classify.py b69fbade49 adapt origin model to new backend 4 anni fa
config.py b69fbade49 adapt origin model to new backend 4 anni fa
db_project.py b69fbade49 adapt origin model to new backend 4 anni fa
demo.py b69fbade49 adapt origin model to new backend 4 anni fa
demo_camera.py b69fbade49 adapt origin model to new backend 4 anni fa
demo_func.py b69fbade49 adapt origin model to new backend 4 anni fa
demo_video.py b69fbade49 adapt origin model to new backend 4 anni fa
flask_api.py b69fbade49 adapt origin model to new backend 4 anni fa
gunicorn.conf.py b69fbade49 adapt origin model to new backend 4 anni fa
main.py b69fbade49 adapt origin model to new backend 4 anni fa
nohup.out 680ecde4ad switch to 25-point model and debugging. 4 anni fa
requirements.txt b69fbade49 adapt origin model to new backend 4 anni fa
stderr 611ec2e23c de an unknown bug 4 anni fa
stdout 611ec2e23c de an unknown bug 4 anni fa
supervisor.conf b69fbade49 adapt origin model to new backend 4 anni fa
video_to_photo.py 001bd00b69 transfer analyzer code. 4 anni fa

README.md

pytorch-openpose

pytorch implementation of openpose including Body and Hand Pose Estimation, and the pytorch model is directly converted from openpose caffemodel by caffemodel2pytorch. You could implement face keypoint detection in the same way if you are interested in. Pay attention to that the face keypoint detector was trained using the procedure described in [Simon et al. 2017] for hands.

openpose detects hand by the result of body pose estimation, please refer to the code of handDetector.cpp. In the paper, it states as:

This is an important detail: to use the keypoint detector in any practical situation, 
we need a way to generate this bounding box. 
We directly use the body pose estimation models from [29] and [4], 
and use the wrist and elbow position to approximate the hand location, 
assuming the hand extends 0.15 times the length of the forearm in the same direction.

If anybody wants a pure python wrapper, please refer to my pytorch implementation of openpose, maybe it helps you to implement a standalone hand keypoint detector.

Don't be mean to star this repo if it helps your research.

Getting Started

Install Requriements

Create a python 3.7 environement, eg:

conda create -n pytorch-openpose python=3.7
conda activate pytorch-openpose

Install pytorch by following the quick start guide here (use pip) https://download.pytorch.org/whl/torch_stable.html

Install other requirements with pip

pip install -r requirements.txt

Download the Models

*.pth files are pytorch model, you could also download caffemodel file if you want to use caffe as backend.

Download the pytorch models and put them in a directory named model in the project root directory

Run the Demo

Run:

python demo_camera.py

to run a demo with a feed from your webcam or run

python demo.py

to use a image from the images folder or run

python demo_video.py <video-file>

to process a video file (requires ffmpeg-python).

Todo list

  • convert caffemodel to pytorch.
  • Body Pose Estimation.
  • Hand Pose Estimation.
  • Performance test.
  • Speed up.

Demo

Skeleton

Body Pose Estimation

Hand Pose Estimation

Body + Hand

Video Body

Attribution: this video.

Video Hand

Attribution: this video.

Citation

Please cite these papers in your publications if it helps your research (the face keypoint detector was trained using the procedure described in [Simon et al. 2017] for hands):

@inproceedings{cao2017realtime,
  author = {Zhe Cao and Tomas Simon and Shih-En Wei and Yaser Sheikh},
  booktitle = {CVPR},
  title = {Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields},
  year = {2017}
}

@inproceedings{simon2017hand,
  author = {Tomas Simon and Hanbyul Joo and Iain Matthews and Yaser Sheikh},
  booktitle = {CVPR},
  title = {Hand Keypoint Detection in Single Images using Multiview Bootstrapping},
  year = {2017}
}

@inproceedings{wei2016cpm,
  author = {Shih-En Wei and Varun Ramakrishna and Takeo Kanade and Yaser Sheikh},
  booktitle = {CVPR},
  title = {Convolutional pose machines},
  year = {2016}
}