基于YOLO11n的轻量化猪只目标检测算法OA
A lightweight algorithm for pig target detection based on YOLO11n
[目的]为解决规模化猪场中因密集遮挡、光照变化、背景干扰等因素导致的猪只检测算法精确率低、边缘计算设备算力受限制等问题,本研究提出一种基于 YOLO11n 的轻量化猪只目标检测算法,并构建 YOLO11-MWES 模型.[方法]模型以 YOLO11n 为基线,首先将 MobileNetV4 轻量化网络作为主干网络以降低模型复杂度;其次,引入 WTConv 改进原有 C3K2 特征提取模块,扩展其感受野,以强化复杂场景下模型提取猪只图像特征的能力;然后,将高效上采样模块引入 YOLO11n 颈部特征融合网络中,以提升模型的检测精度与鲁棒性;最后,选取 ShapeIoU 作为损失函数以加速模型收敛.[结果]试验结果表明,YOLO11-MWES 的精确率、召回率和mAP@0.95 分别为 98.55%、97.57%和 80.74%,较 YOLO11n 分别提升了 0.25、0.87 和 4.74 个百分点,同时参数量下降了 29.34%,FPS 提升了 12.5.与 Faster-RCNN、RT-DETR、YOLOv5 等主流检测模型相比,YOLO11n-MWES 在遮挡、堆叠、背景干扰和暗光环境下的误检、漏检情况均明显减少.[结论]本研究提出的猪只目标检测模型实现了精确度与轻量化的平衡,能够为规模化猪场猪只盘点、质量估测等应用提供技术支撑.
[Objective]To address the low detection accuracy of pig detection algorithms and the limited computational capacity of edge computing devices in large-scale pig farms caused by dense occlusion,illumination variations,and background interference,this study proposes a lightweight pig detection algorithm based on YOLO11n and develops the YOLO11n-MWES model.[Method]Based on YOLO11n,MobileNetV4 was used as a lightweight backbone to reduce model complexity.WTConv was then introduced to improve the original C3K2 feature extraction module by enlarging its receptive field,thereby enhancing the model's ability to extract pig image features in complex scenarios.Additionally,an efficient upsampling module was incorporated into the YOLO11n neck feature fusion network to improve the model's detection accuracy and robustness.Finally,ShapeIoU was adopted as the loss function to accelerate model convergence.[Result]Experimental results showed that YOLO11n-MWES achieved a precision of 98.55%,a recall of 97.57%,and an mAP@0.95 of 80.74%,improving by 0.25,0.87,and 4.74 percentage points,respectively,over YOLO11n.The number of model parameters was reduced by 29.34%,and the FPS was increased by 12.5.Compared with mainstream detection models such as Faster R-CNN,RT-DETR,and YOLOv5,YOLO11n-MWES significantly reduced both false detections and missed detections under occlusion,stacking,background interference,and low-light conditions.[Conclusion]YOLO11n-MWES effectively balances accuracy and lightweight design,making it suitable for edge-based applications such as pig population monitoring and weight estimation in large-scale pig farms.
冯晨;周素茵;徐爱俊;武新梅;杨婷婷;潘科铭;钭一和
浙江农林大学 数学与计算机科学学院,浙江 杭州 311300浙江农林大学 数学与计算机科学学院,浙江 杭州 311300浙江农林大学 数学与计算机科学学院,浙江 杭州 311300||全省农业智能感知与机器人重点实验室,浙江 杭州 311300浙江农林大学 数学与计算机科学学院,浙江 杭州 311300浙江农林大学 数学与计算机科学学院,浙江 杭州 311300浙江农林大学 数学与计算机科学学院,浙江 杭州 311300浙江农林大学 数学与计算机科学学院,浙江 杭州 311300
农业科技
猪目标检测YOLO11n轻量化
PigObject detectionYOLO11nLightweight
《华南农业大学学报》 2026 (4)
698-709,12
浙江省"三农九方"科技协作计划项目(2025SNJF020)
评论