## pytorch-openpose
pytorch implementation of [openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) including **Body and Hand Pose Estimation**, and the pytorch model is directly converted from [openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) caffemodel by [caffemodel2pytorch](https://github.com/vadimkantorov/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](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/src/openpose/hand/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](https://github.com/Hzzone/pytorch-openpose) 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
* [dropbox](https://www.dropbox.com/sh/7xbup2qsn7vvjxo/AABWFksdlgOMXR_r5v3RwKRYa?dl=0)
* [baiduyun](https://pan.baidu.com/s/1IlkvuSi0ocNckwbnUe7j-g)
`*.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][ffmpeg]).
[ffmpeg]: https://pypi.org/project/ffmpeg-python/
### Todo list
- [x] convert caffemodel to pytorch.
- [x] Body Pose Estimation.
- [x] Hand Pose Estimation.
- [ ] Performance test.
- [ ] Speed up.
### Demo
#### Skeleton
![](images/skeleton.jpg)
#### Body Pose Estimation
![](images/body_preview.jpg)
#### Hand Pose Estimation
![](images/hand_preview.png)
#### Body + Hand
![](images/demo_preview.png)
#### Video Body
![](images/kc-e129SBb4-sample.processed.gif)
Attribution: [this video](https://www.youtube.com/watch?v=kc-e129SBb4).
#### Video Hand
![](images/yOAmYSW3WyU-sample.small.processed.gif)
Attribution: [this video](https://www.youtube.com/watch?v=yOAmYSW3WyU).
### 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}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
pytorch-openpose:openpose的pytorch实现,包括手和身体姿势估计
共32个文件
py:9个
jpg:8个
png:5个
3星 · 超过75%的资源 需积分: 48 44 下载量 159 浏览量
2021-05-06
05:14:09
上传
评论 2
收藏 19.29MB ZIP 举报
温馨提示
pytorch-openpose 的pytorch实施包括身体和手姿态估计,并且pytorch模型直接从转换 caffemodel通过 。 如果您有兴趣,也可以用相同的方法实现人脸关键点检测。请注意,人脸关键点检测器是使用[Simon等人,2003年。 2017]。 openpose通过身体姿势估计的结果来检测手,请参考的代码。 在本文中,它表示为: 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 a
资源详情
资源评论
资源推荐
收起资源包目录
pytorch-openpose-master.zip (32个子文件)
pytorch-openpose-master
demo_camera.py 1KB
.gitignore 90B
demo_video.py 4KB
images
keypoints_pose_18.png 11KB
body_preview_estimation.jpg 156KB
body_preview.jpg 1.03MB
body_preview_keypoints.jpg 137KB
hand.jpg 9KB
detect_hand_preview.jpg 59KB
hand_preview.png 74KB
demo_preview.png 150KB
hand_preview_estimation.png 55KB
keypoints_hand.png 181KB
ski.jpg 299KB
kc-e129SBb4-sample.processed.gif 10.75MB
demo.jpg 16KB
skeleton.jpg 156KB
yOAmYSW3WyU-sample.small.processed.gif 5.7MB
requirements.txt 54B
model
.gitkeep 0B
src
__init__.py 0B
hand_model_outputsize.py 355B
hand_model_output_size.json 14KB
hand.py 3KB
util.py 9KB
body.py 11KB
model.py 9KB
notebooks
detectHand.ipynb 154KB
hand.ipynb 680KB
network_graph.ipynb 74KB
README.md 4KB
demo.py 1KB
共 32 条
- 1
薯条说影
- 粉丝: 33
- 资源: 4689
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5