yolov8-pose姿势估计,站立识别

系列文章目录

基于yolov8-pose的姿势估计模式,实现站姿,坐姿,伏案睡姿识别,姿态动作识别接口逻辑作参考。本文以学习交流,分享,欢迎留言讨论优化。
在这里插入图片描述



前言

算法基础:yolov8-pose:https://docs.ultralytics.com/tasks/pose/
Pose estimation is a task that involves(包含)identifying(认出 )the location of specific points(特定点) in an image, usually referred to as keypoints(关键点). The keypoints can represent(代表) various具有多种特征的parts of the object such as joints(关节), landmarks(地标), or other distinctive (独特)features. The locations of the keypoints are usually represented as a set of 2D [x, y] or 3D [x, y, visible] coordinates坐标.
(模型输出)The output of a pose estimation model is a set of points that represent the keypoints on an object in the image, usually along with the confidence scores (置信度得分)for each point. Pose estimation is a good choice when you need to identify specific parts of an object in a scene, and their location in relation to each other.
YOLOv8 pose models use the -pose suffix(后缀), i.e. yolov8n-pose.pt. These models are trained on the COCO keypoints dataset and are suitable for a variety of pose estimation tasks.
姿势估计是一项涉及识别图像中特定点(通常称为关键点)位置的任务。关键点可以表示对象的各个部分,例如关节、地标或其他独特特征。关键点的位置通常表示为一组2D[x,y]或3D[x,y,visible]坐标。
姿态估计模型的输出是表示图像中对象上的关键点的一组点,通常连同每个点的置信度分数。当您需要识别场景中对象的特定部分以及它们彼此之间的位置时,选择姿势估计。
YOLOv8 pretrained Pose models are shown here.


提示:以下是本篇文章正文内容,下面案例可供参考

一、环境安装

1.安装GPU版pytorch,根据电脑显卡配置选择安装pytorch。
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
pytorch官网或者pytorch 的whl稳定版本下载安装
2.安装ultraytics
pip install ultralytics

二、使用yolov8-pose

1.导入模型,预测图像

选择yolov8l-pose预训练模型。
在这里插入图片描述接口函数如下:

def testSleepYesNo_withKeypoint(mode_pt=None, source=None):
    # device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
    kpt_shape: [17, 3]  # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
    flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]  # 输出关键点顺序
    # 关键点类别索引
    kpClasses = ['nose', 'left_eye', 'right_eye', 'left_ear', 'right_ear', 
  • 1
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

柏常青

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值