English

中国农机化学报

中国农机化学报 ›› 2024, Vol. 45 ›› Issue (8): 240-245.DOI: 10.13733/j.jcam.issn.2095‑5553.2024.08.035

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

基于改进YOLOv5s的硬核期葡萄簇检测

冯晓1,2,张辉1,2,刘运超3,张微1,2,李小红1,2, 马中杰1,2   

  • 出版日期:2024-08-15 发布日期:2024-07-26
  • 基金资助:
    河南省农业科学院科技创新团队项目(2022TD14)

 Detection of grape cluster in stone hardening stage based on improved YOLOv5s 

Feng Xiao1, 2, Zhang Hui1, 2, Liu Yunchao3, Zhang Wei1, 2, Li Xiaohong1, 2, Ma Zhongjie1, 2   

  • Online:2024-08-15 Published:2024-07-26

摘要: 为实现自然环境下硬核期葡萄簇的快速精准检测,提出一种改进的YOLOv5s网络。首先,将YOLOv5s主干特征提取网络和加强特征提取网络中的卷积模块(Conv)替换为拥有更强特征提取能力的RepConv模块;然后,将YOLOv5s主干特征提取网络中C3结构的BottleNeck也替换为RepConv模块;接下来,将高效通道注意力模块(ECA)添加到YOLOv5s加强特征提取网络中的C3结构;最后,将YOLOv5s卷积模块中的激活函数SiLU改为ReLU6。试验结果表明,改进YOLOv5s网络对葡萄簇检测的精确率为96.5%、召回率为94.5%、平均精度均值为98.0%、检测速度为260 f/s。相比Faster R-CNN、SSD、RetinaNet、YOLOv3(Ultralytics)、YOLOXs和YOLOv5s,其平均精度均值分别高10.4、44.1、13.9、0.2、8.9和1.0个百分点。提出的改进网络能够较好地检测自然环境下模糊、遮挡、簇粘连、不完整、昏暗及逆光等各种状态的硬核期葡萄簇,且方便在移动设备上部署。

关键词: 葡萄簇, 目标检测, YOLOv5s算法, 重参数化, 注意力机制

Abstract: In order to realize the rapid and accurate detection of stone hardening stage grape clusters in the natural environment, an improved YOLOv5s network was proposed. Firstly, the convolutional module (Conv) in the backbone feature extraction network and the enhanced feature extraction network of YOLOv5s was replaced by the RepConv module with stronger feature extraction capabilities.  Secondly, the BottleNeck in the C3 structure of the backbone feature extraction network of YOLOv5s was also replaced by the RepConv module. Thirdly, the Efficient Channel Attention (ECA) module was added to the C3 structure of the enhanced feature extraction network of YOLOv5s.  Finally, the activation function SiLU in the convolutional module of YOLOv5s was changed to ReLU6. The experimental results showed that the precision of the improved YOLOv5s network for grape cluster detection was 96.5%, the recall rate was 94.5%, the mean average precision was 98.0%, and the detection speed was 260 f/s. Compared with Faster R-CNN, SSD, RetinaNet, YOLOv3 (Ultralytics), YOLOXs and YOLOv5s, the mean average precision of the improved YOLOv5s was 10.4, 44.1, 13.9, 0.2, 8.9 and 1.0 percentage points higher, respectively. The improved network proposed in this paper can effectively detect stone hardening stage grape clusters in various states, such as blur, occlusion, cluster adhesion, incompleteness, dimness, and backlight in the natural environment, and is easy to deploy on mobile devices.

Key words: grape cluster, object detection, YOLOv5s algorithm, re?parameterization, attention mechanism

中图分类号: