首页|期刊导航|农业工程学报|基于改进YOLOv11n与OSTrack的发情母羊检测与跟踪方法

基于改进YOLOv11n与OSTrack的发情母羊检测与跟踪方法OA

Approach for detecting and tracking estrous ewes based on improved YOLOv11n and OSTrack

中文摘要英文摘要

为解决母羊饲养管理中人工查情法漏检率高、效率低下以及持续监测困难等问题,该研究提出了一种基于改进YOLOv11n与OSTrack的发情母羊自动化检测与跟踪方法.首先,采用空间深度转换卷积(space-to-depth convolution,SPDConv)替代YOLOv11n网络中的标准卷积,在降低模型复杂度的同时保留采样过程中的空间细节信息.其次,将三重注意力(TripletAttention)机制融入颈部结构中,以增强模型在密集且外观相似羊群中的特征提取与姿态判别能力.最后,将改进YOLOv11n与OSTrack跟踪器相结合,以检测的发情母羊目标框作为跟踪器初始输入,构建YOLO-OSTrack框架,实现对发情母羊的检测与追踪.试验结果表明,在检测性能方面,改进YOLOv11n模型的F1分数达93.0%,爬跨行为平均检测精度为98.0%,发情母羊平均检测精度为93.4%,相较于基线YOLOv11n模型分别提升1.1、0.5和2.0个百分点;该模型参数量为2.2 M,浮点运算量为5.6 G,模型大小为4.5 MB,相较于基线YOLOv11n模型分别降低15.4%、12.5%和13.5%.在跟踪性能方面,OSTrack模型的成功率(area under curve,AUC)为85.1%,精确度(P)为87.0%,归一化精确度为96.1%.该研究提出的YOLO-OSTrack框架实现了生产羊场中发情母羊的精准检测与持续跟踪,可为实时监测预警、个体精准管理、繁殖效率优化等关键环节提供可靠的技术支持.

Large-scale and intensive sheep farming is ever-increasing in modern animal husbandry,particularly with the high demand for sheep products,such as meat,milk,and wool.It is often required to accurately identify estrous ewes for effective reproductive management.The optimal breeding window can be expected to capture for the high conception rates and overall reproductive efficiency.However,manual observation cannot fully meet the need of large-scale sheep farming in recent years,due to its labor-intensive and time-consuming nature,which is prone to human errors.There are the high miss rates,low efficiency,and difficulty in sustained surveillance with manual estrus detection.In this study,an optimal detection and tracking method was proposed for estrous ewes using an improved YOLOv11n and OSTrack framework.The vision solution was also developed under complex scenarios,such as high animal density,strong visual similarity among individuals,and frequent occlusions in real-world farms.Two key components were integrated in a complementary manner.(1)Standard convolutions in the YOLOv11n network were replaced with space-to-depth convolution(SPDConv).Complexity and computational load were reduced to preserve critical spatial information after downsampling,thus detecting fine-grained behavioral cues,such as mounting postures or tail raising.Unlike conventional pooling or strided convolutions,which reduced spatial resolution.Spatial pixel information of the SPDConv model was reorganized into channel dimensions,thereby maintaining structural fidelity without increasing parameters.(2)A Triplet Attention mechanism was incorporated into the neck of the network to jointly capture dependencies among channel,height,and width dimensions.Subtle postural differences were extracted and then distinguished,particularly in crowded scenes with the common occlusion and appearance ambiguity.Informative regions were obtained in three orthogonal views.The network was more sensitive to context and alignment,which was crucial for identifying estrus in visually homogeneous flocks.The optimal YOLOv11n detector was combined with the OSTrack single object tracker to form the complete YOLO-OSTrack framework.The initial high-confidence bounding box was provided for an'Estrus' labeled ewe,which was then used to initialize the tracker.Subsequent frames were processed by OSTrack alone,enabling continuous and efficient localization without repeated detection calls.This tracking decoupling reduced inference latency for the temporal smoothness and identity consistency over long sequences.Experimental results also demonstrated the effectiveness of the approach.The improved YOLOv11n was achieved in an F1-score of 93.0%,an average precision(AP)of 98.0%for mounting behavior,and 93.4%for estrous ewes,thus representing gains of 1.1,0.5,and 2.0 percentage points over the baseline model.A lightweight architecture exhibited with only 2.2 M parameters and a model size of 4.5 MB,with a computational cost of 5.6 G.There were reductions of 15.4%,13.5%,and 12.5%,respectively,compared with the baseline.The model was highly suitable for deployment on the edge devices with limited memory and processing power.In tracking,OSTrack achieved a success rate(area under curve,AUC)of 85.1%,precision(P)of 87.0%,and norm precision of 96.1%,indicating its robustness against challenges,such as high-density sheep flocks,pose variations,high visual similarity among individuals,and partial occlusion.Overall,the YOLO-OSTRack framework can be expected to accurately detect and stably track estrous ewes over the long term in practical farming environments.Reliable technical support was offered for real-time monitoring,early warning,individualized precision management,and reproductive efficiency in modern intelligent livestock systems,thereby contributing to more sustainable and data-driven sheep farming.

王彦超;华志新;高铭;汪开英

浙江大学生物系统工程与食品科学学院,杭州 310058浙江大学生物系统工程与食品科学学院,杭州 310058浙江大学生物系统工程与食品科学学院,杭州 310058浙江大学生物系统工程与食品科学学院,杭州 310058

农业科技

智慧养殖深度学习发情检测目标跟踪自动化监测

smart livestock farmingdeep learningestrus detectionobject trackingautomated monitoring

《农业工程学报》 2026 (11)

79-88,10

浙江省"三农九方"科技协作计划引领型项目(2025SNJF019)浙江省农机研发制造推广应用一体化试点(研发制造项目)(2024-KYY-NSFZ-0031).

10.11975/j.issn.1002-6819.202601270

评论