Grape leaf disease real-time detection method based on improved RTDETR model

By improving the feature extraction, interaction, and fusion modules of the RTDETR model, the problems of computational resource consumption and detection speed in grape leaf disease detection of the YOLO series models were solved, and efficient and real-time disease detection was achieved.

CN120912852BActive Publication Date: 2026-05-05BEIFANG UNIV OF NATITIES
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIFANG UNIV OF NATITIES
Filing Date
2025-06-19
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing YOLO series models consume computational resources that increase with target density in grape leaf disease detection, and the NMS post-processing mechanism affects detection speed, making real-time detection difficult to achieve.

Method used

The improved RTDETR model uses PVNet for feature extraction, SPPELAN for feature interaction, and ASF-YOLO for feature fusion, enhancing feature information exchange and robustness while reducing computational cost.

Benefits of technology

While maintaining high detection accuracy and recall, it significantly improves detection speed and real-time performance, solving the detection bottleneck of the YOLO series models in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912852B_ABST
    Figure CN120912852B_ABST
Patent Text Reader

Abstract

The application discloses a grape leaf disease real-time detection method based on an improved RTDETR model, improves a feature extraction module, a feature interaction module and a feature fusion module of the original RTDETR model, feeds image data in a training set into the feature extraction module to perform feature extraction, and obtains feature information of a disease; the extracted feature information is input into a feature interaction module designed based on SPPELAN to perform processing, and information exchange and fusion between features are enhanced; information processed by the feature interaction module is input into a feature fusion module reconstructed based on ASF-YOLO to perform integration; integrated features are transmitted to a decoder detection network to obtain a disease detection result, and a test set is used for testing. The application solves problems existing in grape leaf disease detection, such as calculation redundancy, insufficient real-time performance and small target missing detection, and while the calculation complexity is greatly reduced, the detection precision and speed are still maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of deep learning-based disease detection, and in particular to a real-time detection method for grape leaf diseases based on an improved RTDETR model. Background Technology

[0002] As an important economic crop, grapes are inevitably susceptible to diseases throughout their growth cycle, severely impacting yield and quality and causing significant economic losses. According to a report by the International Organisation of Vine and Wine (IOV), global grape production in 2023 totaled 74.7 million tons, with 4.4 million tons lost due to natural disasters and diseases. In 2024, an outbreak of fungal diseases led to a sharp 23.5% drop in French wine production, the lowest yield since 1957. Against this backdrop, timely and accurate detection and identification of grape leaf diseases are crucial. Real-time detection methods are undoubtedly key to solving this problem. On the one hand, they provide a basis for timely development of control measures, effectively controlling the spread of diseases and reducing their impact on grape yield and quality; on the other hand, they significantly improve the efficiency of disease monitoring, saving manpower and time costs.

[0003] With the rapid rise of smart agriculture, detection methods based on image processing and deep learning have been widely welcomed in target recognition. Among them, the YOLO series of models are quite representative, achieving a good balance between lightweight design and detection accuracy. However, they also have some problems. For example, the YOLO series of models rely heavily on the non-maximum suppression (NMS) post-processing mechanism to eliminate redundant detection boxes. This process requires sorting candidate boxes and thresholding, which leads to an increase in computational resource consumption with target density. Especially in scenarios with densely overlapping leaf lesions, NMS significantly inhibits detection speed, becoming a key obstacle restricting the deployment of real-time detection systems. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and propose a real-time detection method for grape leaf diseases based on an improved RTDETR model. This method utilizes the advantages of the RTDETR model itself to eliminate the impact of NMS on detection speed. At the same time, it can maintain high detection accuracy, detection speed and recall while significantly reducing the amount of computation.

[0005] To achieve the above objectives, the technical solution provided by this invention is as follows: a real-time detection method for grape leaf diseases based on an improved RTDETR model. This improved RTDETR model improves the feature extraction module, feature interaction module, and feature fusion module of the original RTDETR model. Specifically, the feature extraction module is improved by replacing the original backbone network HGNetV2 with PVNet, which is a fusion of VanillaNet and PConv, uniformly named PVNet. The feature interaction module is improved by replacing the AIFI module in the RTDETR model with the scale invariance advantage of SPPELAN. The feature fusion module is improved by constructing a feature fusion module using the synergistic optimization characteristics of ASF-YOLO's multi-scale feature fusion and attention mechanism, thereby enhancing the representation ability of the target region.

[0006] The specific implementation of this real-time detection method for grape leaf diseases includes the following steps:

[0007] 1) Obtain image data of grape leaf diseases, label the disease categories and locations, construct a structured labeled dataset that conforms to the VOC standard, perform data augmentation to expand the dataset, and finally divide the dataset into training set, validation set and test set;

[0008] 2) The training set is input into the improved RTDETR model for training. The process is as follows: First, the feature extraction module obtains the feature information of the corresponding diseases. The extracted feature information is input into the feature interaction module for processing to enhance the information exchange and fusion between features. Then, the information processed by the feature interaction module is input into the feature fusion module for integration. Finally, the integrated features are passed to the decoder detection network of the improved RTDETR model to obtain the detection results of grape leaf disease images, including disease category and location information. After multiple rounds of iterative training, the model performance index is evaluated using the validation set. When the validation set performance no longer improves or reaches the preset number of rounds, training is stopped and the model parameters are saved to obtain the optimal model.

[0009] 3) By inputting the test set into the optimal model for forward propagation prediction, accurate detection results of grape leaf disease images can be obtained.

[0010] Furthermore, in step 1), disease samples are selected from the PlantVillage open-source disease image library, and the disease categories and locations are labeled using the Labelimg annotation tool to construct a structured labeled dataset that conforms to the VOC standard. Then, some samples are selected and data augmentation is performed, including changing the brightness and saturation of the samples, enhancing the contrast, and adding noise to simulate disease samples in special scenarios, thereby expanding the dataset. Finally, the dataset is divided into training set, validation set, and test set.

[0011] Furthermore, in step 2), the feature extraction module uses VanillaNet as the base network, fusing VanillaNet with PConv to form a new backbone network, uniformly named PVNet, aiming to improve computational efficiency while maintaining efficient feature extraction. Utilizing VanillaNet's dynamic training mechanism, in the early stages of training, a single-layer convolution is split into two layers and adjustable activation functions are inserted, gradually integrating nonlinear computation into the weights to ensure that the inference process reverts to a single-layer efficient structure. Simultaneously, a series of activation functions are designed to capture local contextual information through neighborhood weighting, enhancing the ability to distinguish lesion edges from complex backgrounds. Then, using PConv's selective channel processing mechanism, spatial feature extraction is performed only on local channels. The remaining channels directly transmit the original data, reducing parameter computation while avoiding the problem of decreased feature representation ability due to excessive channel compression. The new backbone network includes a Stem module and a Stage module. The Stem module includes a convolution module, a normalization module, and an activation function module. The Stage module includes a convolution module, a normalization module, an activation function module, and a pooling module. The overall process of the feature extraction module is as follows: the input image is quickly downsampled by a 4×4 convolution, then the channels are adjusted by a 1×1 convolution, and the feature response is adjusted by a dynamic activation function to enhance the sensitivity to lesion edges. After passing through multiple Stage modules, the final image resolution is obtained. Each Stage module is expressed by the following mathematical formula:

[0012] F Stage (X)=Activation(MaxPool2d(BN(Conv 1×1 (LeakyReLU(BN(PConv 3×3 (X)))))))

[0013] In the formula, F Stage (X) represents the Stage module itself, X represents the input image, PConv 3×3 This represents a 3×3 partial convolution, BN represents normalization, LeakyReLU represents the activation function, and Conv... 1×1 This represents a 1×1 convolution, MaxPool2d represents a two-dimensional max pooling operation, and Activation represents a dynamic activation function.

[0014] The feature interaction module expands the receptive field by using SPPELAN's multi-level pooling design to gradually expand the feature information obtained by the feature extraction module, while capturing pixel-level lesion details and regional semantic features, thus solving the problem of insufficient adaptability to multi-size targets. The feature interaction module utilizes the multi-scale feature fusion advantage of SPPELAN to replace the AIFI module in the RTDETR model. It fuses feature maps from different stages of the feature extraction module through cross-level residual connections, uses shallow high-resolution information to compensate for the loss of details in deep semantic features, enhances information exchange and fusion between features, and significantly improves robustness to leaf morphology or occluded areas.

[0015] The feature fusion module integrates the information processed by the feature interaction module. It redesigns the feature fusion module of the RTDETR model using ASF-YOLO. First, the SSFF module captures the morphological features of different grape leaf lesions. Then, the TFE module fuses multi-scale feature maps to enrich the detailed information of the lesions. Finally, CPAM is introduced to integrate the SSFF and TFE modules, achieving adaptive channel weight allocation and spatial location focusing to improve robustness in complex field environments and enhance the representation ability of the target area. Finally, the integrated feature map is processed by IoU-aware Query Selection to select a fixed number of features as the target query. After passing through the Decoder & Head, the prediction head maps the results to confidence scores and bounding boxes, yielding the final detection result, which includes disease category and location information.

[0016] Furthermore, in step 2), through multiple rounds of iterative training, the model's performance metrics are evaluated using a validation set, with a focus on an important metric: FPS (Frames Per Second). FPS refers to the number of images the model can process per unit of time, which is closely related to real-time performance. A higher FPS indicates a faster model response. By monitoring the evaluation metrics, it is determined whether the model is overfitting. When the performance metrics on the validation set no longer improve in multiple consecutive training rounds, or when the number of training rounds reaches the pre-set maximum number of rounds, training is stopped and the model parameters are saved. At this point, it is determined as the optimal model. The formula for FPS is as follows:

[0017]

[0018] AllTime = pre + inf + post

[0019] In the formula, ms represents milliseconds, AllTime represents total time, pre represents preprocessing time, inf represents inference time, and post represents postprocessing time.

[0020] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0021] 1. This invention addresses the challenges of real-time detection of grape leaf diseases by improving upon the RTDETR model. In the feature extraction module, VanillaNet is used as the base network, and it is fused with PConv to form a new backbone network, PVNet, aiming to reduce computational load while maintaining efficient feature extraction.

[0022] 2. Based on the advantages of SPPELAN, this invention constructs a feature fusion module that takes into account both global semantics and local details in the feature interaction module, which solves the problem of insufficient adaptability to multi-size targets and significantly improves the model's ability to recognize leaf morphology or occluded areas.

[0023] 3. In the feature fusion module, this invention completely abandons the original modules of the RTDETR model. Based on ASF-YOLO, it introduces SSFF and TFE modules to effectively improve the robustness of the model to interference from complex field environments such as leaf texture and light.

[0024] In summary, this invention first significantly reduces computational complexity by reconstructing the feature extraction module; secondly, it enhances information exchange and fusion between features through an improved feature interaction module; and finally, it effectively solves problems such as missed detection of small targets in disease detection tasks through an improved feature fusion module. In addition, this method also demonstrates high detection accuracy and speed on both the validation and test sets. Attached Figure Description

[0025] Figure 1 The diagram shows the improved structure of the RTDETR model. In the diagram, Backbone is the improved feature extraction module (its new backbone network is PVNet), RepC3 is the reparameterized convolution module, Zoom_cat is the multi-scale feature fusion module, corresponding to the TFE module of ASF-YOLO, Conv is the ordinary convolution module, Upsample is the upsampling operation module, Concat is the fusion operation, ScalSeq is the scale sequence feature fusion module, corresponding to the SSFF module of ASF-YOLO, and Add is the addition operation, corresponding to the CPAM module of ASF-YOLO.

[0026] Figure 2This is a structural diagram of the feature extraction module. In the diagram, Conv2d 4×4 / s4 is a 2D convolution with a kernel size of 4×4 and a stride of 4, BN is normalization, LeakyReLU is the activation function, Conv2d 1×1 is a 2D convolution with a kernel size of 1×1, Activation is the dynamic activation function, PConv 3×3 is a partial convolution with a kernel size of 3×3, and MaxPool2d 2×2 / s2 is a 2D max pooling operation with a kernel size of 2×2 and a stride of 2.

[0027] Figure 3 The diagram shows the structure of SPPELAN. In the diagram, Conv is a convolution with a kernel size of 1×1, a stride of 1, and padding of 0; MaxPool2d is a two-dimensional max pooling operation with a kernel size of 5×5, a stride of 1, and padding of 2; and concat is a fusion operation.

[0028] Figure 4 This is a structural diagram of the feature fusion module (SSFF+TFE+CPAM). In the diagram, x is the input, Split is the data splitting operation module, Conv is a 1×1 convolution, SiLU is the activation function, Add Dim is the dimension expansion operation module, Upsample is the upsampling operation module, 3D Conv is a 3D convolution, 3D BN is a 3D batch normalization, 3D Max Pool is a 3D max pooling, Remove Dim is a dimension removal operation module, Concatenate is a concatenation operation, Max Pooling is a max pooling operation, Avg Pooling is an average pooling operation, Add is an addition operation, keep is an invariant operation, Squeeze last dim is a dimension compression operation module, Transpose last two dims is a dimension transformation operation module, Transpose back and Unsqueeze is a dimension adjustment operation module, Sigmoid is the activation function, Multiply is the feature fusion operation module, feature map is the feature map, Dim h and Dim w are dimension change operations, Expand is the feature expansion operation module, and Output is the output. Detailed Implementation

[0029] The present invention will be further described below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0030] like Figures 1 to 4As shown, this embodiment discloses a real-time detection method for grape leaf diseases based on an improved RTDETR model. This improved RTDETR model improves the feature extraction module, feature interaction module, and feature fusion module of the original RTDETR model. Specifically, the feature extraction module is improved by replacing the original backbone network HGNetV2 with PVNet, which is a fusion of VanillaNet and PConv, uniformly named PVNet. The feature interaction module is improved by replacing the AIFI module in the RTDETR model with the scale invariance advantage of SPPELAN. The feature fusion module is improved by constructing a feature fusion module using the synergistic optimization characteristics of ASF-YOLO's multi-scale feature fusion and attention mechanism, thereby enhancing the representation ability of the target region.

[0031] The specific implementation of this real-time detection method for grape leaf diseases includes the following steps:

[0032] 1) Image data of grape leaf diseases were obtained through the PlantVillage open-source disease image library. 6238 images were selected and labeled with disease categories and locations using the Labelimg annotation tool to construct a structured labeled dataset that conforms to the VOC standard. Then, some samples were selected and data augmentation was performed, including changing the brightness and saturation of the samples, enhancing the contrast, and adding noise to simulate disease samples under special scenarios, thereby expanding the dataset. The dataset was then divided into a training set of 4990 images, a validation set of 623 images, and a test set of 625 images in an 8:1:1 ratio. The division results are shown in Table 1.

[0033] Table 1 Dataset Partitioning

[0034] Disease types Total number of images training set Validation set test set Black measles 2038 1660 206 172 Black rot 2072 1621 226 225 Leaf spot disease 2128 1709 191 228

[0035] 2) The training set is input into the improved RTDETR model for training. The process is as follows: First, the feature extraction module obtains the feature information of the corresponding diseases. The extracted feature information is then input into the feature interaction module for processing to enhance the information exchange and fusion between features. Next, the information processed by the feature interaction module is input into the feature fusion module for integration. Finally, the integrated features are passed to the decoder detection network of the improved RTDETR model to obtain the detection results of grape leaf disease images, including disease category and location information. After multiple rounds of iterative training, the model performance metrics are evaluated using a validation set. When the validation set performance no longer improves or reaches a preset number of rounds, training is stopped and the model parameters are saved to obtain the optimal model. The specific details are as follows:

[0036] The feature extraction module uses VanillaNet as the base network, fusing VanillaNet with PConv to form a new backbone network, uniformly named PVNet. This aims to improve computational efficiency while maintaining efficient feature extraction. Utilizing VanillaNet's dynamic training mechanism, single-layer convolutions are split into two layers with adjustable activation functions during the initial training phase, gradually integrating non-linear computations into the weights. This ensures that the structure reverts to a single-layer, efficient structure during inference. Simultaneously, a series of activation functions are designed to capture local contextual information through neighborhood weighting, enhancing the ability to distinguish lesion edges from complex backgrounds. Furthermore, PConv's selective channel processing mechanism performs spatial feature extraction only on local channels, while the remaining channels directly transmit the original data, reducing parameter computation and avoiding excessive computation. The problem of reduced feature representation ability caused by channel compression is addressed. The new backbone network includes a Stem module and a Stage module. The Stem module includes a convolution module, a normalization module, and an activation function module. The Stage module includes a convolution module, a normalization module, an activation function module, and a pooling module. Furthermore, taking a 640×640 input image as an example, the overall process of the feature extraction module is as follows: the input image is rapidly downsampled to 160×160 resolution via 4×4 convolution, then the channels are adjusted via 1×1 convolution, and the feature response is adjusted through a dynamic activation function (Activation) to enhance sensitivity to lesion edges. After passing through multiple Stage modules, the final image resolution is downsampled from 160×160 to 20×20. Each Stage module is mathematically represented as follows:

[0037] F Stage (X)=Activation(MaxPool2d(BN(Conv 1×1 (LeakyReLU(BN(PConv 3×3 (X)))))))

[0038] In the formula, F Stage (X) represents the Stage module itself, X represents the input image, PConv 3×3 This represents a 3×3 partial convolution, BN represents normalization, LeakyReLU represents the activation function, and Conv... 1×1 This represents a 1×1 convolution, MaxPool2d represents a two-dimensional max pooling operation, and Activation represents a dynamic activation function.

[0039] The feature interaction module expands the receptive field by using SPPELAN's multi-level pooling design to gradually expand the feature information obtained by the feature extraction module, while capturing pixel-level lesion details and regional semantic features, thus solving the problem of insufficient adaptability to multi-size targets. The feature interaction module utilizes the multi-scale feature fusion advantage of SPPELAN to replace the AIFI module in the RTDETR model. It fuses feature maps from different stages of the feature extraction module through cross-level residual connections, uses shallow high-resolution information to compensate for the loss of details in deep semantic features, enhances information exchange and fusion between features, and significantly improves robustness to leaf morphology or occluded areas.

[0040] The feature fusion module integrates the information processed by the feature interaction module. It redesigns the feature fusion module of the RTDETR model using ASF-YOLO. First, the SSFF module captures the morphological features of different grape leaf lesions. Then, the TFE module fuses multi-scale feature maps to enrich the detailed information of the lesions. Finally, CPAM is introduced to integrate the SSFF and TFE modules, achieving adaptive channel weight allocation and spatial location focusing to improve robustness in complex field environments and enhance the representation ability of the target area. Ultimately, the integrated feature map is processed by IoU-aware Query Selection to select a fixed number of features as the target query. After passing through the Decoder & Head, the prediction head maps the results to confidence scores and bounding boxes, yielding the final detection result, which includes disease category and location information.

[0041] Through multiple rounds of iterative training, the model's performance metrics are evaluated using a validation set, with a particular focus on the crucial metric of Faster Image Processing (FPS). FPS refers to the number of images the model can process per unit of time, which is closely related to real-time performance; a higher FPS indicates a faster model response. By monitoring these metrics, overfitting is assessed. Training is stopped and model parameters are saved when the performance metrics on the validation set no longer improve over several consecutive training rounds, or when the pre-set maximum number of training rounds is reached. This model is then identified as the optimal one. The formula for FPS is as follows:

[0042]

[0043] AllTime = pre + inf + post

[0044] In the formula, ms represents milliseconds, AllTime represents total time, pre represents preprocessing time, inf represents inference time, and post represents postprocessing time.

[0045] 3) By inputting the test set into the optimal model for forward propagation prediction, accurate detection results of grape leaf disease images can be obtained.

[0046] The improved RTDETR model was compared and analyzed with YOLOV8L, YOLOV9C, YOLOV10L, YOLO11L, YOLOV12L, RTDETR-Mamba-L and RTDETR-L models. The experimental results are shown in Table 2.

[0047] Table 2. Analysis of Experimental Results

[0048]

[0049] The experimental results above clearly show that the improved RTDETR model achieves better performance than other mainstream models, which fully demonstrates the effectiveness and robustness of the method of this invention. In the next study, we plan to apply the method of this invention to other fields of disease detection to fully verify its generalization ability.

[0050] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for real-time detection of grape leaf diseases based on an improved RTDETR model, characterized in that, The improved RTDETR model enhances the feature extraction, feature interaction, and feature fusion modules of the original RTDETR model. Specifically, the feature extraction module replaces the original backbone network HGNetV2 with PVNet, which is a fusion of VanillaNet and PConv, uniformly named PVNet. The feature interaction module utilizes the scale invariance advantage of SPPELAN to replace the AIFI module in the RTDETR model. The feature fusion module leverages the synergistic optimization characteristics of ASF-YOLO's multi-scale feature fusion and attention mechanism to construct a feature fusion module, enhancing the representation capability of the target region. The specific implementation of this real-time detection method for grape leaf diseases includes the following steps: 1) Obtain image data of grape leaf diseases, label the disease categories and locations, construct a structured labeled dataset that conforms to the VOC standard, perform data augmentation to expand the dataset, and finally divide the dataset into training set, validation set and test set; 2) The training set is input into the improved RTDETR model for training. The process is as follows: First, the feature extraction module obtains the feature information of the corresponding diseases. The extracted feature information is input into the feature interaction module for processing to enhance the information exchange and fusion between features. Then, the information processed by the feature interaction module is input into the feature fusion module for integration. Finally, the integrated features are passed to the decoder detection network of the improved RTDETR model to obtain the detection results of grape leaf disease images, including disease category and location information. After multiple rounds of iterative training, the model performance index is evaluated using the validation set. When the validation set performance no longer improves or reaches the preset number of rounds, training is stopped and the model parameters are saved to obtain the optimal model. 3) By inputting the test set into the optimal model for forward propagation prediction, accurate detection results of grape leaf disease images can be obtained.

2. The method for real-time detection of grape leaf diseases based on the improved RTDETR model according to claim 1, characterized in that, In step 1), disease samples are selected from the PlantVillage open-source disease image library. The Labelimg annotation tool is used to annotate the disease categories and locations to construct a structured annotation dataset that conforms to the VOC standard. Then, some samples are selected and data augmentation is performed, including changing the brightness and saturation of the samples, enhancing the contrast, and adding noise to simulate disease samples in special scenarios, thereby expanding the dataset. Finally, the dataset is divided into training set, validation set, and test set.

3. The method for real-time detection of grape leaf diseases based on the improved RTDETR model according to claim 1, characterized in that, In step 2), the feature extraction module uses VanillaNet as the base network, and merges VanillaNet with PConv to form a new backbone network, which is uniformly named PVNet, aiming to improve computational efficiency while maintaining efficient feature extraction. Utilizing VanillaNet's dynamic training mechanism, a single-layer convolution is split into two layers and an adjustable activation function is inserted in the early stages of training. Nonlinear computation is gradually integrated into the weights to ensure that the structure reverts to a single-layer, efficient structure during inference. Simultaneously, a series of activation functions are designed to capture local contextual information through neighborhood weighting, enhancing the ability to distinguish lesion edges from complex backgrounds. Furthermore, PConv's selective channel processing mechanism is used to perform spatial feature extraction only on local channels, while the remaining channels directly transmit the original data, reducing parameter computation and avoiding the problem of decreased feature representation due to excessive channel compression. The new backbone network includes a Stem module and a Stage module. The Stem module includes a convolution module, a normalization module, and an activation function module. The Stage module includes a convolution module, a normalization module, an activation function module, and a pooling module. The overall process of the feature extraction module is as follows: the input image is rapidly downsampled through a 4×4 convolution, then the channels are adjusted through a 1×1 convolution, and the feature response is adjusted through a dynamic activation function to enhance sensitivity to lesion edges. After passing through multiple Stage modules, the final image resolution is obtained. Each Stage module is mathematically represented as follows: F Stage (X)=Activation(MaxPool2d(BN(Conv 1×1 (LeakyReLU(BN(PConv 3×3 (X))))))) In the formula, F Stage (X) represents the Stage module itself, X represents the input image, PConv 3×3 This represents a 3×3 partial convolution, BN represents normalization, LeakyReLU represents the activation function, and Conv... 1×1 This represents a 1×1 convolution, MaxPool2d represents a two-dimensional max pooling operation, and Activation represents a dynamic activation function. The feature interaction module expands the receptive field by using SPPELAN's multi-level pooling design to gradually expand the feature information obtained by the feature extraction module, while capturing pixel-level lesion details and regional semantic features, thus solving the problem of insufficient adaptability to multi-size targets. The feature interaction module utilizes the multi-scale feature fusion advantage of SPPELAN to replace the AIFI module in the RTDETR model. It fuses feature maps from different stages of the feature extraction module through cross-level residual connections, uses shallow high-resolution information to compensate for the loss of details in deep semantic features, enhances information exchange and fusion between features, and significantly improves robustness to leaf morphology or occluded areas. The feature fusion module integrates the information processed by the feature interaction module. It redesigns the feature fusion module of the RTDETR model using ASF-YOLO. First, the SSFF module captures the morphological features of different grape leaf lesions. Then, the TFE module fuses multi-scale feature maps to enrich the detailed information of the lesions. Finally, CPAM is introduced to integrate the SSFF and TFE modules, achieving adaptive channel weight allocation and spatial location focusing to improve robustness in complex field environments and enhance the representation ability of the target area. Finally, the integrated feature map is processed by IoU-aware QuerySelection to select a fixed number of features as the target query. After passing through the Decoder & Head, the prediction head maps the results to confidence scores and bounding boxes, yielding the final detection result, which includes disease category and location information.

4. The method for real-time detection of grape leaf diseases based on the improved RTDETR model according to claim 1, characterized in that, In step 2), the model undergoes multiple rounds of iterative training. During this process, the model's performance metrics are evaluated using a validation set, with a particular focus on the crucial metric of FPS (Frames Per Second). FPS refers to the number of images the model can process per unit of time, which is closely related to real-time performance. A higher FPS indicates a faster model response. By monitoring the evaluation metrics, it is determined whether the model is overfitting. When the performance metrics on the validation set no longer improve over several consecutive training rounds, or when the number of training rounds reaches the pre-set maximum number of rounds, training is stopped and the model parameters are saved. At this point, the optimal model is determined. The formula for FPS is as follows: AllTime = pre + inf + post In the formula, ms represents milliseconds, AllTime represents total time, pre represents preprocessing time, inf represents inference time, and post represents postprocessing time.

Citation Information

Patent Citations

  • Grape leaf disease detection method

    CN118864401A

  • Tomato leaf disease detection method based on SSP-DETR model

    CN119785157A