基于改进YOLOv8n-pose和三维点云分析的蒙古马体尺自动测量方法OACSTPCD
Automatic Measurement of Mongolian Horse Body Based on Improved YOLOv8n-pose and 3D Point Cloud Analysis
[目的/意义]准确高效地获取马匹体尺信息是马产业现代化进程中的关键环节.传统的人工测量方法耗时长、工作量大,且会对马匹造成一定应激反应.因此,实现准确且高效的体尺参数自动测量对于制定蒙古马早期育种计划至关重要.[方法]选择Azure Kinect深度相机获取蒙古马双侧RGB-D数据,以YOLOv8n-pose为基础,通过在C2f模块中引入可变形卷积(Deformable Convolution v2,DCNv2),同时添加洗牌注意力机制(Shuffle Atten-tion,SA)模块和优化损失函数(SCYLLA-IoU Loss,SIoU)的方法,利用余弦退火法动态调整学习率,提出一种名为DSS-YOLO(DCNv2-SA-SIoU-YOLO)的模型用于蒙古马体尺关键点的检测.其次,将RGB图中的二维关键点坐标与深度图中对应深度值相结合,得到关键点三维坐标,并实现蒙古马点云信息的转换.利用直通滤波、随机抽样一致性(Random Sample Consensus,RANSAC)、统计离群值滤波、主成分分析法(Principal Component Analy-sis,PCA)完成点云处理与分析.最终根据关键点坐标自动计算体高、体斜长、臀高、胸围和臀围5项体尺参数.[结果和讨论]DSS-YOLO的平均关键点检测精度为92.5%;dDSS为7.2个像素;参数量和运算量分别仅为3.48 M和9.1 G.体尺参数自动测量结果与人工测量值相比,各项体尺参数的整体平均绝对误差为3.77 cm;平均相对误差为2.29%.[结论]研究结果可为蒙古马运动性能相关遗传参数的确定提供技术支撑.
[Objective]There exist a high genetic correlation among various morphological characteristics of Mongolian horses.Utilizing ad-vanced technology to obtain body structure parameters related to athletic performance could provide data support for breeding institu-tions to develop scientific breeding plans and establish the groundwork for further improvement of Mongolian horse breeds.However,traditional manual measurement methods are time-consuming,labor-intensive,and may cause certain stress responses in horses.There-fore,ensuring precise and effective measurement of Mongolian horse body dimensions is crucial for formulating early breeding plans. [Method]Video images of 50 adult Mongolian horses in the suitable breeding stage at the Inner Mongolia Agricultural University Horse Breeding Technical Center was first collected.Fifty images per horse were captured to construct the training and validation sets,resulting in a total of 2 500 high-definition RGB images of Mongolian horses,with an equal ratio of images depicting horses in mo-tion and at rest.To ensure the model's robustness and considering issues such as angles,lighting,and image blurring during actual im-age capture,a series of enhancement algorithms were applied to the original dataset,expanding the Mongolian horse image dataset to 4 000 images.The YOLOv8n-pose was employed as the foundational keypoint detection model.Through the design of the C2f_DCN module,deformable convolution(DCNV2)was integrated into the C2f module of the Backbone network to enhance the model's adapt-ability to different horse poses in real-world scenes.Besides,an SA attention module was added to the Neck network to improve the model's focus on critical features.The original loss function was replaced with SCYLLA-IoU(SIoU)to prioritize major image re-gions,and a cosine annealing method was employed to dynamically adjust the learning rate during model training.The improved mod-el was named DSS-YOLO(DCNv2-SA-SIoU-YOLO)network model.Additionally,a test set comprising 30 RGB-D images of ma-ture Mongolian horses was selected for constructing body dimension measurement tasks.DSS-YOLO was used for keypoint detection of body dimensions.The 2D keypoint coordinates from RGB images were fused with corresponding depth values from depth images to obtain 3D keypoint coordinates,and Mongolian horse's point cloud information was transformed.Point cloud processing and analy-sis were performed using pass-through filtering,random sample consensus(RANSAC)shape fitting,statistical outlier filtering,and principal component analysis(PCA)coordinate system correction.Finally,body height,body oblique length,croup height,chest cir-cumference,and croup circumference were automatically computed based on keypoint spatial coordinates. [Results and Discussion]The proposed DSS-YOLO model exhibited parameter and computational costs of 3.48 M and 9.1 G,respec-tively,with an average accuracy mAP0.5:0.95 reaching 92.5%,and a dDSS of 7.2 pixels.Compared to Hourglass,HRNet,and SimCC,mAP0.5:0.95 increased by 3.6%,2.8%,and 1.6%,respectively.By relying on keypoint coordinates for automatic calculation of body di-mensions and suggesting the use of a mobile least squares curve fitting method to complete the horse's hip point cloud,experiments in-volving 30 Mongolian horses showed a mean average error(MAE)of 3.77 cm and mean relative error(MRE)of 2.29%in automatic measurements. [Conclusions]The results of this study showed that DSS-YOLO model combined with three-dimensional point cloud processing meth-ods can achieve automatic measurement of Mongolian horse body dimensions with high accuracy.The proposed measurement method can also be extended to different breeds of horses,providing technical support for horse breeding plans and possessing practical appli-cation value.
李明煌;苏力德;张永;宗哲英;张顺
内蒙古农业大学 机电工程学院,内蒙古呼和浩特 010018,中国||牧草饲料生产全程智能化装备内蒙古自治区工程研究中心,内蒙古呼和浩特 010018,中国内蒙古自治区巴彦淖尔市现代农牧事业发展中心,内蒙古巴彦淖尔 015001,中国
计算机与自动化
蒙古马体尺测量卷积神经网络注意力机制三维点云处理YOLOv8n-pose
Mongolian horsebody measurementsconvolutional neural networkattention mechanism3D point cloud processingYOLOv8n-pose
《智慧农业(中英文)》 2024 (004)
91-102 / 12
国家自然科学基金(32360856);内蒙古自治区自然科学基金(2022QN03019);内蒙古自治区高等学校创新团队(NMGIRT2312);内蒙古农业大学高层次人才引进科研启动项目(NDYB2020-21) National Natural Science Foundation of China(32360856);Inner Mongolia Autonomous Region Natural Science Foundation(2022QN03019);Science and Technology Innovation Project of Higher Education Team in Inner Mongolia Autonomous Region(NMGIRT2312);Research Initiation Program for the Introduction of High-level Talents in Inner Mongolia Agricultural Uni-versity(NDYB2020-21)
评论