English

中国农机化学报

中国农机化学报 ›› 2024, Vol. 45 ›› Issue (8): 254-261.DOI: 10.13733/j.jcam.issn.2095‑5553.2024.08.037

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

基于改进YOLOv4-tiny的果园复杂环境下桃果实实时识别

苑迎春,张傲,何振学,张若晨,雷浩   

  • 出版日期:2024-08-15 发布日期:2024-07-26
  • 基金资助:
    国家自然科学基金(62102130);河北省自然科学基金(F2020204003)

Peach fruit real⁃time recognition in complex orchard environment based on improved YOLOv4-tiny

Yuan Yingchun, Zhang Ao, He Zhenxue, Zhang Ruochen, Lei Hao   

  • Online:2024-08-15 Published:2024-07-26

摘要: 为实现果园复杂环境下的桃果实实时识别,提出一种基于YOLOv4-tiny的桃果实实时识别方法YOLOv4-tiny-Peach。通过在主干网络中引入卷积注意力模块CBAM,优化其通道维度和空间维度的特征信息;在颈部网络中添加大尺度浅层特征层,提高对小目标识别精度;采用双向特征金字塔网络BiFPN对不同尺度特征信息进行融合。通过训练和比较,YOLOv4-tiny-Peach模型在测试集下的平均精度AP为87.88%,准确率P为91.81%,召回率R为73.84%,F1值为81.85%,相比于改进前,AP提升5.46%,P提升2.29%,R提升4.09%,F1提升3.44%。为检验改进模型在果园复杂环境下的适应性,在不同数目、不同成熟期和遮挡的情况下对果实图像进行识别,并与原模型识别效果进行对比,结果表明改进模型在三种情况下的识别精度均高于原模型,尤其在大视场和未熟期场景下模型改进效果显著。YOLOv4-tiny-Peach模型占用内存为27.4 MB,识别速度为49.76 fps,适用于农业嵌入式设备。为果园复杂环境下的桃果实自动采摘提供实时精准的目标识别指导。

关键词: 桃, 采摘机器人, 目标识别模型, YOLOv4-tiny, 果园, 实时

Abstract: In order to achieve real‑time peach fruit recognition in complex orchard environments, a real‑time peach fruit recognition approach (YOLOv4-tiny-Peach) was proposed based on YOLOv4-tiny. The method firstly optimized the feature information in its channel dimension and spatial dimension by introducing a Convolution Block Attention Module (CBAM) in the backbone network, then, it improved the accuracy of small target recognition by adding a large‑scale feature layer (F3) to the neck network, and finally, it used a Bidirectional Feature Pyramid Network (BiFPN) to fuse feature information at different scales. Through training and comparison, the average accuracy AP of YOLOv4-tiny-Peach model was 87.88%, the accuracy P was 91.81%, the recall R  was 73.84%, and the F1 score  was 81.85% under the test set. AP was increased by 5.46%, P by 2.29%, R by 4.09%, and F1 by 3.44%, respectively, compared to before the improvement. The recognition of peach fruit images under different numbers, different ripening stages, and occlusion was performed in order to verify the adaptability of the improved model in the complex environment of orchards, and the recognition effect of the improved model was compared with that of the original model. The results showed that the recognition accuracy of YOLOv4-tiny-Peach  was higher than that of the YOLOv4-tiny in all three cases, especially in scenes with a wide field of view and unripe fruit. The YOLOv4-tiny-Peach model uses memory of 27.4 MB  and has a inference speed of 49.76 fps, making it more suitable  for embedded agricultural equipment. The method provides real‑time and precise target identification assistance for autonomous peach fruit picking under complex environment in orchards.

Key words: peach, picking robot, target recognition model, YOLOv4-tiny, orchard, real?time 

中图分类号: