Search

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

CN120912852BCN 120912852 BCN120912852 BCN 120912852BCN-120912852-B

Abstract

The invention discloses a grape leaf disease real-time detection method based on an improved RTDETR model, which is characterized in that a feature extraction module, a feature interaction module and a feature fusion module of an original RTDETR model are improved, image data in a training set is sent to the feature extraction module to perform feature extraction to obtain feature information of diseases, the extracted feature information is input to the feature interaction module designed based on SPPELAN to be processed to enhance information exchange and fusion between features, the information processed by the feature interaction module is input to the feature fusion module reconstructed based on ASF-YOLO to be integrated, the integrated features are transmitted to a decoder detection network to obtain disease detection results, and a test set is used for testing. The invention solves the problems of redundant calculation, insufficient real-time performance, missed detection of small targets and the like in grape leaf disease detection, and still maintains higher detection precision and speed while greatly reducing the calculation complexity.

Inventors

  • WANG QIMING
  • YU QIANCHENG
  • WANG JINYUN
  • LIU YANG

Assignees

  • 北方民族大学

Dates

Publication Date
20260505
Application Date
20250619

Claims (4)

  1. 1. A grape leaf disease real-time detection method based on an improved RTDETR model is characterized in that the improved RTDETR model is an improvement on a feature extraction module, a feature interaction module and a feature fusion module of an original RTDETR model, wherein the improvement on the feature extraction module is that an original backbone network HGNetV2 is replaced by PVNet, PVNet is obtained by fusing VANILLANET and PConv and is uniformly named as PVNet, the improvement on the feature interaction module is that a AIFI module in the RTDETR model is replaced by using the scale invariance advantage of SPPELAN, and the improvement on the feature fusion module is that a feature fusion module is constructed by utilizing the cooperative optimization characteristics of multi-scale feature fusion and attention mechanism of ASF-YOLO, so that the characterization capability of a target area is enhanced; the specific implementation of the grape leaf disease real-time detection method comprises the following steps: 1) Obtaining image data of grape leaf diseases, marking disease types and positions, constructing a structured marking data set which accords with VOC standards, then carrying out data enhancement to expand the data set, and finally dividing the data set into a training set, a verification set and a test set; 2) The training set is input into an improved RTDETR model for training, wherein the process comprises the steps of firstly, obtaining characteristic information of corresponding diseases through a characteristic extraction module, inputting the extracted characteristic information into a characteristic interaction module for processing, enhancing information exchange and fusion between characteristics, inputting the information processed by the characteristic interaction module into a characteristic fusion module for integration, and finally, transmitting the integrated characteristics into a decoder detection network of an improved RTDETR model to obtain a detection result of a grape leaf disease image, wherein the detection result comprises disease category and position information; 3) Inputting the test set into an optimal model for forward propagation prediction, and obtaining the accurate detection result of the grape leaf disease image.
  2. 2. The method for detecting grape leaf diseases in real time based on an improved RTDETR model according to claim 1 is characterized in that in step 1), disease samples are screened out from a PLANTVILLAGE open source disease image library, a Labelimg marking tool is used for marking disease types and positions, a structured marking dataset which accords with VOC standards is constructed, part of samples are screened out through a data enhancement mode, the brightness, saturation, contrast enhancement and noise addition of the samples are changed to simulate disease samples in special scenes, so that a dataset is expanded, and finally the dataset is divided into a training set, a verification set and a test set.
  3. 3. The method for detecting grape leaf diseases in real time based on an improved RTDETR model as claimed in claim 1, wherein in step 2), the feature extraction module uses VANILLANET as a basic network, fuses VANILLANET and PConv to form a new backbone network, and is uniformly named PVNet, the aim of improving the computing efficiency is to maintain efficient feature extraction, a dynamic training mechanism of VANILLANET is utilized to split single-layer convolution into two layers and insert an adjustable Activation function in the initial Stage of training, nonlinear computation is gradually fused into weights, a single-layer efficient structure is ensured during reasoning, a series of Activation functions are designed, local context information is captured through neighborhood weighting, the distinguishing capability of a disease edge and a complex background is enhanced, a selective channel processing mechanism of PConv is utilized, spatial feature extraction is only performed on a local channel, and other channels directly transmit original data, the problem of feature expression capability reduction caused by an excessive compression channel is avoided while the parameter computation amount is reduced, the new backbone network comprises a Stem module and a Stage module, the Stem module comprises a normalization convolution module and an Activation function, the Stage module comprises a Stage sensor module, the sensitivity of the whole image is quickly adjusted by the whole convolution module, the Stage sensor module is adjusted by the Activation module 1, the Stage sensor module is adjusted by the whole image sensor 1, and the whole image sensor is finally, the image is quickly responded by the map 1, and the map is finally obtained by the following the algorithm by the algorithm: F Stage (X)=Activation(MaxPool2d(BN(Conv 1×1 (LeakyReLU(BN(PConv 3×3 (X))))))) Wherein F Stage (X) represents the Stage module itself, X represents the input image, PConv 3×3 represents a partial convolution of 3×3, BN represents normalization, leakyReLU represents an Activation function, conv 1×1 represents a convolution of 1×1, maxPool2d represents a two-dimensional max pooling operation, and Activation represents a dynamic Activation function; The feature interaction module gradually expands receptive fields through SPPELAN multi-level pooling design according to the feature information acquired by the feature extraction module, and captures pixel-level disease spot details and regional-level semantic features at the same time, so that the problem of insufficient adaptability to multi-size targets is solved; the feature interaction module replaces AIFI modules in the RTDETR model by utilizing the multi-scale feature fusion advantage of SPPELAN, and compensates detail loss of deep semantic features by utilizing shallow high-resolution information by connecting feature graphs of different stages of the fusion feature extraction module through cross-level residual errors, so that information exchange and fusion among the features are enhanced, and robustness to blade forms or shielding areas is remarkably improved; The feature fusion module integrates information processed by the feature interaction module, utilizes ASF-YOLO to redesign a RTDETR model feature fusion module, firstly captures different grape leaf lesion morphological features through an SSFF module, then utilizes a TFE module to realize fusion of multi-scale feature images and enrich the detailed information of the lesion, finally introduces CPAM to integrate the SSFF module and the TFE module to realize self-adaptive channel weight distribution and spatial position focusing so as to improve the robustness of detection in a field complex environment and enhance the characterization capability of a target area, and finally, the integrated feature images are subjected to IoU-aware Query Selection to select a fixed number of features as target query, and then are mapped into confidence and boundary boxes through a prediction Head after being subjected to a Decoder & Head to obtain a final detection result, wherein the final detection result comprises disease category and position information.
  4. 4. The method for detecting grape leaf diseases in real time based on the improved RTDETR model according to claim 1, wherein in step 2), the performance index of the model is evaluated by using a verification set during a plurality of iterative training, and an important index FPS is focused again, which refers to the number of images that the model can process in a unit time, and is closely related to the real-time performance, the higher the FPS value is, the faster the response speed of the model is, the better the fit phenomenon of the model is judged by monitoring the evaluation index, and when the performance index on the verification set is not lifted in a plurality of continuous training rounds or the number of training rounds reaches a preset maximum number of rounds, the training is stopped and model parameters are saved, and the model parameters are determined to be an optimal model, wherein the formula of the FPS is expressed as follows: AllTime=pre+inf+post Where ms represents milliseconds, allTime represents the total time, pre represents the preprocessing time Preprocess, inf represents the inference time INFERENCE, and post represents the post-processing time Postprocess.

Description

Grape leaf disease real-time detection method based on improved RTDETR model Technical Field The invention relates to the technical field of deep learning disease detection, in particular to a grape leaf disease real-time detection method based on an improved RTDETR model. Background Grape is an important cash crop, the growth period stage of the grape is inevitably affected by diseases, the yield and the quality of the grape are seriously damaged, small economic losses are caused, the total yield of the 2023 global grape is 74.7 million tons according to reports issued by international grape and grape wine organizations, the yield losses of the 2024 global grape reach 4.4 million tons due to natural disasters, diseases and other factors, and the explosion of 2024 fungal diseases causes the annual yield of the French grape wine to be suddenly reduced by 23.5 percent, and the lowest yield of the grape is created in 1957. In the background, how to timely and accurately detect and identify grape leaf diseases is important, and a method with real-time detection clearly becomes a key factor for solving the problem, so that on one hand, a basis is provided for timely making control measures, the spread of diseases is effectively controlled, the influence on the yield and quality of the grapes is reduced, on the other hand, the efficiency of disease monitoring is greatly improved, and the labor and time cost is saved. With the rapid rise of intelligent agriculture, detection methods based on image processing and deep learning are widely welcomed in target recognition. The model comparison based on the YOLO series is representative, the model achieves better balance between light weight and detection precision, but has some problems at the same time, for example, the model comparison of the YOLO series relies on a non-maximum value inhibition NMS post-processing mechanism to eliminate redundant detection frames, and the process needs to sort and threshold value screening candidate frames, so that the calculation resource consumption increases along with the target density, and especially in the scene of dense overlapping of leaf lesions, the NMS obviously inhibits the detection speed, and becomes a key obstacle for restricting the deployment of a real-time detection system. Disclosure of Invention The invention aims to overcome the defects and shortcomings of the prior art, and provides a grape leaf disease real-time detection method based on an improved RTDETR model, which utilizes the advantages of a RTDETR model to eliminate the influence of NMS on detection speed, and can still maintain higher detection precision, detection speed and recall rate under the condition of greatly reducing the calculated amount. The technical scheme includes that the grape leaf disease real-time detection method based on an improved RTDETR model is characterized in that a characteristic extraction module, a characteristic interaction module and a characteristic fusion module of an original RTDETR model are improved by the improved RTDETR model, wherein the improvement of the characteristic extraction module is that an original backbone network HGNetV is replaced by PVNet, the PVNet is obtained by fusing VANILLANET and PConv and is uniformly named as PVNet, the improvement of the characteristic interaction module is that a AIFI module in a RTDETR model is replaced by using the scale invariance advantage of SPPELAN, and the improvement of the characteristic fusion module is that a characteristic fusion module is constructed by utilizing the cooperative optimization characteristics of multi-scale characteristic fusion and attention mechanism of ASF-YOLO, so that the characterization capability of a target area is enhanced; the specific implementation of the grape leaf disease real-time detection method comprises the following steps: 1) Obtaining image data of grape leaf diseases, marking disease types and positions, constructing a structured marking data set which accords with VOC standards, then carrying out data enhancement to expand the data set, and finally dividing the data set into a training set, a verification set and a test set; 2) The training set is input into an improved RTDETR model for training, wherein the process comprises the steps of firstly, obtaining characteristic information of corresponding diseases through a characteristic extraction module, inputting the extracted characteristic information into a characteristic interaction module for processing, enhancing information exchange and fusion between characteristics, inputting the information processed by the characteristic interaction module into a characteristic fusion module for integration, and finally, transmitting the integrated characteristics into a decoder detection network of an improved RTDETR model to obtain a detection result of a grape leaf disease image, wherein the detection result comprises disease category and position information; 3) Inputting the