Tea garden pest and disease damage prediction method and system based on big data
By constructing a weighted cost function for the edge of lesions, compensating for illumination in haze scenes, and designing an adaptive feature extraction layer, the problems of noise influence, illumination changes, and feature capture in tea garden pest and disease prediction are solved, achieving highly accurate and reliable pest and disease prediction.
Patent Information
- Application Number
- CN202510902541.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-10
AI Technical Summary
Existing tea garden pest and disease prediction methods are prone to introducing noise, have difficulty retaining the details of the lesion edge, and changes in lighting conditions lead to false alarms or missed alarms. It is difficult to simultaneously capture local lesion details and global environmental characteristics, and is overly sensitive to explosive and weak bud samples, resulting in poor prediction reliability.
A weighted cost function for the edge of the lesion is constructed, anisotropic diffusion kernel and haze scene illumination compensation are introduced to enhance the contrast between lesions and leaf patterns, and multi-scale disease morphology is processed through non-weighted Gaussian iterative filtering; the feature extraction layer design is enhanced, focusing on the key areas of the lesion edge, introducing global/local dual paths and adaptive fusion, and designing an adaptive smooth convergence loss.
It improves the accuracy and reliability of tea garden pest and disease prediction, enhances the ability to identify lesions, reduces the false alarm rate, and improves early warning capabilities.
Smart Images

Figure CN120766024A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pest prediction, in particular to a tea garden pest prediction method and system based on big data. BACKGROUND
[0002] The tea garden pest prediction method usually combines environmental factors, biological characteristics, statistical models and modern technologies to predict the occurrence of pests in advance, so as to take preventive measures in time and ensure the yield and quality of tea. However, the general tea garden pest prediction method has the problems that the background is easy to introduce noise, affecting the recognition of the disease spot; the edge of the disease spot is difficult to retain; different light conditions are easy to cause false alarm or missed alarm; the general tea garden pest prediction method is difficult to capture both local disease spot details and global environmental characteristics; and it is excessively sensitive to explosive high-risk samples and weak bud samples, thereby causing poor prediction reliability. SUMMARY
[0003] In view of the above problems, in order to overcome the defects of the prior art, the present application provides a tea garden pest prediction method and system based on big data, which can overcome the problems of the general tea garden pest prediction method that the background is easy to introduce noise, affecting the recognition of the disease spot; the edge of the disease spot is difficult to retain; different light conditions are easy to cause false alarm or missed alarm. The present application constructs a disease spot edge weighted cost function to enhance the adaptive regularization of the disease spot area; introduces an anisotropic diffusion kernel to make the vein direction smoother and more sufficient, enhance the contrast between the disease spot and the leaf vein, and suppress the false smoothing across the texture; based on the light compensation of the haze scene to improve the contrast between the disease spot and the healthy leaf, dynamic brightness stretching correction is used to avoid weak disease spot too dark or strong light saturation; non-weighted Gaussian iterative filtering is used to capture multi-scale disease morphology; gain factor and gradient variance metric value are used to enhance the disease spot texture without diffusion along the vein; thereby improving the subsequent tea garden pest prediction accuracy; the present application enhances the feature extraction layer design, highlights the key area of the disease spot edge, and pays attention to the feature difference under different plots or different vegetation covers; based on the global / local dual path and adaptive fusion, the global tea garden environment information and the local disease spot details are dynamically balanced; the adaptive smoothing convergence loss is introduced to suppress the abnormal explosion overfitting; the small changes at the initial stage of the disease spot are better captured to improve the early warning ability; thereby improving the prediction reliability.
[0004] The technical scheme adopted by the present application is as follows: the present application provides a tea garden pest prediction method based on big data, which comprises the following steps:
[0005] Step S1: image acquisition;
[0006] Step S2: image preprocessing;
[0007] Step S3: establishing a tea garden pest and disease prediction model;
[0008] Step S4: tea garden pest and disease prediction.
[0009] Further, in step S1, the image collection is to collect historical tea garden image data; the historical tea garden image data is labeled with pest and disease evaluation grades; the historical tea garden image data collected is cropped to a tea canopy layer region, and the cropped image is arranged in the order of land and time to form a historical sequence sample, which is used as an initial tea garden image set.
[0010] Further, in step S2, the image preprocessing is to process the initial tea garden image set to obtain a historical feature map sequence corresponding to the initial tea garden image set, which specifically includes the following contents:
[0011] Step S21: canopy adaptive edge filtering; for the original tea garden image, a canopy adaptive edge filtering process is performed; a local linear model is established by guiding the local window of the image, which is expressed as: ; wherein, is the pixel of the original tea garden image; is the pixel after filtering; and is a linear coefficient, which is obtained by fitting first and then non-local weighted average in the local window of the i-th pixel; a disease spot edge weighted cost function is constructed, which is expressed as: ; wherein, is the value of the guide image at the i-th pixel, and the guide image selects the green light band; is the variance of the pixel neighborhood; is a regularization coefficient; is a local pixel set; i is a pixel index; is a slope parameter in the local window; is an intercept parameter in the local window; an anisotropic diffusion kernel is introduced in the non-local weight, and the optimal coefficient is calculated, which is expressed as: ; a non-local weighted average is performed, which is expressed as: ; ; ; ; ; wherein, is the sample variance of all original tea garden image pixels in the window; T j is the anisotropic diffusion tensor at the pixel position of the j-th pixel position; det(·) is the determinant of the matrix; T is the matrix transpose; is a sampling neighborhood reflectance vector; is the neighborhood covariance of the jth pixel; is the sum of all non-local weights for normalization; is the similarity weight; is the Gaussian kernel based on spatial distance and local structure covariance; and are the two-dimensional spatial coordinates of the ith pixel and the jth pixel in the image respectively; and is the similarity parameter;
[0012] Step S22: haze scene light compensation; in the haze scene, the incident light is divided into direct reflection light J(·) from the leaf surface and air scattering light A(·); take two frames of images with orthogonal polarization as each other, denoted as: ; ; wherein, and are the gray values when the polarization plate angle is perpendicular and parallel at the pixel respectively; is the degree of polarization; in turn, the dehazing processing and haze scene light compensation are performed on the filtered image; the polarization information is introduced into the minimum operation, and the dehazing model is represented as: ; ; wherein, is the dehazing corrected image corresponding to the filtered image, and x is a specific pixel; is the adjustment coefficient; is the transmittance; is the local region set of the pixel, and y is the pixel index of the local region; the weighted cumulative distribution is introduced and the dynamic lower limit is truncated, and the dynamic brightness stretching correction is performed, and the formula used is: ; ; ; ; ; ; ; wherein, is the pixel value of the image after haze scene light compensation; is the maximum pixel value in the image; I is the pixel value of the image before haze scene light compensation; is the dynamically adjusted value; is the reflection histogram after dehazing correction; is the maximum gray level; is the lower limit; is the weighted cumulative distribution function; and are the upper and lower limits of the weighted cumulative distribution respectively; is the correction index; is the original probability density function value; g is a specific gray level, and m is the gray level index; is the maximum gray level; M is the total number of pixels of the image; is the corrected reflection histogram after truncation processing; is the truncation threshold;
[0013] Step S23: Multi-scale decomposition of tea garden image; After the light compensation image of the haze scene, through the non-weighted Gaussian iterative filtering processing, after the iterative decomposition, the large-scale and small-scale spot features are extracted respectively; It is expressed as: ; ; ; ; ; wherein, is the smooth base layer, corresponding to large area yellowing; is the first layer of details, corresponding to medium-sized patches; is the second layer of details, corresponding to tiny insect spots; is the result obtained after the first non-weighted Gaussian iterative filtering of the light compensation image IC of the haze scene; is the non-weighted Gaussian iterative filtering; is the second filtering result; is the reconstructed image;
[0014] Step S24: Spot texture magnification; For the reconstructed image, through the combination of gradient operator and local variance adaptive noise suppression, the formula used is: ; ; ; ; ; wherein, is the square of the four-direction gradient energy, capturing the direction of spot texture; is the kth layer of details; is the gain factor; and are the minimum gain factor and the maximum gain factor respectively; is the gradient variance measurement value; is the gradient comprehensive measurement value; is the local variance measurement value; is the sensitivity coefficient; is the local variance; is the smoothing term; is the kth layer of spot texture magnified image; is the kth layer of detail image;
[0015] Step S25: Feature fusion; For the spot texture magnified image, the amount of information of each layer is measured by entropy, and the fusion weight is adaptively allocated to obtain the final feature map; The formula used is: ; ; where H(·) is the spectral entropy operator, measuring the uncertainty of lesion distribution in the layer; the disease information at different scales is automatically balanced by fusing features; is the final feature map; and are the enlarged images of the spot texture at the 0th layer and the 1st layer, respectively; , and are the detail image fusion weights; is the scale coefficient.
[0016] Further, in step S3, the tea garden pest prediction model is established based on the final feature map of the initial tea garden image set, and the tea garden pest prediction model is established, which specifically includes the following contents:
[0017] Step S31: model structure design; input the historical feature map sequence into the model main body, and the model is divided into four modules, including: main feature extraction, time series modeling, feature pyramid, multi-task prediction head and auxiliary deep supervision; the main feature extraction inputs the historical feature map sequence, and each Stage contains an enhanced feature extraction layer; down-sampling is realized between each Stage through 2x2 max-pooling convolution; and multi-scale frame-level features are output; the time series modeling sends the frame-level feature sequence of all time steps at each scale into the time series network; the same size time series aggregation features are output; the feature pyramid performs 1x1 convolution dimension reduction to the unified channel number on the time series aggregation features; top-down fusion is performed to generate a multi-scale feature map set {P2, P3, P4, P5}; the multi-task prediction head performs global average pooling on the deepest scale P5→double-layer full connection→PReLU→Dropout→outputs the predicted pest evaluation grade probability vector of the future M steps ; Dropout is a regularization technique; the auxiliary deep supervision adds a small classification branch: Conv3x3→GAP→FC→Sigmoid at P3, P4, respectively; GAP is global average pooling; FC is double-layer full connection; the labels of the future M steps are also used to supervise the two branches, which accelerates the feature time series convergence and suppresses the gradient vanishing; wherein, and are the feature maps at the qth layer and the q+1th layer of the feature pyramid, respectively; is a 1x1 convolution; is an up-sampling operation;
[0018] Step S32: enhanced feature extraction layer design; the enhanced feature extraction layer combines: spatial+channel reconstruction convolution; receptive field attention convolution; global / local dual-path CQBlock series and adaptive fusion; multi-scale convolution obtains two features through parallel and , which are represented as: ; ;in, It is the input feature map of the enhanced feature extraction layer; SCConv first uses point-by-point convolution to purify the channel, and then uses small-size spatial convolution to remove redundancy; RFAConv introduces attention weights for each spatial position in the convolution kernel; the two features are spliced in the channel dimension to obtain , expressed as: ; It is a splicing operation; global feature extraction is performed through global maximum pooling, and K CQBlocks are connected in series to output ; CQBlock includes: point-by-point convolution → PReLU → Dropout → BatchNorm, BatchNorm is batch normalization, the overall expression is: ; ; Among them, G is The output of global maximum pooling; local feature extraction directly connects K CQBlocks in series on the original splicing features and outputs , expressed as: Repeatedly expand the global features to the spatial size, concatenate and reduce the dimension through point-by-point convolution PWConv, and then generate the fusion weight W through Sigmoid mapping, which is expressed as: ; ;in, It is a feature map obtained by repeatedly expanding the global features; It is a repeated expansion operation; is a tensor; It is a point-by-point convolution operation; It is a Sigmoid mapping; finally, the two features are dynamically balanced in channels and space according to the weights to obtain an enhanced feature map , expressed as: ;
[0019] Step S33: loss function design; introduce adaptive smooth convergence loss, record the true pest and disease incidence rate of the u-th sample as , the model predicts , define the error ; The adaptive smooth convergence loss L is expressed as: ; The loss gradient is expressed as: ; Where N is the number of samples; is the gradient characteristic parameter; ; and are the lower and upper bounds of the parameter respectively; is the steepness parameter; is the error threshold.
[0020] Further, in step S4, the tea garden pest prediction is real-time collection of tea garden image data, after cutting, input into the tea garden pest prediction model, and the pest evaluation level of the future step output by the model is taken as the tea garden pest prediction result.
[0021] The application provides a tea garden pest prediction system based on big data, which comprises an image collection module, an image preprocessing module, a tea garden pest prediction model establishment module and a tea garden pest prediction module.
[0022] The image collection module collects historical tea garden image data and constructs an initial tea garden image set.
[0023] The image preprocessing module applies crown layer adaptive edge filtering, haze scene light compensation, multi-scale Gaussian iterative decomposition, spot texture enlargement and entropy weight feature fusion to the initial tea crown layer image sequence in sequence to generate a historical feature map sequence.
[0024] The tea garden pest prediction model establishment module inputs the historical feature map sequence into a multi-module network structure comprising an enhanced feature extraction layer, a time sequence aggregation module, a feature pyramid fusion, a multi-task prediction head and auxiliary deep supervision, and constructs a pest prediction model.
[0025] The tea garden pest prediction module performs tea garden pest prediction on the real-time collected tea garden image based on the pest prediction model.
[0026] The application has the following beneficial effects by adopting the above scheme:
[0027] (1) The scheme can solve the problems of general tea garden pest prediction methods, such as that the background is easy to introduce noise, affecting the recognition of the disease spot; the edge of the disease spot is difficult to retain; and false positives or false negatives are easy to occur under different light conditions. The scheme can construct a disease spot edge weighted cost function, enhance the adaptive regularization of the disease spot region, introduce an anisotropic diffusion kernel, make the vein direction smooth more fully, enhance the contrast between the disease spot and the leaf vein, suppress the false smoothness across the texture, improve the contrast between the disease spot and the healthy leaf based on haze scene light compensation, dynamically stretch the brightness to avoid weak disease spots being too dark or strong light saturation, capture multi-scale disease morphology through non-weighted Gaussian iterative filtering processing, enhance the disease spot texture without diffusion along the vein through a gain factor and a gradient variance measurement value, and further improve the subsequent tea garden pest prediction accuracy.
[0028] (2) For the general tea garden pest prediction method, it is difficult to capture the local lesion details and global environmental characteristics at the same time; for the explosive high-risk samples and weak bud samples, it is over-sensitive, and then leads to poor prediction reliability. The scheme highlights the key area of lesion edge by enhancing the feature extraction layer design and paying attention to the feature difference under different plots or different vegetation cover. Based on the global / local dual path and adaptive fusion, the global tea garden environment information and the local lesion details are dynamically balanced. The adaptive smoothing convergence loss is introduced to suppress the abnormal explosion overfitting. The small changes at the early stage of lesion are better captured, the early warning ability is improved, and the prediction reliability is improved. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 The flowchart of the tea garden pest prediction method based on big data provided by the present application is shown in the figure.
[0030] Figure 2 The schematic diagram of the tea garden pest prediction system based on big data provided by the present application is shown in the figure.
[0031] Figure 3 The flowchart of step S2 is shown in the figure.
[0032] The accompanying drawings are used to provide a further understanding of the present application, and constitute a part of the specification, together with the embodiments of the present application, to explain the present application, and do not constitute a limitation on the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. 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.
[0034] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "top", "bottom", "in", "out" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the systems or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore it cannot be understood as a limitation on the present application.
[0035] Embodiment one, refer to Figure 1 The tea garden pest prediction method based on big data provided by the present application comprises the following steps:
[0036] Step S1: image acquisition; collect historical tea garden image data, and construct an initial tea garden image set;
[0037] Step S2: image preprocessing; applying crown layer adaptive edge filtering, haze scene light compensation, multi-scale Gaussian iterative decomposition, spot texture enlargement and entropy weight feature fusion on the initial tea crown layer image sequence in turn to generate a historical feature map sequence;
[0038] Step S3: establishing a tea garden pest and disease prediction model; the historical feature map sequence is input into a multi-module network structure containing an enhanced feature extraction layer, a time series aggregation module, a feature pyramid fusion, a multi-task prediction head and auxiliary deep supervision to construct a pest and disease prediction model;
[0039] Step S4: tea garden pest and disease prediction; based on the pest and disease prediction model, the tea garden images collected in real time are predicted for tea garden pest and disease.
[0040] Example two, see Figure 1 This example is based on the above example, in step S1, the image collection is to collect historical tea garden image data; the historical tea garden image data is collected at fixed time intervals; the historical tea garden image data is labeled with pest and disease evaluation grades; the pest and disease evaluation grades include normal, mild, moderate and severe; the tea crown layer region is cropped from the collected historical tea garden image data, and the cropped images are arranged in the order of land and time to form a historical sequence sample as an initial tea garden image set.
[0041] Example three, see Figure 1 and Figure 3 This example is based on the above example, in step S2, the image preprocessing is to process the initial tea garden image set to obtain the historical feature map sequence corresponding to the initial tea garden image set, which specifically includes the following contents:
[0042] Step S21: crown layer adaptive edge filtering; the sky reflection, shade and dry soil, and weed ground background in the tea garden are easy to introduce noise, and the edge of the disease spot of the tea red spider mite damage spot and the tea green leafhopper sucking spot is fine, so the crown layer adaptive edge filtering is used to weakly smooth the edge of the disease spot and strongly smooth the background area, taking into account the global similarity of similar crown layer and orchard distance; for the original tea garden image, the crown layer adaptive edge filtering is performed; a local linear model is established, and the local window of the guide image is used to ensure the smoothing effect of edge protection, which is expressed as: ; wherein, is the pixel of the original tea garden image; is the pixel after filtering; and are linear coefficients, which are obtained by fitting in the local window of the i-th pixel and then by non-local weighted average; a disease spot edge weighted cost function is constructed, which is expressed as: ; wherein, is the value of the guided image at the i-th pixel, the guided image is selected in the green light band; is the variance of the pixel neighborhood, as an edge weight, for enhancing the adaptive regularization in the lesion area; is the regularization coefficient; is the local pixel set; i is the pixel index; is the slope parameter within the local window, for the lesion edge, the value is high, retaining more details, for the flat background, the value is low, enhancing the smoothness; is the intercept parameter within the local window; introduce anisotropic diffusion kernel in the non-local weight , so that the vein direction is more fully smoothed, the lesion and vein contrast is enhanced, the false smoothness across the texture is suppressed, and the false detection is reduced; the optimal coefficient is calculated, expressed as: ; the non-local weighted average is performed, expressed as: ; ; ; ; ; wherein, is the sample variance of all original tea garden image pixels within the window; T j is the anisotropic diffusion tensor at the pixel position at the j-th pixel position, used to control the smoothing strength and directionality in different directions when filtering, , and are two eigenvalues of the tensor; and are the unit eigenvectors corresponding to the eigenvalues; h1 and h2 are the decay bandwidth parameters and spatial distance bandwidths, respectively; det(·) is the matrix determinant; T is the matrix transpose; is the sampling neighborhood reflectance vector; is the neighborhood covariance of the j-th pixel, which ensures that the filtering kernel adapts to the direction of the leaf structure; is the sum of all non-local weights, used for normalization; is the similarity weight; is the Gaussian kernel based on spatial distance and local structure covariance; and are the two-dimensional spatial coordinates of the i-th pixel and the j-th pixel in the image, respectively; and are the similarity parameters; the lesion edge is retained clearly, and the background and vein noise are adaptively smoothed; the whole garden similar canopy reflectance is fused, and the uneven sunlight and shadow effect are suppressed;
[0043] Step S22: haze scene light compensation; in the haze scene, the incident light can be divided into direct reflection light J(·) from the leaf surface and air scattering light A(·); two frames of images with orthogonal polarization are taken, denoted as: ; ; wherein, and are the gray values when the polarizer angle is perpendicular and parallel at the pixel, respectively; is the polarization degree; the dehazing processing and the haze scene light compensation are sequentially performed on the filtered image; the polarization information is introduced into the minimum operation, and the dehazing model is represented as: ; ; wherein, is the dehazing corrected image corresponding to the filtered image, and x is a specific pixel; is an adjustment coefficient; is the transmittance; is a local region set of the pixel, and y is a pixel index of the local region; because the canopy reflection histogram distribution of different varieties and different growth periods in the tea garden is greatly different, the fixed easily leads to dark weak disease spots or strong light saturation; the weighted cumulative distribution and dynamic lower limit cutoff are introduced to perform dynamic brightness stretching correction, so that the intermediate reflection value corresponding to the disease spot gray scale is moderately stretched; the formula used is: ; ; ; ; ; ; ; wherein, is the pixel value of the image after haze scene light compensation; is the maximum pixel value in the image; I is the pixel value of the image before haze scene light compensation, and is also the pixel value of the image after dehazing correction; is the dynamically adjusted value; is the reflection histogram after dehazing correction; is the maximum gray level; is the lower limit; is the weighted cumulative distribution function; and are the upper limit and the lower limit of the weighted cumulative distribution, respectively; is the correction index; is the original probability density function value; g is a specific gray level, and m is a gray level index; is the maximum gray level; M is the total number of pixels of the image; is the corrected reflection histogram after the truncation processing; is the truncation threshold;
[0044] Contrast adaptive optimization between disease spots and healthy leaves under different light conditions; reduce false positives in shadow areas and avoid leaf surface highlight saturation;
[0045] Step S23: Multi-scale decomposition of tea garden images; Tea garden disease spots have large-scale leaf yellowing and insect bite point small dot damage caused by pathogen infection; Therefore, after processing the image compensated for light in the haze scene, through non-weighted Gaussian iterative filtering, after iterative decomposition, large-scale and small-scale disease spot features are extracted respectively; Denoted as: is a smooth base layer, corresponding to large-area yellowing; is the first layer of details, corresponding to medium-sized spots; is the second layer of details, corresponding to tiny insect spots; Multi-scale disease morphology is captured by layering, without pre-setting spot size; is the result obtained after the first non-weighted Gaussian iterative filtering of the image IC after light compensation in the haze scene; is non-weighted Gaussian iterative filtering; is the second filtering result; is the reconstructed image;
[0046] Step S24: Spot texture enlargement; Early disease spots often show weak gray texture changes, and background leaf veins and light spot noise interference are large; For the reconstructed image, weak disease signs are enlarged by combining gradient operators and local variance adaptive noise suppression; The formula used is: is the square of the four-direction gradient energy, capturing the direction of disease spot texture; is the kth layer of details; is the gain factor; and are the minimum and maximum gain factors, respectively; is the gradient variance measurement value; is the gradient comprehensive measurement value; is the local variance measurement value; is the sensitivity coefficient; is the local variance; is the smoothing term; is the kth layer of spot texture enlarged image; is the kth layer of detail image; is the kth layer of detail image takes the average value; Disease spot texture is enhanced without spreading along the leaf veins; Adaptive suppression of leaf surface high-frequency noise reduces false detection;
[0047] Step S25: Feature fusion; large patches and micro-spots contribute differently to prediction: large areas of yellowing indicate severe disease, while small spots indicate early infection; for the image after the spot texture is magnified, entropy is used to measure the amount of information in each layer, and fusion weights are adaptively assigned to obtain the final feature map; the formula used is: ; ; Where H(·) is the spectral entropy operator, which measures the uncertainty of the distribution of lesions in the layer; the fusion feature automatically balances the disease information of different scales; is the final feature map; and These are the magnified images of the spot textures at layer 0 and layer 1 respectively; 、 and is the detail image fusion weight; is the scale factor.
[0048] By performing the above operations, in order to address the problems of general tea garden pest and disease prediction methods, such as the background easily introduces noise, affecting the identification of lesions; the edges of lesions are subtle and difficult to retain; and false alarms or missed alarms are easily caused under different lighting conditions, this scheme enhances the adaptive regularization of the lesion area by constructing a weighted cost function for the lesion edge; introduces an anisotropic diffusion kernel to make the vein direction smoother, enhance the contrast between lesions and leaf textures, and suppress false smoothing across textures; improves the contrast between lesions and healthy leaves based on haze scene lighting compensation, and performs dynamic brightness stretching correction to avoid weak lesions being too dark or saturated by strong light; captures multi-scale disease morphology through non-weighted Gaussian iterative filtering; enhances the lesion texture without spreading along the veins through gain factor and gradient variance measurement value, thereby improving the accuracy of subsequent tea garden pest and disease prediction.
[0049] Example 4, see Figure 1 This embodiment is based on the above embodiment. In step S3, a tea garden pest and disease prediction model is established based on the final feature map of the initial tea garden image set. The tea garden pest and disease prediction model is established, specifically including the following contents:
[0050] Step S31: Model structure design; input the historical feature map sequence into the model body. The model is divided into four major modules, including: backbone feature extraction, time series modeling, feature pyramid, multi-task prediction head and auxiliary deep supervision; backbone feature extraction inputs the historical feature map sequence, and each stage contains an enhanced feature extraction layer; downsampling is achieved between each stage through 2×2 maximum pooling convolution; and multi-scale frame-level features are output; for each scale, the frame-level feature sequence of all time steps is fed into the time series network; time series aggregation features of the same size are output; the feature pyramid performs 1×1 convolution on the time series aggregation features to reduce the dimension to a uniform number of channels; top-down fusion is performed, expressed as: ; each Refined by 3x3 convolution again to suppress fusion artifacts; generate multi-scale feature map set {P2, P3, P4, P5}; multi-task prediction head does global average pooling on the deepest scale P5→double-layer fully connected→PReLU→Dropout→output prediction disease and pest assessment level probability vector of future M steps ; Dropout is a regularization technique; auxiliary deep supervision adds a small classification branch at P3, P4 respectively: Conv3x3→GAP→FC→Sigmoid, GAP is global average pooling; FC is double-layer fully connected; the labels of the future Mth step are also supervised to these two branches to accelerate feature temporal convergence and suppress gradient vanishing; wherein, and are the feature maps of the qth and q+1th layers of the feature pyramid respectively; is a 1x1 convolution; is an up-sampling operation;
[0051] Step S32: Enhance feature extraction layer design; In tea garden disease and pest prediction, the commonly used convolutional neural network is difficult to balance local details and global environmental information at the same time, and is prone to spatial / channel redundancy; The enhanced feature extraction layer designed in this scheme combines: spatial+channel reconstruction convolution, which is used to de-redundancy and strengthen key channels and positions; receptive field attention convolution, which assigns learnable weights to different spatial positions; global / local dual-path CQBlock series and adaptive fusion, which dynamically balances global environmental features and local lesion details; multi-scale convolution obtains two features and , respectively, as follows: ; ; wherein, is the input feature map of the enhanced feature extraction layer; SCConv first purifies the channel with pointwise convolution, and then de-redundancy with small size spatial convolution, focusing on de-redundancy and extracting the most key spectral and meteorological responses of each region in the field; RFAConv introduces attention weights to each spatial position in the convolution kernel, highlighting the key areas of lesion edges and paying attention to feature differences under different plots or different vegetation covers, ensuring that the convolution kernel is no longer blindly shared; The two features are concatenated in the channel dimension to obtain , which is expressed as: ; is a concatenation operation; global feature extraction is performed through global max pooling, and K CQBlocks are connected in series to output ; CQBlock includes: pointwise convolution→PReLU→Dropout→BatchNorm, BatchNorm is batch normalization, which is expressed as: ; ; wherein, G is The output of the global max pooling; the local feature extraction directly concatenates K CQBlocks to the original spliced feature string, and outputs , which is expressed as: ; the global feature is repeatedly expanded to the spatial size, concatenated and reduced in dimension by point-wise convolution PWConv, and then the fusion weight W is generated by Sigmoid mapping, which is expressed as: ; ; wherein, is the feature map obtained by repeatedly expanding the global feature; is the repeated expansion operation; is a tensor; is a point-wise convolution operation; is a Sigmoid mapping; finally, the enhanced feature map is obtained by dynamically balancing the two features in the channel and space according to the weight, which is expressed as: ; not only in the local / global two dimensions to excavate multi-scale features, but also through Sigmoid weight mapping to realize controllable fusion, which is significantly better than the existing single path or fixed fusion strategy; the obtained not only retains the local lesion details, but also integrates the global tea garden environment information; unlike single path or fixed fusion, the scheme design captures multi-dimensional and controllable redundant features through SCConv+RFAConv, and then accurately schedules the global / local attention degree by means of adaptive fusion weight;
[0052] Step S33: loss function design; in tea garden pest prediction, pest data often presents two extreme scenarios: explosive high-risk samples, triggered by heavy rainfall, sudden changes in temperature and humidity, etc. Pest outbreak; weak bud samples, disease spots appear, small-scale infection in the hidden period, weak signal; the traditional mean square error is too sensitive to extreme outbreak samples, which will cause the model to overfit abnormal values; the average absolute error is not derivable at zero error, which is difficult to ensure the stability of training; therefore, an adaptive smooth convergence loss is introduced, denoted as the true pest occurrence rate of the u-th sample , the model prediction is , and the error is defined as ; the adaptive smooth convergence loss L is expressed as: ; the loss gradient is expressed as: ; wherein, N is the number of samples; is the gradient characteristic parameter, which gives a larger gradient to small errors and suppresses large errors; ; and are the lower and upper bounds of the parameter, respectively; is the steepness parameter; is the error threshold; when Corresponding to the prediction error of large-scale outbreak, the molecular denominator is the same order of exponential growth, and the upper limit of the gradient is constrained and will not explode; when Corresponding to the small error at the initial appearance of the lesion, the gradient approaches 0, and has a smooth convergence characteristic; the adjustable smooth loss suppresses abnormal outbreak overfitting, focuses on the fine lesion features, and improves the early warning capability.
[0053] By performing the above operation, for the general tea garden pest prediction method, it is difficult to capture both local lesion details and global environmental features; for explosive high-risk samples and weak bud samples, it is overly sensitive, which further leads to poor prediction reliability. The scheme enhances the feature extraction layer design, highlights the key area of the lesion edge, and pays attention to the feature difference under different plots or different vegetation covers; based on the global / local dual path and adaptive fusion, the global tea garden environment information and the local lesion details are dynamically balanced; the adaptive smooth convergence loss is introduced to suppress abnormal outbreak overfitting; the small changes at the initial appearance of the lesion are better captured, and the early warning capability is improved; and the prediction reliability is further improved.
[0054] Embodiment five, refer to Figure 1 The embodiment is based on the above-mentioned embodiment. In step S4, the tea garden pest prediction is to collect tea garden image data in real time, input the cropped image data into the tea garden pest prediction model, take the pest evaluation level of the future step output by the model as the tea garden pest prediction result, and warn the management personnel if the pest evaluation level of the future step is moderate or severe.
[0055] Embodiment six, refer to Figure 2 The embodiment is based on the above-mentioned embodiment. The tea garden pest prediction system based on big data provided by the application comprises an image acquisition module, an image preprocessing module, a tea garden pest prediction model establishment module, and a tea garden pest prediction module.
[0056] The image acquisition module acquires historical tea garden image data and constructs an initial tea garden image set.
[0057] The image preprocessing module applies crown layer adaptive edge filtering, haze scene light compensation, multi-scale Gaussian iterative decomposition, spot texture enlargement, and entropy weight feature fusion to the initial tea crown layer image sequence in sequence to generate a historical feature map sequence.
[0058] The tea garden pest prediction model establishment module inputs the historical feature map sequence into a multi-module network structure comprising an enhanced feature extraction layer, a time series aggregation module, a feature pyramid fusion, a multi-task prediction head, and auxiliary deep supervision, and constructs a pest prediction model.
[0059] The tea garden pest prediction module performs tea garden pest prediction on the real-time collected tea garden image based on the pest prediction model.
[0060] It is to be understood that the terminology used herein such as first and second, and the like, is only used to distinguish one entity or action from another entity or action, and does not necessarily require or imply any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0061] While the embodiments of the application have been illustrated and described, it will be understood by those skilled in the art that various changes, modifications, substitutions, and alterations can be made therein without departing from the spirit and scope of the application.
[0062] The above description of the application and its embodiments is not restrictive, and the embodiments shown in the drawings are only one of the embodiments of the application, and the actual structure is not limited thereto. In general, if a person skilled in the art is inspired by it, without departing from the purpose of the application, without creative design, similar structure and embodiments of the technical solution can be designed, which should belong to the protection scope of the application.
Claims
1. A tea garden pest and disease prediction method based on big data, characterized by: The method comprises the following steps: Step S1: Image acquisition: Collect historical tea garden image data and construct an initial tea garden image set; Step S2: Image preprocessing: applying canopy adaptive edge filtering, haze scene illumination compensation, multi-scale Gaussian iterative decomposition, speckle texture amplification, and entropy weight feature fusion to the initial tea canopy image sequence in sequence to generate a historical feature map sequence; Step S3: Establishing a tea garden pest and disease prediction model; the historical feature graph sequence is input into a multi-module network structure including an enhanced feature extraction layer, a time series aggregation module, a feature pyramid fusion, a multi-task prediction head, and auxiliary deep supervision to construct a pest and disease prediction model; Step S4: predicting tea garden pests and diseases; predicting tea garden pests and diseases based on the real-time collected tea garden images based on the pest and disease prediction model.
2. The tea garden pest and disease prediction method based on big data according to claim 1, characterized in that: In step S2, the image preprocessing is to process the initial tea garden image set to obtain a historical feature map sequence corresponding to the initial tea garden image set, which specifically includes the following contents: Step S21: canopy adaptive edge filtering; for the original tea garden image, perform canopy adaptive edge filtering; establish a local linear model, and guide the local window of the image, which is expressed as: ;in, is the original tea garden image pixel; is the filtered pixel; and is the linear coefficient, which is obtained by fitting the local window where the i-th pixel is located and then performing non-local weighted averaging; constructing the weighted cost function of the lesion edge , expressed as: ;in, is the value of the guide image at the i-th pixel, and the guide image selects the green light band; is the variance of the pixel neighborhood; is the regularization coefficient; is a local pixel set; i is a pixel index; is the slope parameter within the local window; is the intercept parameter within the local window; anisotropic diffusion kernel is introduced in the non-local weight , calculate the optimal coefficient, expressed as: ; Perform non-local weighted averaging, expressed as: ; ; ; ; ;in, is the sample variance of all original tea garden image pixels within the window; T j is the anisotropic diffusion tensor at the pixel position j; det(·) is the matrix determinant; T is the matrix transpose; is the sampled neighborhood reflectivity vector; is the neighborhood covariance of the j-th pixel; is the sum of all non-local weights, used for normalization; is the similarity weight; It is a Gaussian kernel based on spatial distance and local structure covariance; and are the two-dimensional spatial coordinates of the i-th pixel and the j-th pixel in the image respectively; and is the similarity parameter; Step S22: Compensate for illumination in a hazy scene. In a hazy scene, the incident light is divided into the direct reflected light J(·) from the leaf surface and the air scattered light A(·). Take two frames of orthogonal polarization images, expressed as: ; ;in, and are the grayscale values when the polarizer angles at the pixel are vertical and parallel, respectively; is the degree of polarization; dehazing and haze scene illumination compensation are performed on the filtered image in turn; the polarization information is incorporated into the minimum operation, and the dehazing model is expressed as: ; ;in, is the dehazed image, corresponding to the filtered image, and x is a specific pixel; is the adjustment coefficient; is the transmittance; is a set of local pixel regions, and y is the pixel index of the local region. The weighted cumulative distribution is introduced and the dynamic lower limit is truncated to perform dynamic brightness stretch correction. The formula used is: ; ; ; ; ; ; ;in, is the image pixel value after illumination compensation of the haze scene; is the maximum pixel value in the image; I is the image pixel value before illumination compensation for the haze scene; It is dynamically adjusted value; is the reflection histogram after dehazing correction; is the maximum gray level; yes lower limit; is the weighted cumulative distribution function; and are the upper and lower bounds of the weighted cumulative distribution, respectively; is the correction index; is the original probability density function value; g is the specific gray level, and m is the gray level index; is the maximum gray level; M is the total number of pixels in the image; is the corrected reflection histogram after truncation; is the cutoff threshold; Step S23: multi-scale decomposition of the tea garden image; Step S24: amplifying the spot texture; Step S25: Feature fusion.
3. The method for predicting tea garden pests and diseases based on big data according to claim 2, characterized in that: In step S2, the multi-scale decomposition of the tea garden image is to process the image after the haze scene illumination compensation through non-weighted Gaussian iterative filtering. After iterative decomposition, the large-scale and small-scale lesion features are extracted respectively; it is expressed as: ; ; ; ; ;in, It is a smooth basal layer, corresponding to a large area of yellowing; It is the first level of detail, corresponding to medium patches; It is the second layer of details, corresponding to tiny insect spots; It is the result obtained by performing the initial non-weighted Gaussian iterative filtering on the image IC after illumination compensation of the haze scene; It is a non-weighted Gaussian iterative filter; is the secondary filtering result; is the reconstructed image.
4. The method for predicting tea garden pests and diseases based on big data according to claim 1, characterized in that: In step S2, the speckle texture amplification is to suppress noise of the reconstructed image by combining the gradient operator with the local variance adaptive noise. The formula used is: ; ; ; ; ;in, is the square of the four-directional gradient energy, capturing the texture direction of the lesion; is the kth level of detail; is the gain factor; and are the minimum gain factor and the maximum gain factor respectively; is the gradient variance measure; is the gradient comprehensive measure; is the local variance measure; is the sensitivity coefficient; is the local variance; is a smoothing term; is the image after the k-th layer of spot texture is magnified; is the k-th layer detail image.
5. The method for predicting tea garden pests and diseases based on big data according to claim 4, characterized in that: In step S2, the feature fusion is to measure the amount of information of each layer for the image after the spot texture is magnified, and adaptively assign fusion weights to obtain the final feature map; the formula used is: ; ; Where H(·) is the spectral entropy operator, which measures the uncertainty of the distribution of lesions in the layer; the fusion feature automatically balances the disease information of different scales; is the final feature map; and These are the magnified images of the spot textures at layer 0 and layer 1 respectively; 、 and is the detail image fusion weight; is the scale factor.
6. The method for predicting tea garden pests and diseases based on big data according to claim 5, characterized in that: In step S3, the tea garden pest and disease prediction model is established based on the final feature map of the initial tea garden image set, and the tea garden pest and disease prediction model is established, which specifically includes the following contents: Step S31: Model structure design; input the historical feature map sequence into the model body, and the model is divided into four major modules, including: backbone feature extraction, time series modeling, feature pyramid, multi-task prediction head and auxiliary deep supervision; backbone feature extraction inputs the historical feature map sequence, and each stage contains an enhanced feature extraction layer; downsampling is achieved between each stage through 2×2 maximum pooling convolution; and multi-scale frame-level features are output; for each scale, the frame-level feature sequence of all time steps is sent into the time series network; time series aggregation features of the same size are output; feature pyramid performs 1×1 convolution on the time series aggregation features to reduce the dimension to a uniform number of channels; top-down fusion is performed to generate a multi-scale feature map set {P2, P3, P4, P5}; the multi-task prediction head performs global average pooling on the deepest scale P5 → double-layer full connection → PReLU → Dropout → outputs the predicted pest and disease assessment level probability vector for the next M steps Dropout is a regularization technique. Auxiliary deep supervision adds a small classification branch to P3 and P4 respectively: Conv3×3→GAP→FC→Sigmoid, GAP is global average pooling; FC is a double-layer full connection; the labels of the future Mth step are also used to supervise these two branches to accelerate the convergence of feature timing and suppress gradient disappearance. Among them, and They are the feature maps of the qth and q+1th layers of the feature pyramid respectively; It is a 1×1 convolution; is an upsampling operation; Step S32: Enhanced feature extraction layer design; Step S33: loss function design.
7. The method for predicting tea garden pests and diseases based on big data according to claim 6, characterized in that: In step S3, the enhanced feature extraction layer design is to enhance the feature extraction layer combination: spatial + channel reconstruction convolution; receptive field attention convolution; global / local dual path CQBlock series and adaptive fusion; multi-scale convolution to obtain two-way features in parallel and , respectively expressed as: ; ;in, It is the input feature map of the enhanced feature extraction layer; SCConv first uses point-by-point convolution to purify the channel, and then uses small-size spatial convolution to remove redundancy; RFAConv introduces attention weights for each spatial position in the convolution kernel; the two features are spliced in the channel dimension to obtain , expressed as: ; It is a splicing operation; global feature extraction is performed through global maximum pooling, and K CQBlocks are connected in series to output ; CQBlock includes: point-by-point convolution → PReLU → Dropout → BatchNorm, BatchNorm is batch normalization, the overall expression is: ; ; Among them, G is The output of global maximum pooling; local feature extraction directly connects K CQBlocks in series on the original splicing features and outputs , expressed as: Repeatedly expand the global features to the spatial size, concatenate and reduce the dimension through point-by-point convolution PWConv, and then generate the fusion weight W through Sigmoid mapping, which is expressed as: ; ;in, It is a feature map obtained by repeatedly expanding the global features; It is a repeated expansion operation; is a tensor; It is a point-by-point convolution operation; It is a Sigmoid mapping; finally, the two features are dynamically balanced in channels and space according to the weights to obtain an enhanced feature map , expressed as: .
8. The method for predicting tea garden pests and diseases based on big data according to claim 7, characterized in that: In step S3, the loss function is designed by introducing an adaptive smooth convergence loss, and the real pest and disease incidence rate of the u-th sample is recorded as , the model predicts , define the error ; The adaptive smooth convergence loss L is expressed as: ; The loss gradient is expressed as: ; Where N is the number of samples; is the gradient characteristic parameter; ; and are the lower and upper bounds of the parameter respectively; is the steepness parameter; is the error threshold.
9. The method for predicting tea garden pests and diseases based on big data according to claim 8, characterized in that: In step S1, the image acquisition includes collecting historical tea garden image data; marking the historical tea garden image data with pest and disease assessment levels; cropping the collected historical tea garden image data to obtain the tea canopy area, and arranging the cropped images in order of plots and time to form a historical sequence sample as an initial tea garden image set; In step S4, the tea garden pest and disease prediction is to collect tea garden image data in real time, crop it and input it into the tea garden pest and disease prediction model, and use the pest and disease assessment level of the future step output by the model as the tea garden pest and disease prediction result.
10. A tea garden pest and disease prediction system based on big data, used to implement the tea garden pest and disease prediction method based on big data as described in any one of claims 1 to 9, characterized in that: It includes image acquisition module, image preprocessing module, tea garden pest and disease prediction model establishment module and tea garden pest and disease prediction module; The image acquisition module collects historical tea garden image data to construct an initial tea garden image set; The image preprocessing module sequentially applies canopy adaptive edge filtering, haze scene illumination compensation, multi-scale Gaussian iterative decomposition, speckle texture amplification, and entropy weight feature fusion to the initial tea canopy image sequence to generate a historical feature map sequence; The tea garden pest and disease prediction model building module inputs the historical feature map sequence into a multi-module network structure including an enhanced feature extraction layer, a time series aggregation module, a feature pyramid fusion, a multi-task prediction head and auxiliary deep supervision to build a pest and disease prediction model; The tea garden pest and disease prediction module predicts tea garden pests and diseases based on the tea garden images collected in real time based on the pest and disease prediction model.