DC-YOLO:应对遮挡和光照变化的湖羊行为检测OA
DC-YOLO:A Behavior Detection Model for Hu Sheep Addressing Occlusion and Illumination Variations
[目的/意义]畜牧业中,动物行为是评估动物生理健康以及提供环境预警的重要指标.针对集约化养殖中行为检测面临的多目标严重遮挡、光照条件多变、类别分布不均等挑战,本研究旨在开发一种能够实现舍饲湖羊24小时日常行为自动监测的高效算法DCAttention-YOLO(DC-YOLO),以支撑羊群的精准化管理.[方法]针对多目标严重遮挡,引入自适应细节-上下文注意力(DCAttention,Adaptive Detail-Contextual Attention)机制构建DCAC3K2模块,并采用边界框相似度Soft-NMS(Bounding Box Similarity Soft-NMS,BS-NMS)防止错误去除遮挡目标的边界框.针对光照条件多变,预训练光照编码器并将其参数迁移至DC-YOLO.针对类别分布不均,设计综合分类质量焦点损失(CQFL),对遮挡及少数类样本自适应增大损失权重.本研究数据集通过湖羊养殖场全天候监控采集,包含505张标注图像,涵盖饮水、采食、躺卧、舔舐和站立5种行为.[结果和讨论]DC-YOLO的重叠度阈值为 0.5 时的平均精度均值mAP@50达到91.4%,相比YOLOv12提高了7.8个百分点.此外,DC-YOLO的参数量为2.29 M,相较YOLOv12减少了8.74%.在CPU环境下,DC-YOLO的推理时间缩短至115.5 ms,帧率提升至8.50帧/s,分别提升了33.2%和48.9%.[结论]DC-YOLO在保持低参数量与高推理速度的同时,有效缓解了舍饲环境下多目标遮挡、光照条件多变及行为类别分布不均带来的检测难题,能够为集约化湖羊养殖的行为跟踪与分析提供有效的技术支撑.
[Objective]In the livestock industry,animal behavior serves as a critical indicator for evaluating physiological health and providing environmental early warning.To address the challenges of severe multi-object occlusion,complex il-lumination,and class imbalance in intensive farming,a detail-contextual attention-YOLO(DC-YOLO)model was devel-oped for the 24/7 automatic detection of daily behaviors in housed Hu sheep,thereby facilitating precision management.[Methods]For severe multi-object occlusion,an adaptive detail-contextual attention(DCAttention)mechanism was intro-duced to construct the DCAC3K2 module,and bounding box similarity soft-NMS(BS-NMS)was adopted to prevent in-correct removal of occluded bounding boxes.For complex illumination,a Light-Encoder was pre-trained on illumination conditions and its parameters were transferred to DC-YOLO.For class imbalance,a comprehensive classification-quality focal loss was designed to adaptively increase loss weights for occluded and minority-class samples.The dataset,collected through 24/7 surveillance at Hu sheep farms,comprised 505 annotated images depicting 5 daily behaviors:drinking,eat-ing,lying,licking,and standing.[Results and Discussions]DC-YOLO achieved mAP@50 of 91.4%,improving by 7.8 percentage points over YOLOv12.Moreover,DC-YOLO had 2.29 M parameters,an 8.74%reduction compared to YO-LOv12.On CPU,the inference time of DC-YOLO was reduced to 115.5 ms and the frame rate increased to 8.50 f/s,corre-sponding to improvements of 33.2%and 48.9%,respectively.[Conclusions]Experimental results demonstrate that DC-YOLO effectively mitigates detection challenges caused by severe occlusion,complex illumination,and class imbalance while maintaining high inference efficiency.Consequently,it provides effective technical support for tracking and analyz-ing behaviors in intensive Hu sheep farming.
李夏溪;冀荣华;常宏瑞;张所向
中国农业大学信息与电气工程学院,北京 100083,中国中国农业大学信息与电气工程学院,北京 100083,中国中国农业大学信息与电气工程学院,北京 100083,中国中国农业大学信息与电气工程学院,北京 100083,中国
信息技术与安全科学
集约化养殖行为检测湖羊行为注意力机制YOLOBS-NMS
Intensive livestock farmingBehavior detectionHu sheep behaviorAttention MechanismYOLOBS-NMS
《智慧农业(中英文)》 2026 (4)
127-147,21
National Key Research and Development Program of China(2022YFD1301104) 国家重点研发计划项目(2022YFD1301104)
评论