Abstract:
In China, grapes are not only a common fresh fruit but also the primary ingredient for winemaking, with a continuously growing market demand and cultivation area. However, grapes are susceptible to diseases during their growth period, which not only affects the quality and yield of the grapes but also leads to economic losses for farmers.Once grapevines are affected by diseases, their physiological and morphological characteristics change, with these changes often being prominently reflected in the leaves.Therefore, applying computer vision and deep learning technologies for disease detection and identification in grape leaves can achieve rapid detection and identification of grape leaf diseases, reducing the risk of cultivation.To enhance the precision and processing speed of grape leaf spot recognition, we propose an innovative detection method based on the optimization of the YOLOv8 algorithm.YOLOv8 can select network models of different depths and widths according to task requirements for object detection, image classification, instance segmentation, and keypoint detection tasks.The neck network of YOLOv8 has not changed much, using a PAN+FPN structure to enhance the network's ability to fuse features. The head part is used to convert the output feature maps from the neck part into detection results. The head part of YOLOv8 draws on the decoupled head design from YOLOX and YOLOv6, eliminating the objectness branch, and performs bounding box regression and object classification through two parts: 4×reg_max and num_class.Firstly, we need to preprocess the images of grape leaf diseases. The potential uneven distribution of disease image samples may lead to model overfitting. To mitigate this, we employ data augmentation techniques, including image rotation and mirror transformation, to increase sample diversity. These measures collectively aim to improve the model's generalization capability and accuracy in disease detection.Secondly, this study aims to enhance the precision and processing speed of grape leaf spot recognition; therefore, the proposed method involves integrating the CBAM (Convolutional Block Attention Module) attention mechanism into the backbone to enhance the refined processing of feature maps.The Convolutional Block Attention Module (CBAM) is a concise and efficient attention mechanism designed as a module within feedforward convolutional networks, capable of effectively integrating spatial and channel information, thereby enhancing the network's recognition capabilities.Since downsampling during the feature extraction process may lead to information loss when dealing with spots of varying sizes, this approach can enhance the model's ability to recognize spots of different scales.Finally, we have adopted ShuffleNet V2, a lightweight convolutional neural network, as the main framework, replacing the traditional CBS convolutional module, to reduce the model's parameters and computational requirements.ShuffleNet V2 places special emphasis on the balanced distribution of parameters and computational load across different parts of the network, thereby optimizing resource utilization efficiency and reducing the model's energy consumption. The design of ShuffleNet V2 adheres to several core principles to ensure efficient computational performance: reducing memory access by simplifying operations and optimizing data paths, thereby lowering energy consumption and increasing speed; simplifying the network structure and avoiding the use of computationally expensive operations.This approach ensures detection speed while maintaining the model's high efficiency and accuracy, demonstrating a significant improvement in the detection of grape leaf spots.Experiments have demonstrated that the proposed method ensures detection speed while maintaining the model's high efficiency and accuracy, achieving a significant improvement in the detection performance of grape leaf spots.We trained the model using a dataset of images depicting three types of grape leaf diseases, and compared experiments with the YOLOv5, YOLOv8, and the improved YOLOv8 models, as well as other models. The results showed that the accuracy of the improved YOLOv8 model reached 94.6%, which is an enhancement compared to the accuracy of other models. This model can serve as an effective approach for the detection of grape leaf diseases.