首页|期刊导航|农业机械学报|基于改进YOLO v8n-pose的奶山羊体尺关键点检测方法

基于改进YOLO v8n-pose的奶山羊体尺关键点检测方法OA

Body Size Key Point Detection Method of Dairy Goats Based on Improved YOLO v8n-pose

中文摘要英文摘要

针对奶山羊姿态多变导致边缘轮廓特征提取困难、体尺关键点误检漏检等问题,本文提出一种基于改进YOLO v8n-pose 的奶山羊体尺关键点检测方法.在主干网络构建 C2f_Ghost 模块,保持模型轻量化的同时增强特征提取能力;引入双域选择机制(DSM)提高模型对关键点所在边缘信息的关注,增强对边缘轮廓特征提取能力;引入全局注意力机制(GAM)获取全局特征,增强对关键点之间特征的提取.试验结果表明,改进模型 mAP0.5 为94.5%,相较 YOLO v8n-pose 提升3.3 个百分点,并降低参数量和浮点运算量.与主流模型 HRNet、Lite-HRNet、YOLO v5-pose、YOLO v7-W6-psoe、YOLO v8s-pose、YOLO-NAS-pose-N 和YOLO 11n-pose 相比,mAP0.5分别提升4.3、5.0、5.9、3.7、3.2、3.0、3.5 个百分点.奶山羊体高、十字部高、体长、胸宽、腹宽和胸围平均绝对误差分别为3.43、3.21、3.27、1.33、1.34、5.64 cm;平均绝对百分比误差分别为 4.72%、4.36%、4.26%、6.21%、4.84%和5.83%,经坐标系矫正后胸围误差可降低至4.63%.本文方法能有效提升体尺关键点检测精度,为奶山羊体尺关键点检测和体尺获取提供技术支持.

Aiming at the challenges posed by the highly variable postures of dairy goats,which result in difficulty in extracting edge contour features and frequent misdetection or omission of body size keypoints,an enhanced keypoint detection method was proposed based on an improved YOLO v8n-pose architecture.Firstl,a C2f_Ghost module was integrated into the backbone network to enhance the model's feature extraction capability while maintaining its lightweight nature,making it more suitable for real-time applications.Secondly,a dual-domain selection mechanism(DSM)was designed to emphasize edge-related information in both spatial and frequency domains,thereby enhancing the model's sensitivity to boundary features and improving the localization of keypoints near complex contours.Thirdly,a global attention mechanism(GAM)was employed to effectively capture long-range dependencies and global context,which strengthened the interaction and structural consistency among keypoints.Experimental results showed that the improved model achieved a mAP0.5 of 94.5%,outperforming YOLO v8n-pose by 3.3 percentage points while reducing parameters and computation.Compared with mainstream models,HRNet,Lite-HRNet,YOLO v5-pose,YOLO v7-W6-pose,YOLO v8s-pose,YOLO-NAS-pose-N,and YOLO 11n-pose,mAP0.5 was improved by 4.3,5.0,5.9,3.7,3.2,3.0,and 3.5 percentage points,respectively.The mean absolute errors for body height,withers height,body length,chest width,abdominal width,and chest girth were 3.43 cm,3.21 cm,3.27 cm,1.33 cm,1.34 cm,and 5.64 cm,with mean absolute percentage errors of 4.72%,4.36%,4.26%,6.21%,4.84%,and 5.83%,respectively.After coordinate correction,chest girth error was further reduced to 4.63%.These results demonstrated the effectiveness of the proposed method in improving keypoint detection accuracy which can provide technical support for dairy goat body measurement.

李书琴;王井超

西北农林科技大学信息工程学院,陕西 杨凌 712100西北农林科技大学信息工程学院,陕西 杨凌 712100

信息技术与安全科学

奶山羊关键点检测YOLO v8n-pose羊只体尺测量

dairy goatskey point detectionYOLO v8n-posesheep body size measurement

《农业机械学报》 2026 (14)

68-79,12

国家重点研发计划项目(2022YFD1300200)

10.6041/j.issn.1000-1298.2026.14.008

评论