基于 Openpose 实现人体动作识别



系统组成



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=0image3 = 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)




分享

点收藏

点点赞

点在看
关注公众号:拾黑(shiheibook)了解更多
[广告]赞助链接:
四季很好,只要有你,文娱排行榜:https://www.yaopaiming.com/
让资讯触达的更精准有趣:https://www.0xu.cn/
关注网络尖刀微信公众号随时掌握互联网精彩
赞助链接
排名
热点
搜索指数
- 1 习近平将发表二〇二六年新年贺词 7904141
- 2 2026年国补政策来了 7808738
- 3 东部战区:开火!开火!全部命中! 7712893
- 4 2026年这些民生政策将惠及百姓 7616985
- 5 小学食堂米线过期2.5小时被罚5万 7519709
- 6 解放军喊话驱离台军 原声曝光 7428214
- 7 为博流量直播踩烈士陵墓?绝不姑息 7327605
- 8 每月最高800元!多地发放养老消费券 7238391
- 9 数字人民币升级 1月1日起将计付利息 7141831
- 10 2026年1月1日起 一批新规将施行 7040675


AI100
