# tf-pose-estimation
'Openpose', human pose estimation algorithm, have been implemented using Tensorflow. It also provides several variants that have some changes to the network structure for **real-time processing on the CPU or low-power embedded devices.**
**You can even run this on your macbook with a descent FPS!**
Original Repo(Caffe) : https://github.com/CMU-Perceptual-Computing-Lab/openpose
| CMU's Original Model</br> on Macbook Pro 15" | Mobilenet-thin </br>on Macbook Pro 15" | Mobilenet-thin</br>on Jetson TX2 |
|:---------|:--------------------|:----------------|
| ![cmu-model](/etcs/openpose_macbook_cmu.gif) | ![mb-model-macbook](/etcs/openpose_macbook_mobilenet3.gif) | ![mb-model-tx2](/etcs/openpose_tx2_mobilenet3.gif) |
| **~0.6 FPS** | **~4.2 FPS** @ 368x368 | **~10 FPS** @ 368x368 |
| 2.8GHz Quad-core i7 | 2.8GHz Quad-core i7 | Jetson TX2 Embedded Board |
Implemented features are listed here : [features](./etcs/feature.md)
## Important Updates
- 2019.3.12 Add new models using mobilenet-v2 architecture. See : [experiments.md](./etcs/experiments.md)
- 2018.5.21 Post-processing part is implemented in c++. It is required compiling the part. See: https://github.com/ildoonet/tf-pose-estimation/tree/master/src/pafprocess
- 2018.2.7 Arguments in run.py script changed. Support dynamic input size.
## Install
### Dependencies
You need dependencies below.
- python3
- tensorflow 1.4.1+
- opencv3, protobuf, python3-tk
- slidingwindow
- https://github.com/adamrehn/slidingwindow
- I copied from the above git repo to modify few things.
### Install
Clone the repo and install 3rd-party libraries.
```bash
$ git clone https://www.github.com/ildoonet/tf-pose-estimation
$ cd tf-pose-estimation
$ pip3 install -r requirements.txt
```
Build c++ library for post processing. See : https://github.com/ildoonet/tf-pose-estimation/tree/master/tf_pose/pafprocess
```
$ cd tf_pose/pafprocess
$ swig -python -c++ pafprocess.i && python3 setup.py build_ext --inplace
```
### Package Install
Alternatively, you can install this repo as a shared package using pip.
```bash
$ git clone https://www.github.com/ildoonet/tf-pose-estimation
$ cd tf-openpose
$ python setup.py install # Or, `pip install -e .`
```
## Models & Performances
See [experiments.md](./etc/experiments.md)
### Download Tensorflow Graph File(pb file)
Before running demo, you should download graph files. You can deploy this graph on your mobile or other platforms.
- cmu (trained in 656x368)
- mobilenet_thin (trained in 432x368)
- mobilenet_v2_large (trained in 432x368)
- mobilenet_v2_small (trained in 432x368)
CMU's model graphs are too large for git, so I uploaded them on an external cloud. You should download them if you want to use cmu's original model. Download scripts are provided in the model folder.
```
$ cd models/graph/cmu
$ bash download.sh
```
## Demo
### Test Inference
You can test the inference feature with a single image.
```
$ python run.py --model=mobilenet_thin --resize=432x368 --image=./images/p1.jpg
```
The image flag MUST be relative to the src folder with no "~", i.e:
```
--image ../../Desktop
```
Then you will see the screen as below with pafmap, heatmap, result and etc.
![inferent_result](./etcs/inference_result2.png)
### Realtime Webcam
```
$ python run_webcam.py --model=mobilenet_thin --resize=432x368 --camera=0
```
Then you will see the realtime webcam screen with estimated poses as below. This [Realtime Result](./etcs/openpose_macbook13_mobilenet2.gif) was recored on macbook pro 13" with 3.1Ghz Dual-Core CPU.
## Python Usage
This pose estimator provides simple python classes that you can use in your applications.
See [run.py](run.py) or [run_webcam.py](run_webcam.py) as references.
```python
e = TfPoseEstimator(get_graph_path(args.model), target_size=(w, h))
humans = e.inference(image)
image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False)
```
If you installed it as a package,
```python
import tf_pose
coco_style = tf_pose.infer(image_path)
```
## ROS Support
See : [etcs/ros.md](./etcs/ros.md)
## Training
See : [etcs/training.md](./etcs/training.md)
## References
See : [etcs/reference.md](./etcs/reference.md)
没有合适的资源?快使用搜索试试~ 我知道了~
tf-pose-estimation-master-韦访源码分析带注释.zip
共152个文件
py:46个
pyc:28个
jpg:17个
需积分: 48 106 下载量 62 浏览量
2019-07-07
16:18:03
上传
评论 2
收藏 53.43MB ZIP 举报
温馨提示
tf-pose-estimation-master-韦访源码分析带注释.zip
资源推荐
资源详情
资源评论
收起资源包目录
tf-pose-estimation-master-韦访源码分析带注释.zip (152个子文件)
pafprocess_wrap.cpp 177KB
pafprocess.cpp 10KB
pafprocess_wrap.cxx 177KB
Dockerfile 2KB
Dockerfile 238B
.dockerignore 212B
_pafprocess.cp36-win_amd64.exp 821B
openpose_p40_cmu.gif 5.1MB
openpose_p40_mobilenet.gif 4.83MB
openpose_tx2_mobilenet3.gif 3.98MB
openpose_macbook13_mobilenet2.gif 2.44MB
openpose_macbook_mobilenet3.gif 2.41MB
openpose_macbook_cmu.gif 152KB
imgcat0.gif 109KB
.gitattributes 283B
.gitignore 2KB
pafprocess.h 1KB
numpy.i 107KB
pafprocess.i 559B
tf-pose-estimation-master.iml 464B
apink2.jpg 372KB
apink1.jpg 310KB
ski.jpg 299KB
apink1_crop.jpg 273KB
golf.jpg 218KB
apink1_crop_s1.jpg 204KB
handsup1.jpg 197KB
cat.jpg 137KB
COCO_val2014_000000000357.jpg 128KB
hand1_small.jpg 127KB
apink3.jpg 126KB
p2.jpg 85KB
p3.jpg 74KB
hand1.jpg 70KB
valid_person1.jpg 66KB
hand2.jpg 20KB
p1.jpg 11KB
demo_video.launch 2KB
_pafprocess.cp36-win_amd64.lib 2KB
LICENSE 11KB
training.md 4KB
experiments.md 4KB
README.md 4KB
reference.md 1KB
ros.md 1KB
feature.md 618B
README.md 319B
README.md 241B
dance.mp4 5.94MB
Persons.msg 60B
BodyPartElm.msg 53B
Person.msg 23B
pafprocess_wrap.obj 1.57MB
pafprocess.obj 1.43MB
graph_opt.pb 8.67MB
graph_freeze.pb 7.61MB
graph_opt.pb 7.44MB
graph.pb 2.09MB
graph_opt.pb 2MB
inference_result2.png 683KB
p3_dance.png 562KB
h.png 124KB
loss_ll_paf.png 55KB
loss_ll_heat.png 53KB
estimator.py 23KB
pose_dataset.py 21KB
network_base.py 17KB
mobilenet.py 17KB
train.py 16KB
train.py 14KB
conv_blocks.py 13KB
pose_augment.py 9KB
network_cmu.py 9KB
network_dsconv.py 9KB
networks.py 8KB
mobilenet_v2.py 8KB
pafprocess.py 7KB
eval.py 6KB
network_mobilenet_v2.py 5KB
network_mobilenet.py 5KB
network_mobilenet_thin.py 5KB
common.py 4KB
RectangleUtils.py 4KB
SlidingWindow.py 4KB
datum_pb2.py 4KB
run.py 3KB
smoother.py 3KB
ArrayUtils.py 3KB
visualization.py 3KB
broadcaster_ros.py 3KB
Merging.py 3KB
run_webcam.py 3KB
run_directory.py 2KB
run_checkpoint.py 2KB
run_video.py 2KB
setup.py 2KB
runner.py 2KB
pystopwatch.py 978B
WindowDistance.py 562B
setup.py 421B
共 152 条
- 1
- 2
资源评论
__FangWei__
- 粉丝: 1798
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- delphi实现DBGrid全选和反选功能
- 25C11F41-2B2A-4D1A-AAA8-7C654526B129.pdf
- Android Studio Jellyfish(android-studio-2023.3.1.18-cros.deb)
- MVC+EF框架+EasyUI实现权限管理源码程序
- python第66-75天,Day66-75.rar
- python后端服务project-of-tornado.rar
- python测验,hello-tornado.rar
- 基于SpringBoot+Vue3快速开发平台、自研工作流引擎源码设计.zip
- docker安装部署全流程
- 基于树莓派的人脸识别系统python源码+项目部署说明+超详细代码注释.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功