| In recent years,with the development of modern agriculture,mechanized equipment has made certain progress in automatic fruit harvesting,but fruit recognition still faces many challenges in practical scenarios.Due to hardware configuration limitations,some algorithms are difficult to deploy to devices with limited computing power.In addition,the images collected in complex scenes are subject to interference from background and noise,and detailed features are lost.Even under highly configured hardware conditions,the algorithm recognition rate is still low.In view of the above problems,this thesis studies fruit recognition algorithm based on deep convolution neural network.The main research work is as follows:1)In view of the problems that there are many kinds of object recognition algorithms and the performance of different application scenarios is different,the selection of basic fruit recognition algorithms is carried out.Firstly,the fruit recognition dataset under special complex scenes is produced,and the normalization and data enhancement preprocessing operations are carried out at the same time.Secondly,experimental comparisons are conducted on the recognition accuracy,real-time performance,and memory consumption of various object recognition algorithms based on the fruit recognition dataset.Finally,YOLO series algorithms are selected as the basic fruit recognition algorithm for subsequent optimization.2)Addressing the issues of low hardware configuration,limited computing power,and difficulty in deploying algorithms for devices,an improved YOLO lightweight object recognition algorithm is proposed.Firstly,a new lightweight feature extraction network based on Efficient Net is constructed,which can greatly reduce the number of parameters and reduce the complexity of the algorithm on the premise of ensuring the recognition accuracy of the algorithm.Secondly,the algorithm improves the accuracy of boundary box positioning regression.Finally,a balanced sample optimizer is introduced to optimize the uneven distribution of positive and negative samples.This algorithm realizes the lightweight well,and can recognize the object efficiently.3)Aiming at the problem of insufficient feature extraction ability and low recognition rate of object recognition algorithm in complex scenes,a YOLOv4 fusion dual attention mechanism algorithm is proposed.On the one hand,the CBAM attention mechanism module is introduced between CSPDarknet53 and PANet to focus on feature space and feature channel information and enhance algorithm feature extraction.On the other hand,the Soft-DIo U-NMS algorithm is introduced into the model to reduce the missed detection rate of adjacent overlapping objects and well solve the fruit occlusion problem in complex scenes.This can further improve the recognition accuracy of the algorithm.The improved YOLOv4 algorithm can maintain favorable recognition rate in complex scenes.4)A fruit recognition system based on the above proposed algorithm has been developed.Integrate the trained optimization algorithm into the recognition tool,and use the Py Qt5 framework to build a visual interface.Users can simply upload the image to be recognized and visualize the results of fruit recognition. |