基于 Openpose 实现人体动作识别
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/ca8bb25bd0e8524c2faaa36b02936a87.png)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/26f329c7182f2fdf1cb2451ca8d6eadd.gif)
系统组成
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/73933ef74bd8dbd77873b3abb3e6ebc5.gif)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/1d75162a107e5b2a9159c5757f581f12.png)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/6e991f872ea8e27bacbb00e06d787ed3.png)
myfont = ImageFont.truetype(r'C:/Windows/SIMLI.TTF', 20)
parser = argparse.ArgumentParser(description='tf-pose-estimation run')
parser.add_argument('--image', type=str, default='Standard/1.jpg')
parser.add_argument('--model', type=str, default='cmu',
help='cmu / mobilenet_thin / mobilenet_v2_large / mobilenet_v2_small')
parser.add_argument('--resize', type=str, default='0x0',
help='if provided, resize images before they are processed. '
'default=0x0, Recommends : 432x368 or 656x368 or 1312x736 ')
parser.add_argument('--resize-out-ratio', type=float, default=4.0,
help='if provided, resize heatmaps before they are post-processed. default=1.0')
args = parser.parse_args()
update_a = ["", "", "", "", "", "", "", "", "", ""]
w, h = model_wh(args.resize)
if w == 0 or h == 0:
e = TfPoseEstimator(get_graph_path(args.model), target_size=(432, 368))
else:
e = TfPoseEstimator(get_graph_path(args.model), target_size=(w, h))
cap=cv2.VideoCapture("shuaidao.mp4")
conditions=[5,6]
num=0
image3 = np.zeros([600, 480, 3])
image3.fill(255)
cv2.imwrite("iimg3.jpg", image3)
image3 = cv2.imread("iimg3.jpg")
image_web4=cv2.resize(image3,(800,480))
image3 = Image.fromarray(cv2.cvtColor(image3, cv2.COLOR_BGR2RGB))
draw = ImageDraw.Draw(image3)
dates = str(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
draw.text((10, 10), "系统日志:" + dates, font=myfont, fill=(255, 0, 0))
image3 = cv2.cvtColor(np.asarray(image3), cv2.COLOR_RGB2BGR)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/0ffac3031ed9b7ac5d97a676b78a9e09.png)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/a0abe7fd93ef3455b1f169afc3c0a411.gif)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/e3b0f9524d21b3ac21bd797443068604.png)
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/98a54fbd31663687f723d5fd40c6cf28.png)
分享
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/39fb23aedd0e67137b7b15d89992bc66.png)
点收藏
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/67eb32483878558accae25022c404a35.png)
点点赞
![](https://imgs.knowsafe.com:8087/img/chayuqing/2021/9/14/0b57f93cae7318ba66ed65e14c6f4fd6.png)
点在看
关注公众号:拾黑(shiheibook)了解更多
[广告]赞助链接:
四季很好,只要有你,文娱排行榜:https://www.yaopaiming.com/
让资讯触达的更精准有趣:https://www.0xu.cn/
![公众号](/static/img/ewm.jpg)
随时掌握互联网精彩
赞助链接
排名
热点
搜索指数
- 1 人生能得几次搏 4967932
- 2 140秒回顾巴黎奥运会开幕式 4971754
- 3 将韩国念成朝鲜 国际奥委会道歉 4888036
- 4 中国军团巴黎奥运图鉴来了 4772515
- 5 初二学生保送清华本硕博连读 4650482
- 6 沪上银行员工“贴钱”抢房贷客户 4515722
- 7 市民反映民警态度生硬 警方:已停职 4402512
- 8 南京工业大学35名研究生被退学处理 4374943
- 9 女子被捆绑后扔山洞?假的 4246795
- 10 中国队00后小将冲击首金 4144820