低资源版动作识别:tf-pose-estimation

一、github项目

https://github.com/ildoonet/tf-pose-estimation

1.部署环境时候遇到的问题

① 按照文档配置环境,其中visual C++ Build tools需要单独安装。参考文档

②pip安装pycocotools报错“ERROR: Failed building wheel for pycocotools”
解决措施,在虚拟环境中先安装git 然后使用git安装pycocotools

conda install git
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
③No module named 'tensorflow.contrib.tensorrt'

解决措施参考链接:

 先将tfpose/estimator.py中的14行#import tensorflow.contrib.tensorrt as trt注释掉

 再将run_webcam.py中10行注释掉

 

 

 

④swig没安装上

windows下SWIG需要去官网下载一个安装包

https://sourceforge.net/projects/swig/files/

 

二、用三种模式测试

①图片

Test Inference

You can test the inference feature with a single image.

$ python run.py --model=mobilenet_thin --resize=432x368 --image=./images/p1.jpg

②摄像头

Realtime Webcam

$ python run_webcam.py --model=mobilenet_thin --resize=432x368 --camera=0

③视频

posted @ 2019-12-19 16:17  StarZhai  阅读(1389)  评论(0编辑  收藏  举报