计算机工程与应用 ›› 2023, Vol. 59 ›› Issue (15): 329-340.DOI: 10.3778/j.issn.1002-8331.2302-0224

• 工程与应用 • 上一篇    

改进YOLOv7-Tiny农田环境下甜椒果实检测

赵鹏飞,钱孟波,周凯琪,单奕杰,吴浩宇   

  1. 浙江农林大学 光机电工程学院,杭州 311300
  • 出版日期:2023-08-01 发布日期:2023-08-01

Improvement of Sweet Pepper Fruit Detection in YOLOv7-Tiny Farming Environment

ZHAO Pengfei, QIAN Mengbo, ZHOU Kaiqi, SHAN Yijie, WU Haoyu   

  1. School of Opto-Mechanical Engineering, Zhejiang Agriculture and Forestry University, Hangzhou 311300, China
  • Online:2023-08-01 Published:2023-08-01

摘要: 针对在农田环境下甜椒果实的深度学习目标检测算法容易出现误检率较高、检测精度较低的问题,为提高农业生产管理系统以及农业机器人生产效率。基于YOLOv7-Tiny目标检测算法进行一系列改进。在YOLOv7-Tiny的主干中添加DBB(diverse branch block)模块;在三个输出特征层添加SimAM注意力机制;采用Bi-FPN特征融合机制,并增加跨通道特征融合,在P7层加入ASPP空洞空间卷积池化金字塔结构;采用数据集增强技术,对数据集图片进行扩充和图像处理,将800张甜椒果实数据集图片扩充至4?800张。实验结果表明,在相同实验条件下改进YOLOv7-Tiny相较于YOLOv7-Tiny平均准确率(mAP)提高了2.21个百分点,视频检测速度32.82?FPS,改进YOLOv7-Tiny模型体积相较于YOLOv7-Tiny减小5.4?MB。改进YOLOv7-Tiny精度有明显提升,可实现快速、精准检测甜椒果实。

关键词: 甜椒检测, 卷积神经网络, Bi-FPN, YOLOv7-Tiny

Abstract: To improve the efficiency of the agricultural production management system as well as agricultural robot production, the deep learning target detection algorithm for sweet pepper fruits in a farming environment is prone to a high false detection rate and low detection accuracy. In this paper, a series of improvements are made based on the YOLOv7-Tiny target detection algorithm. Firstly, the DBB(diverse branch block) module is added to the backbone of YOLOv7-Tiny. Secondly, the SimAM attention mechanism is added to the three output feature layers. Then, the Bi-FPN feature fusion mechanism is adopted, and cross-channel feature fusion is added, and the ASPP null space convolution pooling pyramid structure is added to the P7 layer. Finally, the dataset enhancement technique to expand and image process the dataset images, and expand the 800 sweet pepper fruit dataset images to 4?800 images. The experimental results show that the average accuracy(mAP) of improved YOLOv7-Tiny is improved by 2.21?percentage points compared with YOLOv7-Tiny under the same experimental conditions, the video detection speed is 32.82 FPS, and the volume of improved YOLOv7-Tiny model is reduced by 5.4 MB compared with YOLOv7-Tiny. The accuracy of the improved YOLOv7-Tiny is significantly improved, enabling fast and accurate detection of bell pepper fruits.

Key words: bell pepper detection, convolutional neural network, Bi-FPN, YOLOv7-Tiny