基于YOLO11n的轻量化猪只目标检测算法

    A lightweight pig detection algorithm 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在遮挡、堆叠、背景干扰和暗光环境下的误检、漏检情况均明显降低。
      结论 本研究提出的猪只目标检测模型实现了精确度与轻量化的平衡,能够为规模化猪场猪只盘点、质量估侧等应用提供技术支撑。

       

      Abstract:
      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 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 enhance the C3K2 feature extraction module. Additionally, an efficient upsampling module was incorporated into the neck network to improve feature fusion. Finally, ShapeIoU was applied to accelerate training convergence.
      Result 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 model parameters were reduced by 29.34%, and the FPS was increased by 12.5. Compared with Faster R-CNN, RT-DETR, and YOLOv5, the proposed model significantly reduced the false positives and false negatives 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.

       

    /

    返回文章
    返回