• Stars
    star
    2,040
  • Rank 22,678 (Top 0.5 %)
  • Language
    Jupyter Notebook
  • Created about 6 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

pytorch implementation of openpose including Hand and Body Pose Estimation.

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

More Repositories

1

Precipitation-Nowcasting

pytorch implemention of trajGRU.
Python
547
star
2

MTLFace

When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework (CVPR 2021 oral & TPAMI 2022)
Jupyter Notebook
166
star
3

ProPos

Self-Supervised Learning for Deep Clustering (TPAMI 2022)
Python
98
star
4

PseCo

(CVPR 2024) Point, Segment and Count: A Generalized Framework for Object Counting
Jupyter Notebook
69
star
5

TCL

Twin Contrastive Learning with Noisy Labels (CVPR 2023)
Python
66
star
6

DU-GAN

DU-GAN: Generative Adversarial Networks with Dual-Domain U-Net Based Discriminators for Low-Dose CT Denoising
Jupyter Notebook
57
star
7

PFA-GAN

PFA-GAN: Progressive Face Aging with Generative Adversarial Network (TIFS 2021)
Python
45
star
8

torch_clustering

A pure PyTorch implementation of kmeans and GMM with distributed clustering.
Python
36
star
9

AdaTrans

Adaptive Nonlinear Latent Transformation for Conditional Face Editing (ICCV 2023)
Jupyter Notebook
34
star
10

Hand-Keypoint-Detection

Hand and Keypoint detection by caffe.
Python
30
star
11

grad-CAM-pycaffe

grad-CAM visulization technique of pycaffe, regression task of Medical Image.
Python
26
star
12

E-Book

一款网络小说阅读器(仿追书神器)
HTML
22
star
13

AgeFlow

AgeFlow: Conditional Age Progression and Regression with Normalizing Flows (IJCAI 2021)
Python
20
star
14

Bone-Age-Assessment

Deep Learning and Training dicom file with Caffe and Regression Prediction by age label.
JavaScript
15
star
15

CNTK_Realtime_Multi-Person_Pose_Estimation

Microsoft CNTK implementation of Realtime Multi-Person Pose Estimation.
Python
8
star
16

determination-of-identity

Caffe Siamese Network and Similarity by feature vector.
Jupyter Notebook
7
star
17

hzzone.github.io

HTML
7
star