A computer vision-based agricultural pest and disease identification system
Patent Information
- Application Number
- CN202611190027.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-09
AI Technical Summary
[0004]但是,现有农业病虫害识别系统仍存在系统级智能化程度不足的问题
[0005]为解决上述问题,本发明通过融合视觉特征与环境信息,提高病虫害识别精度与鲁棒性,降低复杂光照与背景干扰对识别结果的影响,提升农业病虫害智能化检测能力。
Smart Images

Figure CN122888643A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent agricultural information processing technology, and in particular to an agricultural pest and disease identification system based on computer vision. Background Technology
[0002] Intelligent monitoring systems for agricultural pests and diseases are a crucial component of smart agriculture. They utilize image acquisition equipment, environmental sensing devices, data processing equipment, and intelligent analysis modules to continuously monitor and identify abnormal conditions during crop growth. With the development of large-scale planting, facility agriculture, and unmanned agricultural management, traditional pest and disease monitoring methods relying on manual field patrols and experience-based judgment are insufficient to meet the demands for large-scale, high-frequency, and continuous monitoring. Especially in greenhouse clusters, large areas of farmland, and complex planting environments, pest and disease outbreaks are often concealed and spread rapidly, necessitating intelligent identification systems to promptly obtain crop status information and provide data support for agricultural production management.
[0003] Existing agricultural pest and disease identification systems typically include an image acquisition module, an image processing module, and a pest and disease identification module. The image acquisition module acquires images of crop leaves, stems, or fruits using fixed cameras, drones, or mobile inspection equipment. The image processing module performs noise reduction, enhancement, and region extraction on the acquired images. The pest and disease identification module uses image feature analysis models or deep learning models to identify lesion areas, insect-infested areas, and abnormal growth areas, and outputs corresponding pest and disease category information. Some systems further integrate environmental data such as temperature, humidity, and light intensity collected by sensors to assist in the analysis of pest and disease occurrence conditions, improving the adaptability of the identification results.
[0004] However, existing agricultural pest and disease identification systems still suffer from insufficient system-level intelligence. On one hand, the data correlation capabilities between the image acquisition, image processing, and identification analysis modules in existing systems are limited, making them susceptible to factors such as changes in natural light, leaf shading, background interference, changes in shooting angle, and differences in crop growth stages. This leads to unstable image data quality, reducing the reliability of lesion location and pest and disease identification. On the other hand, existing systems typically only output pest and disease categories based on visual image information, lacking comprehensive analysis of the correlation between environmental factors such as temperature, humidity, and light and the visual recognition results, making it difficult to further assess the risk of pest and disease spread after an outbreak. Furthermore, the output of existing systems usually remains at the level of pest and disease category indication, lacking the ability to generate risk levels and prevention and control suggestions based on the identification results and environmental conditions, making it difficult to form a complete closed loop from data acquisition and intelligent identification to decision support. Therefore, there is an urgent need for an agricultural pest and disease identification system that can integrate multi-source sensor data, improve the stability of pest and disease identification, and output risk assessment results and prevention and control suggestions. Summary of the Invention
[0005] To address the aforementioned issues, this invention improves the accuracy and robustness of pest and disease identification by integrating visual features and environmental information, reduces the impact of complex lighting and background interference on the identification results, and enhances the intelligent detection capabilities for agricultural pests and diseases.
[0006] The above objectives can be achieved through the following approach: A computer vision-based agricultural pest and disease identification system includes an image acquisition module for acquiring agricultural crop image data and environmental auxiliary data to generate a multi-source crop perception dataset; a preprocessing module for performing image preprocessing and feature enhancement on the multi-source crop perception dataset to generate standardized crop image feature data; a segmentation module for segmenting lesion regions on the standardized crop image feature data to generate candidate lesion region feature data; a feature extraction module for performing deep convolution feature extraction on the candidate lesion region feature data to generate pest and disease visual feature vectors; a classification module for classifying and recognizing the pest and disease visual feature vectors to generate pest and disease category labels; an evaluation module for performing risk assessment processing on the pest and disease category labels combined with environmental auxiliary data to generate pest and disease risk levels; and an output module for outputting prevention and control prompts based on the pest and disease risk levels.
[0007] Optionally, the step of performing image preprocessing and feature enhancement on the multi-source crop sensing dataset to generate standardized crop image feature data includes: denoising the multi-source crop sensing dataset to generate denoised image feature data; performing illumination normalization processing on the denoised image feature data to generate illumination normalized image feature data; and performing contrast enhancement processing on the illumination normalized image feature data to generate standardized crop image feature data.
[0008] Optionally, the step of performing lesion region segmentation processing on the standardized crop image feature data to generate candidate lesion region feature data includes: performing multi-scale feature encoding processing on the standardized crop image feature data to generate a multi-scale encoded feature map; calculating spatial attention weights on the multi-scale encoded feature map to generate a lesion attention response map; and performing region threshold segmentation processing based on the lesion attention response map to generate candidate lesion region feature data.
[0009] Optionally, the step of performing deep convolutional feature extraction on the candidate lesion region feature data to generate a visual feature vector of pests and diseases includes: performing convolutional feature mapping processing on the candidate lesion region feature data to generate shallow lesion texture features; performing residual feature enhancement processing on the shallow lesion texture features to generate deep pest and disease semantic features; and performing feature fusion processing on the deep pest and disease semantic features to generate a visual feature vector of pests and diseases.
[0010] Optionally, the step of classifying and recognizing the visual feature vectors of pests and diseases to generate pest and disease category labels includes: performing feature normalization processing on the visual feature vectors of pests and diseases to generate standardized feature representations; performing fully connected mapping processing on the standardized feature representations to generate category probability distribution vectors; and performing maximum probability determination processing based on the category probability distribution vectors to generate pest and disease category labels.
[0011] Optionally, the step of performing risk assessment processing on the pest and disease category labels in conjunction with environmental auxiliary data to generate pest and disease risk levels includes: performing risk weight mapping processing on the pest and disease category labels to generate basic risk factors; performing environmental impact quantification processing on the environmental auxiliary data to generate environmental adjustment factors; and performing fusion calculation based on the basic risk factors and the environmental adjustment factors to generate pest and disease risk levels.
[0012] Optionally, the step of outputting prevention and control prompt information based on the pest and disease risk level includes: performing level mapping processing on the pest and disease risk level to generate prevention and control strategy parameters; performing rule matching processing on the prevention and control strategy parameters to generate prevention and control measure instructions; and outputting pest and disease prevention and control prompt information based on the prevention and control measure instructions.
[0013] Optionally, the spatial attention weight calculation includes: performing spatial gradient calculation on the multi-scale encoded feature map to generate a spatial saliency feature map; normalizing the spatial saliency feature map to generate an attention weight distribution map; and enhancing the response intensity of the lesion region based on the attention weight distribution map.
[0014] Optionally, the environmental auxiliary data includes temperature data, humidity data, and light intensity data; the environmental adjustment factor is obtained by weighted fusion calculation of the temperature data, humidity data, and light intensity data.
[0015] Based on the same inventive concept, this invention also provides a computer vision-based agricultural pest and disease identification system. The system includes: an image acquisition module for acquiring agricultural crop image data and environmental auxiliary data to generate a multi-source crop perception dataset; a preprocessing module for performing image preprocessing and feature enhancement on the multi-source crop perception dataset to generate standardized crop image feature data; a segmentation module for segmenting lesion regions on the standardized crop image feature data to generate candidate lesion region feature data; a feature extraction module for performing deep convolution feature extraction on the candidate lesion region feature data to generate pest and disease visual feature vectors; a classification module for classifying and recognizing the pest and disease visual feature vectors to generate pest and disease category labels; an evaluation module for performing risk assessment processing on the pest and disease category labels combined with environmental auxiliary data to generate pest and disease risk levels; and an output module for outputting prevention and control information features based on the pest and disease risk levels. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A schematic diagram of the system structure of an agricultural pest and disease identification system based on computer vision according to an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the preprocessing effect of a computer vision-based agricultural pest and disease identification system according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the lesion region segmentation effect of a computer vision-based agricultural pest and disease identification system according to an embodiment of the present invention. Figure 4 This is a flowchart illustrating a computer vision-based method for identifying agricultural pests and diseases according to an embodiment of the present invention. Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the protection scope of the present invention.
[0018] Reference Figure 1One embodiment of the present invention proposes an agricultural pest and disease identification system based on computer vision. By integrating visual features and environmental information, the system improves the accuracy and robustness of pest and disease identification, reduces the impact of complex lighting and background interference on the identification results, and enhances the intelligent detection capability of agricultural pests and diseases.
[0019] The method described in this embodiment specifically includes: The image acquisition module is used to acquire agricultural crop image data and environmental auxiliary data to generate a multi-source crop perception dataset; Specifically, agricultural crop image data is acquired by fixed field cameras, mobile inspection terminals, or drone image acquisition devices, and the collected objects include one or more of the following: crop leaves, stems, fruits, or ears. Environmental auxiliary data is simultaneously collected by temperature sensors, humidity sensors, and light intensity sensors, and includes at least temperature data, humidity data, and light intensity data. The agricultural crop image data and environmental auxiliary data are timestamped, and image data within the same sampling time or a preset time window are bound to environmental data to generate a multi-source crop perception dataset. The preset time window can be the environmental data collection interval within 30 seconds before and after the image acquisition time; if the same image acquisition time corresponds to multiple environmental data sampling values, the average value is used to calculate the corresponding environmental auxiliary data for that image. For the first... The multi-source crop perception data corresponding to the images of agricultural crops include: ; In the formula, Indicates the first Multi-source crop perception data corresponding to Zhang's agricultural crop images. Indicates the first Zhang's agricultural crop image data, Indicates the relationship with the first Temperature data corresponding to images of agricultural crops. Indicates the relationship with the first Humidity data corresponding to images of agricultural crops. Indicates the relationship with the first Light intensity data corresponding to Zhang's agricultural crop image data Indicates the first The timestamp of the acquisition of agricultural crop image data.
[0020] For example, a fixed camera, temperature sensor, humidity sensor, and light intensity sensor are installed in a tomato greenhouse. The fixed camera captures an image of the tomato leaves every 10 minutes, while the temperature, humidity, and light intensity sensors collect environmental auxiliary data every 30 seconds. The first tomato leaf image is captured at 10:00:00. The average of the environmental auxiliary data from 9:59:30 to 10:00:30 is taken, resulting in a temperature of 28°C, humidity of 82%, and light intensity of 6500 lux. For the first tomato leaf image, we have: This data, as one piece of data in the multi-source crop perception dataset, is passed to subsequent image preprocessing and feature enhancement steps.
[0021] The preprocessing module is used to perform image preprocessing and feature enhancement on the multi-source crop perception dataset to generate standardized crop image feature data. In one embodiment of the present invention, generating standardized crop image feature data includes the following steps: The multi-source crop perception dataset is denoised to generate denoised image feature data; The denoised image feature data is subjected to illumination normalization processing to generate illumination normalized image feature data; The illumination-normalized image feature data is subjected to contrast enhancement processing to generate standardized crop image feature data.
[0022] Specifically, such as Figure 2As shown, the agricultural crop image data in the multi-source crop sensing dataset undergoes size normalization, noise suppression, illumination correction, and contrast enhancement. First, the original images from the agricultural crop image data are read and scaled to 224×224 pixels using bilinear interpolation. If the aspect ratio of the original image is inconsistent with the 224×224 pixel input ratio, boundary regions with pixel values of 0 are filled on both sides of the shorter side before scaling is performed to avoid disproportionate deformation of leaf lesion areas. Then, median filtering is applied to the scaled image. Median filtering uses a 3×3 pixel sliding window, replacing the gray value of the center pixel with the median of the gray values of all pixels within the window to generate denoised image feature data. When the noise intensity of the image sensor in the image acquisition device exceeds a preset noise threshold, a Gaussian filter with a standard deviation of 1.2 and a convolution kernel size of 5×5 is used to perform secondary smoothing on the denoised image feature data to suppress isolated noise points caused by sensor noise, raindrop reflections, or image compression. Next, the denoised image feature data is converted from the RGB color space to the HSV color space. The luminance channel is extracted as the object of illumination correction, and illumination normalization processing is performed on the luminance channel in conjunction with the illumination intensity data in the environmental auxiliary data to generate illumination-normalized image feature data. For the grayscale values of the illumination-normalized image, we have: ; In the formula, This represents the grayscale value of the image after illumination normalization. Represents the grayscale value of the original image. Indicates the preset standard light intensity. This represents the measured light intensity corresponding to the current image.
[0023] Contrast-limited adaptive histogram equalization is performed on the illumination-normalized image feature data. This process involves dividing the 224×224 pixel image into 8×8 local image blocks, each block measuring 28×28 pixels. A contrast limit threshold of 2.0 is set. Histogram equalization is then applied to each local image block, and bilinear interpolation is used to transition the grayscale levels at the boundaries of adjacent local image blocks, generating standardized crop image feature data.
[0024] For example, setting the original agricultural crop image size to 1920×1080 pixels, first fill the boundary regions with pixel values of 0 on both sides of the short side of the original agricultural crop image to obtain a square image of 1920×1920 pixels, and then scale it to 224×224 pixels using bilinear interpolation. The scaled image is then processed using a 3×3 pixel median filter. If the grayscale values of 9 pixels within a certain window are 132, 135, 136, 138, 139, 140, 142, 220, and 224 respectively, then the grayscale value of the pixel at the center of the window is updated to 139. Setting the preset standard light intensity to 6000 lux, the measured light intensity corresponding to a certain image acquisition is 7500 lux, and the original image grayscale value of the suspected lesion area on the leaf is 180, then: The 224×224 pixel image after illumination normalization was divided into 8×8 local image blocks, each of which was 28×28 pixels. After setting the contrast limit threshold to 2.0, adaptive histogram equalization was performed to obtain standardized crop image feature data.
[0025] The segmentation module is used to segment the lesion region of the standardized crop image feature data and generate candidate lesion region feature data. In one embodiment of the present invention, generating candidate lesion region feature data includes the following steps: The standardized crop image feature data is subjected to multi-scale feature encoding processing to generate a multi-scale encoded feature map; Spatial attention weights are calculated on the multi-scale encoded feature map to generate a lesion attention response map; Based on the lesion attention response map, region threshold segmentation is performed to generate candidate lesion region feature data.
[0026] Specifically, such as Figure 3As shown, standardized crop image feature data is input into a pre-trained multi-scale feature encoding network. This network is a convolutional coding network (CCN) with pre-trained characteristics. Training samples include crop leaf images with lesion region annotations, which are binary masks obtained through manual or semi-automatic annotation. During training, standardized crop image feature data is used as input, and lesion region annotations are used as the supervised target. The network parameters are jointly optimized using cross-entropy loss and cross-union loss functions to obtain the multi-scale feature encoding network used to extract lesion texture, color boundaries, and semantic morphology. The multi-scale feature encoding network includes a first-scale encoding branch, a second-scale encoding branch, and a third-scale encoding branch. The first-scale encoding branch uses a 3×3 convolution kernel with a stride of 1 and 32 output channels to extract fine-grained texture features from the leaf surface, generating low-level texture features. The second-scale encoding branch uses a 5×5 convolution kernel with a stride of 1 and 64 output channels to extract transition features between lesion edges, color abrupt change regions, and healthy leaf tissue, generating mid-level color boundary features. The third-scale encoding branch uses a 7×7 convolution kernel with a stride of 1 and 128 output channels to extract lesion spread morphology, regional contours, and overall pest and disease distribution features, generating high-level semantic features. The output features of all three scale encoding branches maintain the same spatial dimensions as the input image through padding and are concatenated along the channel dimension to obtain a multi-scale encoded feature map with 224 channels. When calculating spatial attention weights for multi-scale encoded feature maps, average pooling and max pooling are first performed on the multi-scale encoded feature maps along the channel dimension to obtain average response feature maps and maximum response feature maps. The average response feature maps and maximum response feature maps are then concatenated along the channel dimension, spatial mapping is performed using a 7×7 convolution kernel, and normalized to the 0-1 interval using the Sigmoid function to generate a lesion attention response map. Further, in the spatial attention weight calculation, spatial gradient calculation can be performed on the multi-scale encoded feature maps to generate spatial saliency feature maps; the spatial saliency feature maps are then normalized to generate an attention weight distribution map; and the response intensity of the lesion region is enhanced based on the attention weight distribution map. Spatial gradient calculation uses a 3×3 horizontal Sobel convolution kernel [-1, 0, 1; -2, 0, 2; -1, 0, 1] and a 3×3 vertical Sobel convolution kernel [-1, -2, -1; 0, 0, 0; 1, 2, 1]. For the spatial saliency feature map, we have: ; In the formula, Represents spatial saliency feature map, Indicates the gradient response in the horizontal direction. This represents the gradient response in the vertical direction.
[0027] For the attention weight distribution map, we have: ; In the formula, This represents the attention weight distribution diagram. Represents spatial saliency feature map, This represents the minimum response value in the spatial saliency feature map. This represents the maximum response value in the spatial saliency feature map.
[0028] For the enhancement feature map of the lesion area, we have: ; In the formula, This represents an enhanced feature map of the lesion area. Represents multi-scale encoded feature maps. Indicates the attention enhancement coefficient. This represents the attention weight distribution diagram. You can take 0.5.
[0029] For the attention response value of a pixel, we have: ; In the formula, This represents the attention response value of a pixel. Represents multi-scale encoded feature maps. This represents the average response feature map obtained by channel-average pooling of the multi-scale encoded feature map. This represents the maximum response feature map obtained by performing channel max pooling on the multi-scale encoded feature map. This indicates a spatial convolution operation with a kernel size of 7×7. This represents the normalized activation function. Thresholding is performed based on the response values of each pixel in the lesion attention response map, and connected component filtering rules are used to remove noise regions with excessively small areas, generating candidate lesion region feature data.
[0030] For the determination values of lesion area, we have: ; ; In the formula, Indicates the lesion area determination value. This represents the attention response value of a pixel. Indicates the spatial response threshold. 0.65 can be taken. This represents the area of the connected region. This represents the threshold area of the connected region. It can take 120 pixels.
[0031] For example, standardized crop image feature data of 224×224 pixels is input into a multi-scale feature encoding network. The first-scale encoding branch uses a 3×3 convolutional kernel and outputs 32-channel features, the second-scale encoding branch uses a 5×5 convolutional kernel and outputs 64-channel features, and the third-scale encoding branch uses a 7×7 convolutional kernel and outputs 128-channel features. The outputs of the three branches are concatenated along the channel dimension to obtain a 224-channel multi-scale encoded feature map. Channel average pooling is performed on the 224-channel feature map to obtain a 224×224-pixel single-channel spatial response map; then, a 3×3 horizontal Sobel convolutional kernel and a 3×3 vertical Sobel convolutional kernel are used to calculate the horizontal and vertical gradient responses, respectively. If the horizontal gradient response of a suspected lesion boundary pixel is set to 0.42 and the vertical gradient response to 0.56, then: If we set the minimum response value in the spatial saliency feature map to 0.10 and the maximum response value to 0.90, then: If we set the original response value of this pixel in the multi-scale encoded feature map to 0.60 and the attention enhancement coefficient to 0.5, then: The spatial response threshold is set to 0.65, and the connected region area threshold is set to 120 pixels. In a leaf image, the attention response value of a yellow spot region is 0.78, and the connected region area is 360 pixels. Then: Since the lesion area determination value is 1, this area is retained as a candidate lesion area. Another bright spot area formed by leaf reflection has an attention response value of 0.71, but the connected region area is only 40 pixels. Therefore: The bright spot area is removed, thereby reducing missegmentation caused by localized reflections, dust, or shooting noise.
[0032] The feature extraction module is used to perform deep convolution feature extraction on the candidate lesion area feature data to generate a visual feature vector of pests and diseases. In one embodiment of the present invention, generating visual feature vectors of pests and diseases includes the following steps: The candidate lesion region feature data are subjected to convolutional feature mapping to generate shallow lesion texture features; The shallow lesion texture features are subjected to residual feature enhancement processing to generate deep pest and disease semantic features; The deep semantic features of pests and diseases are subjected to feature fusion processing to generate visual feature vectors of pests and diseases.
[0033] Specifically, the candidate lesion region feature data is input into a pre-trained deep convolutional feature extraction network (DCNN), which is a pre-trained convolutional residual network. Training samples include candidate lesion region images and corresponding pest / disease category labels. These pest / disease category labels include one or more of the following: healthy leaves, powdery mildew, downy mildew, leaf spot, rust, aphid damage, and spider mite damage. During training, the candidate lesion region feature data is used as input, and the pest / disease category labels are used as the supervision target. The network parameters are optimized using a cross-entropy loss function to obtain the DCNN used to extract lesion edges, color abrupt changes, insect bite gaps, spot clustering morphology, and disease spread semantics. The DCNN includes an input adaptation layer, a shallow texture extraction layer, a residual semantic enhancement layer, and a feature fusion layer. The input adaptation layer is used to uniformly scale the candidate lesion region feature data to 128×128 pixels and set the background pixels outside the candidate lesion regions to 0. The shallow texture extraction layer consists of a first convolutional layer and a second convolutional layer. The first convolutional layer uses a 3×3 kernel with a stride of 1 and 32 output channels, while the second convolutional layer uses a 3×3 kernel with a stride of 1 and 64 output channels. Each convolutional layer is followed by a batch normalization layer and a non-linear activation layer. The non-linear activation layer uses the ReLU activation function to generate shallow lesion texture features. The residual semantic enhancement layer consists of a first residual block and a second residual block. The first residual block consists of two 3×3 convolutional layers, each with a stride of 1 and 128 output channels. The second residual block consists of one 3×3 convolutional layer and one 1×1 convolutional layer. The 3×3 convolutional layer is used to extract lesion diffusion patterns and spot aggregation patterns, while the 1×1 convolutional layer is used to adjust the channel dimensions, with 256 output channels. Each residual block performs a skip connection between the convolutional output features and the input features before passing them through the ReLU activation function to generate deep pest and disease semantic features. The feature fusion layer consists of a global average pooling layer and a linear projection layer. The global average pooling layer compresses the spatial dimension of the shallow lesion texture features and the deep pest semantic features to obtain the corresponding one-dimensional feature representations. The linear projection layer projects the shallow lesion texture features into 128-dimensional feature vectors and the deep pest semantic features into 128-dimensional feature vectors. Then, they are weighted and fused according to the preset fusion weights to generate the visual feature vectors of pests and diseases.
[0034] For the visual feature vectors of pests and diseases, we have: ; In the formula, Represents the visual feature vector of pests and diseases. Indicates the texture characteristics of superficial lesions. This indicates semantic features related to deep-seated pests and diseases. and Indicates the feature fusion weights. 0.4 can be taken. 0.6 can be taken.
[0035] For example, candidate lesion region feature data obtained by lesion region segmentation is input into a deep convolutional feature extraction network. First, the candidate lesion region feature data is scaled to 128×128 pixels, and the background pixels outside the candidate lesion region are set to 0. Then, it passes through a first convolutional layer for a 3×3 convolution with a stride of 1, outputting 32-channel features. Next, it passes through a second convolutional layer for a 3×3 convolution with a stride of 1, outputting 64-channel features, obtaining shallow lesion texture features. Then, it passes through a first residual block to output 128-channel features, and a second residual block to output 256-channel features, obtaining deep pest and disease semantic features. Finally, it passes through a global average pooling layer and a linear projection layer to obtain 128-dimensional shallow lesion texture features and 128-dimensional deep pest and disease semantic features. The normalized feature value of the shallow lesion texture features is set to 0.72, and the normalized feature value of the deep pest and disease semantic features is set to 0.81. The feature fusion weights are set to 0.4 and 0.6 respectively. Then: Since the fusion value of the visual feature vector of pests and diseases is 0.774, it indicates that the candidate region has both obvious texture anomalies and strong semantic disease features. Therefore, it is used as an effective visual feature input for pests and diseases in the subsequent classification and recognition process.
[0036] The classification module is used to classify and identify the visual feature vectors of the pests and diseases, and generate pest and disease category labels. In one embodiment of the present invention, generating pest and disease category labels includes the following steps: The visual feature vectors of the pests and diseases are subjected to feature normalization processing to generate standardized feature representations; The standardized feature representation is subjected to fully connected mapping to generate a class probability distribution vector; Based on the category probability distribution vector, the maximum probability determination process is performed to generate pest and disease category labels.
[0037] Specifically, the classification and recognition process employs a pre-trained classification and recognition model. The training samples for this model include candidate lesion region images across multiple crop categories, along with corresponding pest and disease category labels. These labels include one or more of the following: healthy leaves, powdery mildew, downy mildew, leaf spot, rust, aphid damage, and spider mite damage. During training, the candidate lesion region images undergo image preprocessing, lesion region segmentation, and deep convolutional feature extraction to obtain visual feature vectors for pests and diseases. These visual feature vectors are used as training input, and the pest and disease category labels are used as supervised output. The weight parameters of the classification and recognition model are optimized using a cross-entropy loss function to obtain the classification and recognition model used to output the category probability distribution vector. The classification and recognition model comprises a feature normalization layer, a first fully connected layer, a non-linear activation layer, a random deactivation layer, a second fully connected layer, and a normalized output layer. The feature normalization layer normalizes the mean and variance of the visual feature vectors of pests and diseases, generating a standardized feature representation. The first fully connected layer maps the standardized feature representation to a 256-dimensional hidden feature space. The non-linear activation layer uses the ReLU activation function. The inactivation rate of the random deactivation layer can be set to 0.3. The second fully connected layer maps the 256-dimensional hidden features to the category score vectors corresponding to a preset number of categories. The normalization output layer uses the Softmax function to probabilistically normalize the category score vectors, generating a category probability distribution vector. For the standardized feature representation, we have: In the formula, This represents the standardized feature representation. Represents the visual feature vector of pests and diseases. This represents the mean of the visual feature vectors of pests and diseases in the training samples. This represents the standard deviation of the visual feature vectors of pests and diseases in the training samples.
[0038] For the class probability distribution vector, we have: ; In the formula, Represents the category probability distribution vector, This represents the fully connected weight matrix of the classification and recognition model. This represents the standardized feature representation. This represents the bias term of the classification and recognition model. This represents the probability normalization function.
[0039] For pest and disease category labels have: ; In the formula, Indicates the category of pests and diseases. Represents the category probability distribution vector. This represents the category selection function with the highest probability.
[0040] For example, if the fusion value of the visual feature vector of pests and diseases is set to 0.774, the mean of the features in the training samples is 0.500, and the standard deviation of the features in the training samples is 0.200, then: The standardized feature representation is input into the classification and recognition model. The first fully connected layer maps it to a 256-dimensional hidden feature space. After processing by the ReLU activation function and a random deactivation layer with a deactivation rate of 0.3, the second fully connected layer outputs a class score vector, which is then processed by the Softmax function to obtain the class probability distribution vector: healthy leaves 0.06, powdery mildew 0.12, downy mildew 0.68, leaf spot 0.09, aphid damage 0.05. According to the aforementioned formula, we have: Since downy mildew has the highest probability of corresponding to this category, a pest / disease category label of downy mildew is generated. This pest / disease category label is passed to subsequent risk assessment processing and used to determine the risk of disease spread in conjunction with environmental auxiliary data.
[0041] The assessment module is used to perform risk assessment processing on the pest and disease category labels combined with environmental auxiliary data to generate pest and disease risk levels; In one embodiment of the present invention, generating a pest and disease risk level includes the following steps: Risk weight mapping is performed on the pest and disease category labels to generate basic risk factors; The environmental impact quantification process is performed on the aforementioned environmental auxiliary data to generate environmental adjustment factors; The risk level of pests and diseases is generated by fusion calculation based on the basic risk factors and environmental regulation factors.
[0042] Specifically, basic risk factors are obtained based on pest and disease category labels, and environmental adjustment factors are calculated based on environmental auxiliary data. Basic risk factors characterize the severity of different pest and disease categories, while environmental adjustment factors characterize the degree to which current temperature, humidity, and light intensity promote the occurrence and spread of pests and diseases. A mapping table between pest and disease categories and basic risk factors is established; for example, healthy leaves correspond to 0.05, minor pests to 0.45, leaf spot to 0.65, powdery mildew to 0.75, rust to 0.80, and downy mildew to 0.85. Basic risk factors are generated by retrieving corresponding values from the mapping table based on pest and disease category labels. Environmental auxiliary data includes temperature, humidity, and light intensity data. Environmental adjustment factors are obtained by weighted fusion calculation of temperature, humidity, and light intensity data. To ensure that environmental data of different dimensions can participate in unified calculations, temperature, humidity, and light intensity data are first quantified into temperature influence factors, humidity influence factors, and light influence factors, respectively, within the range of 0 to 1.
[0043] Regarding the temperature-related factors, we have: ; In the formula, Indicates the influence factor of temperature. Represents temperature data. This indicates the preset suitable temperature center value. This indicates the permissible range of temperature deviation.
[0044] Regarding the factors affecting humidity, we have: ; In the formula, Indicates the humidity influencing factor. Represents humidity data. This indicates the initial threshold for high humidity risk. This indicates the high humidity saturation threshold.
[0045] Regarding the factors affecting light intensity, we have: ; In the formula, Indicates the light effect factor. Represents light intensity data. This indicates the preset suitable light center value. This indicates the permissible range of illumination deviation.
[0046] When the calculated results of the temperature impact factor, humidity impact factor, or light impact factor are less than 0, they are corrected to 0; when the calculated results are greater than 1, they are corrected to 1, so as to ensure that each environmental impact factor is in the range of 0 to 1.
[0047] For environmental regulatory factors, we have: ; In the formula, Indicates environmental regulating factors, Indicates the influence factor of temperature. Indicates the humidity influencing factor. Indicates the light effect factor. , and Indicates environmental weight. 0.3 can be taken. You can take 0.5. 0.2 is acceptable.
[0048] For pest and disease risk scoring, there are: ; In the formula, This indicates the risk score for pests and diseases. Indicates the basic risk factor. Indicates environmental regulating factors, and Indicates the risk fusion weight, 0.6 can be taken. 0.4 can be taken.
[0049] The pest and disease risk level is generated based on the relationship between the pest and disease risk score and the preset risk level range. A pest and disease risk score less than 0.4 is considered low risk, a pest and disease risk score greater than or equal to 0.4 and less than or equal to 0.7 is considered medium risk, and a pest and disease risk score greater than 0.7 is considered high risk.
[0050] For example, in the greenhouse tomato downy mildew identification scenario, the pest category label generated by the classification and identification process is downy mildew, and the basic risk factor is 0.85. The temperature sensor collects temperature data of 24℃, the humidity sensor collects humidity data of 88%, and the light intensity sensor collects light intensity data of 4500 lux. The preset suitable temperature center value is set to 25℃, the temperature deviation tolerance range is 10℃, the high humidity risk threshold is 80%, the high humidity saturation threshold is 95%, the preset suitable light center value is 5000 lux, and the light deviation tolerance range is 4000 lux. According to the aforementioned formula, we have: ; ; If we set the environmental weights to 0.3, 0.5, and 0.2 respectively, then: If the risk fusion weights are set to 0.6 and 0.4 respectively, then: Since 0.7946 is greater than 0.7, the generated pest and disease risk level is high. This result indicates that the current image recognition results and greenhouse environmental conditions both point to a high risk of spread, and subsequent prevention and control prompts should generate priority processing prompts.
[0051] The output module is used to output prevention and control prompts based on the pest and disease risk level.
[0052] In one embodiment of the present invention, the output of prevention and control prompt information features based on the pest and disease risk level includes the following steps: The risk levels of the pests and diseases are mapped to generate control strategy parameters. The prevention and control strategy parameters are subjected to rule matching processing to generate prevention and control measure instructions; Based on the aforementioned prevention and control measures, output pest and disease control prompts are provided.
[0053] Specifically, a prevention and control strategy database is pre-established. This database includes at least the following fields: pest / disease category, risk level, treatment priority, recommended treatment timeframe, control measure type, environmental regulation measures, and re-inspection interval. The pest / disease category field stores one or more of the following: healthy leaves, powdery mildew, downy mildew, leaf spot, rust, aphid damage, and spider mite damage. The risk level field stores low, medium, and high risk. The treatment priority field represents the execution order of corresponding prevention and control tasks: low risk corresponds to level three priority, medium risk to level two priority, and high risk to level one priority. The control measure type field stores one or more of the following: observation and re-inspection, local treatment, isolation treatment, environmental regulation, or chemical control. The environmental regulation measures field stores one or more of the following: ventilation, dehumidification, shading, increasing light, or reducing leaf surface moisture time. The re-inspection interval field stores the re-inspection time calculated based on the pest / disease risk score. When mapping pest / disease risk levels, a search key is generated based on the pest / disease category label and the pest / disease risk level, and the corresponding prevention and control strategy parameters are matched in the prevention and control strategy database. If the pest and disease risk level is low, the control strategy parameters include a three-tiered priority, observation and re-inspection measures, and a relatively long re-inspection interval. If the pest and disease risk level is medium, the control strategy parameters include a second-tier priority, local treatment measures, enhanced monitoring measures, and a medium re-inspection interval. If the pest and disease risk level is high, the control strategy parameters include a first-tier priority, priority treatment measures, isolation of diseased plants, environmental regulation measures, and a relatively short re-inspection interval. When performing rule matching on the control strategy parameters, the pest and disease category label, the pest and disease risk level, and environmental auxiliary data are used as matching conditions. If the pest and disease category label is downy mildew or powdery mildew, and the humidity data in the environmental auxiliary data is greater than 80%, then measures to reduce humidity and enhance ventilation are added to the control measures instructions. If the pest and disease category label is aphid damage or spider mite damage, and the pest and disease risk level is high, then measures to isolate affected plants and focus on inspecting adjacent plants are added to the control measures instructions. If the pest and disease risk level is low, then only regular observation and re-inspection measures are added to the control measures instructions. Through rule matching, prevention and control measures instructions are generated, which include processing priority, processing time limit, disposal action and re-inspection time.
[0054] Regarding the re-inspection time interval, we have: ; In the formula, Indicates the time interval for re-inspection. Indicates the baseline re-inspection time. This indicates the risk score for pests and diseases.
[0055] Regarding the suggested processing timeframes: ; In the formula, Indicates the suggested processing timeframe. Indicates the baseline processing time limit. This indicates the risk score for pests and diseases.
[0056] For example, let's set the pest / disease category label as downy mildew, the pest / disease risk level as high risk, the pest / disease risk score as 0.7946, the humidity data in the environmental auxiliary data as 88%, the baseline re-inspection time as 72 hours, and the baseline treatment time limit as 24 hours. According to the aforementioned formula, we have: ; Because the pest and disease risk level is high, the treatment priority is mapped to first-level priority. Since the pest and disease category label is downy mildew and the humidity data is 88%, meeting the rule condition of humidity data greater than 80%, the control measures instructions include isolating suspected diseased leaf areas, reducing humidity inside the greenhouse, and increasing ventilation. Because the re-inspection interval is approximately 15 hours and the recommended treatment time limit is approximately 5 hours, the output pest and disease control prompt information is characterized as follows: downy mildew high risk, first-level priority, recommended treatment within 5 hours, re-inspection within 15 hours, isolation of suspected diseased leaf areas, and reduction of humidity inside the greenhouse and increased ventilation.
[0057] Based on the same inventive concept, such as Figure 4 As shown, the present invention also provides a method for identifying agricultural pests and diseases based on computer vision, the method comprising: Acquire agricultural crop image data and environmental auxiliary data to generate a multi-source crop perception dataset; Image preprocessing and feature enhancement are performed on the multi-source crop perception dataset to generate standardized crop image feature data; The standardized crop image feature data is subjected to lesion region segmentation processing to generate candidate lesion region feature data; Deep convolution feature extraction is performed on the candidate lesion region feature data to generate a visual feature vector of pests and diseases; The visual feature vectors of the pests and diseases are classified and identified to generate pest and disease category labels; The pest and disease category labels are combined with environmental auxiliary data to perform risk assessment processing and generate pest and disease risk levels. Based on the risk level of the pests and diseases, output prevention and control tips are provided.
[0058] All equivalent changes and modifications made in accordance with the teachings of this invention are still within the scope of this invention. Those skilled in the art will readily conceive of other embodiments of this invention upon considering the specification and the disclosure of practical truth. This application is intended to cover any variations, uses, or adaptations of this invention that follow the general principles of this invention and include common knowledge or conventional techniques in the art not described herein.
Claims
1. A computer vision-based agricultural pest and disease identification system, characterized in that, The system includes: The image acquisition module is used to acquire agricultural crop image data and environmental auxiliary data to generate a multi-source crop perception dataset; The preprocessing module is used to perform image preprocessing and feature enhancement on the multi-source crop perception dataset to generate standardized crop image feature data. The segmentation module is used to segment the lesion region of the standardized crop image feature data and generate candidate lesion region feature data. The feature extraction module is used to perform deep convolution feature extraction on the candidate lesion area feature data to generate a visual feature vector of pests and diseases. The classification module is used to classify and identify the visual feature vectors of the pests and diseases, and generate pest and disease category labels. The assessment module is used to perform risk assessment processing on the pest and disease category labels combined with environmental auxiliary data to generate pest and disease risk levels; The output module is used to output prevention and control prompts based on the pest and disease risk level.
2. The agricultural pest and disease identification system based on computer vision according to claim 1, characterized in that, The generated standardized crop image feature data includes: The multi-source crop perception dataset is denoised to generate denoised image feature data; The denoised image feature data is subjected to illumination normalization processing to generate illumination normalized image feature data; The illumination-normalized image feature data is subjected to contrast enhancement processing to generate standardized crop image feature data.
3. The agricultural pest and disease identification system based on computer vision according to claim 1, characterized in that, The generated candidate lesion region feature data includes: The standardized crop image feature data is subjected to multi-scale feature encoding processing to generate a multi-scale encoded feature map; Spatial attention weights are calculated on the multi-scale encoded feature map to generate a lesion attention response map; Based on the lesion attention response map, region threshold segmentation is performed to generate candidate lesion region feature data.
4. The agricultural pest and disease identification system based on computer vision according to claim 1, characterized in that, The generated visual feature vector of pests and diseases includes: The candidate lesion region feature data are subjected to convolutional feature mapping to generate shallow lesion texture features; The shallow lesion texture features are subjected to residual feature enhancement processing to generate deep pest and disease semantic features; The deep semantic features of pests and diseases are subjected to feature fusion processing to generate visual feature vectors of pests and diseases.
5. The agricultural pest and disease identification system based on computer vision according to claim 1, characterized in that, The generated pest and disease category labels include: The visual feature vectors of the pests and diseases are subjected to feature normalization processing to generate standardized feature representations; The standardized feature representation is subjected to fully connected mapping to generate a class probability distribution vector; Based on the category probability distribution vector, the maximum probability determination process is performed to generate pest and disease category labels.
6. The agricultural pest and disease identification system based on computer vision according to claim 1, characterized in that, The generated pest and disease risk levels include: Risk weight mapping is performed on the pest and disease category labels to generate basic risk factors; The environmental impact quantification process is performed on the aforementioned environmental auxiliary data to generate environmental adjustment factors; The risk level of pests and diseases is generated by fusion calculation based on the basic risk factors and the environmental regulation factors.
7. The agricultural pest and disease identification system based on computer vision according to claim 1, characterized in that, The features of outputting prevention and control prompts based on the pest and disease risk level include: The risk levels of the pests and diseases are mapped to generate control strategy parameters. The prevention and control strategy parameters are subjected to rule matching processing to generate prevention and control measure instructions; Based on the aforementioned prevention and control measures, output pest and disease control prompts are provided.
8. The agricultural pest and disease identification system based on computer vision according to claim 3, characterized in that, The spatial attention weight calculation includes: Spatial gradient calculation is performed on the multi-scale encoded feature map to generate a spatially salient feature map; The spatial saliency feature map is normalized to generate an attention weight distribution map; The response intensity of the lesion area is enhanced based on the attention weight distribution map.
9. The agricultural pest and disease identification system based on computer vision according to claim 6, characterized in that, The environmental auxiliary data includes temperature data, humidity data, and light intensity data; the environmental adjustment factor is obtained by weighted fusion calculation of the temperature data, humidity data, and light intensity data.
10. A method for identifying agricultural pests and diseases based on computer vision, characterized in that, The method includes: Acquire agricultural crop image data and environmental auxiliary data to generate a multi-source crop perception dataset; Image preprocessing and feature enhancement are performed on the multi-source crop perception dataset to generate standardized crop image feature data; The standardized crop image feature data is subjected to lesion region segmentation processing to generate candidate lesion region feature data; Deep convolution feature extraction is performed on the candidate lesion region feature data to generate a visual feature vector of pests and diseases; The visual feature vectors of the pests and diseases are classified and identified to generate pest and disease category labels; The pest and disease category labels are combined with environmental auxiliary data to perform risk assessment processing and generate pest and disease risk levels. Based on the risk level of the pests and diseases, output prevention and control tips are provided.