低资源版动作识别: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
③视频
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步