畜牧与饲料科学 ›› 2025, Vol. 46 ›› Issue (2): 59-70.doi: 10.12160/j.issn.1672-5190.2025.02.008

• 动物生产与管理 • 上一篇    下一篇

分娩奶山羊躺卧姿态的自动识别及胸腹部运动规律研究

冯思远, 安晓萍, 王园, 齐景伟   

  1. 内蒙古农业大学动物科学学院/智慧畜牧自治区高等学校重点实验室/内蒙古自治区高校智慧畜牧集成攻关大平台/内蒙古自治区草食家畜饲料技术研究中心/国家乳业技术创新中心奶山羊繁育与养殖技术研究中心,内蒙古 呼和浩特 010018
  • 收稿日期:2025-01-10 发布日期:2025-07-09
  • 通讯作者: 齐景伟(1967—),男,教授,博士,博士生导师,主要从事智慧养殖及生物饲料技术创新研究工作。
  • 作者简介:冯思远(1997—),男,硕士研究生,主要从事智慧养殖及生物饲料技术创新研究工作。
  • 基金资助:
    内蒙古自治区科技计划项目(2022YFHH0103); 内蒙古自治区科技重大专项(2021ZD0023-3)

Automatic Recognition of Lying Postures and Analysis of Thoracoabdominal Movement Patterns in Parturient Dairy Goats

FENG Siyuan, AN Xiaoping, WANG Yuan, QI Jingwei   

  1. College of Animal Science, Inner Mongolia Agricultural University/Key Laboratory of Smart Animal Husbandry of Universities in Inner Mongolia Autonomous Region/Integrated Research Platform for Smart Animal Husbandry in Universities of Inner Mongolia Autonomous Region/Forage Technology Research Center for Herbivorous Livestock in Inner Mongolia Autonomous Region/Dairy Goat Breeding and Farming Technology Research Center of National Dairy Industry Technology Innovation Center, Hohhot 010018,China
  • Received:2025-01-10 Published:2025-07-09

摘要: [目的]运用You Only Look Once version 5s(YOLOv5s)模型实现对分娩奶山羊躺卧姿态的自动识别,并结合Farneback光流算法对分娩奶山羊胸腹部起伏特征进行分析,从而为奶山羊分娩的精准化管理提供技术支撑。[方法]利用YOLOv5s模型对分娩奶山羊的躺卧与站立姿态进行分类识别,采用精确率(P)、召回率(R)及平均精确率(mAP)对模型分类结果进行评价。通过视频识别后,依据分娩时长将20只萨能奶山羊分为2组:A组为分娩时长<30 min,B组为分娩时长≥30 min。并基于Farneback光流算法提取分娩奶山羊胸腹部起伏参数(速度、高度、单次持续时间、次数),对比分析两组奶山羊胸腹部运动规律。[结果]①YOLOv5s模型对躺卧和站立姿态识别的P分别为98.4%和98.3%,假阳性率<2%,误判风险极低;R为95.3%和94.6%,漏检率<6%,监测覆盖性优异;mAP达96.3%和95.2%,综合性能稳定,鲁棒性强。②光流法分析表明,B组胸腹部起伏速度均值为5.358 px/s,显著(P<0.05)高于A组均值(2.461 px/s);B组胸腹部起伏高度均值为6.104 px,极显著(P<0.01)高于A组均值(2.280 px);B组单次起伏持续时间均值(4.687 s)与A组均值(4.272 s)差异不显著(P=0.35);B组胸腹部起伏次数(45.67次)极显著(P<0.01)高于A组(12.92次),且节律性降低,这表明分娩难度随分娩时长增加而升高。[结论]YOLOv5s模型与Farneback光流算法协同运作,实现了对奶山羊分娩姿态的精准识别以及胸腹部运动精准量化。该技术能够集成到牧场分娩预警系统中,实时识别奶山羊的异常分娩行为,降低母羊难产风险,为奶山羊的智能化管理提供技术支持。

关键词: 奶山羊, 胸腹部运动规律, 姿态识别, YOLOv5s模型, Farneback光流算法

Abstract: [Objective] To achieve automatic recognition of lying postures in parturient dairy goats using the You Only Look Once version 5s (YOLOv5s) model and analyze thoracoabdominal movement characteristics using the Farneback optical flow algorithm, thereby providing technical support for precise management of dairy goat parturition. [Methods] The YOLOv5s model was employed to classify lying and standing postures of parturient dairy goats, with model performance evaluated by precision (P), recall (R), and mean average precision (mAP). After video recognition, 20 Saanen dairy goats were divided into two groups based on parturition duration: Group A (parturition duration <30 min) and Group B (parturition duration ≥30 min). The Farneback optical flow algorithm was used to extract thoracoabdominal movement parameters (velocity, amplitude, duration of single movement, and frequency), and differences in movement patterns between the two groups were compared. [Results] ①The YOLOv5s model achieved P values of 98.4% and 98.3% for lying and standing posture recognition, respectively, with a false positive rate <2%, indicating minimal misjudgment risk; R values was 95.3% and 94.6%, with a missed detection rate <6%, demonstrating excellent detection coverage; mAP reached 96.3% and 95.2%, reflecting stable comprehensive performance and strong robustness. ②Optical flow analysis showed that the mean thoracoabdominal movement velocity in Group B was 5.358 px/s, significantly higher than that in Group A (2.461 px/s, P<0.05); the mean movement amplitude in Group B was 6.104 px, extremely significantly higher than that in Group A (2.280 px, P<0.01); the mean duration of single movements was 4.687 s in Group B and 4.272 s in Group A, with no significant difference (P=0.35); Group B showed a significantly higher movement frequency (45.67 times) compared to Group A (12.92 times, P<0.01), with reduced rhythmicity, indicating that parturition difficulty increases with prolonged parturition duration. [Conclusion] The synergistic application of the YOLOv5s model and Farneback optical flow algorithm enabled precise recognition of parturient dairy goat postures and accurate quantification of thoracoabdominal movements. This technology can be integrated into farm parturition early-warning systems to identify abnormal parturition behaviors in real time, reduce the risk of dystocia, and provide technical support for intelligent dairy goat management.

Key words: dairy goat, thoracoabdominal movement patterns, posture recognition, YOLOv5s model, Farneback optical flow algorithm

中图分类号: