Search

CN-121982542-A - Wheat disease detection and identification method and system based on wavelet and posterior probability

CN121982542ACN 121982542 ACN121982542 ACN 121982542ACN-121982542-A

Abstract

The invention discloses a wheat disease detection and identification method and system based on wavelet and posterior probability, wherein the method comprises the steps of S1, obtaining an original wheat disease image, preprocessing, inputting a reference SegFormer model, extracting a multi-scale feature map by using an encoder, S2, carrying out frequency domain attention processing based on two-dimensional discrete wavelet decomposition on the multi-scale feature map to generate a space enhanced feature map, S3, obtaining an illumination intensity estimated value by using an illumination perception network, calculating Bayesian posterior probability of each category based on statistical correlation, S4, fusing the space enhanced feature map to obtain fusion features by using a decoder, carrying out Dropout operation and convolution processing, combining Bayesian posterior probability, utilizing Monte Carlo sampling quantization prediction uncertainty, and outputting a segmentation result.

Inventors

  • ZHANG XIAOBIAO
  • WEI HUI
  • LIU LILI
  • ZHANG ERLEI
  • LI SHIXING

Assignees

  • 西北农林科技大学

Dates

Publication Date
20260505
Application Date
20260130

Claims (9)

  1. 1. The wheat disease detection and identification method based on wavelet and posterior probability is characterized by comprising the following steps of: S1, acquiring an original wheat disease image, preprocessing the original wheat disease image, inputting the preprocessed image into a reference SegFormer semantic segmentation model, and extracting a multi-scale feature map of the image by using an encoder in the reference SegFormer semantic segmentation model; S2, carrying out frequency domain attention processing based on two-dimensional discrete wavelet decomposition on the multi-scale feature map, and generating a feature map after space enhancement through multi-scale analysis; s3, processing the original wheat disease image by utilizing an illumination perception network to obtain an illumination intensity estimated value, and calculating Bayesian posterior probability of each class based on statistical association of the illumination intensity and disease class; S4, fusing the feature map subjected to space enhancement through a decoder in a reference semantic segmentation network to obtain fusion features, applying Dropout operation to the fusion features to obtain sampling features, combining the sampling features with the Bayesian posterior probability, and outputting a wheat disease region segmentation result by utilizing Monte Carlo sampling quantization prediction uncertainty.
  2. 2. The wheat disease detection and identification method based on wavelet and posterior probability as claimed in claim 1, wherein the step of S1, preprocessing includes performing data cleaning and format unification processing on an original wheat disease image, converting RGB values of each pixel of the wheat disease image into gray values, and performing smoothing processing on the wheat disease image by a Gaussian filter method.
  3. 3. The method for detecting and identifying wheat diseases based on wavelet and posterior probability according to claim 1, wherein the step S2 is to perform a frequency domain attention process based on two-dimensional discrete wavelet decomposition on the multi-scale feature map, and generate a spatially enhanced feature map by multi-scale analysis, and specifically comprises: three-level two-dimensional discrete wavelet decomposition is carried out on the multi-scale feature map through a low-pass filter and a high-pass filter, and four primary wavelet sub-band feature maps are obtained; Processing each level of wavelet sub-band characteristic map by using dimension pooling, L1 norm and Softmax layers, and calculating to obtain a airspace characteristic enhancement map under a primary decomposition view angle; Processing each level of wavelet sub-band characteristic diagram by using global pooling, L1 norm and Softmax layers, and calculating to obtain global contribution rate under a first-level decomposition view angle; weighting all levels of wavelet sub-band features according to the global contribution rate; and performing two-dimensional wavelet reconstruction operation on the weighted multi-level wavelet sub-band characteristics to obtain a characteristic diagram after spatial enhancement.
  4. 4. The method for detecting and identifying wheat diseases based on wavelet and posterior probability according to claim 1, wherein the step of calculating the bayesian posterior probability of each category comprises: calculating the conditional probability of the illumination intensity according to the illumination intensity estimated value and the statistical parameters of the wheat disease categories; Based on the Bayes principle, under the condition of given illumination intensity, the posterior probability estimated value of each disease category is calculated.
  5. 5. The method for detecting and identifying wheat diseases based on wavelet and posterior probability according to claim 1, wherein the steps of S4, dropout operation and convolution processing are specifically as follows: dropout operation is applied to the fusion characteristics, so that the processed fusion characteristics are obtained; Performing element-by-element product operation on the processed fusion features and Bayes posterior probability to obtain intermediate features; Sequentially performing 1×1 convolution operation, batch normalization processing and ReLU activation on the intermediate features to obtain normalized nonlinear features; applying Dropout operation to the nonlinear characteristics, and introducing a second random sampling mechanism to obtain characteristic representation; And calculating a characteristic representation through a1 multiplied by 1 convolution layer, and outputting a pixel-by-pixel classification prediction result.
  6. 6. The method for detecting and identifying wheat diseases based on wavelet and posterior probability according to claim 1, wherein the step S4 of quantitatively predicting uncertainty by utilizing monte carlo sampling specifically comprises the steps of performing T monte carlo sampling in a prediction stage, and obtaining a random sample of model posterior distribution through an activated Dropout layer each time; calculating average prediction probability distribution of each category based on the multi-sampling result; calculating prediction entropy according to the average prediction probability distribution so as to quantify the uncertainty of the classification result; And selecting the category corresponding to the maximum value in the average prediction probability distribution as a final wheat disease region segmentation result.
  7. 7. A wavelet and posterior probability-based wheat disease detection and identification system for implementing the wavelet and posterior probability-based wheat disease detection and identification method as set forth in any one of claims 1 to 6, comprising: the feature extraction module is used for acquiring an original wheat disease image and preprocessing the original wheat disease image, inputting the preprocessed image into the benchmark SegFormer semantic segmentation model, and extracting a multi-scale feature map of the image by using an encoder in the benchmark SegFormer semantic segmentation model; the frequency domain feature enhancement module is used for carrying out frequency domain attention processing based on two-dimensional discrete wavelet decomposition on the multi-scale feature map and generating a feature map after space enhancement through multi-scale analysis; The Bayesian probability calculation module is used for processing the original wheat disease image by utilizing an illumination perception network to obtain an illumination intensity estimated value, and calculating the Bayesian posterior probability of each category based on the statistical association of the illumination intensity and the disease category; The prediction and uncertainty evaluation module is used for fusing the feature map after spatial enhancement through a decoder in a reference semantic segmentation network to obtain fusion features, applying Dropout operation to the fusion features to obtain sampling features, combining the sampling features with the Bayesian posterior probability, and utilizing Monte Carlo sampling to quantify prediction uncertainty and output a wheat disease region segmentation result.
  8. 8. An electronic device comprising a processor and a memory, the processor configured to execute a computer program stored in the memory to implement the wavelet and posterior probability-based wheat-disease detection and identification method of any one of claims 1-6.
  9. 9. A computer readable storage medium, wherein the computer readable storage medium, when executed by a processor, implements the wavelet and posterior probability-based wheat disease detection and identification method according to any one of claims 1-6.

Description

Wheat disease detection and identification method and system based on wavelet and posterior probability Technical Field The invention relates to the technical field of computer vision, in particular to a wheat disease detection and identification method and system based on wavelet and posterior probability. Background The image recognition and segmentation technology is an important research direction in the field of computer vision, and the core aim is to realize accurate positioning and semantic classification of target areas in images. The technology is widely applied to a plurality of fields such as target detection, scene understanding and the like. In an agricultural disease detection scene, the crop images are analyzed to identify disease areas, so that the method has important significance in realizing accurate pesticide application, disease early warning and agricultural production management, and has higher application value in disease monitoring of large-scale grain crops such as wheat. In recent years, with the development of deep learning technology, a semantic segmentation method based on a deep neural network gradually becomes a mainstream technical scheme for detecting agricultural diseases. The semantic segmentation model of the transducer architecture represented by SegFormer can automatically learn multi-scale semantic features and long-distance context information of the image through a self-attention mechanism, and obtains better performance in various visual segmentation tasks. Therefore, segFormer-based semantic segmentation networks have been widely used in wheat disease area detection tasks. However, the existing SegFormer-based disease area detection method still has certain defects in practical application. On the one hand, after the multi-scale feature extraction is completed, the conventional SegFormer model is generally and directly subjected to feature fusion, lacks a pertinence enhancement mechanism for relevant key features (such as texture change, edge structure and the like) of the disease, has limited characterization capability for fine differences between a disease area and a healthy area under the condition of unobvious complex background or disease features, and is easy to cause the problem of fuzzy boundary or missed detection of the disease area. On the other hand, the existing model mostly adopts a deterministic classification prediction mode, lacks the capability of describing uncertainty of a prediction result, is difficult to quantitatively evaluate the reliability of model output, and has high risk in the case that the boundary of a disease area is unclear or the illumination condition is complex, so that effective reference is difficult to be provided for subsequent manual decision. In view of the above problems, studies have been made in the field of computer vision to improve the deep learning model in terms of both feature enhancement and prediction reliability assessment. On one hand, by introducing a frequency domain analysis method, the image features are subjected to frequency domain decomposition to enhance the expression capability of key information such as textures, edges and the like, wherein wavelet transformation is used as a typical frequency domain analysis tool, and has certain advantages in the aspects of feature enhancement and noise suppression. On the other hand, the uncertainty modeling is carried out on the classification result by utilizing the Bayesian inference idea, and the result reliability of the model in a complex environment is improved by approximating the quantitative estimation of the Bayesian posterior probability prediction confidence. However, the existing improvement methods focus on general vision tasks, and in the field of agricultural disease detection, especially for application scenes with fine granularity characteristics and complex backgrounds such as wheat diseases, the combination of application and actual effects of the application scenes are still to be further researched and verified. Therefore, how to combine the characteristic features of the wheat disease image, further improve the characteristic expression capability of the disease region and realize the reliability evaluation of the prediction result while guaranteeing the semantic segmentation precision is still a problem to be solved in the current agricultural disease detection technology. Disclosure of Invention The invention aims to provide a wheat disease detection and identification method and system based on wavelet and posterior probability, which realize wheat disease region segmentation by combining the Bayesian probability of frequency domain attention and illumination perception based on two-dimensional discrete wavelet decomposition and utilizing Monte Carlo sampling to quantitatively predict uncertainty. In order to achieve the above purpose, the present invention provides the following technical solutions: a wheat disease detection and ide