中国农业科学 ›› 2025, Vol. 58 ›› Issue (18): 3783-3798.doi: 10.3864/j.issn.0578-1752.2025.18.014

• 畜牧·兽医 • 上一篇    

复杂场景下基于改进YOLOv11的羊爬跨行为识别研究

晏川博1,6(), 宫平3, 郑文新1(), 陈新文3,4, 郭雷风2,5()   

  1. 1 新疆农业大学计算机与信息工程学院,乌鲁木齐 830052
    2 中国农业科学院农业信息研究所,北京 100081
    3 新疆维吾尔自治区畜牧科学院,乌鲁木齐 830052
    4 新疆智慧养殖重点实验室,乌鲁木齐 830052
    5 新疆农业信息化工程技术研究中心,乌鲁木齐 830052
    6 智能农业教育部工程研究中心,乌鲁木齐 830052
  • 收稿日期:2025-03-18 接受日期:2025-06-22 出版日期:2025-09-18 发布日期:2025-09-18
  • 通信作者:
    郑文新,E-mail:
    郭雷风,E-mail:
  • 联系方式: 晏川博,E-mai:410892876@qq.com。
  • 基金资助:
    国家重点研发计划(2021YFD1600701-3); 高效肉羊新品种培育与应用(CAAS-ZDRW202502); 自治区重点研发计划(2023B02013); “天山英才”计划——科技创新领军人才(团队)(20221100619); 国家绒毛用羊产业技术体系(CARS-39-21)

Research on Sheep Mounting Behavior Recognition in Complex Scenes Based on an Improved YOLOv11

YAN ChuanBo1,6(), GONG Ping3, ZHENG WenXin1(), CHEN XinWen3,4, GUO LeiFeng2,5()   

  1. 1 College of Computer and Information Engineering, Xinjiang Agricultural University, Urumqi 830052
    2 Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081
    3 Xinjiang Academy of Animal Husbandry Science, Xinjiang Uygur Autonomous Region, Urumqi 830052
    4 Xinjiang Key Laboratory of Intelligent Animal Husbandry, Urumqi, 830052
    5 Xinjiang Agricultural Informatization Engineering Technology Research Center, Urumqi 830052
    6 Engineering Research Center of Intelligent Agriculture, Ministry of Education, Urumqi 830052
  • Received:2025-03-18 Accepted:2025-06-22 Published:2025-09-18 Online:2025-09-18

摘要:

【目的】羊爬跨行为是反映母羊发情状态的重要行为学指标之一,在种羊繁殖管理与发情监测中具有重要意义。传统人工监测方法存在主观性强、效率低、漏检率高等问题,难以满足大规模智慧养殖的需求。为解决复杂环境下羊只爬跨行为识别困难、图像光照变化剧烈、个体遮挡重叠等挑战,拟构建一种具备高精度与强鲁棒性的自动识别模型,实现爬跨行为的快速检测与精准定位,为智能化羊群繁殖管理提供技术支撑。【方法】采集山东省嘉祥种羊场2024年4月15日至5月15日期间24只母羊在圈舍内日常活动视频数据,通过人工标注获取爬跨与非爬跨行为样本图像共4 700张,构建平衡行为识别数据集。在YOLOv11模型基础上,提出改进型SIDS-YOLOv11检测模型,分别引入SCINet低光照图像增强模块提升低光照图像质量,iAFF特征融合模块优化多尺度语义信息表达,DySample动态上采样机制增强边缘细节恢复能力,以及SEAM空间注意力机制提升遮挡目标辨识度。训练过程中采用CIoU损失函数进行边框回归优化,辅以多种数据增强策略提升模型鲁棒性与泛化能力。【结果】改进模型SIDS-YOLOv11在验证集上取得mAP@0.5值为0.942,Precision为0.956,Recall为0.854,mAP@0.5-0.95为0.703,分别较YOLOv11原始模型提升3.5%、4.7%、1.7%和1.5%。热力图可视化结果表明,改进模型在低光照和遮挡场景下仍能准确关注目标区域,模型改进后的热力图更加集中,减少了背景噪声干扰,特征提取能力逐步增强,显著提升了识别准确率与定位稳定性。对比YOLOv8n、YOLOv6、Faster R-CNN与SSD等主流目标检测算法,SIDS-YOLOv11在精度与推理速度之间取得更优平衡,通过对低光照、高遮挡视频的测试,进一步验证了SIDS-YOLOv11在复杂场景下羊爬跨行为检测任务的性能优势,且在复杂场景下保持63%以上检测精度,表现出良好的实用性与适应性。【结论】SIDS-YOLOv11模型有效融合图像增强、特征表达与注意力机制,显著提升了复杂环境下羊爬跨行为的识别能力。其在遮挡重叠、低光照等不利条件下依然具备稳定的检测性能,可为智慧羊场中发情监测、行为分析与繁殖管理提供高效的视觉识别解决方案,具有良好的推广应用价值。

关键词: 羊爬跨行为, SIDS-YOLOv11, 行为检测, 发情监测, 复杂场景

Abstract:

【Objective】 Mounting behavior in sheep is a critical ethological indicator for identifying the estrus status of ewes, and plays an essential role in breeding management and estrus monitoring. Traditional manual observation methods suffer from subjectivity, low efficiency, and high omission rates, which limit their applicability in large-scale intelligent farming. To address the challenges of accurately recognizing mounting behavior in complex farm environments, such as dramatic illumination changes, severe occlusions, and dense sheep clusters, this study aimed to develop a high-precision and robust automatic recognition model to enable rapid detection and precise localization of mounting behavior, thereby supporting intelligent sheep reproduction management. 【Method】 Daily activity videos of 24 ewes were collected from the Jiaxiang Breeding Sheep Farm in Shandong Province between April 15 and May 15, 2024. A balanced dataset consisting of 4 700 annotated images (including both mounting and non-mounting samples) was constructed. Based on the YOLOv11 architecture, an improved detection model was proposed, named SIDS-YOLOv11, which incorporated four key modules: SCINet for low-light image enhancement, improving visual quality in dim conditions; iAFF for optimizing multi-scale semantic feature fusion; DySample for enhancing edge detail recovery via dynamic upsampling; and SEAM for improving target perception under occlusions using spatial attention. The training process employed the CIoU (Complete Intersection over Union) loss function for bounding box regression, combined with various data augmentation techniques to enhance model robustness and generalization. 【Result】 On the validation set, compared with the original YOLOv11 model, SIDS-YOLOv11 achieved a mAP@0.5 of 0.942, a Precision of 0.956, a Recall of 0.854, and a mAP@0.5-0.95 of 0.703—representing improvements of 3.5%, 4.7%, 1.7%, and 1.5%, respectively. Heatmap visualizations demonstrated that the improved model maintained accurate focus on target regions even in low-light and occluded scenarios. The attention regions of the enhanced model were more concentrated, background noise was reduced, and feature extraction capabilities were significantly improved, leading to enhanced recognition accuracy and localization stability. Compared with mainstream detection models, such as YOLOv8n, YOLOv6, Faster R-CNN, and SSD, SIDS-YOLOv11 achieved a better balance between detection accuracy and inference speed. Evaluation on low-light and heavily occluded videos further verified the model's superior performance, maintaining over 63% detection accuracy in complex scenarios, indicating strong applicability and adaptability. 【Conclusion】 The proposed SIDS-YOLOv11 model effectively integrated image enhancement, feature representation, and attention mechanisms, significantly improving the recognition accuracy of sheep mounting behavior in complex environments. The model maintained stable performance under challenging conditions, such as occlusion and low illumination, offering a high-performance visual recognition solution for estrus monitoring, behavior analysis, and breeding management in smart farming. The model held strong potential for practical deployment and large-scale application.

Key words: sheep mounting behavior, SIDS-YOLOv11, behavior detection, estrus monitoring, complex scenarios