欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2021, Vol. 3 ›› Issue (2): 100-114.doi: 10.12133/j.smartag.2021.3.2.202105-SA005

• 信息处理与决策 • 上一篇    下一篇

基于轻量化改进YOLOv5的苹果树产量测定方法

李志军1,2(), 杨圣慧1,2, 史德帅1,2, 刘星星1,2, 郑永军1,2()   

  1. 1.中国农业大学 工学院,北京 100083
    2.中国农业大学 烟台研究院,山东 烟台 264670
  • 收稿日期:2021-05-13 修回日期:2021-06-10 出版日期:2021-06-30 发布日期:2021-08-25
  • 基金资助:
    山东烟台校地融合发展项目(2019XDRHXMPT30);国家重点研发项目(2018YFD0700603)
  • 作者简介:李志军(1996-),男,硕士研究生,研究方向为智能农业装备。E-mail:335022969@qq.com
  • 通讯作者: 郑永军 E-mail:335022969@qq.com;zyj@cau.edu.cn

Yield Estimation Method of Apple Tree Based on Improved Lightweight YOLOv5

LI Zhijun1,2(), YANG Shenghui1,2, SHI Deshuai1,2, LIU Xingxing1,2, ZHENG Yongjun1,2()   

  1. 1.College of Engineering, China Agricultural University, Beijing 100083, China
    2.Yantai Institute of China Agricultural University, Yantai 264670, China
  • Received:2021-05-13 Revised:2021-06-10 Online:2021-06-30 Published:2021-08-25
  • corresponding author: Yongjun ZHENG E-mail:335022969@qq.com;zyj@cau.edu.cn

摘要:

果树测产是果园管理的重要环节之一,为提升苹果果园原位测产的准确性,本研究提出一种包含改进型YOLOv5果实检测算法与产量拟合网络的产量测定方法。利用无人机及树莓派摄像头采集摘袋后不同着色时间的苹果果园原位图像,形成样本数据集;通过更换深度可分离卷积和添加注意力机制模块对YOLOv5算法进行改进,解决网络中存在的特征提取时无注意力偏好问题和参数冗余问题,从而提升检测准确度,降低网络参数带来的计算负担;将图片作为输入得到估测果实数量以及边界框面总积。以上述检测结果作为输入、实际产量作为输出,训练产量拟合网络,得到最终测产模型。测产试验结果表明,改进型YOLOv5果实检测算法可以在提高轻量化程度的同时提升识别准确率,与改进前相比,检测速度最大可提升15.37%,平均mAP最高达到96.79%;在不同数据集下的测试结果表明,光照条件、着色时间以及背景有无白布均对算法准确率有一定影响;产量拟合网络可以较好地预测出果树产量,在训练集和测试集的决定系数R2分别为0.7967和0.7982,均方根误差RMSE分别为1.5317和1.4021 ㎏,不同产量样本的预测精度基本稳定;果树测产模型在背景有白布和无白布的条件下,相对误差范围分别在7%以内和13%以内。本研究提出的基于轻量化改进YOLOv5的果树产量测定方法具有良好的精度和有效性,基本可以满足自然环境下树上苹果的测产要求,为现代果园环境下的智能农业装备提供技术参考。

关键词: 苹果原位测产, 深度学习, 果实检测, BP神经网络, YOLOv5

Abstract:

Yield estimation of fruit tree is one of the important works in orchard management. In order to improve the accuracy of in-situ yield estimation of apple trees in orchard, a method for the yield estimation of single apple tree, which includes an improved YOLOv5 fruit detection network and a yield fitting network was proposed. The in-situ images of the apples without bags at different periods were acquired by using an unmanned aerial vehicle and Raspberry Pi camera, formed an image sample data set. For dealing with no attention preference and the parameter redundancy in feature extraction, the YOLOv5 network was improved by two approaches: 1) replacing the depth separable convolution, and 2) adding the attention mechanism module, so that the computation cost was decreased. Based on the improvement, the quantity of fruit was estimated and the total area of the bounding box of apples were respectively obtained as output. Then, these results were used as the input of the yield fitting network and actual yields were applied as the output to train the yield fitting network. The final model of fruit tree production estimation was obtained by combining the improved YOLOv5 network and the yield fitting network. Yield estimation experimental results showed that the improved YOLOv5 fruit detection algorithm could improve the recognition accuracy and the degree of lightweight. Compared with the previous algorithm, the detection speed of the algorithm proposed in this research was increased by up to 15.37%, while the mean of average accuracy (mAP) was raised up to 96.79%. The test results based on different data sets showed that the lighting conditions, coloring time and with white cloth in background had a certain impact on the accuracy of the algorithm. In addition, the yield fitting network performed better on predicting the yield of apple trees. The coefficients of determination in the training set and test set were respectively 0.7967 and 0.7982. The prediction accuracy of different yield samples was generally stable. Meanwhile, in terms of the with/without of white cloth in background, the range of relative error of the fruit tree yield measurement model was respectively within 7% and 13%. The yield estimation method of apple tree based on improved lightweight YOLOv5 had good accuracy and effectiveness, which could achieve yield estimation of apples in the natural environment, and would provide a technical reference for intelligent agricultural equipment in modern orchard environment.

Key words: apple in-situ yield estimation, deep learning, fruit detection, BP neural network, YOLOv5

中图分类号: