| Citrus planting is a significant part of agriculture in Taizhou City,Zhejiang Province.The cost of labor continues to increase due to the loss of suitable labor force and the aging of the population.Besides,the time is restraint,so citrus picking has become an extremely important part of the entire citrus planting process.Therefore,it is necessary to design a new citrus automatic picking machine to replace manual work.In the process of citrus automatic picking machine identifying citrus,citrus target recognition,judging maturity and three-dimensional positioning are the most important aspects.In a natural orchard environment,citrus is easily blocked by branches and leaves or overlapped by other fruits.Different weather conditions will lead to different lighting conditions.These unstable factors mentioned above will interfere with the identification and positioning of citrus.The data set of this paper selects pictures taken in citrus orchards in natural environments and chooses citrus of different maturity in different weathers.First,the YOLO target recognition algorithm is used to detect the target on the citrus data set,and then the target recognition is performed on the same citrus data set based on the YOLO algorithm combined with the lightweight network.After the citrus target boxes is obtained,a single citrus image is intercepted,and the network of three scales of the Res Net classification algorithm is used to classify the citrus to determine whether the citrus is ripe or not.Finally,the binocular camera stereo vision method was used to locate the citrus photos in the laboratory,and the three-dimensional coordinates and point cloud images of the citrus photos were obtained.This paper proposes a method to train the data set of citrus photos taken in the natural environment based on YOLOv5 s 、 YOLOv7-tiny and Mobile Net V3.The optimal algorithm for comprehensive judgment is YOLOv7-tiny-Mobile Net V3,the accuracy of training is 89.27%,the training time is 8.782 h,and the total test time is35.076 s.Then a single citrus photo was taken from the citrus data set and manually classified as a new training set.Three different scale networks,Res Net-50,Res Net-101,and Res Net-152,were used to train the new training set,and the test set was tested to successfully distinguish whether the citrus is ripe or not.Res Net-50 is used as the citrus maturity determination algorithm in this article for comprehensive judgment,the accuracy rate obtained was 85.5421%,and the detection time was4.302 s.Finally,the three-dimensional positioning of the citrus photos was carried out by using the binocular camera stereo vision positioning method.The 3D coordinates and point cloud of the citrus can be obtained by putting the citrus photos at different distances from the binocular camera,and through the steps of camera calibration,stereo correction,stereo matching,parallax calculation,and depth calculation. |