欢迎访问《茶叶科学》,今天是

茶叶科学 ›› 2024, Vol. 44 ›› Issue (1): 62-74.doi: 10.13305/j.cnki.jts.2024.01.006

• 研究报告 • 上一篇    下一篇

基于改进YOLOv7-tiny的茶叶嫩芽分级识别方法

洪孔林, 吴明晖*, 高博, 冯业宁   

  1. 上海工程技术大学机械与汽车工程学院,上海 201620
  • 收稿日期:2023-09-24 修回日期:2023-11-13 出版日期:2024-02-25 发布日期:2024-03-13
  • 通讯作者: *wuminghui@sues.edu.cn
  • 作者简介:洪孔林,男,硕士研究生,主要从事图像处理与目标检测方面的研究。
  • 基金资助:
    上海市自然科学基金(21ZR1425900)

A Grading Identification Method for Tea Buds Based on Improved YOLOv7-tiny

HONG Konglin, WU Minghui*, GAO Bo, FENG Yening   

  1. School of Mechanical and Automotive Engineering, Shanghai University of Engineering Science, Shanghai 201620, China
  • Received:2023-09-24 Revised:2023-11-13 Online:2024-02-25 Published:2024-03-13

摘要: 实现自然生长环境的茶叶嫩芽分级识别是名优茶智能化采摘的基础,针对光照、遮挡、密集等复杂环境造成的茶叶嫩芽识别精度较低、鲁棒性较差等问题,提出了一种基于YOLOv7-tiny的改进模型。首先在YOLOv7-tiny模型的小目标检测层添加卷积注意力模块,提高模型对小目标特征的关注能力,减少复杂环境对茶叶嫩芽识别的干扰;调整空间金字塔池化结构,降低模型运算成本,提高检测速度;使用交并比(Intersection over Union,IoU)和归一化Wasserstein距离(Normalized gaussian wasserstein distance,NWD)结合的损失函数,改善IoU机制对位置偏差敏感的问题,进一步提高模型对小目标检测的鲁棒性。结果表明,该模型的检测准确率为91.15%,召回率为88.54%,均值平均精度为92.66%,模型大小为12.4 MB,与原始模型相比,准确率、召回率、均值平均精度分别提高2.83、2.00、1.47个百分点,模型大小增加0.1 MB。与不同模型的对比试验表明,该模型在多个场景下的嫩芽分级检测中漏检和误检较少,置信度分数较高。改进后的模型可应用于名优茶采摘机器人的嫩芽分级识别。

关键词: YOLOv7-tiny, 茶叶嫩芽, 分级识别, 注意力机制, NWD损失函数

Abstract: The intelligent grading and recognition of tea buds in a natural environment are fundamental for the automation of premium tea harvesting. To address the problems of low recognition accuracy and limited robustness caused by complex environmental factors like lighting, obstruction, and dense foliage, we propose an enhanced model based on YOLOv7-tiny. Firstly, a CBAM module was added into the small object detection layer of the YOLOv7-tiny model to enhance the model's ability to focus on small object features and reduce the interference of complex environments on tea bud recognition. We adjusted the spatial pyramid pooling structure to lower computational costs and improve detection speed. Additionally, we utilized a loss function combining IoU and NWD to further enhance the model's robustness in small object detection by addressing the sensitivity of the IoU mechanism to position deviations. Experimental results demonstrate that the proposed model achieves a detection accuracy of 91.15%, a recall rate of 88.54%, and a mean average precision of 92.66%. The model's size is 12.4 MB. Compared to the original model, this represents an improvement of 2.83%, 2.00%, and 1.47% in accuracy, recall rate, and mean average precision, respectively, with a significant increase of 0.1 MB in model size. Comparative experiments with different models show that our model exhibits fewer false negatives and false positives in multiple scenarios, along with higher confidence scores. The improved model can be applied to the bud grading and recognition process of premium tea harvesting robots.

Key words: YOLOv7-tiny, tea bud, grading identification, attention mechanisms, NWD loss

中图分类号: