https://www.ahs.ac.cn/images/0513-353X/images/top-banner1.jpg|#|苹果
https://www.ahs.ac.cn/images/0513-353X/images/top-banner2.jpg|#|甘蓝
https://www.ahs.ac.cn/images/0513-353X/images/top-banner3.jpg|#|菊花
https://www.ahs.ac.cn/images/0513-353X/images/top-banner4.jpg|#|灵芝
https://www.ahs.ac.cn/images/0513-353X/images/top-banner5.jpg|#|桃
https://www.ahs.ac.cn/images/0513-353X/images/top-banner6.jpg|#|黄瓜
https://www.ahs.ac.cn/images/0513-353X/images/top-banner7.jpg|#|蝴蝶兰
https://www.ahs.ac.cn/images/0513-353X/images/top-banner8.jpg|#|樱桃
https://www.ahs.ac.cn/images/0513-353X/images/top-banner9.jpg|#|观赏荷花
https://www.ahs.ac.cn/images/0513-353X/images/top-banner10.jpg|#|菊花
https://www.ahs.ac.cn/images/0513-353X/images/top-banner11.jpg|#|月季
https://www.ahs.ac.cn/images/0513-353X/images/top-banner12.jpg|#|菊花

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

• 新技术与新方法 • 上一篇    下一篇

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

孙宇朝1,2,李守豪1,2,夏秀波1,3,*,杨 玮2,*,李民赞2,张焕春1,3   

  1. 1山东省烟台市农业科学研究院,山东烟台 265500;2中国农业大学智慧农业系统集成研究教育部重点实验室,北京 100083;3烟台市智慧农业研究中心,山东烟台 265500
  • 出版日期:2024-02-25 发布日期:2024-02-27
  • 基金资助:
    山东省现代优势产业集群 + 人工智能试点示范单位项目(鲁工信工联〔2020〕89号);烟台市设施番茄育种攻关团队项目(烟农[2023]174号)

Detecting Tomato Fruit Ripeness and Appearance Quality Based on Improved YOLOv5s

SUN Yuchao1,2,LI Shouhao1,2,XIA Xiubo1,3,*,YANG Wei2,*,LI Minzan2,and ZHANG Huanchun1,3   

  1. 1Yantai Academy of Agricultural Sciences in Shandong Province,Yantai,Shandong 265500,China;2Key Laboratory of Smart Agriculture Systems,Ministry of Education,China Agricultural University,Beijing 100083,China;3Yantai Smart Agriculture Research Center,Yantai,Shandong 265500,China
  • Published:2024-02-25 Online:2024-02-27

摘要: 以粉果番茄为试验材料,基于深度学习方法开展了番茄果实成熟度和外观品质的检测研究。试验中共采集番茄图片数据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

中图分类号: