The fruit picking robot and sorter can effectively solve the problems of high labor cost and low efficiency.The visual system determines the picking efficiency and accuracy of the robot.Therefore,it is of great practical significance to carry out automatic fruit picking and classification by developing a vision system that can accurately identify fruit and classify the surface quality of fruit after collection under complex conditions.In this paper,deep learning and binocular vision technology are used to study the detection and location of strawberry fruit and the automatic classification of postharvest fruit.The main achievements are as follows:1.Study on target fruit detection methods.Aiming at the problems of background interference,fruit overlapping and serious size difference in the current strawberry recognition and detection process,this study proposes a detection method based on improved YOLOv5 algorithm.First of all,TC-SE module is introduced into Backbone and Neck of YOLOv5,and the PAN structure in the original network is replaced by Bi-FPN,which effectively reduces the ratio of fruit missing due to size difference;Secondly,Gaussian weighting is introduced in the post-processing stage of the model output,which improves the recall rate of overlapping occlusion target fruits;Finally,the vector angle between regressions is introduced into the position loss function,and the penalty index is redefined,which improves the fruit recognition accuracy in complex background.The improved model has a MAP of 93%,which is3.7% higher than the original model,and the detection speed is 31.15 ms.After that,in order to prove the effectiveness and practicability of the algorithm in this paper,a number of different groups of different algorithms,different viewfinder and different lighting conditions were carried out.2.Study on fruit three-dimensional positioning method.Firstly,the internal and external parameters of the binocular camera are obtained from the imaging model,and then calibrated with Matlab software.Then,the three-dimensional coordinates of the fruit are obtained by stereo matching with SGBM algorithm.The experimental results meet the three-dimensional positioning accuracy requirements of strawberry picking robot for the target fruit.3.Study on classification methods of fruit appearance quality.In order to improve the classification speed and accuracy of different appearance quality of fruit after picking,this study proposes a new fruit classification method based on Mobile Net V3.First of all,the attention mechanism NAM is introduced at the end of each Block of the original model,which can reduce the weight of features that are not significant and improve the classification accuracy;Secondly,hole convolution is introduced in the Bottleneck module to extract more and deeper feature information from its convolution kernel.The accuracy of this method under the test set ACC is99.7%,which is 1.8% higher than the original model,the speed is basically unchanged,and the overall performance is higher than other mainstream partition methods,which also proves the rationality of the improved algorithm,and can meet the need for improving the appearance quality classification of strawberries.4.Model deployment and real-time evaluation.Deploying general-purpose object detection and classification models on mobile and embedded devices where computing resources are scarce takes a long time to inference.Therefore,this study first converted the model in Py Torch framework into ONNX format,then simplifies the network structure and reads the.onnx model file in the C++ environment to obtain the final result graph.The real-time evaluation of the deployed model shows that the speed is improved by nearly 10 times without changing the MAP value,which meets the expectations and requirements of the experiment. |