Rice disease and pest identification method based on encoder and decoder
Through the decoder encoder model equipped with a hyperspectral camera and deep learning algorithm, the problem of time-consuming and low accuracy of traditional rice pest recognition is solved, and fast and accurate pest recognition is achieved, reducing the use of chemical pesticides. Protect the ecological environment.
Patent Information
- Application Number
- CN202411107525.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional rice pest identification methods are time-consuming and labor-intensive and have low accuracy, making it difficult to meet the rapid and accurate needs of modern agriculture.
Using an encoder decoder-based method, a drone is equipped with a hyperspectral camera to capture the spectral images of rice leaves, a sample data set is established, and a decoder encoder model of a deep learning algorithm is used to extract feature information from the image for automatic identification.
It has achieved rapid, accurate and real-time identification of rice pests and diseases, reduced the use of chemical pesticides, protected the ecological environment, and improved the efficiency of pest monitoring.
Smart Images

Figure CN119131460A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of rice pest and disease identification, in particular to a rice pest and disease identification method based on an encoder-decoder. Background Art
[0002] Identification of rice pests and diseases has always been a difficult problem in the agricultural field. Traditional manual identification methods are not only time-consuming and labor-intensive, but also have low accuracy, making it difficult to meet the rapid and precise needs of modern agriculture. With the development of drone technology and hyperspectral imaging technology, a rice pest and disease identification method based on an encoder-decoder combined with a deep learning algorithm has emerged, providing a new technical approach for the automatic identification and precise prevention and control of rice pests and diseases.
[0003] Hyperspectral imaging technology is a technology that can simultaneously obtain spectral information of an object at hundreds of wavelengths, and can extract rich feature information from spectral images. This feature information is of great significance for the identification of pests and diseases, because different pests and diseases have different spectral characteristics. By analyzing this feature information, automatic identification of pests and diseases can be achieved.
[0004] Deep learning algorithms, especially decoder-encoder models, can extract rich feature information from spectral images and accurately classify them through deep learning models to achieve automatic identification of pests and diseases. The decoder-encoder model is a common deep learning model consisting of two parts: an encoder and a decoder. The encoder is responsible for extracting features from the input image to form a fixed-length feature vector as the image encoding; the decoder is responsible for mapping the feature vector to a specific rice pest and disease category. In this way, the decoder-encoder model can convert the original image data into a feature representation that can be used for classification, thereby achieving automatic identification of pests and diseases. Summary of the invention
[0005] To solve the above problems, the present invention proposes a rice pest and disease identification method based on encoder-decoder, which has the advantages of high efficiency, accuracy, real-time, non-destructiveness, scalability, reduced use of chemical pesticides, cost savings and data accumulation. It can quickly cover a large area of farmland, collect a large amount of data, and greatly improve the efficiency of pest and disease monitoring. The specific steps are as follows, characterized in that:
[0006] Step 1: Use the hyperspectral camera carried by the drone to capture the spectral images of rice leaves in the field, and establish a sample data set of rice diseases and insect pests. The specific data set sample labels are: healthy rice, rice blast, rice planthopper, rice leaf roller, rice sheath blight, rice white leaf blight, rice leafhopper, rice locust, rice stalk fly, rice leaf tip blight, rice smut, rice leaf mold, rice leaf sheath rot, rice root knot nematode disease, and rice seedling disease syndrome, a total of 15 types of label data;
[0007] Step 2: Standardize, scale, and crop the input rice leaf image to meet the size requirements of the network input layer;
[0008] Step 3, establish an encoder network for rice pests and diseases, extract features from the input image, and form a fixed-length feature vector as image encoding;
[0009] Step 4, establish a decoder network for rice pests and diseases, and map the feature vector to a specific rice pest and disease category through the decoder;
[0010] Step 5: Deploy the trained decoder-encoder model into practical applications for real-time identification of rice pests and diseases.
[0011] Furthermore, the process of normalizing, scaling, cropping, etc. the input rice leaf image in step 2 can be expressed as:
[0012] Step 2.1, image normalization
[0013] In order to make the pixel values of the image have the same distribution, the pixel values of the original image are scaled to the range of [-1,1], the formula is as follows:
[0014]
[0015] Where I is the original image, μ is the mean value of the pixel value, σ is the standard deviation of the pixel value, and x and y are the corresponding coordinates of the original image;
[0016] Step 2.2, Image Scaling
[0017] All input images are resized to the fixed size required by the network. The size of the image taken by the drone is H×W, and the target size of the encoder input layer is H'×W'. The image scaling formula is as follows:
[0018]
[0019] In the formula, I normalized is the original image, I resized is the scaled image, x 2 and 2 is the coordinate of the image scaling target image, x 1 and 1 are the coordinates of the image after normalization;
[0020] Step 2.3, Cutting and Cropping
[0021] In order to extract the region of interest from the image, a central region H is cropped from the image. c ×W c , the formulas for shearing and cropping images are as follows:
[0022] I cropped (x 3 ,y 3 )=I resized (x c +x 2 ,y c +y 2 )
[0023] In the formula, and is the center coordinate of the clipping area, x 3 and 3 are the coordinates of the image label shear and crop target image.
[0024] Furthermore, the process of establishing the encoder network for rice pests and diseases in step 3 can be expressed as follows:
[0025] Step 3.1, establish multiple convolutional layer networks, each convolutional layer extracts image features through a series of convolution operations, and the convolution operation can be expressed as:
[0026]
[0027] f k (x 3 ,y 3 ) is the kth convolutional layer at position (x 3 ,y 3 )’s output features, w k (i, j) is the convolution kernel weight of the kth convolution layer, i and j are the positions of the convolution kernel relative to the current pixel, and b k is the bias term of the kth convolutional layer, a and b are the size ranges of the convolution kernel;
[0028] Step 3.2, connect the nonlinear activation function ReLU after the convolution layer:
[0029] ReLU(f k (x 3 ,y 3 ))=max(0,f k (x 3 ,y 3 ))
[0030] Step 3.3, after the nonlinear activation function, the connection pooling layer reduces the dimension of the feature space and retains important information. The maximum pooling is as follows:
[0031]
[0032] Where P k (x 3 ,y 3 ) is the kth pooling layer at position (x3 ,y 3 )’s output features, S x and S y is the size of the pooling window, indicating the size of the pooling operation in the horizontal and vertical directions, i and j are the positions of the pooling layer relative to the current pixel;
[0033] Step 3.4, add a fully connected layer at the end of the encoder network to convert the features extracted by the convolution layer and the pooling layer into a feature vector of fixed length. The fully connected layer can be expressed as:
[0034] F=g(W·P k +b)
[0035] Where F is the final feature vector, W is the weight matrix of the fully connected layer, and P k is the feature vector after convolution and pooling layers, b is the bias term, and g is the activation function.
[0036] Furthermore, the process of establishing the decoder network for rice pests and diseases in step 4 can be expressed as follows:
[0037] The decoder network consists of a fully connected layer, a softmax activation function, and an output layer. The fully connected layer is the same as the fully connected layer in the encoder layer. The softmax activation function is as follows:
[0038]
[0039] In the formula, softmax(Z m ) is the probability of the mth category, Z is the output of the decoder’s fully connected layer, and n is the category of rice pests and diseases;
[0040] The output layer is implemented by selecting the category with the highest output probability of the softmax activation function:
[0041]
[0042] In the formula, is the predicted category label, and argmax represents the value of the independent variable when the function reaches its maximum value.
[0043] The rice pest and disease identification method based on the encoder-decoder of the present invention has the following beneficial effects:
[0044] 1. The invention uses a hyperspectral camera carried by a drone to quickly cover a large area of farmland, collect a large amount of data, and greatly improve the efficiency of pest and disease monitoring;
[0045] 2. The decoder-encoder method of the present invention can extract rich feature information from spectral images and accurately classify them through deep learning models, with a recognition accuracy much higher than that of traditional methods;
[0046] 3. The present invention can accurately identify pests and diseases, carry out targeted prevention and treatment, reduce the abuse of chemical pesticides, and protect the ecological environment;
[0047] 4. The hyperspectral imaging technology in the present invention is a non-contact, non-destructive detection method and will not cause damage to crops. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of the present invention;
[0049] Figure 2 This is a network model diagram of the present invention. DETAILED DESCRIPTION
[0050] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:
[0051] The present invention proposes a rice pest and disease identification method based on an encoder-decoder, and the invention flow chart is as follows: Figure 1 As shown, the steps of the present invention are described in detail below.
[0052] Step 1: Use the hyperspectral camera carried by the drone to capture the spectral images of rice leaves in the field, and establish a sample data set of rice diseases and insect pests. The specific data set sample labels are: healthy rice, rice blast, rice planthopper, rice leaf roller, rice sheath blight, rice white leaf blight, rice leafhopper, rice locust, rice stalk fly, rice leaf tip blight, rice smut, rice leaf mold, rice leaf sheath rot, rice root knot nematode disease, and rice seedling disease syndrome, a total of 15 types of label data;
[0053] Step 2: Standardize, scale, and crop the input rice leaf image to meet the size requirements of the network input layer;
[0054] Step 2.1, image normalization
[0055] In order to make the pixel values of the image have the same distribution, the pixel values of the original image are scaled to the range of [-1,1], the formula is as follows:
[0056]
[0057] Where I is the original image, μ is the mean value of the pixel value, σ is the standard deviation of the pixel value, and x and y are the corresponding coordinates of the original image;
[0058] Step 2.2, Image Scaling
[0059] All input images are resized to the fixed size required by the network. The size of the image taken by the drone is H×W, and the target size of the encoder input layer is H'×W'. The image scaling formula is as follows:
[0060]
[0061] In the formula, I normalized is the original image, I resized is the scaled image, x 2 and 2 is the coordinate of the image scaling target image, x 1 and 1 are the coordinates of the image after normalization;
[0062] Step 2.3, Cutting and Cropping
[0063] In order to extract the region of interest from the image, a central region H is cropped from the image. c ×W c , the formulas for shearing and cropping images are as follows:
[0064] I cropped (x 3 ,y 3 )=I resized (x c +x 2 ,y c +y 2 )
[0065] In the formula, and is the center coordinate of the clipping area, x 3 and 3 are the coordinates of the image label shear and crop target image.
[0066] Step 3, establish an encoder network for rice pests and diseases, extract features from the input image, and form a fixed-length feature vector as image encoding;
[0067] Step 3.1, establish multiple convolutional layer networks, each convolutional layer extracts image features through a series of convolution operations, and the convolution operation can be expressed as:
[0068]
[0069] f k (x 3 ,y 3 ) is the kth convolutional layer at position (x 3 ,y 3 )’s output features, w k(i, j) is the convolution kernel weight of the kth convolution layer, i and j are the positions of the convolution kernel relative to the current pixel, and b k is the bias term of the kth convolutional layer, a and b are the size ranges of the convolution kernel;
[0070] Step 3.2, connect the nonlinear activation function ReLU after the convolution layer:
[0071] ReLU(f k (x 3 ,y 3 ))=max(0,f k (x 3 ,y 3 ))
[0072] Step 3.3, after the nonlinear activation function, the connection pooling layer reduces the dimension of the feature space and retains important information. The maximum pooling is as follows:
[0073]
[0074] Where P k (x 3 ,y 3 ) is the kth pooling layer at position (x 3 ,y 3 )’s output features, S x and S y is the size of the pooling window, indicating the size of the pooling operation in the horizontal and vertical directions, i and j are the positions of the pooling layer relative to the current pixel;
[0075] Step 3.4, add a fully connected layer at the end of the encoder network to convert the features extracted by the convolution layer and the pooling layer into a feature vector of fixed length. The fully connected layer can be expressed as:
[0076] F=g(W·P k +b)
[0077] Where F is the final feature vector, W is the weight matrix of the fully connected layer, and P k is the feature vector after convolution and pooling layers, b is the bias term, and g is the activation function.
[0078] Step 4: Establish a decoder network for rice pests and diseases. Use the decoder to map the feature vector to a specific rice pest and disease category. The encoder-decoder network model is shown in the figure below: Figure 2 As shown;
[0079] The decoder network consists of a fully connected layer, a softmax activation function, and an output layer. The fully connected layer is the same as the fully connected layer in the encoder layer. The softmax activation function is as follows:
[0080]
[0081] In the formula, softmax(Z m ) is the probability of the mth category, Z is the output of the decoder’s fully connected layer, and n is the category of rice pests and diseases;
[0082] The output layer is implemented by selecting the category with the highest output probability of the softmax activation function:
[0083]
[0084] In the formula, is the predicted category label, and argmax represents the value of the independent variable when the function reaches its maximum value.
[0085] Step 5: Deploy the trained decoder-encoder model into practical applications for real-time identification of rice pests and diseases.
[0086] The above description is only a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent change made based on the technical essence of the present invention still falls within the scope of protection required by the present invention.
Claims
1. The rice pest and disease recognition method based on encoder-decoder, the specific steps are as follows: Features: Step 1: Use the hyperspectral camera carried by the drone to capture the spectral images of rice leaves in the field, and establish a sample data set of rice diseases and insect pests. The specific data set sample labels are: healthy rice, rice blast, rice planthopper, rice leaf roller, rice sheath blight, rice white leaf blight, rice leafhopper, rice locust, rice stalk fly, rice leaf tip blight, rice smut, rice leaf mold, rice leaf sheath rot, rice root knot nematode disease, and rice seedling disease syndrome, a total of 15 types of label data; Step 2: Standardize, scale, and crop the input rice leaf image to meet the size requirements of the network input layer; Step 3, establish an encoder network for rice pests and diseases, extract features from the input image, and form a fixed-length feature vector as image encoding; Step 4, establish a decoder network for rice pests and diseases, and map the feature vector to a specific rice pest and disease category through the decoder; Step 5: Deploy the trained decoder-encoder model into practical applications for real-time identification of rice pests and diseases.
2. The rice pest and disease identification method based on encoder-decoder according to claim 1, Features: The process of normalizing, scaling, and cropping the input rice leaf image in step 2 is expressed as: Step 2.1, image normalization In order to make the pixel values of the image have the same distribution, the pixel values of the original image are scaled to the range of [-1,1], the formula is as follows: Where I is the original image, μ is the mean value of the pixel value, σ is the standard deviation of the pixel value, and x and y are the corresponding coordinates of the original image; Step 2.2, Image Scaling All input images are resized to the fixed size required by the network. The size of the image taken by the drone is H×W, and the target size of the encoder input layer is H'×W'. The image scaling formula is as follows: In the formula, I normalized is the original image, I resized is the scaled image, x 2 and 2 is the coordinate of the image scaling target image, x 1 and 1 are the coordinates of the image after normalization; Step 2.3, Cutting and Cropping In order to extract the region of interest from the image, a central region H is cropped from the image. c ×W c , the formulas for shearing and cropping images are as follows: I cropped (x 3 ,y 3 )=I resized (x c +x 2 ,y c +y 2 ) In the formula, and is the center coordinate of the clipping area, x 3 and 3 are the coordinates of the image label shear and crop target image.
3. The rice pest and disease identification method based on encoder-decoder according to claim 1, Features: The process of establishing the encoder network for rice pests and diseases in step 3 is expressed as follows: Step 3.1, establish multiple convolutional layer networks, each convolutional layer extracts image features through a series of convolution operations, and the convolution operation can be expressed as: f k (x 3 ,y 3 ) is the kth convolutional layer at position (x 3 ,y 3 )’s output features, w k (i, j) is the convolution kernel weight of the kth convolution layer, i and j are the positions of the convolution kernel relative to the current pixel, and b k is the bias term of the kth convolutional layer, a and b are the size ranges of the convolution kernel; Step 3.2, connect the nonlinear activation function ReLU after the convolution layer: ReLU(f k ( x 3 ,y 3 ))=max(0,f k ( x 3 ,y 3 )) Step 3.3, after the nonlinear activation function, the connection pooling layer reduces the dimension of the feature space and retains important information. The maximum pooling is as follows: Where P k (x 3 ,y 3 ) is the kth pooling layer at position (x 3 ,y 3 )’s output features, S x and S y is the size of the pooling window, indicating the size of the pooling operation in the horizontal and vertical directions, i and j are the positions of the pooling layer relative to the current pixel; Step 3.4, add a fully connected layer at the end of the encoder network to convert the features extracted by the convolution layer and the pooling layer into a feature vector of fixed length. The fully connected layer can be expressed as: F=g(W·P k +b) Where F is the final feature vector, W is the weight matrix of the fully connected layer, and P k is the feature vector after convolution and pooling layers, b is the bias term, and g is the activation function.
4. The rice pest and disease identification method based on encoder-decoder according to claim 1, Features: The process of establishing the decoder network for rice pests and diseases in step 4 is expressed as follows: The decoder network consists of a fully connected layer, a softmax activation function, and an output layer. The fully connected layer is the same as the fully connected layer in the encoder layer. The softmax activation function is as follows: In the formula, softmax(Z m ) is the probability of the mth category, Z is the output of the decoder’s fully connected layer, and n is the category of rice pests and diseases; The output layer is implemented by selecting the category with the highest output probability of the softmax activation function: In the formula, is the predicted category label, and argmax represents the value of the independent variable when the function reaches its maximum value.
Citation Information
Cited By
Rice canopy disease identification and positioning method based on unmanned aerial vehicle
CN119360002A
