基于改进YOLOv5网络的牧区牛粪检测方法

    Detecting cattle manure in pastoral areas using the YOLO network

    • 摘要: 中国草原面积广阔,牛粪作为草原畜牧业的副产品,既对牧草生长有负面影响,又是重要的资源。牛粪分布零散,传统捡拾方式效率低,为了解决上述问题,该文提出一种改进牛粪图像检测模型,用于检测牧区牛粪,以提高牛粪捡拾的效率和智能化水平。1)替换注意力机制轻量化主干网络EfficientFormerV2,提高对边界敏感性并减少模型复杂度。2)改进颈部网络BiFPN,增强特征融合能力。3)改进损失函数Inner-IoU,提高边界框回归的定位精度。4)替换瓶颈层改进FasterNet block,以减少计算复杂度并加快推理速度。5)添加捡拾判断机制,利用预测阶段检测框对区域牛粪做出分类。改进后的网络模型在准确率为92.6%,召回率为87.7%,平均精度均值为87.4%的情况下,参数量减少到4.02M,浮点运算量减少到8.1G,检测速度提升到34.7 f/s。试验结果表明,改进模型在保持模型轻量化的同时,具有较高的平均精度均值,能够有效地完成牧区牛粪的识别与定位任务,适合在资源受限的移动设备和牧区环境中应用,为牛粪智能化捡拾车的研究提供技术支持。

       

      Abstract: Grassland animal husbandry is the main form of animal husbandry. Cow manure is the by-product of grassland animal husbandry on the vast grassland areas. Since cow manure can serve as an important source of energy, there is a negative impact on grass growth. The distribution of cow manure is also characterized by scattered and concentrated areas in natural grasslands. However, manual picking is still used to collect cow manure in pastoral areas at present, leading to the high labor intensity and cost. Alternatively, computer vision can be expected to apply to the collection of cow manure in recent years. In this article, an image detection model was proposed for cow manure using improved YOLOv5. Firstly, New CSP-Darknet53 was replaced with EfficientFormerV2, in order to improve the boundary sensitivity for low complexity of the model. Experimental results showed that the computational complexity was significantly reduced, compared with the original model. Secondly, PANET was replaced with BiFPN to enhance the feature fusion capability for the high accuracy of detection. There was an increase in the accuracy of detection. Furthermore, CIoU Loss was replaced with Inner IoU Loss, in order to improve the localization accuracy of bounding box regression. Once the ratio value was greater than 1, the larger auxiliary bounding boxes were generated to accelerate the convergence of the sample. A comparison with different ratio values showed that the best performance was achieved when the ratio value was 1.10. From then on, the Bottleneck was replaced in the C3 module with an improved FasterNet block. Leaky Relu was used instead of Relu as the activation function for the FasterNet block module, resulting in significant improvements in the accuracy, recall, and average precision. Additionally, the number of parameters and floating-point operations decreased significantly. The computational complexity was reduced to accelerate the inference speed. Finally, a picking judgment mechanism was added using the YOLOv5 detection box, in order to evaluate the size of the cow manure block and the density of the cow manure group. The cow manure was classified in a certain area for intelligent conditional picking of cow manure. The accuracy of the improved network model was 92.6%, the recall rate was 87.7%, the average accuracy was 87.4%, the parameter count was 4022847B, and the floating-point operation count was 8.1G. The improved model significantly reduced the parameter and operation for the high detection accuracy, in order to significantly improve the performance of the model. A dataset of cow manure was established in pastoral areas, in order to improve data diversity. The collected data was randomly combined using five operations: flipping, scaling and translation, motion blur, random occlusion, and brightness change, in order to enhance data augmentation. Comparison experiments were conducted on the multiple networks and the improved model on the dataset. The experimental results showed that the accuracy of the improved model was superior to other models with the same level of parameter and computational complexity. The improved YOLOv5 model classified the cow manure, according to its different sizes during the inference stage, and then distinguished it using different colored bounding boxes. The recognition and localization of cow manure were achieved in the pastoral areas. The finding can also provide technical support to the intelligent picking vehicles of cow manure.

       

    /

    返回文章
    返回