English

中国农机化学报

中国农机化学报 ›› 2024, Vol. 45 ›› Issue (10): 274-280.DOI: 10.13733/j.jcam.issn.2095-5553.2024.10.040

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

基于改进YOLOv8的多阶段草莓检测算法

章璞,乔波,陈义明   

  1. (湖南农业大学信息与智能科学技术学院,长沙市,410128)
  • 出版日期:2024-10-15 发布日期:2024-09-30
  • 基金资助:
    2022年度湖南省社会科学成果评审委员会课题(XSP22YBZ024)

A multi‑stage strawberry detection algorithm based on improved YOLOv8

Zhang Pu, Qiao Bo, Chen Yiming   

  1. (College of Information and Intelligence, Hunan Agricultural University, Changsha, 410128, China)
  • Online:2024-10-15 Published:2024-09-30

摘要: 为实现温室复杂环境中草莓的快速、精确检测,提出一种基于改进YOLOv8的多阶段草莓检测算法。首先,针对温室环境下采集到的草莓数据集,使用LabelImg对数据集进行标注;其次,针对草莓体积小、环境复杂等问题,在主干网络中融入BiFormer动态注意力机制,实现更加灵活的计算分配和特征感知,使网络模型更加关注小目标检测,并提高其在复杂环境下的果实检测能力;最后,在Neck部分引入VanillaNet模块,以降低模型计算量,进一步提高对草莓的识别精度。试验结果表明,相较传统的YOLOv8,改进后的YOLOv8的平均精度均值mAP提升4.6%,达到93.8%。改进后的YOLOv8具有更高的检测精度,同时在小目标检测方面表现出色,为后续的采摘机器人实时小目标检测提供支撑。

关键词: 深度学习, 草莓检测, YOLOv8, 注意力机制, 数据增强

Abstract: In order to achieve fast and accurate detection of strawberries in complex greenhouse environments, a multi‑stage strawberry detection algorithm based on an improved YOLOv8 was proposed. Firstly, the strawberry dataset, collected in greenhouse environments, was initially annotated by using LabelImg. Subsequently, in order to address issues such as the small size of strawberries and the complexity of the environment, a BiFormer dynamic attention mechanism was integrated into the backbone network. This integration allowed for more flexible computational allocation and feature perception, focusing the network model more on small object detection and enhancing its fruit detection capabilities in complex environments. Finally, a VanilaNet module was introduced in the Neck component to reduce the computational complexity of the model and further improve its strawberry recognition accuracy. Experimental results demonstrated that the improved YOLOv8, in comparison to the traditional YOLOv8, increased the mAP by 4.6%, reaching 93.8%. The improved YOLOv8 not only has higher detection accuracy, but also performs well  in small target detection, which can provide support for the subsequent real‑time small target detection of picking robots.

Key words: deep learning, strawberry detection, YOLOv8, attention mechanism, data enhancement

中图分类号: