Abstract:Aiming at the problems of overlapping tomato leaves with shading in greenhouse environment, small spots of some diseases leading to low detection accuracy, and large number of parameters of the existing detection model, which is difficult to be deployed to the embedded end with limited computational resources, a lightweight tomato leaf disease detection method based on the improvement of YOLO v8n was proposed. Firstly, the HGNetV2 network was used to replace the backbone network of the YOLO v8n model, and a lightweight convolutional GhostConv structure was introduced to improve the extraction of multi-scale disease features while reducing the number of parameters and computation of the model. Secondly, an improved C2f_Star module was used in the neck network part to achieve further lightweighting while enhancing the feature representation of the model. Then the lightweight attention mechanism SimAM module was added to strengthen the feature extraction ability of the model for small lesions. Finally, the hybrid loss function Wise_Focaler_MPDIoU was designed to replace the original loss function to improve the performance of the network bounding box regression and accelerate the convergence speed. The experimental results showed that the number of parameters and model size of the improved model (GSSW-YOLO v8n) were reduced by 28.9% and 26.9%, respectively, compared with the original model, while the average detection accuracy on the tomato leaf disease dataset used reached 97.4%, which was an improvement of 3.0 percentage points, comparing with other target detection algorithms of Faster R-CNN, YOLO v5n, YOLO v6n, and YOLO v7-tiny by 13.3, 5.4, 9.9, and 9.2 percentage points, respectively. The improved model (GSSW-YOLO v8n) had high detection accuracy and less number of parameters, which can provide a reference for the deployment and application of the tomato leaf disease detection model on the embedded device side.