Abstract
With the increasing demand for precision agriculture, automatic detection of tomato leaf diseases has become a critical technological challenge in smart agriculture. Among various diseases, Tomato Yellow Virus Leaf, due to its unique pathological characteristics, presents a particularly challenging identification target. Traditional image recognition methods often fail to meet the high-precision detection requirements for this disease, leading to delayed responses in disease control by farmers, which severely impacts tomato yield and quality. To address this issue, this paper proposes an optimized YOLOv8n algorithm, incorporating a C2f-DynamicConv optimization module. By dynamically adjusting the weights of convolutional kernels, the model can adapt to the characteristics of different input data, thereby enhancing its ability to represent diverse features. Additionally, we introduce the SimAM attention mechanism, which enhances the model's focus on key areas by weighting the feature map, significantly improving the accuracy of disease detection while filtering out irrelevant features and enhancing sensitivity. During the upsampling process, we adopt the Dysample upsampling operator, optimizing the quality of feature map reconstruction and improving detection resolution through a refined upsampling strategy. To better address the bounding box regression problem in object detection, we incorporate the GIoU loss function. Compared to traditional loss functions, GIoU performs excellently in handling bounding box overlap and positional accuracy, further improving the model's detection performance. Experimental results show that the improved model achieves an average precision of 81.8%, precision of 77.1%, and recall of 77.4%. Compared to existing methods, our approach shows significant advantages in detection accuracy, localization precision, and model computational efficiency, achieving improved detection performance on the tomato leaf disease dataset.