Crop pest and disease recognition method based on ultra-lightweight and efficient convolutional neural network
By designing an ultra-lightweight and efficient convolutional neural network in the identification of crop diseases and insect pests, and using residual depth convolution and spatial pyramid pooling layers, the existing model parameters are large and the training time is long, and the problem of low computing power is achieved. Rapid deployment and efficient recognition effects on the platform.
Patent Information
- Application Number
- CN202210012912.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-01-07
AI Technical Summary
The existing convolutional neural network model parameters for crop disease and pest identification methods based on deep learning have a large number of parameters, long training and inference times, and are difficult to deploy quickly on platforms with limited computing power.
An ultra-lightweight and efficient convolutional neural network is designed, which uses a residual depth convolution module and a spatial pyramid pooling layer to reduce the number of model parameters, and enhances feature interaction through depth-separable convolution and channel reorganization modules. It is suitable for on low computing power platforms.
It realizes the rapid deployment of crop disease and pest identification models on a low computing power platform, has the lowest computational complexity and competitive classification performance, significantly reduces the amount of model parameters and training time, and is suitable for mobile applications.
Smart Images

Figure CN114463651B_ABST
Abstract
Description
Field of the Invention
[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network. Background Art
[0002] Crop pest and disease infection is the main factor affecting the healthy growth of plants, which greatly threatens food security. Real-time, rapid and accurate monitoring of crop pests and diseases throughout their life cycle is of great significance for protecting crop growth, ensuring crop yields and maintaining food security. However, due to the wide variety of pests and diseases, methods that rely on manual visual inspection and experience-based interpretation are very inefficient and prone to misdiagnosis, resulting in poor accuracy and timeliness in crop pest and disease monitoring. Therefore, automatic detection of crop pests and diseases based on computer vision technology provides an efficient and low-cost method for real-time crop growth monitoring and management. In recent years, the vigorous development of deep learning technology in various fields has verified its outstanding performance in image interpretation and understanding. Most of the existing deep learning-based plant disease classification methods use convolutional neural networks originally developed for general image classification tasks. Although these existing neural network architectures can also be directly applied to the recognition of crop pest and disease images, they do not take into account the particularity of crop images. These network architectures generally have huge network training parameters and have high requirements on the computing power of hardware devices. The training and inference time of the model are both time-consuming, which seriously restricts its rapid and flexible deployment on platforms with limited computing power (such as mobile platforms: mobile phones). Summary of the invention
[0003] The technical problem to be solved by the present invention is that in view of the shortcomings of the above-mentioned method, an ultra-lightweight and efficient convolutional neural network is proposed to realize the image-based crop pest and disease identification task, focusing on solving the problems of large number of parameters of the existing model, long training and inference time, and high platform computing power requirements.
[0004] The proposed network consists of two parts, a deep feature extraction module using residual deep convolution and a classification module that receives multi-scale features enhanced by spatial pyramid pooling layers. The network is built with a very compact design with only about 100,000 parameters, which greatly benefits the demand for lightweight models in practical needs. Publicly available plant datasets are applied in the experiments. Compared with the state-of-the-art architectures, the proposed network shows superior advantages with the lowest computational complexity and competitive classification performance.
[0005] To solve the above problems, the present invention provides a method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network. The method mainly comprises the following steps:
[0006] Step 1, collect image data of health, disease and pest of different types of crops;
[0007] Step 2: preprocess the collected crop image dataset and divide the dataset into a training set, a test set, and a validation set according to a certain ratio;
[0008] Step 3: Input the training set data into the ultra-lightweight and efficient convolutional neural network for training;
[0009] The ultra-lightweight and efficient convolutional neural network structure consists of five basic modules. The first module includes a convolution layer, a batch normalization layer, and an activation function layer in sequence. The second module includes multiple pooling layers. The third module includes two residual depth-separable convolution modules with a step size of 1 and a step size of 2. The fourth module includes a convolution layer, a batch normalization layer, and an activation function layer. The features output by the fourth module are subjected to a spatial pyramid pooling operation and are finally input into the fifth module. The five modules are single-layer fully connected layers.
[0010] Step 4: During the training process, the validation set data is continuously input into the network to check the results and evaluate the performance;
[0011] Step 5: Repeat steps 3 and 4, and only retain the model with the best performance on the validation set until the training is completed;
[0012] Step 6: Obtain the final trained network model, input the data on the test set into the crop pest and disease identification model, and obtain the final pest and disease detection results.
[0013] Furthermore, the step 2 is specifically as follows: removing blurred, out-of-focus, or subject-missing images from the captured images, and then selecting images from the data set in the ratio of 70%, 20%, and 10% as the training set, validation set, and test set, respectively.
[0014] Furthermore, the ultra-lightweight and efficient convolutional neural network structure used in the step 3 is composed of 5 basic modules, the first module is composed of a convolution layer with a convolution kernel of 3*3 and a step size of 1, a batch normalization layer and a ReLU activation function layer stacked in sequence, the second module is composed of two pooling layers with a maximum convolution kernel of 3*3 and a step size of 2, the third module is composed of two residual depth separable convolution modules with a step size of 1 and a step size of 2, the fourth module is composed of a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer and a ReLU activation function layer stacked in sequence, the features output by the fourth module are subjected to a spatial pyramid pooling operation, and are finally input into the fifth module, which is composed of a single-layer fully connected layer with an input dimension of 2016 and an output dimension of 38.
[0015] Furthermore, the residual deep separable convolution module with a step size of 1 first copies the input features into two identical features, and passes one set of features through a sub-module, which consists of a deep separable convolution module with a convolution kernel of 3*3 and a step size of 1, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer. The features processed by the sub-module are spliced with the original features, and then the final output features are obtained through a channel recombination module.
[0016] Furthermore, the residual depth separable convolution module with a step size of 2 first copies the input features into two identical features, passes one set of features through the first submodule, which consists of a depth separable convolution module with a convolution kernel of 3*3 and a step size of 2, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer; passes the other set of features through the second submodule, which consists of a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, a ReLU activation layer, a depth separable convolution module with a convolution kernel of 3*3 and a step size of 2, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer. Finally, the features processed by the two submodules are spliced, and then the final output features are obtained through a channel reorganization module.
[0017] Furthermore, the depthwise separable convolution module draws on the idea of the residual network and copies the input features into two identical feature groups, one of which undergoes feature transformation through a deep convolution layer and is then concatenated with the original feature. Since the depthwise separable convolution does not perform information transformation in the channel dimension, a channel reorganization module is designed after the feature to enhance the information interaction of the features in the channel dimension.
[0018] Furthermore, the channel reorganization module first divides the multi-channel features into N groups, then transforms the dimensions of the features by group, transposes the feature groups, and again groups and splices the transposed feature groups to form a final new feature map.
[0019] Furthermore, the loss function used in the network training in step 3 is the cross entropy loss function.
[0020] Furthermore, the performance evaluation in step 4 includes precision, recall and F1 index.
[0021] Compared with the prior art, the present invention proposes an ultra-lightweight and efficient neural network classifier for identifying agricultural pests and diseases images, and proposes to introduce deep separable convolution into the feature extractor, which greatly reduces the amount of training parameters required for ordinary feature extractors. At the same time, in order to increase the information interaction of features in multi-channel dimensions, a channel reorganization module is introduced to enhance the interaction of multi-channel features, and a spatial pyramid pooling layer is proposed on the feature classifier to maintain the information of local and global multi-scale features of the feature map. Compared with the existing convolutional neural network classification framework, the method of the present invention has fewer network parameters, faster network training speed, and can achieve classification accuracy similar to that of complex neural networks on small sample sets. Therefore, the inventive method has lower requirements for hardware equipment in actual application scenarios, and is very suitable for deployment and application on mobile platforms with low computing power (such as mobile phones, etc.). BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of an embodiment of the present invention.
[0023] Figure 2 A diagram of the structure of an ultra-lightweight and efficient convolutional neural network constructed for an embodiment of the present invention.
[0024] Figure 3 It is the structural diagram of the depth-wise separable convolution module. DETAILED DESCRIPTION
[0025] The present invention will be further described below with reference to the accompanying drawings.
[0026] like Figure 1 As shown, the present invention proposes a crop disease and insect pest identification method based on an ultra-lightweight and efficient convolutional neural network, comprising the following steps:
[0027] Step 1, collect image data of health, disease and pest of different types of crops;
[0028] Step 2: preprocess the collected crop image dataset and divide the dataset into a training set, a test set, and a validation set according to a certain ratio;
[0029] Step 3: Input the training set data into the ultra-lightweight and efficient convolutional neural network for training. The loss function used in network training is the cross entropy loss function.
[0030] Step 4: During the training process, the validation set data is continuously input into the network to check the results and evaluate the performance;
[0031] Step 5: Repeat steps 3 and 4, and only retain the model with the best performance on the validation set until the training is completed;
[0032] Step 6: Obtain the final trained network model, input the data on the test set into the crop pest and disease identification model, and obtain the final pest and disease detection results.
[0033] Furthermore, the step 2 is specifically as follows: removing blurred, out-of-focus, or subject-missing images from the captured images, and then selecting images from the data set in the ratio of 70%, 20%, and 10% as the training set, validation set, and test set, respectively.
[0034] Furthermore, if Figure 2 As shown, the ultra-lightweight and efficient convolutional neural network structure used in step 3 consists of 5 basic modules. The first module is composed of a convolution layer with a convolution kernel of 3*3 and a step size of 1, a batch normalization layer and a ReLU activation function layer stacked in sequence. The second module is composed of two pooling layers with a maximum convolution kernel of 3*3 and a step size of 2. The third module is composed of two residual depth separable convolution modules with a step size of 1 and a step size of 2. The fourth module is composed of a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer and a ReLU activation function layer stacked in sequence. The features output by the fourth module are subjected to a spatial pyramid pooling operation and are finally input into the fifth module, which consists of a single-layer fully connected layer with an input dimension of 2016 and an output dimension of 38.
[0035] Furthermore, if Figure 3 As shown in a, the residual depth separable convolution module with a step size of 1 first copies the input features into two identical features, and passes one set of features through a submodule, which consists of a depth separable convolution module with a convolution kernel of 3*3 and a step size of 1, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer. The features processed by the submodule are concatenated with the original features, and then the final output features are obtained through a channel recombination module.
[0036] Furthermore, if Figure 3As shown in FIG. 2 , the residual depth separable convolution module with a step size of 2 first copies the input features into two identical features, and passes one set of features through the first submodule, which consists of a depth separable convolution module with a convolution kernel of 3*3 and a step size of 2, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer; the other set of features passes through the second submodule, which consists of a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, a ReLU activation layer, a depth separable convolution module with a convolution kernel of 3*3 and a step size of 2, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer. Finally, the features processed by the two submodules are spliced, and then the final output features are obtained through a channel reorganization module.
[0037] Furthermore, the depthwise separable convolution module draws on the idea of the residual network and copies the input features into two identical feature groups, one of which undergoes feature transformation through a deep convolution layer and is then concatenated with the original feature. Since the depthwise separable convolution does not perform information transformation in the channel dimension, a channel reorganization module is designed after the feature to enhance the information interaction of the features in the channel dimension.
[0038] Furthermore, the channel reorganization module first divides the multi-channel features into N groups, then transforms the dimensions of the features by group, transposes the feature groups, and again groups and splices the transposed feature groups to form a final new feature map.
[0039] The classification accuracy and classification efficiency of the method of the present invention and the existing method were tested on the PLANT-VILLAGE open data set, and the test results are as follows:
[0040] Table 1 Comparison of classification accuracy
[0041]
[0042] Table 2 Comparison of classification efficiency
[0043]
[0044] VGG16, MobileNet_v2, Xception, ShuffleNet_v2 in Table 1 are existing methods. Compared with the existing methods, the method of the present invention has achieved an accuracy of 98.13%, a recall rate of 97.49, and an F1 index of 0.9776, which is very close to the optimal Xception method in terms of overall classification accuracy. As can be seen from Table 2, the method of the present invention has very few model parameters, memory usage, and floating-point operations compared to other methods. In terms of computing speed, the method of the present invention is 2.6 times faster than ShuffleNet_v2 and 380 times faster than Xception. In summary, it can be seen that the method of the present invention has fewer network parameters than the existing neural network classification framework, and the network training speed is faster. It can achieve classification accuracy performance similar to the optimal network framework on a small sample set, and has achieved hundreds of times of optimization in computing efficiency, and only 6Mb in memory space usage. Therefore, the method of the present invention is very suitable for running on a low computing power platform.
[0045] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network, characterized in that: The steps include: Step 1, collect image data of health, disease and pest of different types of crops; Step 2: preprocess the collected crop image dataset and divide the dataset into a training set, a test set, and a validation set according to a certain ratio; Step 3: Input the training set data into the ultra-lightweight and efficient convolutional neural network for training; The ultra-lightweight and efficient convolutional neural network structure consists of five basic modules. The first module includes a convolution layer, a batch normalization layer, and an activation function layer in sequence. The second module includes multiple pooling layers. The third module includes two residual depth-separable convolution modules with a step size of 1 and a step size of 2. The fourth module includes a convolution layer, a batch normalization layer, and an activation function layer. The features output by the fourth module are subjected to a spatial pyramid pooling operation and are finally input into the fifth module. The five modules are single-layer fully connected layers. Step 4: During the training process, the validation set data is continuously input into the network to check the results and evaluate the performance; Step 5: Repeat steps 3 and 4, and only retain the model with the best performance on the validation set until the training is completed; Step 6: Obtain the final trained network model, input the data on the test set into the crop pest and disease identification model, and obtain the final pest and disease detection results.
2. The method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 1, characterized in that: In step 2, blurred, out-of-focus, or subject-missing images are removed from the collected images, and then images are selected from the dataset in the ratio of 70%, 20%, and 10% as the training set, validation set, and test set, respectively.
3. The method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 1, characterized in that: In step 3, the first module is composed of a convolution layer with a convolution kernel of 3*3 and a stride of 1, a batch normalization layer, and a ReLU activation function layer. The second module consists of two pooling layers with a maximum convolution kernel of 3*3 and a stride of 2. The fourth module consists of a convolution layer with a kernel of 1*1 and a stride of 1, a batch normalization layer, and a ReLU activation function layer. The fifth module consists of a single fully connected layer with an input dimension of 2016 and an output dimension of 38.
4. The method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 1, characterized in that: The specific processing process of the residual depth separable convolution module with a step size of 1 is as follows; First, the input features are copied into two identical features, and one set of features is passed through a sub-module, which consists of a depth-wise separable convolution module with a convolution kernel of 3*3 and a step size of 1, a batch normalization layer, a convolution layer with a convolution kernel of 1*1 and a step size of 1, a batch normalization layer, and a ReLU activation layer. The features processed by this sub-module are concatenated with the original features, and then the final output features are obtained through a channel recombination module.
5. The method for identifying crop pests and diseases based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 1, characterized in that: The specific processing process of the residual depth separable convolution module with a step size of 2 is as follows; First, the input features are copied into two identical features, and one set of features is passed through the first submodule, which consists of 1 depthwise separable convolution module with a convolution kernel of 3*3 and a stride of 2, 1 batch normalization layer, 1 convolution layer with a convolution kernel of 1*1 and a stride of 1, 1 batch normalization layer, and 1 ReLU activation layer; the other set of features is passed through the second submodule, which consists of 1 convolution layer with a convolution kernel of 1*1 and a stride of 1, 1 batch normalization layer, a ReLU activation layer, 1 depthwise separable convolution module with a convolution kernel of 3*3 and a stride of 2, a batch normalization layer, 1 convolution layer with a convolution kernel of 1*1 and a stride of 1, 1 batch normalization layer, and a ReLU activation layer. Finally, the features processed by the two submodules are spliced, and then the final output features are obtained through a channel recombination module.
6. A method for identifying crop diseases and insect pests based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 4 or 5, characterized in that: The channel reorganization module first divides the multi-channel features into N groups, then transforms the dimensions of the features by group, transposes the feature groups, and again groups and splices the transposed feature groups to form a final new feature map.
7. The method for identifying crop pests and diseases based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 1, characterized in that: The loss function used in network training in step 3 is the cross entropy loss function.
8. The method for identifying crop pests and diseases based on an ultra-lightweight and efficient convolutional neural network as claimed in claim 1, characterized in that: The performance evaluation in step 4 includes precision, recall, and F1 index.
Citation Information
Patent Citations
High-resolution remote sensing image classification method guided by multi-level spatial context features
CN111126127A
Crop disease and insect pest type identification method, system and device, and medium
CN111814622A
