English

中国农机化学报

中国农机化学报 ›› 2025, Vol. 46 ›› Issue (1): 213-219.DOI: 10.13733/j.jcam.issn.2095-5553.2025.01.032

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

改进YOLOv5模型的草莓检测方法研究

彭勇1,乔印虎2,张春燕2,姚杰1,包殿令2   

  1. 1. 安徽工程大学机械工程学院,安徽芜湖,241000; 2. 安徽科技学院机械工程学院,安徽凤阳,233100
  • 出版日期:2025-01-15 发布日期:2025-01-24
  • 基金资助:
    安徽省教育厅协同创新项目(GXXT—2022—077)

Research of strawberry detection method with improved YOLOv5 model

Peng Yong1, Qiao Yinhu2, Zhang Chunyan2, Yao Jie1, Bao Dianling2   

  1. 1.  School of Mechanical Engineering, Anhui Polytechnic University, Wuhu, 241000, China;
    2. School of Mechanical Engineering, Anhui Science and Technology University, Fengyang, 233100, China
  • Online:2025-01-15 Published:2025-01-24

摘要: 草莓检测对草莓的自动化采摘具有重要的意义和价值,针对目前草莓模型检测精度较低、模型占用较大等问题,基于深度学习技术,提出一种改进YOLOv5的目标检测方法。首先,使用Ghost模块对YOLOv5主干网络进行优化,降低模型参数量和复杂度;其次,使用坐标注意力模块CA,提升模型对草莓关键特征的关注;然后将YOLOv5中的定位损失替换为SIoU,考虑边界框回归之间的向量角度。结果表明,该模型的平均精度均值为94.8%,相较于目前经典的目标检测模型,检测能力提升显著,一张图片的预测时间为25.2ms,模型大小仅为10.4MB,具有较快的推理速度且模型尺寸较小。为草莓检测提供更加准确快捷的检测方法,更为容易地应用到移动式和嵌入式设备中。

关键词: 草莓, 深度学习, YOLOv5, 损失函数, 目标检测

Abstract: Strawberry detection is of great significance and value for automated strawberry picking. In order to address the problems of low detection accuracy and large model occupation of the current strawberry model, this study proposes an improved YOLOv5 object detection method based on deep learning technology. Firstly, the YOLOv5 backbone network is optimized by using Ghost model to reduce the number of model parameters and complexity. Secondly, the coordinate attention module CA is used to improve the models focus on key strawberry features. Then the localization loss in YOLOv5 is replaced with SIoU, and the vector angle between the bounding box regressions is considered. The test experimental results show that the average accuracy of the model is 94.8%, compared with the current classical object detection algorithm, the detection ability is improved while the prediction time for a picture is 25.2ms and the model size is only 10.4MB, with faster inference speed and lower model size, the research results can provide a more accurate and faster detection method for strawberry detection, which can be applied to mobile and embedded devices more easily.

Key words: strawberry, deep learning, YOLOv5, loss function, object detection

中图分类号: