| 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. |