In order to automatically detect the maturity of cherry fruits in the natural environment 1 and realize the automatic picking of cherry fruits, three levels of cherry fruit maturity (Green ripening 2 stage, medium ripening stage, full ripening stage) were formulated according to the changes of 3 cherry fruit phenotypic characteristics in the mature stage and the company standard GH/T 1193-2021. Aiming at the problem that the difference of adjacent cherries’ maturity characteristics is not obvious and the mutual occlusion between fruits, an improved YOLO v8 model is proposed for cherry fruit maturity detection. In this method, the Dymatic Snake Convolution (DSconv) module 7 was introduced into the YOLO v8 model as the backbone feature extraction network to reduce the number of parameters of the network. At the same time, the spatial attention mechanism (including 9 CBMA and FocalModulation modules) was added to the feature fusion network to improve the feature expression ability of the network. The experimental results show that the average precision, 11 recall and average precision of the improved YOLO v8 model under the test set are 98.6%, 98.1% and 12 98.2% respectively. Compared with Faster R-CNN, YOLO v3 and YOLO v5s, the improved YOLO v8 13 model has improved by 18.7, 0.2, 0.3 and 0.1 percentage points respectively. The results show that the 14 improved YOLO v8 model can provide technical support for the automatic picking of cherries.