园艺学报2024,Vol.51Issue(2) :396-410.DOI:10.16420/j.issn.0513-353x.2023-0859

利用改进YOLOv5s模型检测番茄果实成熟度及外观品质

Detecting Tomato Fruit Ripeness and Appearance Quality Based on Improved YOLOv5s

孙宇朝 李守豪 夏秀波 杨玮 李民赞 张焕春
园艺学报2024,Vol.51Issue(2) :396-410.DOI:10.16420/j.issn.0513-353x.2023-0859

利用改进YOLOv5s模型检测番茄果实成熟度及外观品质

Detecting Tomato Fruit Ripeness and Appearance Quality Based on Improved YOLOv5s

孙宇朝 1李守豪 1夏秀波 2杨玮 3李民赞 3张焕春2
扫码查看

作者信息

  • 1. 山东省烟台市农业科学研究院,山东烟台 265500;中国农业大学智慧农业系统集成研究教育部重点实验室,北京 100083
  • 2. 山东省烟台市农业科学研究院,山东烟台 265500;烟台市智慧农业研究中心,山东烟台 265500
  • 3. 中国农业大学智慧农业系统集成研究教育部重点实验室,北京 100083
  • 折叠

摘要

以粉果番茄为试验材料,基于深度学习方法开展了番茄果实成熟度和外观品质的检测研究.试验中共采集番茄图片数据2 036张,通过处理扩增至5 316张,然后将数据进行标注和文件转换,构建了试验用数据集;通过在YOLOv5s模型中加入CA注意力机制、替换Stem block结构、结合识别需求优化检测层尺度、替换K-means++聚类算法来实现SC-YOLOv5s识别精度提升,提高模型的特征表达能力;通过在SC-YOLOv5s模型中加入Fire module结构进行轻量化卷积、降低Bottleneck模块的参数量来实现SC-YOLOv5s-lite轻量化设计,提升模型在硬件上的检测速度;将SC-YOLOv5s-lite模型在训练集上进行训练优化、消融试验和性能对比,结果表明,SC-YOLOv5s-lite模型内存大小为7.73 M,其准确率为89.04%,召回率83.35%,平均精度91.34%,检测时间为143 ms,相比于YOLOv5s,模型参数量降低了 45.57%,模型大小压缩了 44.86%,平均精度提升3.98%,检测时间减少20.99%,优势明显,更适合于硬件上部署.

Abstract

The study was conducted on the detection of tomato fruit maturity and appearance quality based on deep learning methods using pink tomato as the experimental material.Two thousand and thirty-six tomato image data were collected and amplified to 5 316 through preprocessing.Then,the data was annotated and converted into files to construct an experimental dataset.The experiment improves the accuracy of SC-YOLOv5s by adding CA attention mechanism,replacing the Stem block structure,optimizing the detection layer scale based on recognition requirements,and replacing the K-means++clustering algorithm to improve the model's feature expression ability.By adding a fire module structure to SC-YOLOv5s for lightweight convolution and reducing the parameter count of the Bottleneck module,the SC-YOLOv5s-lite lightweight design is achieved,improving the detection speed of the model on hardware;Train and optimize the SC-YOLOv5s-lite model on the training set.The results showed that the memory usage of the SC-YOLOv5s-lite model was 7.73 M,with an accuracy rate of 89.04%,a recall rate of 83.35%,an average accuracy of 91.34%,and a detection time of 143 ms.Compared to YOLOv5s,the model parameter quantity is reduced by 54.57%,model size is compressed by 44.86%,with an average accuracy improvement of 3.98%,and the detection time is reduced by 20.99%.It has obvious advantages and is more suitable for hardware deployment.

关键词

番茄/成熟度/外观品质/检测/深度学习/计算机视觉

Key words

tomato/maturity/appearance quality/detection/deep learning/computer vision

引用本文复制引用

基金项目

山东省现代优势产业集群+人工智能试点示范单位项目(鲁工信工联[2020]89号)

烟台市设施番茄育种攻关团队项目(烟农[2023]174号)

出版年

2024
园艺学报
中国园艺学会 中国农业科学院蔬菜花卉研究所

园艺学报

CSTPCD北大核心
影响因子:1.127
ISSN:0513-353X
参考文献量31
段落导航相关论文