Welcome to Smart Agriculture 中文

Smart Agriculture ›› 2024, Vol. 6 ›› Issue (4): 91-102.doi: 10.12133/j.smartag.SA202312027

• Topic--Technological Innovation and Sustainable Development of Smart Animal Husbandry • Previous Articles     Next Articles

Automatic Measurement of Mongolian Horse Body Based on Improved YOLOv8n-pose and 3D Point Cloud Analysis

LI Minghuang1,2, SU Lide1,2, ZHANG Yong1,2(), ZONG Zheying1,2, ZHANG Shun3   

  1. 1. College of Mechanical and Electronic Engineering, Inner Mongolia Agriculture University, Hohhot 010018, China
    2. Inner Mongolia Engineering Research Center of Intelligent Equipment for the Entire Process of Forage and Feed Production, Hohhot 010018, China
    3. Bayannur Modern Agriculture and Animal Husbandry Development Center of Inner Mongolia, Bayannur 010051, China
  • Received:2023-12-28 Online:2024-07-30
  • Foundation items:
    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(NMGIR T2312); Research Initiation Program for the Introduction of High-level Talents in Inner Mongolia Agricultural University(NDYB2020-21)
  • About author:
    LI Minghuang, E-mail:
  • corresponding author:
    ZHANG Yong, E-mail:

Abstract:

[Objective] There exist a high genetic correlation among various morphological characteristics of Mongolian horses. Utilizing advanced technology to obtain body structure parameters related to athletic performance could provide data support for breeding institutions 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. Therefore, 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 motion and at rest. To ensure the model's robustness and considering issues such as angles, lighting, and image blurring during actual image 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 adaptability 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 regions, and a cosine annealing method was employed to dynamically adjust the learning rate during model training. The improved model was named DSS-YOLO (DCNv2-SA-SIoU-YOLO) network model. Additionally, a test set comprising 30 RGB-D images of mature 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 analysis 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 circumference, 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, respectively, 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 dimensions and suggesting the use of a mobile least squares curve fitting method to complete the horse's hip point cloud, experiments involving 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 methods 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 application value.

Key words: Mongolian horse, body measurements, convolutional neural network, attention mechanism, 3D point cloud processing, YOLOv8n-pose