English

中国农机化学报

中国农机化学报 ›› 2025, Vol. 46 ›› Issue (2): 217-223.DOI: 10.13733/j.jcam.issn.2095‑5553.2025.02.032

• 农业智能化研究 • 上一篇    下一篇

基于改进YOLOv5s的香菇菌棒污染识别方法

吴秋兰1,陈雪飞1,陈超2,张峰1,王姝妹1,赵恒1   

  • 出版日期:2025-02-15 发布日期:2025-01-24
  • 基金资助:
    山东省重点研发计划项目(2022CXGC010609)

 Identification method of Lentinus Edodes logs contamination based on improved YOLOv5s

Wu Qiulan1, Chen Xuefei1, Chen Chao2, Zhang Feng1, Wang Shumei1, Zhao Heng1   

  • Online:2025-02-15 Published:2025-01-24

摘要: 为提高香菇菌棒污染识别的准确性和效率,提出一种改进YOLOv5s的香菇菌棒污染识别模型(YOLOv5s—CGGS)。首先,在YOLOv5s的特征提取网络引入CA(Coordinate Attention)注意力机制提高菌棒污染的可识别性和目标定位的准确性。然后,将CIoU损失函数替换为SIoU损失函数,提高模型收敛速度和推理准确性。最后,采用GSConv和GhostConv模块对特征融合网络进行改进优化,提高识别效率。该方法的精确率、召回率、mAP@0.5分别达到97.68%、97.20%、98.01%,相比于YOLOv5s分别提高2.21%、2.79%、1.31%。mAP@0.5比YOLOv4、Ghost—YOLOv4、Mobilenetv3—YOLOv4提高4.42%、4.97%、5.85%,且FPS提高2~3倍。

关键词: 香菇菌棒, 污染识别, 深度学习, 注意力机制, 损失函数

Abstract: In order to improve the accuracy and efficiency of Lentinula Edodes logs contamination identification, an improved YOLOv5s contamination identification model for Lentinula Edodes logs (YOLOv5s—CGGS) is proposed in this paper. Firstly, a CA (coordinate attention) mechanism is introduced in the feature extraction network of YOLOv5s to improve the identifiability of Lentinula Edodes logs contamination and the accuracy of target localization. Then, the CIoU (Complete—IoU) loss function is replaced by an SIoU (SCYLLA—IoU) loss function to improve the model's convergence speed and inference accuracy. Finally, the GSConv and GhostConv modules are used to improve and optimize the feature fusion network to enhance identification efficiency. The method in this paper achieves values of 97.68%, 97.20%, and 98.01% in precision, recall, and mAP@0.5, which are 2.21%, 2.79%, and 1.31% higher  than that of YOLOv5s, respectively. mAP@0.5 is 4.42%, 4.97%, and 5.85% higher than YOLOv4, Ghost—YOLOv4, and Mobilenetv3—YOLOv4, and the FPS is increased by two to three times.

Key words: Lentinula Edodes logs, contamination identification, deep learning, attention mechanism, loss function

中图分类号: