Abstract:Automatic and accurate detection of cherry tomato maturity in natural environment is the foundation for achieving automatic cherry tomato picking. According to the changes in phenotypic characteristics of cherry tomato during its mature period and the national standard GH/T 1193—2021, and regarding the lack of significant differences in adjacent maturity characteristics of cherry tomatoes and the problem of mutual occlusion between fruits, a lightweight maturity detection method of cherry tomato with five levels, including green, turning, pink, lightred and red was proposed based on improved YOLO v7 model. In this model, MobileNetV3 was introduced into the original YOLO v7 model as backbone for feature extraction to reduce the parameters of the original model; global attention mechanism (GAM) module was added to the feature fusion network to improve the feature expression ability of the model. The experimental results showed that the precision, recall and mean average precision of the improved model were 98.6%, 98.1% and 98.2%, respectively, the average detection time of a single image was 82ms, and the memory occupied by the model was 66.5MB. Compared with Faster R-CNN, YOLO v3, YOLO v5s and YOLO v7 models, the mean average precision (mAP) was improved by 18.7, 0.2, 0.3 and 0.1 percentage points, respectively. The average accuracy of the improved YOLO v7 model was also improved, and memory usage of the model was optimal. The results showed that the improved YOLO v7 model can provide effective exploration for automated cherry tomato fruit picking.