节点文献
基于卷积神经网络的果园水果检测算法研究
Fruit Detection Algorithm based on Convolution Neural Network
【作者】 陈亮;
【导师】 牛海军;
【作者基本信息】 西安电子科技大学 , 计算机科学与技术, 2020, 硕士
【摘要】 自然场景下的水果检测在自动机械收获系统、水果产量统计与预测等方面具有较大的应用前景。但是,果园现场环境十分复杂,存在着遮挡、光照不均匀、水果颜色与周围环境颜色相近等问题,导致依靠传统手工设计特征的机器学习方法检测准确率不高,泛化性能不强。由于基于深度学习的目标检测算法检测准确率高,泛化能力强,并且对于遮挡和光照不均匀等问题具有较强的鲁棒性。因此,本文利用卷积神经网络进行水果检测,分别研究了使用锚点框的算法和不使用锚点框的算法,成功实现了高准确率的水果检测。本文的主要贡献有:1)针对使用锚点框的一阶段算法对小尺寸水果定位困难和检出率较低的问题,研究了使用锚点框的二阶段基于区域提议的网络Faster R-CNN,并对其进行优化改进,提出了基于区域提议网络的水果检测算法(Fruit Detection R-CNN,FD R-CNN)。FD R-CNN算法使用Res2NetPlus进行特征提取,结合K-means聚类分析和统计的标注框宽高分布确定了适合本文所用数据集的锚点框尺寸。利用双线性插值获得特征图上不同尺寸候选区域中浮点坐标位置处的特征值。在分类层边框回归时,综合考虑了预测框与标注框的交并比、中心点距离和长宽比,使得边框回归变得更加稳定。2)针对使用锚点框的二阶段算法网络结构复杂,速度慢的问题,研究了网络结构简单的非锚点框算法,并提出了基于Res2NetPlus的水果中心点和尺寸预测(Fruit Center and Size Prediction based Res2NetPlus,FCSP-Res2NetPlus)算法。FCSP-Res2NetPlus算法使用Res2NetPlus进行特征提取,并分别利用转置卷积、最近邻插值和双线性插值进行上采样,最终使用预测模块直接预测出水果的中心点和尺寸。3)在芒果和杏数据集上对前述方法进行了实验验证。其中,FD R-CNN算法在芒果和杏数据集上的平均准确率分别达到了0.975和0.979。FCSP-Res2NetPlus算法中,在特征提取网络中使用最近邻插值模块进行上采样的网络获得了最优的结果,在芒果和杏数据集上的平均准确率达到了0.980和0.973。实验结果表明,本文提出的FD R-CNN和FCSP-Res2NetPlus都能够有效提升小尺寸水果的检测准确率,能够更好的适应复杂背景下的水果检测,具有较强的鲁棒性和泛化能力。并且FCSP-Res2NetPlus能够更快速的完成水果检测工作,很好的平衡了检测速度和准确率。
【Abstract】 The fruit detection under natural scenes have great application prospects in automatic mechanical harvesting system,fruit yield statistics and prediction.However,the real orchard scene is very complex,including the problems of shadowing,uneven illumination and similar color of fruit and its surrounding environment.As a result,the average precision and generalization performance of machine learning methods based on traditional manual extraction features are not high.The object detection algorithm based on deep learning has high average precision,strong generalization ability and strong robustness to issues such as shadowing and uneven illumination.This thesis is intended to provide a research of fruit detection based on convolutional neural networks.The paper shows the research of anchor based and anchor free algorithm.The main contributions of this thesis are:Aiming at the problem of low average precision of small-sized fruit with one stage algorithm,a two stage Faster R-CNN based on regional proposal using anchor box is studied and optimized,and Fruit Detection R-CNN(FD R-CNN)is proposed,which is an anchor based algorithm.FD R-CNN uses Res2NetPlus50 as the feature extraction network.Determine anchor box scale based on K-means and the size distribution of ground truth.Bilinear interpolation is used to extract the features at floating point coordinates in different sizes candidate areas on the feature map.For bounding box regression,the Io U of the prediction box and the ground truth,the distance between the center points,and the aspect ratio are taken into account to make the bounding box regression more stable.Aiming at the problems of complex network structure and slow training and testing speed of two-stage algorithm,the anchor free algorithm is studied,and a new anchor free algorithm Fruit Center and Size Prediction based Res2NetPlus(FCSP-Res2NetPlus),which is suitable for fruit detection,is proposed.FCSP-Res2NetPlus uses Res2NetPlus50 to extract features and uses transposed convolution,nearest neighbor interpolation,and bilinear interpolation for up-sampling.FCSP-Res2NetPlus uses prediction module to directly predict the center and size of the fruit on the feature map.The methods above are verified by experiments on mangoes and almonds datasets.The average precision of FD R-CNN algorithm on mangoes and almonds datasets reaches 0.975 and 0.979,respectively.In FCSP-Res2NetPlus,the optimal results are obtained by using the nearest neighbor interpolation module for up-sampling in the feature extraction network,and the average precision reaches 0.980 and 0.973 on mangoes and almonds datasets.The experimental results show that both FD R-CNN and FCSP-Res2NetPlus proposed in this paper can effectively improve the detection accuracy of small-sized fruits,and can better adapt to the detection of fruits in a complex background,with strong robustness and generalization ability.And FCSP-Res2NetPlus can complete the fruit detection work more quickly,which has a good balance between detection speed and accuracy.
【Key words】 object detection; fruit detection; anchor box; regional proposal; up-sampling;