Crop disease and pest image recognition method based on large model

By extracting texture and color features of lesion areas using a large model approach, and combining confidence scoring and iterative optimization, the problem of uneven distribution of disease categories was solved, enabling efficient identification and stable modeling of rare diseases, and improving the accuracy and adaptability of agricultural pest and disease identification.

CN120894623APending Publication Date: 2025-11-04XIAN XINGCHEN CLOUD DATA TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511002026.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing crop disease and pest image recognition methods are insufficient in the face of uneven distribution of disease categories, especially in the identification of rare diseases, leading to misjudgment and delay in prevention and control, resulting in reduced crop yields and economic losses.

Method used

A large model approach is adopted, which extracts the texture features of the lesion area through the local binary mode and gray-level co-occurrence matrix algorithm. Combined with multi-channel analysis of RGB and HSV color spaces, a composite lesion feature vector is generated. A support vector machine classifier and Monte Carlo Dropout mechanism are introduced to perform confidence scoring and model iterative optimization, and a closed-loop adaptive recognition system is constructed.

Benefits of technology

It significantly improves the discrimination and generalization performance of pest and disease image recognition, enhances the robustness of identification of rare diseases, reduces misjudgments, and strengthens the stability and applicability of the system in complex agricultural scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894623A_ABST
    Figure CN120894623A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of crop disease and insect pest image recognition, and particularly discloses a crop disease and insect pest image recognition method based on a large model, and the method comprises the steps: obtaining a multi-angle leaf image through high-resolution imaging equipment under a controllable illumination condition, and obtaining a target image in a unified format; extracting scab texture complexity features in combination with a local binary pattern and a gray-level co-occurrence matrix algorithm, and performing multi-channel statistical analysis on RGB and HSV color spaces to generate color heterogeneity feature vectors; further fusing the two types of features into a composite disease feature vector, inputting the composite disease feature vector into a probability model constructed based on a support vector machine and a Monte Carlo Dropout mechanism, and outputting probability distribution and confidence score of disease and pest categories; and dynamically adjusting a model training strategy according to a confidence level, triggering a feedback mechanism for a low-confidence sample, generating a synthetic image by using a conditional generative adversarial network, and optimizing model parameters in combination with incremental learning to realize stable identification modeling of rare or complex disease types.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of crop disease and pest image recognition, and particularly relates to a crop disease and pest image recognition method based on a large model. BACKGROUND

[0002] With the development of precision agriculture and intelligent plant protection technology, crop disease and pest automatic diagnosis methods based on image recognition have become a research hotspot. Traditional disease and pest identification mainly relies on artificial experience or laboratory detection, which has problems such as low efficiency, high cost, and slow response. In recent years, the integration of computer vision and deep learning technology has promoted the progress of agricultural image recognition. By collecting crop leaf images and extracting their texture, color and other features, the type of disease can be quickly identified. Among them, local binary pattern (LBP), gray level co-occurrence matrix (GLCM) and color space analysis are widely used in image texture and color feature modeling, and support vector machine (SVM) is also used for disease identification tasks. However, there is still a lot of room for improvement when the existing methods face problems such as inaccurate disease spot area positioning, incomplete feature expression, insufficient model generalization ability, and unreliable identification results.

[0003] The prior art has the following disadvantages:

[0004] In the application of crop disease and pest image recognition based on deep learning, due to the significant "long tail effect" of disease category distribution, i.e. common disease samples are abundant and rare disease samples are scarce, it is difficult for traditional supervised learning models to fully learn the feature expression of minority categories during training, resulting in a serious lack of recognition ability for rare or unseen diseases when deployed in practice. This problem is particularly prominent in agricultural practice, for example, when a new or rare disease (such as pepper virus disease) that lacks representative samples in the training set suddenly occurs in the field, existing models often cannot make accurate judgments, and even misjudge as healthy or known disease types, thereby delaying the prevention and treatment opportunity and causing crop yield and economic losses. SUMMARY

[0005] The purpose of the present application is to provide a crop disease and pest image recognition method based on a large model to solve the problems in the background.

[0006] The purpose of the present application can be achieved by the following technical solutions:

[0007] The crop disease and pest image recognition method based on a large model comprises the following steps:

[0008] S1: Obtain high-resolution image data of a crop leaf to be identified, and perform standardization preprocessing on the image to obtain a target image focusing on the disease spot area;

[0009] S2: Perform texture feature extraction on the lesion area in the target image based on the local binary pattern and gray level co-occurrence matrix algorithm, calculate the gradient difference distribution between adjacent texture units, and generate lesion texture complexity feature values for quantifying the microscopic structural differences of disease representation;

[0010] S3: Perform multi-channel separation and pixel-level statistical analysis on the color space of the lesion area, extract the standard deviation and variance distribution of each channel in the RGB and HSV color spaces, and generate color heterogeneity feature values to represent the irregularity of color distribution and the evolution stage of the lesion area;

[0011] S4: Fuse the lesion texture complexity feature values and color heterogeneity feature values into a composite disease feature vector, and input it into a pre-trained probability distribution model of plant disease and pest categories, the model outputs the probability distribution and confidence score of the current image belonging to the plant disease and pest category;

[0012] S5: Determine the reliability level of the recognition result according to the confidence score output by the model, and iteratively optimize the model parameters until stable recognition modeling of the plant disease and pest type is completed.

[0013] As a further scheme of the present application: the acquisition process of the target image is:

[0014] Collect crop leaf images through high-resolution digital imaging equipment, and acquire multi-angle image samples under natural light and controllable light conditions to reduce shadow interference and enhance the texture information of the lesion area;

[0015] Perform adaptive histogram equalization processing on the collected images, and use a lesion segmentation network based on the U-Net architecture to perform pixel-level semantic segmentation on the images to extract accurate lesion regions of interest (ROIs);

[0016] Perform edge smoothing and morphological optimization processing on the extracted lesion area to remove noise interference, and standardize the lesion image to a uniform size and spatial distribution format to obtain a target image focused on the lesion area.

[0017] As a further scheme of the present application: the texture feature extraction on the lesion area in the target image based on the local binary pattern and gray level co-occurrence matrix algorithm specifically includes:

[0018] Divide the lesion area in the target image into multi-scale sliding windows, and extract the local binary pattern (LBP) feature vector in each sub-window;

[0019] Calculate the gradient direction difference and amplitude change rate between each LBP feature vector, and construct a local gradient difference matrix between adjacent texture units;

[0020] Generate texture complexity initial eigenvalue based on the local gradient difference matrix statistics texture direction consistency and distribution dispersion;

[0021] Weighted fusion of texture complexity initial eigenvalue under multiple scales forms the final lesion texture complexity eigenvalue.

[0022] As a further scheme of the application: the generation of lesion texture complexity eigenvalue specifically includes:

[0023] Apply the gray level co-occurrence matrix GLCM algorithm to the lesion area in the target image, extract the gray correlation features in different directions, and obtain a group of basic texture parameters;

[0024] Within each texture unit, the gradient amplitude and direction in the horizontal and vertical directions are calculated using the Sobel or Prewitt operator to construct a local gradient field;

[0025] For each pair of adjacent texture units, compare their local gradient fields, calculate the gradient amplitude difference and direction angle difference between the two texture units, and form a gradient difference vector;

[0026] Statistical analysis of the gradient difference vector distribution between all adjacent texture units, through the calculation of the standard deviation, mean and skewness of the gradient difference vector distribution, the texture complexity in the lesion area is quantified;

[0027] Combine the obtained basic texture parameters and the calculated statistical parameters, and generate the final lesion texture complexity eigenvalue by weighted summation.

[0028] As a further scheme of the application: the multi-channel separation and pixel-level statistical analysis of the color space of the lesion area specifically includes:

[0029] Convert the lesion area in the target image to RGB and HSV color spaces respectively, and perform independent grayscale processing on each channel image;

[0030] In each color channel, calculate the histogram distribution of pixel values, and extract the standard deviation, variance and skewness parameters of the channel to quantify the dispersion degree of color distribution;

[0031] Normalize the statistical parameters of each channel to eliminate the scale difference between different color spaces;

[0032] Combine the normalized statistical parameters according to the channel categories to form a color heterogeneity initial eigenvalue vector, which is used as the basic input for subsequent fusion modeling.

[0033] As a further scheme of the application: the S3 further includes the following color heterogeneity analysis steps based on local region division:

[0034] The diseased spot area is divided into a plurality of concentric ring sub-areas, and the disease evolution process of the diseased spot from the center to the edge is simulated;

[0035] The variance and standard deviation of each channel of RGB and HSV are extracted in each sub-area, and a local color variation feature sequence is formed;

[0036] The color statistical parameter change rate between adjacent sub-areas is calculated, and a color heterogeneity gradient curve is constructed;

[0037] Based on the gradient curve, the spatial evolution trend of the color distribution of the diseased spot is analyzed, and a color heterogeneity dynamic feature value reflecting the disease development stage is generated.

[0038] As a further scheme of the present application, the color heterogeneity feature value is generated, specifically including:

[0039] A cross-correlation matrix is established between the channels of RGB and HSV, and the Pearson correlation coefficient between the channels is calculated;

[0040] Based on the correlation matrix, a color channel combination with high correlation is screened out, so as to avoid the influence of repeated or redundant information on the feature expression efficiency;

[0041] The standard deviation, variance and maximum-minimum range of the retained color channels are calculated respectively, and a basic color variation feature set is formed;

[0042] The above basic color variation features are subjected to principal component analysis PCA dimension reduction processing, and a low-dimensional color heterogeneity feature vector with strong explanation is generated.

[0043] As a further scheme of the present application, the disease spot texture complexity feature value and the color heterogeneity feature value are fused into a composite disease feature vector, specifically including:

[0044] The input disease spot texture complexity feature value and color heterogeneity feature value are respectively subjected to standardization processing, so as to eliminate the numerical scale difference between different feature dimensions;

[0045] The two feature vectors are combined into an initial fusion vector in a feature splicing manner, and dimension reduction processing is performed through principal component analysis PCA, so as to remove redundant information and extract key discriminant features;

[0046] The dimension-reduced composite disease feature vector is input into a pre-trained support vector machine SVM classifier, the classifier adopts RBF kernel function for nonlinear mapping, and the recognition ability for slight differences between disease categories is enhanced;

[0047] The SVM classifier outputs the probability distribution and confidence score of the disease category to which the current image belongs, and the credibility of the recognition result is judged in combination with the maximum soft interval principle.

[0048] As a further scheme of the present application: the model outputs the probability distribution and confidence score of the current image belonging to the pest category, specifically comprising:

[0049] A Monte Carlo Dropout sampling mechanism is introduced after the model output layer, multiple prediction results are obtained by multiple forward propagations in the inference stage, and a probability distribution set of the pest category is formed;

[0050] Based on the probability distribution set, the expected probability and variance of each pest category are calculated, wherein the variance is used to measure the uncertainty of the prediction result;

[0051] The final probability distribution of the pest category is generated according to the expected probability, and the confidence score is constructed in combination with the variance information, wherein high variance represents low confidence;

[0052] The confidence score and the probability distribution are output together, and are presented in a visual manner in the user interface to assist the user in determining whether to adopt the corresponding recognition result or to manually review.

[0053] As a further scheme of the present application: the S5, specifically comprising:

[0054] A plurality of confidence threshold intervals are set to divide the recognition result into three reliability levels of high, medium and low; wherein the high level indicates that the recognition result can be directly adopted, and the low level indicates that manual review or introduction of additional data is required;

[0055] For samples with a confidence score lower than the lowest threshold, a feedback mechanism is triggered, a pre-trained conditional generative adversarial network cGAN is called, and a plurality of synthetic images with consistent disease spot texture and color distribution are generated based on the category to which the sample belongs;

[0056] The generated synthetic images and the same category samples in the original training set are merged to construct an expanded training set, and an incremental learning strategy is used to fine-tune the local parameters of the current recognition model, focusing on optimizing the discrimination ability of the low confidence category;

[0057] After each model update, the recognition result of the low confidence sample is re-evaluated, if the prediction result remains consistent for three times and the confidence score exceeds the set threshold, it is determined that the model has realized stable recognition modeling for the disease type, and the iteration optimization process is terminated.

[0058] The beneficial effects of the present application are:

[0059] (1)The application realizes fine modeling of the complexity of the microstructure of the lesion by fusing the local binary pattern (LBP) and the gray level co-occurrence matrix (GLCM) algorithm to extract multi-scale texture features of the lesion area, and introducing gradient difference distribution analysis between adjacent texture units. Meanwhile, in terms of color feature extraction, through multi-channel separation of RGB and HSV color spaces, pixel-level statistical analysis and principal component analysis (PCA) dimension reduction processing, a color heterogeneity feature vector with strong explanation is constructed, which can effectively reflect the irregularity of the color distribution of the lesion and the spatial change trend in the evolution process of the lesion. The above-mentioned multi-modal feature extraction method not only enhances the accuracy and robustness of feature expression, but also provides high-quality and low-redundancy composite disease features for subsequent disease recognition based on a support vector machine (SVM) classifier, thereby significantly improving the discrimination ability and generalization performance of the disease image recognition, and making the system have higher stability and applicability in complex agricultural scenes.

[0060] (2)The application divides the reliability level of the disease and pest recognition result by introducing a confidence scoring system based on the Monte Carlo Dropout mechanism, and accordingly constructs a closed-loop model self-adaptive optimization mechanism. For low-reliability samples with confidence lower than a set threshold, the system automatically triggers the feedback module, calls the pre-trained conditional generative adversarial network (cGAN), generates a synthetic image with consistent lesion texture and color distribution according to the category to which the sample belongs, thereby effectively expanding the training data set. On this basis, an incremental learning strategy is used to fine-tune the local parameters of the model, focusing on improving the discrimination ability of low-confidence categories, rather than global retraining, which not only preserves existing knowledge, but also enhances the recognition robustness of rare or complex lesion types; through iterative optimization and evaluation of recognition stability after each update, the optimization process is terminated when the prediction results are consistent for several times and the confidence rebounds, realizing dynamic convergence and stable modeling of the model. This mechanism not only significantly improves the self-adaptive ability and intelligent level of the system in the actual application scenarios of agriculture such as sample imbalance and environmental variability, but also effectively alleviates the overfitting and misjudgment problems caused by small samples, providing a solid technical support for the accurate identification and continuous learning of crop diseases and pests. BRIEF DESCRIPTION OF DRAWINGS

[0061] The application will be further described below with reference to the accompanying drawings.

[0062] Figure 1 is a flowchart of the crop disease and pest image recognition method based on a large model of the application. DETAILED DESCRIPTION

[0063] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described, obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0064] Please refer to Figure 1 The present application is a crop disease and pest image recognition method based on a large model, which comprises the following steps:

[0065] S1: Obtain high-resolution image data of the crop leaf to be identified, and perform standardization preprocessing on the image to obtain a target image focusing on the lesion area;

[0066] S2: Perform texture feature extraction on the lesion area in the target image based on the local binary pattern and the gray level co-occurrence matrix algorithm, calculate the gradient difference distribution between adjacent texture units, and generate lesion texture complexity feature values for quantifying the microscopic structural differences of disease representation;

[0067] S3: Perform multi-channel separation and pixel-level statistical analysis on the color space of the lesion area, extract the standard deviation and variance distribution of each channel in the RGB and HSV color spaces, and generate color heterogeneity feature values for representing the irregularity of color distribution in the lesion area and the evolution stage of the lesion;

[0068] S4: Fuse the lesion texture complexity feature values and the color heterogeneity feature values into a composite disease feature vector, and input it into a pre-trained probability distribution model of disease and pest categories, the model outputs the probability distribution and confidence score of the disease and pest category to which the current image belongs;

[0069] S5: Determine the reliability level of the recognition result according to the confidence score output by the model, and iteratively optimize the model parameters according to the reliability level until stable recognition modeling of the disease and pest type is completed.

[0070] In S1, high-resolution image data of the crop leaf to be identified is obtained, and the image is standardized and preprocessed to obtain a target image focusing on the lesion area, which specifically includes:

[0071] In the crop disease and pest image recognition method based on a large model provided by the application, first, a high-resolution digital imaging device is used to collect crop leaf images to obtain original image data with rich texture details. In order to improve the image quality, the shooting is carried out under natural light combined with a controllable light supplementing system, so as to ensure that the diseased spot area can be clearly presented under different lighting environments. At the same time, the same leaf is shot from multiple angles (such as 0°, 45°, 90°, etc.) during the collection process to form multi-view image samples, thereby enhancing the integrity of the texture information of the diseased spot area and the recognition robustness.

[0072] The collected images are further subjected to adaptive histogram equalization (CLAHE) processing to improve the local contrast of the images and highlight the color and texture differences between the diseased spots and healthy tissues. Subsequently, the enhanced images are input into a semantic segmentation network based on the U-Net architecture, which has been trained. The network can perform pixel-level recognition of the diseased spot area in the image and output the corresponding diseased spot mask image, thereby accurately extracting the region of interest (ROI) of the diseased spot. Through this semantic segmentation technology, background interference can be effectively eliminated, and the key lesion area can be focused on, thereby providing a high-quality data basis for subsequent feature extraction.

[0073] In order to further improve the quality and consistency of the diseased spot images, morphological optimization operations are performed on the extracted diseased spot area, including edge smoothing and noise removal, to eliminate the influence of image boundary burrs and isolated small areas. Subsequently, the optimized diseased spot images are uniformly scaled to a standard size (such as 256x256 pixels) and normalized to meet the input requirements of the deep learning model. In addition, the images are rotated and position-aligned according to the center point of the diseased spot, so that different samples remain consistent in spatial structure and reduce the sensitivity of the model to position changes.

[0074] The final target image is a high-quality image in a standardized format that focuses on the diseased spot area, which can be used for subsequent extraction of diseased spot texture complexity feature values and color heterogeneity feature values, thereby supporting accurate identification and modeling of disease and pest categories.

[0075] In S2, the texture features of the diseased spot area in the target image are extracted based on the local binary pattern and gray level co-occurrence matrix algorithm, the gradient difference distribution between adjacent texture units is calculated, and the diseased spot texture complexity feature value is generated, which is used to quantify the microscopic structural differences of the disease representation. Specifically, it includes:

[0076] To extract the texture features of the lesion area in the target image, we first use a combination of Local Binary Pattern (LBP) and Gray Level Co-occurrence Matrix (GLCM) algorithms. For the lesion area in the target image, we implement a multi-scale sliding window division strategy to ensure that we can capture texture information at different scales. Specifically, within each sub-window, we calculate the Local Binary Pattern (LBP) feature vector, which helps identify small structural changes and texture characteristics within the lesion area. Through this multi-scale analysis method, we can not only improve the accuracy of feature extraction, but also enhance the model's adaptability to lesion features at different scales.

[0077] Based on the gradient direction difference and amplitude change rate between each LBP feature vector, we construct a local gradient difference matrix between adjacent texture units. This step involves calculating the change of LBP feature vectors within each sub-window relative to their adjacent windows, resulting in a gradient field reflecting local texture changes. Further, we use the local gradient difference matrix to calculate the consistency of texture direction and the dispersion of distribution, generating preliminary texture complexity feature values. This step is crucial for understanding the microscopic structural differences within the lesion area, as it quantifies the consistency between different texture units and the unevenness of their distribution.

[0078] When describing the texture characteristics of the lesion area, we apply the Gray Level Co-occurrence Matrix (GLCM) algorithm to extract the gray correlation features in different directions, obtaining a set of basic texture parameters. These parameters include contrast, correlation, energy, and entropy, which provide important information about the texture characteristics of the lesion area. On this basis, we use the Sobel or Prewitt operator to calculate the gradient amplitude and direction in the horizontal and vertical directions within each texture unit, forming a local gradient field. Then, for each pair of adjacent texture units, we compare their local gradient fields and calculate the gradient amplitude difference and direction angle difference between the two texture units, forming a gradient difference vector.

[0079] By statistically analyzing the distribution of gradient difference vectors between all adjacent texture units, we calculate statistical parameters such as standard deviation, mean, and skewness to quantify the texture complexity within the lesion area. Combining the basic texture parameters obtained earlier with these statistical parameters, we generate the final lesion texture complexity feature value through weighted summation. This method not only improves the expressiveness and robustness of the feature value, but also lays a solid data foundation for accurate identification of disease types. Throughout the process, through multi-level feature extraction and fusion, we effectively capture the complex microscopic structural features within the lesion area, significantly improving the accuracy and reliability of disease and pest identification.

[0080] In S3, the color space of the lesion area is subjected to multi-channel separation and pixel-level statistical analysis, the standard deviation and variance distribution of each channel in the RGB and HSV color spaces are extracted, and color heterogeneity feature values are generated to represent the irregularity of color distribution and the evolution stage of the lesion. Specifically, it includes:

[0081] First, the lesion area in the target image is converted to RGB and HSV color spaces. This process allows the color information of the lesion to be described from different angles. Then, each channel (i.e. R, G, B and H, S, V) in each color space is independently grayed. Then, the histogram distribution of the pixel value is calculated in each color channel, and the standard deviation, variance and skewness parameters of the channel are extracted. These statistical parameters can quantify the dispersion of color distribution and provide basic data for subsequent analysis.

[0082] Next, the statistical parameters extracted above are normalized to eliminate the scale difference between different color spaces and ensure that all parameters are on the same comparison basis. The normalized statistical parameters are combined into color heterogeneity initial feature vectors according to channel categories, which are used as the basis input for subsequent fusion modeling. This approach not only simplifies the subsequent model training process, but also improves the consistency and comparability of feature expression.

[0083] To capture the changes in lesion color as the lesion develops more subtly, the lesion area is divided into multiple concentric ring-shaped sub-regions to simulate the development process of the lesion from the center to the edge. The variance and standard deviation of each channel in RGB and HSV are extracted in each sub-region to form a local color variation feature sequence. By calculating the color statistical parameter change rate between adjacent sub-regions, a color heterogeneity gradient curve can be constructed. Based on this gradient curve, the spatial evolution trend of the lesion color distribution is analyzed to generate color heterogeneity dynamic feature values reflecting the development stage of the disease.

[0084] Finally, a cross-correlation matrix is established between the RGB and HSV channels, and the Pearson correlation coefficients between the channels are calculated. According to the correlation matrix, high-correlation color channel combinations are selected to avoid repeated or redundant information affecting feature expression efficiency. For the remaining color channels, their standard deviation, variance, and maximum and minimum range values are calculated to form a basic color variation feature set. To further improve the interpretability of the features and reduce the dimensionality, principal component analysis (PCA) is performed on the above basic color variation features to generate low-dimensional and highly interpretable color heterogeneity feature vectors.

[0085] Through the above steps, the color heterogeneity features of the lesion area are effectively extracted, providing an important basis for accurately identifying and evaluating plant diseases. This method not only focuses on the direct extraction of color information, but also considers the spatial variation trend of color distribution and its manifestation in the development process of diseases, thereby enhancing the comprehensiveness and accuracy of feature expression.

[0086] In S4, the lesion texture complexity feature value and the color heterogeneity feature value are fused into a composite disease feature vector, which is input into a pre-trained probability distribution model of disease and pest categories. The model outputs the probability distribution and confidence score of the disease and pest category to which the current image belongs. Specifically, it includes:

[0087] To achieve efficient identification and classification of crop disease and pest images, the lesion texture complexity feature value and the color heterogeneity feature value extracted in the previous step are fused to construct a composite disease feature vector with comprehensive discrimination ability. Specifically, in the input stage, standardization operations are performed on the texture complexity feature value and the color heterogeneity feature value to eliminate numerical scale differences between different feature dimensions, ensuring fairness and stability in the subsequent fusion process.

[0088] Subsequently, the two standardized feature vectors are combined into an initial fusion vector using feature splicing, and dimensionality reduction is performed on it using the Principal Component Analysis (PCA) method. This dimensionality reduction process not only effectively removes redundant information, but also retains key features with the most discriminative ability, thereby improving the computational efficiency and generalization performance of the model. The low-dimensional composite disease feature vector obtained after PCA processing is used as the input feature and sent to a pre-trained Support Vector Machine (SVM) classifier. The classifier uses a Radial Basis Function (RBF kernel) for non-linear mapping, which can effectively capture subtle but critical feature differences between disease categories and improve classification accuracy.

[0089] In the model output stage, the Monte Carlo Dropout sampling mechanism is introduced to enhance the interpretability and reliability of the identification results. In the specific implementation process, the same input sample is forward propagated multiple times in the inference stage, and different subsets of neurons are randomly activated each time to form a set of probability distributions for disease and pest categories. Based on this probability distribution set, the expected probability and variance of each disease and pest category are calculated, where the variance reflects the uncertainty of the prediction results. If the prediction variance of a category is large, it indicates that the model has high uncertainty in identifying that category, resulting in a lower confidence score.

[0090] A final probability distribution of the disease and pest category to which the current image belongs is generated according to the expected probability, and a confidence score is constructed in combination with the variance information. The confidence score is output together with the probability distribution, and is presented in a visual manner in the user interface, for example, by displaying the probability distribution of each category through a column chart, by color coding to represent the confidence level, to assist the user in intuitively determining whether to adopt the current recognition result or whether manual review is needed. This output mechanism combined with statistical uncertainty significantly improves the practical value and decision support capability of the system in the agricultural scene.

[0091] In S5, the reliability level of the recognition result is determined according to the confidence score output by the model, and the model parameters are iteratively optimized according to the reliability level until stable recognition modeling of the disease and pest type is completed, specifically including:

[0092] In order to improve the robustness and adaptive ability of the disease and pest image recognition system, the reliability level of the recognition result is divided according to the confidence score output by the model, and the model training strategy is dynamically adjusted according to the level to realize continuous optimization of the recognition model. In the specific implementation process, multiple confidence threshold intervals are set to divide the recognition result into three reliability levels: high, medium and low. Among them, the high level indicates that the recognition result has high credibility and can be directly adopted for disease diagnosis; the medium level indicates that the recognition result has certain reference value and is recommended to be combined with manual review for confirmation; the low level indicates that the current sample recognition has high uncertainty and needs to introduce additional data supplement or trigger the model optimization mechanism.

[0093] For low-reliability samples with a confidence score lower than the lowest threshold, the system automatically triggers a feedback mechanism and calls a pre-trained conditional generative adversarial network (cGAN). The cGAN model generates a number of synthetic images that are consistent with the original sample in terms of disease spot texture features and color distribution based on the disease and pest category to which the sample belongs. These synthetic images not only retain the key visual features of the target category, but also increase the diversity of the samples, which helps to alleviate the recognition bias problem caused by small sample categories.

[0094] The newly generated synthetic images are merged with the same category samples in the original training set to construct an expanded training set. On this basis, an incremental learning strategy is used to fine-tune the local parameters of the current recognition model. This fine-tuning process focuses on improving the model's ability to distinguish low-confidence categories, rather than retraining the model in its entirety, thereby effectively enhancing the model's recognition robustness for rare diseases or complex disease types while maintaining existing recognition performance.

[0095] After each model update is completed, the system re-evaluates the identification of the low-confidence sample, records the prediction result and confidence score. If the prediction result remains consistent for three consecutive times and the confidence score is stable and exceeds the set threshold, it is determined that the model has achieved stable identification modeling for the type of disease and pest, and the iterative optimization process is terminated to avoid unnecessary waste of computing resources. The closed-loop model optimization mechanism not only improves the adaptability and intelligence level of the system, but also provides more stable and reliable technical support for agricultural disease identification.

[0096] The working principle of the present application: the present application aims to improve the accuracy and robustness of disease identification. The method includes the following steps: first, obtain a high-resolution image of the crop leaf, and perform standardization preprocessing through illumination control, multi-angle shooting and image enhancement means, realize pixel-level segmentation of the disease spot area combined with U-Net network, and obtain the target image through morphological optimization and spatial alignment; then, the texture complexity feature and color heterogeneity feature of the disease spot area are extracted respectively, the former adopts LBP and GLCM algorithm combined with gradient difference analysis, and the latter quantifies the microstructure and disease evolution information of the disease spot through multi-channel statistics and PCA dimensionality reduction processing of RGB and HSV color space; the two kinds of features are fused into a composite disease feature vector, which is input into the probability model constructed based on SVM and Monte Carlo Dropout mechanism, and the disease category probability distribution and confidence score are output; finally, according to the confidence, the reliability level of the identification result is divided, the feedback mechanism is triggered for the low-confidence sample, the synthetic image is generated by calling cGAN and the model parameters are optimized combined with incremental learning, realizing the closed-loop iteration and stable modeling of the disease identification model. The present scheme effectively improves the precision, interpretability and adaptability of agricultural image recognition, and is suitable for intelligent plant protection applications in complex field environments.

[0097] The above-described embodiments can be implemented in part or in whole through software, hardware, firmware or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded into a computer, all or part of the processes described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid state disk.

[0098] It should be understood that the term "and / or" herein merely describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents that the associated objects before and after it are in an "or" relationship, but it can also represent an "and / or" relationship, which can be understood according to the context before and after it.

[0099] It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0100] The above describes one embodiment of the present application in detail, but the content described is only the preferred embodiment of the present application, and cannot be considered as limiting the scope of the implementation of the present application. Any equivalent changes and improvements made within the scope of the present application are still within the scope of the patent coverage of the present application.

Claims

1. A crop disease and pest image recognition method based on a large model, characterized in that, Includes the following steps: S1: Acquire high-resolution image data of the crop leaves to be identified, and perform standardized preprocessing on the images to obtain target images focused on the lesion areas; S2: Based on the local binary mode and gray-level co-occurrence matrix algorithm, texture features of lesion regions in the target image are extracted, the gradient difference distribution between adjacent texture units is calculated, and lesion texture complexity feature values ​​are generated to quantify the microstructural differences in disease characterization. S3: Perform multi-channel separation and pixel-level statistical analysis on the color space of the lesion area, extract the standard deviation and variance distribution of each channel in the RGB and HSV color spaces, and generate color heterogeneity feature values ​​to characterize the irregularity of the color distribution in the lesion area and the stage of disease evolution. S4: Fuse the feature values ​​of lesion texture complexity and color heterogeneity into a composite disease feature vector, and input it into a pre-trained probability distribution model of disease and pest categories. The model outputs the probability distribution and confidence score of the disease and pest category to which the current image belongs. S5: Determine the reliability level of the identification results based on the confidence score output by the model, and iteratively optimize the model parameters based on the reliability level until a stable identification model for pest and disease types is completed.

2. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The process of acquiring the target image is as follows: Crop leaf images were acquired using high-resolution digital imaging equipment, and multi-angle image samples were obtained under natural light and controlled supplemental lighting conditions to reduce shadow interference and enhance the texture information of lesion areas. Adaptive histogram equalization is applied to the acquired images, and a lesion segmentation network based on the U-Net architecture is used to perform pixel-level semantic segmentation of the images to extract accurate regions of interest (ROIs) for lesions. The extracted lesion areas are processed with edge smoothing and morphological optimization to remove noise interference, and the lesion images are standardized to a uniform size and spatial distribution format to obtain target images focused on the lesion areas.

3. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The method for extracting texture features from lesion regions in the target image based on the local binary pattern and gray-level co-occurrence matrix algorithm specifically includes: The lesion region in the target image is divided into multi-scale sliding windows, and the local binary pattern LBP feature vector is extracted from each sub-window. Calculate the gradient direction difference and magnitude change rate between each LBP feature vector, and construct the local gradient difference matrix between adjacent texture units; Based on the local gradient difference matrix, the consistency of texture direction and the dispersion of distribution are statistically analyzed to generate initial feature values ​​of texture complexity. The initial texture complexity feature values ​​at multiple scales are weighted and fused to form the final lesion texture complexity feature value.

4. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The generated lesion texture complexity feature value specifically includes: The Gray-Level Co-occurrence Matrix (GLCM) algorithm is applied to the lesion region in the target image to extract gray-level correlation features in different directions, thereby obtaining a set of basic texture parameters. Within each texture unit, the gradient magnitude and direction in the horizontal and vertical directions are calculated using the Sobel or Prewi tt operator to construct a local gradient field; For each pair of adjacent texture units, compare their local gradient fields, calculate the gradient magnitude difference and orientation angle difference between the two texture units, and form a gradient difference vector. The gradient difference vector distribution between all adjacent texture units is statistically analyzed. By calculating the statistical parameters of the standard deviation, mean, and skewness of the gradient difference vector distribution, the texture complexity within the lesion region is quantified. By combining the obtained basic texture parameters with the calculated statistical parameters, the final lesion texture complexity feature value is generated through weighted summation.

5. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The multi-channel separation and pixel-level statistical analysis of the color space of the lesion area specifically includes: The lesion areas in the target image are converted to RGB and HSV color spaces respectively, and each channel image is independently grayscaled. Within each color channel, a histogram distribution of pixel values ​​is calculated, and the standard deviation, variance, and skewness parameters of that channel are extracted to quantify the dispersion of the color distribution. The statistical parameters of each channel are normalized to eliminate scale differences between different color spaces; The normalized statistical parameters are combined according to channel category to form an initial feature vector of color heterogeneity, which serves as the basic input for subsequent fusion modeling.

6. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, S3 further includes the following color heterogeneity analysis step based on local region partitioning: The lesion area was divided into multiple concentric ring-shaped sub-regions to simulate the disease evolution process of the lesion developing from the center to the edge; The variance and standard deviation of each RGB and HSV channel are extracted in each sub-region to form a local color variation feature sequence; The rate of change of color statistical parameters between adjacent sub-regions is calculated to construct a color heterogeneity gradient curve; Based on the gradient curve analysis, the spatial evolution trend of lesion color distribution is analyzed, and dynamic characteristic values ​​of color heterogeneity reflecting the disease development stage are generated.

7. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The generation of color heterogeneity feature values ​​specifically includes: Establish a cross-correlation matrix between each channel of RGB and HSV, and calculate the Pearson correlation coefficient between the channels; Highly correlated color channel combinations are selected based on the correlation matrix to avoid duplicate or redundant information affecting feature expression efficiency. Calculate the standard deviation, variance, and maximum-minimum range for each retained color channel to form a basic color variation feature set; Principal component analysis (PCA) is used to reduce the dimensionality of the basic color variation features mentioned above, generating a low-dimensional color heterogeneity feature vector with strong interpretability.

8. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The process of fusing the feature values ​​of lesion texture complexity and color heterogeneity into a composite lesion feature vector specifically includes: The input lesion texture complexity feature value and color heterogeneity feature value are standardized to eliminate the numerical scale difference between different feature dimensions. The two feature vectors are combined into an initial fusion vector by feature concatenation, and dimensionality reduction is performed by principal component analysis (PCA) to remove redundant information and extract key discriminative features. The dimensionality-reduced composite disease feature vector is input into a pre-trained support vector machine (SVM) classifier. This classifier uses the RBF kernel function for nonlinear mapping, which enhances the ability to identify subtle differences between disease categories. The SVM classifier outputs the probability distribution and confidence score of the pest or disease category to which the current image belongs, and combines the maximum soft margin principle to determine the reliability of the recognition result.

9. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, The model outputs the probability distribution and confidence score of the pest or disease category to which the current image belongs, specifically including: A Monte Carlo Dropout sampling mechanism is introduced after the model output layer. Multiple forward propagations are performed during the inference stage to obtain multiple prediction results, forming a set of probability distributions for pest and disease categories. The expected probability and variance of each pest category are calculated based on the probability distribution set, where the variance is used to measure the uncertainty of the prediction results. The final probability distribution of pest and disease categories is generated based on the expected probability, and a confidence score is constructed by combining the variance information, where high variance represents low confidence. The confidence score and probability distribution are output together and presented in a visual manner in the user interface to help users determine whether to adopt the corresponding recognition result or whether manual review is required.

10. The crop disease and pest image recognition method based on a large model according to claim 1, characterized in that, S5 specifically includes: Multiple confidence threshold ranges are set to divide the recognition results into three reliability levels: high, medium, and low. Among them, the high level indicates that the recognition result can be directly adopted, while the low level indicates that manual review or additional data supplementation is required. For samples with confidence scores below the minimum threshold, a feedback mechanism is triggered, which calls the pre-trained conditional generative adversarial network cGAN to generate several synthetic images with consistent lesion texture and color distribution based on the category to which the sample belongs. The generated synthetic images are merged with similar samples in the original training set to construct an expanded training set. An incremental learning strategy is then used to fine-tune the local parameters of the current recognition model, with a focus on optimizing the ability to distinguish low-confidence categories. After each model update, the identification results of the low-confidence sample are re-evaluated. If the prediction results remain consistent for three consecutive times and the confidence score exceeds the set threshold, the model is deemed to have achieved stable identification and modeling of the pest type, and the iterative optimization process is terminated.

Citation Information

Cited By

  • Soybean root rot fungus detection method and system based on multi-feature analysis

    CN121616883A

  • Plant structure pest and disease three-dimensional detection system based on three-dimensional point cloud reconstruction

    CN121767321A

  • Walnut tree pest and disease identification method based on image recognition target detection technology

    CN122391901A