A rice blast disease grade detection method based on hyperspectrum

CN122966984APending Publication Date: 2026-10-23PLANT PROTECTION RES INST OF GUANGDONG ACADEMY OF AGRI SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611436180.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

现有常规技术难以精准捕获相邻病害等级间的微小变化,导致模型对中度、重度病害样本的区分效果受限

Benefits of technology

[0016]可理解,本申请的基于高光谱的水稻稻瘟病病害等级检测方法,通过计算待测样本光谱向量分别与调取的各稻瘟病病害等级的整体中心光谱之间的光谱角形成光谱角特征向量,以获取待测样本光谱向量的几何特征。接着,将光谱角特征向量与待测样本光谱向量输入两个及以上预定义异构基学习器后输出的两个及以上病害等级概率向量融合,首先异构基学习器输出的两个及以上病害等级概率向量的融合提高了模型结构和特征表达方式上的互补性,同时与光谱角特征向量融合,引入了待测样本光谱向量的几何特征,实现了统计特征与几何特征的联合建模,有助于提高不同病害等级,尤其是相邻病害等级对应样本的分类准确性,提高水稻稻瘟病病害等级的预测准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966984A_ABST
    Figure CN122966984A_ABST
Patent Text Reader

Abstract

The application provides a rice rice blast disease grade detection method based on hyperspectrum, and the method comprises the following steps: acquiring a spectrum vector of a to-be-detected sample of rice; calculating a spectrum angle between the spectrum vector of the to-be-detected sample and the overall central spectrum of each rice blast disease grade, and forming a spectrum angle feature vector; inputting the spectrum vector of the to-be-detected sample into two or more predefined heterogeneous base learners, and outputting two or more disease grade probability vectors; and inputting the spectrum angle feature vector and the two or more disease grade probability vectors into a meta-classification model after fusion, and outputting a rice blast disease grade of the rice, which helps to improve the classification accuracy of different disease grades, especially the adjacent disease grades, and improve the prediction accuracy of the rice blast disease grade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of agricultural informatization and plant pathology detection technology, and in particular to a method for detecting the disease level of rice blast disease based on hyperspectral imaging. Background Technology

[0002] Rice blast is a highly damaging fungal disease in rice cultivation, causing yield losses of 10% to 30% annually after an outbreak, posing a significant threat to stable food production both domestically and internationally. As rice leaves are progressively infected by the rice blast fungus, the chlorophyll content, cell structure, and internal water content of the leaves undergo continuous changes, and the severity of the disease gradually transitions from a healthy state to severe infection, exhibiting a gradient-like change. Therefore, developing a rapid and accurate method for identifying the severity of rice blast can provide practical support for early warning and precise pesticide application in the field, possessing significant real-world research value.

[0003] In recent years, hyperspectral imaging equipment has been widely used in various crop disease identification studies due to its advantages such as continuous spectral bands, large data volume, and high sensitivity to subtle changes in crop physiology. In 2022, Zhang's team abroad used hyperspectral data collected from rice leaves, combined with a support vector machine algorithm, to classify rice blast into multiple levels. They also constructed a spectral reflectance ratio model to identify the severity of disease at different growth stages of rice. In 2022, Mandal et al. systematically compared the differences in spectral responses of rice leaves with different disease levels in the visible and near-infrared bands, laying a theoretical foundation for spectral screening of disease classification. Looking at other crop-related research, Mei Guangyuan's team in 2024 combined the VSURF algorithm with a correlation screening method to extract feature bands and complete the quantitative estimation of the disease index of wheat stripe rust. For potato late blight, existing research uses bidirectional temporal convolutional networks to identify asymptomatic diseased leaves with an accuracy rate of 96%. An ensemble learning algorithm has also achieved a classification accuracy exceeding 95.9% for fungal diseases in Chinese cabbage. All of the above studies confirm that it is feasible to use hyperspectral data for crop disease classification and detection. However, further in-depth research is needed to screen effective spectral features for rice blast and build a refined classification model.

[0004] Current technologies for rice blast grading and detection still have two significant shortcomings: First, the differences in disease characteristics between different grades of rice blast are subtle, exhibiting typical fine-grained classification features. Existing conventional technologies struggle to accurately capture these minute changes between adjacent disease grades, limiting the model's ability to distinguish between moderate and severe disease samples. Second, hyperspectral data possesses high-dimensional redundancy, while traditional single machine learning models lack efficient feature selection and global hyperparameter optimization strategies. When processing complex high-dimensional spectral data, they are prone to getting trapped in local optima, leading to significant fluctuations and insufficient stability in grading results. Summary of the Invention

[0005] This application provides a hyperspectral-based method for detecting the disease level of rice blast, which helps to improve the classification accuracy of different disease levels, especially the corresponding samples of adjacent disease levels, and improve the prediction accuracy of rice blast disease level.

[0006] This application provides a method for detecting the severity of rice blast disease based on hyperspectral imaging, the method comprising: Obtain the spectral vector of the rice sample to be tested; Calculate the spectral angles between the spectral vector of the sample to be tested and the overall central spectra of each rice blast disease level, and form a spectral angle feature vector; Input the spectral vector of the sample to be tested into two or more predefined heterogeneous base learners, and output two or more disease level probability vectors; The spectral angle feature vector and two or more disease level probability vectors are fused and input into the meta-classification model to output the rice blast disease level.

[0007] In some embodiments, the formation of the spectral angular eigenvector further includes: The spectral vector of the sample to be tested is divided into multiple spectral sub-intervals, and the overall central spectral vector of each rice blast disease level is divided into multiple sub-interval central spectra. Calculate the spectral angle between each spectral sub-interval and the center spectrum of each sub-interval for each rice blast disease level, and form a spectral angle feature vector.

[0008] In some embodiments, the formation of the spectral angular eigenvector includes: The spectral angle of each sub-region is multiplied by the corresponding weight coefficient and then concatenated to form a spectral angle feature vector. The weight coefficient is assigned a value according to the importance of the spectral sub-region in the identification of the disease level.

[0009] In some embodiments, each overall central spectral vector and sub-interval central spectral vector are respectively the arithmetic mean of the spectral vectors of training samples under the same disease level in the retrieved training set, and the arithmetic mean of each type of spectral sub-interval in the spectral vector.

[0010] In some embodiments, two or more predefined heterogeneous base learners are obtained by training XGBoost and support vector machine based on the training set, or by training XGBoost, support vector machine and random forest based on the training set.

[0011] In some embodiments, determining the training set includes: Multiple raw spectral data with rice blast disease level labels were obtained, and the initial training set was obtained after noise reduction of each raw spectral data. The initial training set is augmented with sample data to obtain the training set.

[0012] In some embodiments, an initial training set is obtained by denoising each original spectral data, including: Local curve segments in each original hyperspectral data are selected using a local sliding window. For all the original reflectances on the local curve segment, a low-order polynomial is used to perform least-squares fitting. The polynomial parameters are solved and substituted back into the low-order polynomial to obtain the fitted polynomial. The optimal weighting coefficients corresponding to each original reflectance within the window are derived from the fitted polynomial. The weighted summation with the corresponding original reflectance is then used to obtain the smoothed reflectance value of the center point wavelength of the local sliding window. The smoothed reflectance values ​​of multiple center point wavelengths calculated by moving the local sliding window are combined to form a smoothed hyperspectral curve. The smoothed hyperspectral curves are transformed by first derivative to obtain spectral vectors labeled with rice blast disease severity, forming the initial training set. The initial training set is augmented with sample data to obtain the training set, which includes: In the feature space, linear interpolation is performed on the initial training samples corresponding to a few types of rice blast disease levels in the initial training set to generate new samples. Small random perturbations are superimposed on the new samples and the initial training samples to form a training set.

[0013] In some embodiments, the output of multiple disease level probability vectors includes: The spectral vectors of the samples to be tested are input into predefined XGBoost, Support Vector Machine and Random Forest respectively. The output is a first disease level probability vector that captures high-order nonlinear correlations between spectral bands and refines detailed features to reduce prediction bias, a second disease level probability vector that is used to construct the global optimal level boundary and delineate the level limit to enhance the discrimination power of fuzzy samples, and a third disease level probability vector that is used to suppress noise interference through multi-tree voting average and stabilize the overall judgment to reduce prediction variance.

[0014] In some embodiments, the formula for forming the spectral angular eigenvector is as follows: , , in, Indicates the first Spectral angles corresponding to disease severity levels Represents the spectral angular eigenvector. Represents the spectral vector of the sample to be tested. Indicates the first The overall central spectral vector corresponding to the disease level, where each overall central spectral vector is the arithmetic mean of the spectral vectors of training samples under the same disease level in the training set; or: , , , in, Indicates the first The first disease level corresponding to the The spectral angles corresponding to each spectral sub-interval Indicates the first Each spectral sub-region Indicates the first The first disease level corresponding to the The central spectral vectors of each spectral sub-interval correspond to a given spectral sub-interval. These central spectral vectors are the arithmetic mean of the spectral vectors of each class of spectral sub-intervals within the spectral vectors of training samples corresponding to the same disease level in the training set. express The weighting coefficients corresponding to each spectral sub-interval.

[0015] In some embodiments, the formula for calculating the smooth reflectivity value at the center point wavelength is as follows: , in, Indicates the first The wavelength at the center point of a local curve segment This represents the smooth reflectivity value at the wavelength of the center point. This indicates the offset relative to the center point. The original reflectivity value of the band, express The corresponding optimal weighting coefficients are obtained by performing least-squares fitting on all original reflectivities using a low-order polynomial, solving for the polynomial parameters, and substituting them back into the low-order polynomial to obtain the fitted polynomial. Based on the fitted polynomial, the optimal weighting coefficients corresponding to each original reflectivity within the local sliding window are derived. , , These represent the left and right half widths of the local sliding window, respectively. The formula for transforming the smoothed reflectance value at each center point of the smoothed hyperspectral curve using the first derivative is: , in, This represents the smoothed reflectivity value at the center point after the first derivative transformation. This indicates the wavelength interval between adjacent bands, which is determined by the sampling interval.

[0016] Understandably, the hyperspectral-based rice blast disease level detection method of this application calculates the spectral angle feature vectors between the spectral vector of the test sample and the overall central spectrum of each retrieved rice blast disease level to obtain the geometric features of the test sample's spectral vector. Then, the spectral angle feature vectors are fused with the two or more disease level probability vectors output by two or more predefined heterogeneous base learners. Firstly, the fusion of the two or more disease level probability vectors output by the heterogeneous base learners improves the complementarity in model structure and feature representation. Simultaneously, the fusion with the spectral angle feature vectors introduces the geometric features of the test sample's spectral vector, achieving joint modeling of statistical and geometric features. This helps improve the classification accuracy of different disease levels, especially samples corresponding to adjacent disease levels, and improves the prediction accuracy of rice blast disease levels. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] Figure 1 A schematic flowchart of a hyperspectral-based method for detecting the severity of rice blast disease provided in this application embodiment; Figure 2 A schematic diagram illustrating the symptom standards for different disease levels of rice blast; Figure 3 This is a schematic diagram of the XGBoost-SVM dual-model stacked network structure; Figure 4 This is a schematic diagram of the overall structure of the XGB-SVM-RF-SA fusion model; Figure 5 A comparison chart of macro-average F1 under different spectral input schemes; Figure 6 A comparison chart of the overall accuracy and macro-average F1 of different models; Figure 7 A comparison of the accuracy and F1 score of the optimal model XGB-SVM-RF-SA at different disease levels; Figure 8 This is the confusion matrix of the XGB-SVM-RF and XGB-SVM-RF-SA models in this application on the test set; Figure 9 The learning curve of the XGB-SVM-RF-SA model in this application; Figure 10 The Macro-F1 variation of the model is shown under different signal-to-noise ratios (40dB, 30dB, 20dB) of noise interference.

[0019] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0021] The terms “first”, “second”, etc. used in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0022] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0023] Please combine Figure 1 , Figure 1 This is a schematic flowchart of a hyperspectral-based method for detecting the severity of rice blast disease provided in this application. The method includes the following steps: Step S210: Obtain the spectral vector of the rice sample to be tested.

[0024] Specifically, the spectral vector of the sample to be tested can be the hyperspectral vector of the sample to be tested (e.g., 2151-dimensional).

[0025] Step S220: Calculate the spectral angles between the spectral vector of the sample to be tested and the overall central spectra of each rice blast disease level, and form a spectral angle feature vector.

[0026] Specifically, the severity of rice blast disease is determined manually based on the seedling blast grading standards published by the International Rice Research Institute (IRRI), such as... Figure 2As shown, the specific disease severity standards for rice blast are as follows: Grade 0, no symptoms; Grade 1, very small brown spots; Grade 2, brown round spots about 1 mm in diameter; Grade 3, round or spindle-shaped lesions about 2-3 mm in diameter, gray in the center and brown at the edges; Grade 4, spindle-shaped lesions about 1-3 mm long, gray in the center and brown at the edges; Grade 5, forming long and wide large spindle-shaped gray lesions, which may even merge into large patches in severe cases. Grades 0-2 are considered resistance reactions (R), meaning the strain exhibits an incompatibility reaction, while grades 3-5 are susceptible reactions (S), meaning the strain exhibits an affinity reaction. Based on this, the corresponding strains for disease severity grades 0-2 are non-virulent strains, while the corresponding strains for disease severity grades 3-5 are considered virulent strains.

[0027] A spectral vector is composed of reflectance values ​​across multiple consecutive bands, and its representation is a curve, hence the name spectral curve. When distinguishing the spectral characteristics of rice leaves at different disease severity levels, relying solely on changes in the reflectance values ​​of the spectral vector is insufficient to fully describe the differences in spectral response caused by the disease; changes in the overall morphology of the leaf spectral curve also contain important discriminative information. Because rice blast infection causes changes in chlorophyll content and damage to leaf cell structure, leaves at different disease levels will exhibit differentiated spectral response characteristics.

[0028] To further utilize the overall morphological information of the spectral curve (or hyperspectral curve), the spectral angle cosine similarity (i.e., spectral angle (SA)) between the sample under test and the overall central spectrum of each disease level is calculated to construct a spectral angle feature vector. The spectral angle is a similarity measurement method based on spectral geometric relationships. This application calculates and forms the spectral angle feature vector through two implementation methods.

[0029] In one implementation, the formula for forming the spectral angular eigenvector is as follows: , , in, Indicates the first Spectral angles corresponding to disease severity levels Represents the spectral angular eigenvector. Represents the spectral vector of the sample to be tested. Indicates the first The overall central spectral vector corresponding to the disease level is the arithmetic mean of the spectral vectors of the training samples under the same disease level in the training set.

[0030] Furthermore, cosine similarity Used to measure the directional similarity in curve shape between the measured spectrum and the central spectrum. Spectral angle It is defined as the arccosine of the included angle.

[0031] From the above formula, it can be seen that, It depends only on the direction of the spectral vector and is not affected by the absolute reflectance amplitude, thus it is not sensitive to multiplicative interference factors such as changes in light intensity.

[0032] Understandable, when The smaller the value, the closer the spectral directions of the two are, meaning that their spectral curves have a higher similarity. Because It primarily relies on spectral direction information and is not affected by changes in absolute reflectance amplitude, thus reducing the impact of multiplicative interference factors such as changes in light intensity on spectral analysis results. Compared to using only spectral amplitude characteristics, spectral angle can better reflect the consistency of spectral curve morphology and has a better ability to distinguish subtle spectral differences between adjacent disease levels.

[0033] Single calculation using full-band spectrum It mainly reflects the overall spectral morphology differences, but it does not make sufficient use of the disease response information contained in different spectral regions.

[0034] Furthermore, considering that chlorophyll changes, cell structure changes, and water state changes in different spectral sub-regions have different response characteristics during the occurrence of rice blast, and that the spectral angle (SA) can accurately capture the curve morphology changes of these local bands without being affected by the amplitude, this application further introduces multi-scale spectral angle features.

[0035] In another implementation, the spectral vector of the sample to be tested is divided into multiple spectral sub-intervals, and the overall central spectral vector of each rice blast disease level is correspondingly divided into multiple sub-interval central spectra. Next, the sub-interval spectral angle between each spectral sub-interval and the central spectra of each rice blast disease level's sub-interval is calculated. The sub-interval spectral angle corresponding to each spectral sub-region is multiplied by the corresponding weighting coefficient and then concatenated to form a spectral angle feature vector. The weighting coefficient is assigned a value based on the importance of the spectral sub-region for disease level identification.

[0036] For example, the formula is as follows: , , , in, Indicates the first The first disease level corresponding to the The spectral angles corresponding to each spectral sub-interval Indicates the first Each spectral sub-region Indicates the first The first disease level corresponding to the The central spectral vectors of each spectral sub-interval correspond to a given spectral sub-interval. These central spectral vectors are the arithmetic mean of the spectral vectors of each class of spectral sub-intervals within the spectral vectors of the training samples corresponding to the same disease level in the training set. Indicates the first The weighting coefficients corresponding to each spectral sub-interval.

[0037] In a more specific implementation, considering that a single SA across the entire wavelength band would average out the disease response in each region, this application divides the 350~2500nm range according to physiological significance. The regions are: visible light (350~680nm), red edge (680~760nm), near-infrared (760~1300nm), and short-wave infrared (1300~2500nm). For the... Subvectors of each region With the Disease level center subvector Calculate the spectral angle of the region ; For 6 disease levels Repeat the above calculations to obtain a 24-dimensional (6 levels × 4 regions) SA feature vector. : ; in, This represents a 24-dimensional eigenvector space of real numbers.

[0038] In one implementation, the region importance is pre-assigned based on the degree of importance; In another preferred embodiment, no fixed weights are preset; instead, the logistic regression meta-classifier adaptively learns (i.e., the aforementioned weight coefficients) during the feature fusion stage. This is reflected in the regression coefficients of each SA component.

[0039] It is understandable that, considering the different importance of different spectral sub-regions for disease severity identification, this application introduces weighting coefficients corresponding to the regions to weight the multi-scale spectral angular features.

[0040] Compared to the implementation method of manually assigning fixed values ​​based on importance, the method of adaptively learning the SA weights of each region through a logistic regression classifier can objectively quantify the contribution of different spectral regions (such as the red edge region being sensitive to chlorophyll changes, and shortwave infrared being sensitive to moisture changes) to the discrimination of fine-grained disease levels. This avoids the subjective bias of manually setting weights and further improves the model's generalization ability and prediction accuracy.

[0041] Understandably, the spectral correlation coefficient (SCM) is also sensitive to shape differences, but the results are easily affected by non-diagnostic noise. Spectral information divergence (SID), on the other hand, measures the "difference" between spectra from an information theory perspective and is more suitable for handling mixed spectra. This application provides a more direct and efficient method for measuring shape similarity using spectral angles.

[0042] Step S230: Input the spectral vector of the sample to be tested into two or more predefined heterogeneous base learners and output two or more disease level probability vectors.

[0043] Specifically, two or more predefined heterogeneous base learners are obtained by training XGBoost and Support Vector Machine (SVM) on the training set, or by training XGBoost, Support Vector Machine, and Random Forest on the training set.

[0044] like Figure 3 The XGBoost-SVM network architecture shown in the diagram inputs the spectral vectors of the test samples into predefined XGBoost, Support Vector Machine, and Random Forest respectively. It outputs a first-level disease probability vector that captures high-order nonlinear correlations between spectral bands and refines detailed features to reduce prediction bias. The second disease level probability vector is used to construct the global optimal level boundary and delineate level limits to enhance the discriminative power of fuzzy samples. The third disease level probability vector is used to suppress noise interference and stabilize the overall judgment to reduce prediction variance through multi-tree voting averaging. .

[0045] It is understandable that XGBoost and Support Vector Machine are selected as base learners for the basic learning layer. The two use gradient boosting trees and kernel function mapping mechanisms to complete classification learning, respectively, and have good complementarity in model structure and feature representation.

[0046] Understandably, to further improve the model's ability to distinguish between samples of different disease levels, a Random Forest (RF) is introduced as a third base learner based on the aforementioned dual-model stacking framework. During the prediction process, the RF output is used to suppress noise interference through multi-tree voting averaging, stabilizing the overall judgment and reducing prediction variance—resulting in a third disease level probability vector. .

[0047] Third disease level probability vector , to , representing the predicted probabilities that the spectral vector of the test sample belongs to rice blast disease levels 0 to 5 in the probability vector of the third disease level. Simultaneously, combining spectral angle (SA) geometric features, an XGB-SVM-RF-SA fusion model is constructed. This model comprehensively utilizes the prediction results of three classifiers and spectral geometric information, and completes the final classification through a meta-learning strategy. The overall structure of XGB-SVM-RF-SA is as follows: Figure 4 As shown.

[0048] Step S240: After fusing the spectral angle feature vector and two or more disease level probability vectors, input the result into the meta-classification model to output the rice blast disease level.

[0049] Specifically, such as Figure 3 When XGBoost and Support Vector Machine are heterogeneous base learners, the fusion formula is: ,in, and These are 6-dimensional probability vectors. Given the aforementioned 24-dimensional spectral angular eigenvectors, the fused features are now... It has 36 dimensions.

[0050] like Figure 4 When XGBoost, Support Vector Machine, and Random Forest are heterogeneous base learners, the fusion formula is: ,in, and These are 6-dimensional probability vectors. Given the aforementioned 24-dimensional spectral angular eigenvectors, the fused features are now... It has 42 dimensions.

[0051] Meta-classification model with The regularized logistic regression meta-classifier is expressed as follows: , This indicates the severity level of rice blast disease.

[0052] It is understandable that by using the geometric features of the spectral angle feature vector as independent discriminant information, and fusing it with the disease level probability vectors output by XGBoost, support vector machine and random forest, and then inputting it into the meta-classification model to output the rice blast disease level, the spectral curve morphology information is introduced into the decision-making process without changing the basic classification model structure. This achieves the complementary fusion of statistical probability features and spectral geometric constraint information, and improves the model's ability to identify subtle spectral differences between adjacent disease levels.

[0053] In this embodiment, the meta-classification model is a band The regularized logistic regression meta-classifier is calculated step by step as follows: ;

[0054] In the formula, Input fusion features Under the given conditions, the meta-classification model outputs that the test sample belongs to the first... Posterior predictive probability of rice blast-like disease severity; The fused feature vector is obtained by fusing the spectral angle feature vector with the disease level probability vector of each base learner. For the first The weight vector of the meta-classification model corresponding to the disease level; For disease level traversal index; It is an exponential function.

[0055] Loss function for training a meta-classification model: ;

[0056] in, This represents the model loss value; For training sample index; For the first The actual disease severity labels for each training sample; For the first The fusion feature vector corresponding to each training sample; for Regularization coefficients are used to suppress model overfitting; Represents the weight vector The square of the L2 norm.

[0057] When making predictions, the category with the highest probability is selected as the rice blast disease level output by the meta-classification model: ; In the formula, The rice blast disease level of the rice sample output by the meta-classification model is compared with the expression. The outputs have the same meaning.

[0058] In the above technical solution, a spectral angle feature vector is formed by calculating the spectral angle between the spectral vector of the sample to be tested and the overall central spectrum of each rice blast disease level, thereby obtaining the geometric features of the spectral vector of the sample to be tested. Since SA depends only on the spectral direction and is not affected by the absolute reflectance amplitude, it is not sensitive to multiplicative interferences such as changes in light intensity. Next, the spectral angle feature vector and the spectral vector of the sample to be tested are fused with the two or more disease level probability vectors output by two or more predefined heterogeneous base learners. First, the fusion of the two or more disease level probability vectors output by the heterogeneous base learners improves the complementarity in model structure and feature expression. At the same time, the fusion with the spectral angle feature vector introduces the geometric features of the spectral vector of the sample to be tested, realizing the joint modeling of statistical features and geometric features. This effectively reduces the interference of environmental factors such as field light on the detection results, helps to improve the classification accuracy of different disease levels, especially the corresponding samples of adjacent disease levels, and improves the prediction accuracy of rice blast disease levels.

[0059] Understandably, using heterogeneous base learner ensembles (XGBoost, SVM, RF) to replace single complex neural network models can effectively combine their respective advantages, producing a comprehensive discriminative power far superior to a single model, especially in fine-grained classification tasks such as rice blast disease where the differences between adjacent grades are extremely subtle. Furthermore, heterogeneous base learner ensembles do not rely on massive amounts of labeled samples to train a large end-to-end model. Instead, through feature engineering (such as spectral angle features) and a clever combination with multiple mature base models, they exhibit superior stability and anti-overfitting ability on small-sample, high-dimensional noisy spectral data, avoiding the problems of "black box" deep learning models being difficult to train and exhibiting large fluctuations in results in data-scarce scenarios such as agricultural hyperspectral data.

[0060] In some embodiments, determining the training set includes the following steps: Step S110: Obtain multiple raw spectral data with rice blast disease level labels, and perform noise reduction processing on each raw spectral data to obtain the initial training set.

[0061] Specifically, raw hyperspectral data can be used as the initial spectral data. The FieldSpec 4 portable ground-based spectrometer from ASD Corporation (USA) collects the initial hyperspectral data, covering the spectral acquisition range of 350–2500 nm. Measurements are performed using specialized plant leaf clips to secure the leaves. Since rice seedlings have small leaves, to ensure uniformity in each measurement area, multiple rice leaves from the same pot are laid flat and fixed on the leaf clips during collection. To reduce random errors from single measurements, multiple initial hyperspectral data points are collected from different parts of the same rice plant and averaged. The average values ​​over a consecutive preset time period are combined to obtain a single raw hyperspectral data point, resulting in a "daily average standard spectrum" representing the current state of the rice plant in that pot. This eliminates measurement errors caused by physiological differences at different locations. Finally, this raw hyperspectral data point is labeled with the corresponding rice blast disease level.

[0062] It is understandable that when collecting initial hyperspectral data outdoors or in greenhouses, random noise can be introduced by the instrument itself, ambient light, and manual operation, causing fluctuations in the hyperspectral curve. To remove noise while preserving the original trend of spectral variation, this application employs the Savitzky–Golay (SG) sliding filter algorithm to smooth the initial hyperspectral data. This method, through local windowing, low-order polynomials, and least squares fitting, can filter out high-frequency noise without destroying the spectral peak and valley characteristics.

[0063] Specifically, the raw hyperspectral data consists of raw reflectance values ​​from multiple continuous bands. A local curve segment is selected within each raw hyperspectral data point using a local sliding window. A low-order polynomial is applied to all raw reflectance values ​​on this local curve segment, and least-squares fitting is performed. The polynomial parameters are solved and substituted back into the low-order polynomial to obtain the fitted polynomial. Based on the fitted polynomial, the optimal weighting coefficients corresponding to each raw reflectance within the local sliding window are derived. These coefficients are then weighted and summed with the corresponding raw reflectance values ​​to obtain the smoothed reflectance value at the center wavelength of the local sliding window. The smoothed reflectance values ​​at multiple center wavelengths calculated by moving the local sliding window are combined to form a smoothed hyperspectral curve.

[0064] For example, the formula for calculating the smooth reflectivity value of the center point wavelength is as follows: , in, Indicates the first The wavelength at the center point of a local curve segment This represents the smooth reflectivity value at the wavelength of the center point. This indicates the offset relative to the center point. The original reflectivity value of the band, express The corresponding optimal weighting coefficients are obtained by performing least-squares fitting on all original reflectivities using a low-order polynomial, solving for the polynomial parameters, and substituting them back into the low-order polynomial to obtain the fitted polynomial. Based on the fitted polynomial, the optimal weighting coefficients corresponding to each original reflectivity within the local sliding window are derived. , , These represent the left and right half widths of the local sliding window, respectively.

[0065] Understandably, in order to further enhance the spectral change information related to the disease and reduce the influence of background reflectance differences, this application performs a first-order derivative transformation on the smoothed hyperspectral curve.

[0066] For example, the formula for transforming the smoothed reflectance value at each center point on the smoothed hyperspectral curve using the first derivative is: , in, This represents the smoothed reflectivity value at the center point after the first derivative transformation. This indicates the wavelength interval between adjacent bands, which is determined by the sampling interval.

[0067] Finally, the smoothed hyperspectral curves are transformed by first derivative to obtain spectral vectors labeled with rice blast disease severity, forming the initial training set.

[0068] Understandably, after processing with the Savitzky–Golay (SG) sliding filter algorithm and first-order derivative transformation, the spectral noise is effectively reduced and the disease-related features are enhanced, providing a more stable and reliable data foundation for subsequent model training.

[0069] Step S120: Expand the initial training set with sample data to obtain the training set.

[0070] Specifically, in the feature space, linear interpolation is performed on the initial training samples corresponding to a minority of rice blast disease levels in the initial training set to generate new samples. A small random perturbation is then superimposed on the new samples and the initial training samples to form the training set. Each training sample in the training set includes a spectral vector labeled with a rice blast disease level.

[0071] For example, the linear interpolation formula is as follows: ; Equivalent to This means that the new sample is located within the line connecting the two points, thus avoiding overfitting caused by simple replication.

[0072] in, Indicates a new sample. This indicates the number of disease levels corresponding to a few types of rice blast. One initial training sample, Indicates and Among similar rice blast disease levels, the distance was calculated using Euclidean distance. The most recent initial training samples, This represents the interpolation coefficient.

[0073] It is understandable that the spectral differences between adjacent disease levels of rice blast (such as moderate and severe) exhibit significant fine-grained characteristics. These subtle differences are an objective manifestation of the physiological evolution of the disease, and simply increasing the sampling scale cannot significantly widen the inter-class distance between adjacent levels in the spectral feature space. Increasing multi-point sampling in the field introduces multiple environmental noises, such as uncontrolled light, humidity, and background occlusion. Traditional single machine learning models are prone to getting trapped in local optima or overfitting when processing such high-noise, high-dimensional hyperspectral data. The key to solving this problem lies in feature selection and hyperparameter optimization at the algorithm level, rather than simply piling up data. The refined classification of agricultural hyperspectral disease samples highly depends on the physicochemical analysis and manual identification by plant protection experts. Massive multi-point sampling will lead to an exponential increase in labeling costs and is highly susceptible to label noise caused by subjective fatigue.

[0074] Therefore, this application uses the Synthetic Minority Over-sampling Technique (SMOTE) to generate new samples by linearly interpolating minority class samples in the feature space. This expands the number of minority class samples while maintaining the original data distribution structure, effectively avoiding the overfitting problem caused by simple replication.

[0075] Furthermore, considering that hyperspectral data is affected by factors such as lighting conditions, sensor errors, and leaf posture during actual acquisition, spectral reflectance fluctuates within a reasonable range. Therefore, based on SMOTE processing, a small random perturbation is superimposed on the initial training samples. This method enhances the model's robustness to small spectral changes and improves its adaptability in real-world scenarios without altering the labels.

[0076] For example, the formula for superposition of small random perturbations is: , Indicates the first Training samples (including the original samples and new samples generated by SMOTE). This represents a small random perturbation. Indicates the number of disturbances after adding perturbation. Training samples.

[0077] In some embodiments, two or more predefined heterogeneous base learners are obtained by training a Limiting Gradient Boosting Tree (XGBoost) and a Support Vector Machine based on the training set.

[0078] XGBoost is a gradient boosting ensemble algorithm that iteratively adds new decision trees to fit the prediction residuals of the previous model, continuously reducing the overall loss function. The objective function formula for XGBoost is: ,in, This represents the objective function value of XGBoost. This represents the index number of the training sample. Indicates the first Disease severity labels for each training sample. Indicates the first The probability vector of the first disease level corresponding to each training sample. Represents the loss function. This represents the index number of the decision tree in XGBoost. Indicates the first The structure function of a decision tree Indicates the first The regularization term of a decision tree.

[0079] Understandably, XGBoost introduces a second-order Taylor series (i.e., ...) on top of the traditional GBDT. The optimization was accelerated by adding a regularization term. Column sampling prevents overfitting and exhibits excellent fitting ability and computational efficiency in high-dimensional spectral vectors.

[0080] Support Vector Machines (SVMs) are supervised classification algorithms built upon statistical learning theory. Their core objective is to find the hyperplane with the largest margin, distinguishing between different classes of samples. Since they typically handle nonlinear, high-dimensional data, a radial basis function (RBF) is introduced to map the low-dimensional features of the spectral vectors to a high-dimensional feature space, and then a linear classification boundary is constructed. The kernel function expression is as follows: , Represents the radial basis kernel value, used to measure the first... The and the first The degree of similarity of reflectance values ​​of all continuous bands of a training sample in a high-dimensional feature space. , They represent the first The and the first The reflectance values ​​of all continuous bands in the training samples. This represents the bandwidth parameter of the radial basis function kernel. Support vector machines (SVMs) have the ability to generalize on small sample and high-dimensional data, making them suitable for the spectral vector classification task of this application.

[0081] In another implementation, two or more predefined heterogeneous base learners are trained using XGBoost, Support Vector Machine, and Random Forest on a training set.

[0082] Random Forest, based on the Bagging ensemble approach, outputs the final classification result through voting among multiple independent decision trees. The algorithm's operation flow is as follows: Bootstrap sampling with replacement is used to generate multiple subset datasets; when splitting nodes in each decision tree, a subset of features is randomly selected to find the optimal split point; the classification task relies on majority voting to determine the sample category. Random Forest can efficiently process high-dimensional spectral vectors, has strong noise and overfitting resistance, and can also output a ranking of feature importance, facilitating subsequent spectral vector analysis.

[0083] The following experiment demonstrates the superiority of the hyperspectral-based rice blast disease severity detection method proposed in this application. The two or more predefined heterogeneous base learners used in this method are XGBoost, Support Vector Machine, and Random Forest. Two rice materials with significantly different characteristics were selected for the experiment: the susceptible variety Lijiang Xintuan Black Rice (LTH) and the disease-resistant line NIL-e1, independently bred by the Guangdong Academy of Agricultural Sciences. After germination treatment, rice seeds were uniformly potted, with temperature, humidity, water, and fertilizer supply controlled throughout the process. Artificial inoculation was carried out when the seedlings reached the 3.5–4 leaf stage. The rice blast fungus strain used in the experiment was provided by Guangdong Province, and the spore suspension concentration was adjusted to 1×10⁻⁶. 5 The concentration of *C0.05* / mL was evenly sprayed onto the surface of rice leaves using a spraying method. After inoculation, the greenhouse temperature and humidity were adjusted to a suitable range for pathogen reproduction, and the plants were continuously cultivated. Observations were conducted daily starting from the 3rd day after inoculation, and spectral data collection and disease classification were carried out on the 6th-7th day when the susceptible control variety showed full disease development. To reduce random errors caused by single measurements, measurements were taken once at three locations on each pot of rice: the base of the leaf, the middle of the leaf, and the tip of the leaf. Each spectrum was considered an independent sample. After removing obvious abnormalities such as instrument errors and leaves not completely covering the sampling window, a total of 1043 valid spectral data were retained. The largest number of samples were grade 0 (healthy) (433 samples), with the remaining grades ranging from 119 to 134 samples. To avoid grade 0 samples suppressing the majority of categories during training, the grade 0 samples were undersampled to 120 samples, resulting in 730 samples. These samples were then randomly stratified into a training set (584 samples) and a test set (146 samples) at an 8:2 ratio. SMOTE oversampling is applied only to the training set to balance the samples of each class to 107 per level (642 after augmentation). The test set maintains its original distribution and does not participate in any oversampling or data augmentation.

[0084] To comprehensively and objectively evaluate the grading performance of each model, several quantitative indicators were selected: overall accuracy (OA), single-class precision (Precision), recall, and F1 harmonic score. In a certain example, the task involved 6-class fine-grained grading, and the sample sizes of each class were balanced after expansion. Therefore, overall accuracy and macro F1 score were chosen as the core evaluation criteria. The macro F1 score first calculates the F1 score for each disease level separately, and then takes the arithmetic mean to avoid bias towards the class with the larger sample size, thus objectively reflecting the overall performance of fine-grained grading.

[0085] The calculation expressions for each evaluation indicator are as follows: Single-class precision, recall and Fraction calculation formula: ; In the formula: This represents the number of true examples of this type. This represents the number of false positive samples of this type. This represents the number of false negative samples of this type.

[0086] Macro averages corresponding to the six categories of rice blast disease levels Calculation formula: ; In the formula, For the first Each disease level corresponds to Fraction; Traverse all rice blast disease levels from 0 to 5.

[0087] To verify whether the full spectral bands are more suitable for fine-grained grading of rice blast, four different spectral input schemes were set up as control experiments using XGBoost as the baseline model: ① original full-band spectrum (2151 bands); ② random forest selection of the top 40 bands based on feature importance; ③ PCA principal component analysis retaining 95% of the variance; ④ univariate F-test selection of the top 100 features. All control experiments used uniform hyperparameters and a uniform 8:2 dataset split, and the average of three random splits was used to exclude interference from other variables. Figure 5 As shown, the macro-average F1 score for the full-band spectral input reached 0.8522±0.0026, significantly better than the other three dimensionality reduction schemes. RF screening achieved an F1 score of only 0.7144±0.0323 for the first 40 bands, F-test for the first 100 bands was 0.7466±0.0176, and PCA-95% was the worst at only 0.5902±0.0186. Significantly reducing continuous bands disrupts spectral continuity, while the distinction between adjacent disease levels relies precisely on subtle continuous changes between bands; linear projection and single-feature screening lose nonlinear correlation information between bands.

[0088] Understandably, the comprehensive comparison results lead to the conclusion that the hyperspectral data bands are highly correlated. Significantly reducing the number of bands or linear dimensionality reduction will greatly reduce the model's discriminative ability. Therefore, all subsequent integrated models uniformly use the complete 2151 band spectrum as the spectral vector of the sample to be tested.

[0089] Based on full-band spectral input, the recognition performance of five single models (including two deep learning baselines) and three stacked ensemble models was compared. The training and test sets were uniformly divided in an 8:2 ratio. Overall accuracy and macro-average F1 score were used as the main evaluation criteria. Performance comparisons of different models are shown below. Figure 6 The indicators for each model are shown in Table 1 below: Table 1

[0090] In the single-model comparison, XGBoost performed best (overall accuracy 0.8425, macro F1 0.8374), thanks to its gradient boosting structure's ability to capture complex nonlinear spectral correlations and its regularization term effectively suppressing overfitting. RF has strong noise resistance, but its ability to capture subtle spectral differences is weaker than XGBoost (0.8164 / 0.8119). SVM has flexible classification boundaries in high-dimensional spectra, but its kernel parameters are sensitive, resulting in low computational efficiency and accuracy for large batches of spectral data (0.7219 / 0.7197). The two deep learning baselines, 1D-CNN and Light-CNN, achieved scores of 0.5877 / 0.5749 and 0.5329 / 0.5045 respectively, significantly lower than tree-based models and stacked ensemble methods. This indicates that in small-sample, high-dimensional spectral tasks, fully regularized machine learning ensembles are more practical than data-hungry deep models. After stacking and fusion, the model recognition accuracy steadily improved: the dual-model fusion XGB-SVM (0.8521 / 0.8501) improved the macro F1 by about 1.3 percentage points compared with the best single model XGBoost. The advantages of the two algorithms, Boosting and kernel methods, complement each other. XGBoost captures complex nonlinear laws, while SVM optimizes the global classification boundary and corrects the prediction bias of the single model. After adding RF to build a three-model stack, the macro F1 reached 0.8525. The Bagging algorithm reduces the prediction variance by averaging multiple trees and improves the recognition stability of each category.

[0091] Based on this, by superimposing spectral angle SA geometric features, the XGB-SVM-RF-SA model constructed in this application achieved the best performance across the entire field, with an overall accuracy of 0.8699 and a macro F1 score of 0.8681. Compared with the three-model stacking (0.8562 / 0.8525), the overall accuracy and macro F1 scores were improved by approximately 1.4 and 1.6 percentage points, respectively. In all five random partitions, the model performed no worse than the version without SA, showing a consistent direction of improvement. Achieving positive gain under the premise that the model accuracy was close to saturation demonstrates that there is no information overlap between the spectral waveform similarity information and the output probability of the basic model, which can supplement additional discrimination criteria and improve the high-confusion boundaries, mainly concentrated between level 0 and level 1 (healthy leaves and newly diseased leaves). Figure 8 Table 2 shows the confusion matrix between the XGB-SVM-RF and XGB-SVM-RF-SA models. Table 2 shows the recognition performance of the XGB-SVM-RF-SA model at different rice blast disease levels. The accuracy and F1 score of the optimal model at different disease levels are shown in Table 2. Figure 7 Further analysis of the single-class classification performance of the optimal model XGBSVMRF-SA revealed that the F1 score for Grade 1 mild disease reached 0.870, indicating stable identification of early-stage disease samples. The recall rate for Grade 0 healthy leaves was 0.700, suggesting that some healthy leaves were still misclassified as mildly diseased (Grade 1). This is because the absolute difference in average reflectance across the entire wavelength band between Grade 0 and Grade 1 is only approximately 7 × 10⁻⁻⁻⁶. 6 The discriminative information is concentrated in a few wavelength bands around 400 nm and 890–1200 nm, and the grade 1 lesions are pinhead-sized brown dots, which are easily mistaken for healthy leaves both visually and spectrally. The overall macro-average precision for the six disease categories is 0.8680, recall is 0.8705, and F1 = 0.8681, with balanced recognition performance across categories, validating the suitability of this fusion framework for fine-grained classification of rice blast.

[0092] To mitigate the confusion between level 0 and level 1 samples, this embodiment sets an auxiliary discrimination threshold rule. When the top two disease levels predicted by the meta-classification model are level 0 and level 1, auxiliary reclassification is performed. ; like The disease level is determined to be level 0; if The disease level was determined to be Level 1. Among them, The relative probability ratio of level 0; threshold The value is determined based on the cross-validation results within the training set. ; , Different as fusion features The lower-order classification model outputs the predicted probabilities of belonging to level 0 and level 1.

[0093] Table 2

[0094] In addition, to prove that the XGB-SVM-RF-SA model of this application does not overfit and is usable in real-world scenarios, robustness tests were conducted from three dimensions: learning curve, 5-fold hierarchical cross-validation, and noise immunity test.

[0095] like Figure 9 To illustrate the learning curve of the XGB-SVM-RF-SA model in this application, the proportion of training set samples was gradually increased (from 10% to 100%), and the changes in macro F1 scores on the training and test sets were observed: the macro F1 score on the training set increased from 0.6603 to 0.8497, and the macro F1 score on the test set increased from 0.5322 to 0.8631. The test set score continued to rise with the increase in sample size without showing any convergence plateau, and the difference between the training and test scores continued to decrease with the increase in sample size. This indicates that the model has sufficient learning ability, no serious overfitting, and further expansion of the training samples could further improve the recognition accuracy.

[0096] Table 3 below shows the five-fold hierarchical cross-validation results of the XGB-SVM-RF-SA model in this application. The single 8:2 dataset split introduces randomness; hierarchical five-fold cross-validation is used to eliminate errors caused by data splitting. Each split involves repeating the entire process (SMOTE oversampling, SA center spectrum, stacked training) on ​​the remaining four splits. The overall mean accuracy of the five-fold trials is 0.8521±0.0197, and the macro-mean F1 is 0.8497±0.0215, with a fluctuation of approximately ±0.02, which is within the normal fluctuation range of each split compared to the single split results. The small standard deviation demonstrates that the model performs stably on different sample subsets, does not depend on a specific dataset split, and has reliable generalization ability.

[0097] Table 3

[0098] To verify the contribution of spectral angle features and each base learner to model performance, ablation experiments were conducted while maintaining consistency in data processing and evaluation protocols. SA features, a single base learner, or the meta-classification model was removed, and the results are shown in Table 4. After removing SA, the overall accuracy and macro F1 decreased from 0.8699 and 0.8681 to 0.8562 and 0.8525, respectively (a decrease of approximately 0.014 and 0.016), indicating that spectral angle geometric features provide discriminative information independent of statistical probability. Removing any of the RF, SVM, or XGBoost base learners resulted in varying degrees of performance degradation, verifying the effectiveness of combining heterogeneous base learners. Replacing the meta-classification model with majority voting led to a significant performance drop, demonstrating that the logistic regression meta-classification model's adaptive fusion of heterogeneous information is indispensable.

[0099] Table 4

[0100] Hyperspectral data is easily affected by changes in illumination, fluctuations in instrument response, and environmental factors during actual acquisition, resulting in a certain degree of random perturbation in the spectral signal. To analyze the model's adaptability to spectral perturbations, this application superimposes Gaussian white noise of different intensities (40dB, 30dB) as data augmentation onto the synthetic samples during the training phase. Corresponding noise is added to the test samples under four signal-to-noise ratio conditions: no noise, 40dB, 30dB, and 20dB, for evaluation. The model's anti-interference ability is evaluated by comparing the changes in the Macro-F1 value under different noise levels. Figure 10 As shown, adding noise during the training phase effectively improves the model's adaptability to noise: the macro F1 scores of the noisy (40dB) training model under the noisy, 40dB, 30dB, and 20dB test conditions are 0.8836, 0.8836, 0.8907, and 0.8770, respectively, all higher than those of the noisy training model (0.8631, 0.8703, 0.8558, and 0.8632), indicating that the constructed model has a good adaptability to a certain degree of spectral noise. It should be noted that artificial noise perturbation experiments cannot completely replace real field environment verification; their main purpose is to control a single variable and analyze the model's sensitivity to random spectral perturbations.

[0101] Understandably, this application uses full-band leaf hyperspectral data as a foundation and combines a multi-algorithm heterogeneous integration approach to build a rice blast 6-level identification model, XGBSVMRF-SA, that balances accuracy and stability. Comparison with various dimensionality reduction schemes confirms that the complete spectral band is indispensable for precise disease classification; ablation experiments demonstrate that fusing three basic models with different learning logics and then superimposing spectral angular geometric features can continuously improve classification accuracy. The final model achieves an overall accuracy of 0.8699 and a macro-average F1 score of 0.8681 on the test set, outperforming all single-model and simple stacked models, providing reliable technical support for precise disease management and early warning systems in farmland. This study also confirms that full-band hyperspectral data combined with heterogeneous integrated algorithms has broad application potential in various crop disease identification fields.

[0102] Existing research on crop spectral classification also confirms that heterogeneous stacking of multiple models can fully exploit complementary information within high-dimensional spectra, solving the problem of insufficient utilization of single-model features, which is consistent with the experimental conclusions of this application. Comparing existing literature on rice blast classification, most traditional machine learning models can only achieve F1 scores in the range of 0.75–0.82, and most only perform binary classification of healthy / disease-related diseases or 2–3 coarse-grained levels. This application achieves six fine-grained classifications from 0 to 5 levels, with extremely high spectral similarity between adjacent levels, making identification more difficult, but the model's macro F1 reaches 0.8681, showing a significant improvement in accuracy. Some deep learning solutions can achieve accuracy exceeding 0.90 in crop disease identification, but these are mostly simple binary classification tasks, and the spectral variation patterns of rice blast leaves differ from those of other crop diseases, making direct comparison impossible. Furthermore, this application outputs individual precision, recall, and F1 scores for each disease category, enabling targeted analysis of model identification shortcomings at different disease stages and providing detailed guidance for tiered pesticide application in the field.

[0103] This application proposes a heterogeneous stacked ensemble model, XGB-SVM-RF-SA, based on full-band hyperspectral data of rice leaves, to perform refined classification of rice blast disease from level 0 to 5. The first layer of the framework integrates three completely different learning paradigms: XGBoost, SVM, and RF. The second layer introduces spectral angle cosine similarity as waveform geometric features. Finally, a logistic regression meta-model fuses statistical probability and spectral geometric information to complete the classification.

[0104] The results of the comparative experiments show that the macro-average F1 of the complete 2151 band spectrum is 0.8522±0.0026, which is significantly better than the three dimensionality reduction schemes of RF feature screening, F test, and PCA. The subtle spectral changes carried by continuous bands are the core information for distinguishing adjacent disease levels. Excessive dimensionality reduction will lose discriminative features and significantly reduce accuracy. In the multi-model comparison experiment, the XGB-SVM-RF-SA model has the best overall performance, with an overall accuracy of 0.8699 and a macro-average F1 of 0.8681, which is better than all single models and simple stacked models. The overall accuracy of 5-fold hierarchical cross-validation is 0.8521±0.0197 and the macro-F1 is 0.8497±0.0215. Combined with the learning curve and noise interference resistance experiments, it is confirmed that the model has stable generalization, is resistant to spectral interference, and is suitable for field application.

[0105] Understandably, this application ① demonstrates, through systematic comparative experiments, the irreplaceable role of full-band continuous spectrum in fine-grained classification of rice blast, thus improving the theoretical basis for hyperspectral disease identification feature engineering; ② verifies the superiority of stacking and integrating three heterogeneous models—Boosting, SVM, and Bagging—with complementary prediction results from different algorithms, effectively improving the accuracy of fine-grained classification; ③ innovatively integrates spectral angular waveform features into the stacking framework via feature splicing, confirming that spectral geometric information and model output probability have a non-redundant complementary effect. This research scheme can improve the accuracy of rice blast classification and identification, guide precise pesticide application in farmland zones, reduce excessive pesticide use, and contribute to the development of green, sustainable, and precision agriculture. The entire model framework is not limited to rice blast and can be transferred to hyperspectral classification and identification of diseases in other crops such as wheat and potatoes, providing a reusable technical approach for similar research.

[0106] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for detecting the disease severity of rice blast based on hyperspectral imaging, characterized in that, The method includes: Obtain the spectral vector of the rice sample to be tested; Calculate the spectral angles between the spectral vector of the sample to be tested and the overall central spectra of each rice blast disease level, and form a spectral angle feature vector; Input the spectral vector of the sample to be tested into two or more predefined heterogeneous base learners, and output two or more disease level probability vectors; The spectral angle feature vector and two or more disease level probability vectors are fused and input into the meta-classification model to output the rice blast disease level.

2. The method according to claim 1, characterized in that, The formation of the spectral angle eigenvector also includes: The spectral vector of the sample to be tested is divided into multiple spectral sub-intervals, and the overall central spectral vector of each rice blast disease level is divided into multiple sub-interval central spectra. Calculate the spectral angle between each spectral sub-interval and the center spectrum of each sub-interval for each rice blast disease level, and form a spectral angle feature vector.

3. The method according to claim 2, characterized in that, The formation of the spectral angular eigenvector includes: The spectral angle of each sub-region is multiplied by the corresponding weight coefficient and then concatenated to form a spectral angle feature vector. The weight coefficient is assigned a value according to the importance of the spectral sub-region in the identification of the disease level.

4. The method according to claim 2, characterized in that, Each overall central spectral vector and sub-interval central spectral vector are the arithmetic mean of the spectral vectors of training samples under the same disease level in the retrieved training set, and the arithmetic mean of each class of spectral sub-intervals in the spectral vector, respectively.

5. The method according to claim 1, characterized in that, The two or more predefined heterogeneous base learners are obtained by training XGBoost and Support Vector Machine based on the training set, or by training XGBoost, Support Vector Machine and Random Forest based on the training set.

6. The method according to claim 5, characterized in that, The determination of the training set includes: Multiple raw spectral data with rice blast disease level labels were obtained, and the initial training set was obtained after noise reduction of each raw spectral data. The initial training set is augmented with sample data to obtain the training set.

7. The method according to claim 6, characterized in that, The initial training set obtained after denoising each original spectral data includes: Local curve segments in each original hyperspectral data are selected using a local sliding window. For all the original reflectances on the local curve segment, a low-order polynomial is used to perform least-squares fitting. The polynomial parameters are solved and substituted back into the low-order polynomial to obtain the fitted polynomial. The optimal weighting coefficients corresponding to each original reflectance within the window are derived from the fitted polynomial. The weighted summation with the corresponding original reflectance is then used to obtain the smoothed reflectance value of the center point wavelength of the local sliding window. The smoothed reflectance values ​​of multiple center point wavelengths calculated by moving the local sliding window are combined to form a smoothed hyperspectral curve. The smoothed hyperspectral curves are transformed by first derivative to obtain spectral vectors labeled with rice blast disease level, forming the initial training set. The process of augmenting the initial training set with sample data to obtain the training set includes: In the feature space, linear interpolation is performed on the initial training samples corresponding to a few types of rice blast disease levels in the initial training set to generate new samples. Small random perturbations are superimposed on the new samples and the initial training samples to form a training set.

8. The method according to claim 5, characterized in that, The outputs of the multiple disease level probability vectors include: The spectral vectors of the samples to be tested are input into predefined XGBoost, Support Vector Machine and Random Forest respectively. The output is a first disease level probability vector that captures high-order nonlinear correlations between spectral bands and refines detailed features to reduce prediction bias, a second disease level probability vector that is used to construct the global optimal level boundary and delineate the level limit to enhance the discrimination power of fuzzy samples, and a third disease level probability vector that is used to suppress noise interference through multi-tree voting average and stabilize the overall judgment to reduce prediction variance.

9. The method according to claim 1, characterized in that, The formula for forming the spectral angular eigenvector is as follows: , , in, Indicates the first Spectral angles corresponding to disease severity levels Represents the spectral angular eigenvector. Represents the spectral vector of the sample to be tested. Indicates the first The overall central spectral vector corresponding to the disease level, where each overall central spectral vector is the arithmetic mean of the spectral vectors of training samples under the same disease level in the training set; or: , , , in, Indicates the first The first disease level corresponding to the The spectral angles corresponding to each spectral sub-interval Indicates the first Each spectral sub-region Indicates the first The first disease level corresponding to the The central spectral vectors of each spectral sub-interval correspond to a given spectral sub-interval. These central spectral vectors are the arithmetic mean of the spectral vectors of each class of spectral sub-intervals within the spectral vectors of training samples corresponding to the same disease level in the training set. express The weighting coefficients corresponding to each spectral sub-interval.

10. The method according to claim 7, characterized in that, The formula for calculating the smooth reflectivity value of the center point wavelength is as follows: , in, Indicates the first The wavelength at the center point of a local curve segment This represents the smooth reflectivity value at the wavelength of the center point. This indicates the offset relative to the center point. The original reflectivity value of the band, express The corresponding optimal weighting coefficients are obtained by performing least-squares fitting on all original reflectivities using a low-order polynomial, solving for the polynomial parameters, and substituting them back into the low-order polynomial to obtain the fitted polynomial. Based on the fitted polynomial, the optimal weighting coefficients corresponding to each original reflectivity within the local sliding window are derived. , , These represent the left and right half widths of the local sliding window, respectively. The formula for transforming the smoothed reflectance value at each center point of the smoothed hyperspectral curve using the first derivative is: , in, This represents the smoothed reflectivity value at the center point after the first derivative transformation. This indicates the wavelength interval between adjacent bands, which is determined by the sampling interval.