基于改进YOLO v5n的猪只盘点算法
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家重点研发计划项目(2021YFD2000802)


Pig Counting Algorithm Based on Improved YOLO v5n
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    猪只盘点是规模化养殖中的重要环节,为生猪精准饲喂和资产管理提供了依据。人工盘点不仅耗时低效,而且容易出错。当前已有基于深度学习的生猪智能盘点算法,但在遮挡重叠、光照等复杂场景下盘点精度较低。为提高复杂场景下生猪盘点的精度,提出了一种基于改进YOLO v5n的猪只盘点算法。该算法从提升猪只目标检测性能出发,构建了一个多场景的生猪数据集;其次,在主干网络中引入SE-Net通道注意力模块,引导模型更加关注遮挡条件下猪只目标信息的通道特征。同时,增加了检测层进行多尺度特征融合处理,使模型更容易学习收敛并预测不同尺度的猪只对象,提升模型遮挡场景的检测性能;最后,对边界框损失函数以及非极大值抑制处理进行了改进,使模型对遮挡的目标有更好的识别效果。实验结果表明,与原YOLO v5n算法相比,改进算法的平均绝对误差(MAE)、均方根误差(RMSE)以及漏检率分别降低0.509、0.708以及3.02个百分点,平均精度(AP)提高1.62个百分点,达到99.39%,在复杂遮挡重叠场景下具有较优的精确度和鲁棒性。算法的MAE为0.173,与猪只盘点算法CClusnet、CCNN和PCN相比,分别降低0.257、1.497和1.567。在时间性能上,单幅图像的平均识别时间仅为0.056s,符合实际猪场生产的实时性要求。

    Abstract:

    Pig counting is an important part in large-scale farming, which provides the basis for precise pig feeding and asset management. Manual counting is both time-consuming and inefficient,more than error-prone. In recent years, as the performance of deep learning systems far outperforms traditional machine learning systems, deep learningbased methods have demonstrated state-of-the-art performance in tasks such as image classification, segmentation, and object detection. Although there are currently existing intelligent pig counting algorithms based on deep learning, the counting accuracy is low in complex scenes such as occlusion and different illumination. So as to increase the accuracy of pig counting in complex scenarios, a pig counting algorithm was proposed based on improved YOLO v5n. Starting from improving the performance of pig target detection, the algorithm constructed a multi-scene pig dataset. In the field of target detection, each target was surrounded by the surrounding background, and the environment around the target object had rich contextual information. However, in the deep convolutional neural network, although the convolutional layer can capture the features of the image from the global receptive field to describe the image, it essentially only modeled the spatial information of the image without modeling the information between channels. By introducing the SE-Net channel attention module into the Backbone network, the model was guided to place greater emphasis on the channel features of the pig target information under occlusion conditions, so that it can better locate the features to be detected and enhance the network performance. At the same time, there may be pig targets of various scales in an actual picture of a dense scene of a pig farm. In order to deal with the complex and densely occluded actual production pig farm scene and obtain more abundant and comprehensive feature information, a detection layer was added based on the original three detection layers of different scales for multi-scale feature detection, so as to better learn the multi-level features of the occlusion target and improve the detection performance of model complex occlusion scenes. Finally, the loss function of the boundary box and the non-maximum suppression processing were improved to make the model have better recognition effect on the occluded targets. According to experimental results, in contrast with the original YOLO v5n algorithm, the mean absolute error (MAE), root mean square error (RMSE) and missed detection rate of the improved algorithm were reduced by 0.509, 0.708 and 3.02 percentage points, respectively, and the average precision (AP) was improved by 1.62 percentage points to 99.39%. The improved algorithm had high accuracy and good robustness in complex occlusion overlapping scenarios. Compared with other pig inventory algorithms: CClusnet, CCNN and PCN, the MAE of this algorithm was 0.173, which was 0.257, 1.497 and 1.567 lower than that of the other three algorithms. In terms of time performance, it only took 0.056s to recognize a single image on average, satisfying the real-time requirements of actual pig farm production.

    参考文献
    相似文献
    引证文献
引用本文

杨秋妹,陈淼彬,黄一桂,肖德琴,刘又夫,周家鑫.基于改进YOLO v5n的猪只盘点算法[J].农业机械学报,2023,54(1):251-262. YANG Qiumei, CHEN Miaobin, HUANG Yigui, XIAO Deqin, LIU Youfu, ZHOU Jiaxin. Pig Counting Algorithm Based on Improved YOLO v5n[J]. Transactions of the Chinese Society for Agricultural Machinery,2023,54(1):251-262.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2022-09-30
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2023-01-10
  • 出版日期: