Improved RegNet-based method for identifying damage degrees of various crop diseases

By improving the RegNet network, combined with deep transfer learning and multi-scale feature fusion strategy, the problem of large model size and weak generalization ability in crop disease recognition is solved, and high-accuracy disease victimization degree recognition is achieved, and it is suitable for embedded devices.

CN119625514APending Publication Date: 2025-03-14XINJIANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411275110.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the identification of crop diseases, the existing technology has large model size, large parameters, unfriendly to embedded devices, as well as weak generalization ability, easy to overfit due to small samples, and failure to accurately identify the degree of harm of crop diseases, resulting in misdiagnosis and misdiagnosis and pesticide abuse.

Method used

A method for identifying crop disease victimization based on deep transfer learning is proposed. By improving the RegNet network, introducing the ECA channel attention mechanism and an improved multi-scale feature fusion strategy, combining data augmentation and Fine-tune technology, the feature extraction and generalization capabilities of the model are improved.

Benefits of technology

It realizes accurate identification of the degree of crop disease victimization, improves the classification accuracy to 94.5%, solves the problem of weak overfitting and generalization capabilities, and is small in size, making it easier to deploy on embedded devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625514A_ABST
    Figure CN119625514A_ABST
Patent Text Reader

Abstract

The invention discloses a method for identifying the damage degree of multiple crop diseases based on improved RegNet, and aims to solve the problems that a traditional crop disease identification method is low in efficiency and inaccurate in damage degree identification, the method comprises the following steps: firstly, carrying out online data enhancement at the input end of the RegNet to improve the diversity of training samples; secondly, an ECA channel attention mechanism is introduced into a feature extraction layer of the model so as to improve the feature extraction capability of the model; then, a multi-scale feature fusion strategy is introduced into a classification layer of the model so as to improve the classification capability of the model on fine-grained features; and finally, the overall performance of the model is optimized by using deep transfer learning, the convergence speed of the model is accelerated, and the generalization ability of the model is improved. The result shows that the accuracy rate of the improved network model on a crop disease damage degree data set reaches 94.5%, and the accuracy rate is improved by 10.4% compared with the accuracy rate of an original RegNet model. The improved model has better feature extraction capability and has stronger classification capability for fine-grained features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0003] The invention relates to a method for identifying the degree of damage of various crop diseases based on improved RegNet. Background Art

[0005] Agriculture is a basic industry of a country and is related to the development of people's livelihood. How to increase crop yields has become one of the important issues facing all countries. Crop diseases are the main factors affecting crop yields. Timely and accurate grasp of the types of crop diseases and their degree of damage is the primary problem in solving crop diseases. The loss of grassroots agricultural technicians in today's society has caused some farmers to have incomplete knowledge of the types and degrees of crop diseases, missing the opportunity for treatment, resulting in crop yield reduction and economic losses. Therefore, it is of great practical significance to develop an efficient and low-cost crop disease identification method for quickly and accurately identifying the types of crop diseases and their degree of damage. Summary of the invention

[0007] Purpose of the invention: Current research mainly improves model selection, transfer learning, and attention mechanisms. Although good results have been achieved, there are still problems such as large model size, large number of parameters, and unfriendly to embedded devices. There is also a problem that the model obtained by training has weak generalization ability and is prone to overfitting due to the small sample size of the crop disease data set, resulting in serious misdiagnosis and missed diagnosis. At the same time, the above research only classifies the types of crop diseases, and does not divide them according to the degree of damage, which is easy to cause pesticide abuse or inadequate prevention and control, and cannot achieve the purpose of accurate prevention and control of crop diseases. Based on this, the present invention proposes a method for identifying the degree of damage of crop diseases based on deep transfer learning. This method can effectively extract subtle features of crop leaf diseases, improve the accuracy of crop disease damage degree classification, and solve the problems of insufficient training and overfitting caused by the large number of classification categories and small number of samples of crop diseases.

[0008] Technical solution: The characteristics of the crop disease damage degree identification method based on deep transfer learning of the present invention are as follows:

[0009] Step 1: crop image acquisition and data preprocessing.

[0010] The dataset used in this invention consists of two parts, which are used for transfer learning and crop disease damage degree model training. Among them: Mini-ImageNet dataset

[14] It has a complex living background, which is used to train the model's ability to extract coarse-grained features, so as to use transfer learning to alleviate the problem of small samples in the crop disease dataset. The dataset contains 100 crop categories and a total of 60,000 samples. PlantVillage plant disease image library, which contains 14 crops and a total of 26 crop disease sample information. By screening and sorting the two datasets, the present invention selected a total of 19 samples including healthy leaves and leaves with different degrees of damage. At the same time, the present invention uses the Python web crawler tool to capture the data of the online agricultural question-and-answer platform to expand the crop disease dataset of the present invention. Finally, the crop disease damage degree test dataset has a total of 6041 pictures, which are divided into 4837 training sets and 1204 test sets at a ratio of 4:1. The sample statistics of each disease type and its damage degree in the dataset are as follows: Figure 1 As shown. A sample data set is Figure 2 shown.

[0011] In order to increase the diversity of the data set, improve the generalization ability of the model, increase noise data, avoid overfitting, and make the model more suitable for disease identification under natural conditions. The present invention adopts an online data enhancement strategy to save time and space for data set collection and expansion. Online data enhancement (Data Increase, DataIncr) is to perform data expansion on each batch of images input to the network at the front end of the network, and then input the enhanced data into the network for training. This operation enhances the randomness of the data input network and increases the diversity of crop disease samples. The data enhancement method and processing effect are as follows Figure 2 shown.

[0012] Step 2: Construction of crop leaf disease model.

[0013] Step 2.1, improve the RegNet network model.

[0014] The improved RegNet network is used to adjust the model distribution by adjusting the parameters, so as to obtain different network structures to handle different classification tasks. The main body of the RegNet design space network consists of three parts, including the input layer Steam, the backbone layer Body and the output layer RegHead. The ECA channel attention mechanism is introduced in the feature extraction layer of the model to improve the feature extraction ability of the model. Its structure is as follows Figure 3 and 4 As shown in the figure, di represents the number of blocks, g represents the width of each group, s is the stride, wi is the number of channels of the output matrix, 1×1 and 3×3 are the sizes of the convolution kernels, and r is the reduction factor. GAP is the global average pooling, Dropout is the random inactivation neuron function, and FC is the fully connected layer.

[0015] ECA-Net (Efficient Channel Attention) is an effective channel attention mechanism that uses a local cross-channel interaction strategy without dimensionality reduction, that is, a 1D convolution is used for sliding filtering on the channel. This strategy saves parameters while also performing cross-channel interaction and avoiding channel reduction. The ECA-Net model structure is as follows: Figure 5 As shown in Figure 2. H, W, and C are the height, width, and number of channels of the feature map, respectively.

[0016] The input image first obtains all feature information without dimensionality reduction through a GAP, then extracts feature weights through an adaptive one-dimensional convolution, and finally maps the feature information to [0,1] through the Sigmoid activation function, improving the acquisition of effective features in the image. The adaptive one-dimensional convolution mainly adjusts the size of the input channel C through the parameter K. The description is as follows:

[0017] In the formula represents the nearest odd number t, and we set a and b to 2 and 1 respectively in all experiments. It can be seen from the formula that high-dimensional channels have longer interactions, while low-dimensional channels have shorter interactions.

[0018] Step 2.2, improve the multi-scale feature fusion strategy.

[0019] Existing multi-scale feature fusion algorithms such as FPN and PAN are all aimed at the fusion between feature maps of different scales, but ignore the feature fusion between different regions on the same layer. In the classification of crop diseases, the category to which the disease belongs needs to be judged using features with a large receptive field, and the degree of damage needs to be judged using features with a small receptive field. Therefore, the overall performance of the model can be improved by fusing feature information of different receptive fields. Since the degree of damage of crop diseases needs to be divided in the present invention, that is, fine-grained recognition of the image is performed. Therefore, in order to improve the accuracy of recognition, an improved spatial pyramid pooling method is proposed to improve the accuracy of the model in classifying the degree of damage of crop diseases at different scales, strengthen the correlation between different regions and different features in the same convolutional layer, and avoid misidentification of the same disease between different crops. Therefore, the use of a multi-scale feature fusion method is more suitable for the classification of the degree of damage of crop diseases in this article. The improved multi-scale feature fusion network such as Figure 6 As shown in the figure, Conv is the convolution operation, 3×3, 5×5 and 7×7 represent the size of the convolution kernel. MaxPool represents the maximum pooling, and 2×2 represents the size of the pooling kernel. The yellow, red, and blue feature matrices represent the downsampling multiples of 1, 2, and 3 respectively. S×S represents the size of the feature map, and 512 is its number of channels.

[0020] Depend on Figure 6 It can be seen that the multi-scale feature fusion module is divided into two modules: multi-scale convolution and multi-scale pyramid fusion. For the multi-scale convolution part on the left, the input image is first convolved using convolution kernels of different sizes, 3×3, 5×5, and 7×7, to obtain feature maps of different scales within the same convolution layer. Then, the feature map is downsampled by the maximum pooling kernel of 2×2 size, and concatenated by Concat to obtain multi-layer convolution feature maps. The multi-layer convolution feature map is reduced in dimension by 1×1 convolution to generate a S×S×512-dimensional feature map, which is used as the input of the multi-scale feature pyramid. The main function of the multi-scale feature pyramid is to pool the feature map. The multi-layer convolution feature map is pooled by selecting pooling kernels of different sizes. Padding is used in the pooling process to keep the scale of the feature map unchanged. Finally, the pooled feature map is concatenated to output a 2048-dimensional feature vector. Through the feature fusion module, multi-scale feature fusion is achieved without changing the resolution, and then the feature pyramid is used to enhance the reuse of features, thereby improving the generalization ability of the model.

[0021] Step 2.3, deep transfer learning.

[0022] Deep transfer learning is to use deep learning methods for transfer learning, among which transfer learning based on domain adaptation (DA) is the representative of deep transfer learning. Depending on whether the target domain has a label, it can be further divided into supervised, semi-supervised and unsupervised DA. The core is to reduce the distribution difference between the source domain and the target domain. In the present invention, since the target domains are all labeled, supervised DA is used, and the source domain and the target domain are both classification tasks, so the migration method is homogeneous DA.

[0023] First, pre-training is performed on the Mini-ImageNet1000 classification dataset in the source domain to make the network model parameters reach the optimal state, and then the trained model is transferred to the crop disease classification and recognition in this paper. However, due to the different label spaces of the source domain and the target domain and the uneven distribution of training data and test data, this paper uses the Fine-tune method to fine-tune the network parameters. By freezing all BottleNecks in the steam input layer and the first two RegStages in the body backbone layer in the model, only the parameters and weights of the Mini-ImageNet dataset are used in the shallow network, avoiding the heavy task of training from scratch, greatly speeding up the model training speed, and improving the generalization performance of the model. Retraining with small sample crop diseases in the deep network makes the network performance more meet personalized needs. The model parameters are initialized by transfer learning, which not only reduces the training time, but also ensures that the feature extraction of crop diseases in the target domain is not lost, speeds up the convergence of the model, and improves the training effect of the model.

[0024] Step 3: Building a crop disease identification model

[0025] The new network structure of the improved RegNet proposed in this paper is used to build a model for identifying the degree of damage of crop diseases, also known as RegNet-EMTL. The model framework is as follows Figure 7 shown. Figure 7 In the figure, CBR-x is a basic unit, where Conv2d is convolution, BN is batch normalization, and ReLu is the activation function; RegStage[1~4] are four stages, each of which contains a BottleNeck module; ECA is channel attention.

[0026] First, the image is sent to the Steam module for feature extraction. The module consists of Conv2d convolution, BN batch normalization and ReLU activation function, that is, Figure 7The CBR_x module in , where x represents the size of the convolution kernel. Then the feature map is input into the Body, which consists of four RegStages, namely RegStage1, RegStage2, RegStage3 and RegStage4. Each RegStage contains a BottleNeck_x structure. The difference between BottleNeck_1 and BottleNeck_2 is that a Conv2d layer and a BN layer are added to the shortcut branch when x is 1. Finally, the output of the Body is sent to the multi-scale feature fusion module in RegHead, and then the dimension is reduced by 1×1 convolution, and then classified by global average pooling and fully connected layers. Compared with the original model, RegNet-EMTL first improves the grouped convolution residual structure in each Block in each RegStage in the Body, and adds an ECA channel attention module after the grouped convolution to further focus on the feature distribution of the image and improve the feature extraction ability of the model. Then, the improved multi-scale feature fusion module is introduced in RegHead to fuse feature maps of different receptive fields, further improving the recognition accuracy of the model. Finally, using deep transfer learning such as Figure 8 As shown, Figure 8 In the figure, the numbers on the main diagonal represent the number of samples that are correctly classified, and the rest are the number of samples that are incorrectly classified.

[0027] Step 4: Conduct experimental verification

[0028] The beneficial effects of the present invention are as follows: the existing inventions mainly solve the problems of misjudgment and wrong judgment caused by relying on manual identification of crop disease conditions in traditional agriculture. The present invention proposes a method for identifying crop diseases based on an improved RegNet. The proposed model enhances the ability to extract crop disease features and improves the classification and recognition accuracy of the degree of crop disease damage. The recognition accuracy of the degree of crop disease damage reaches 94.5%, which is 10.4 percentage points higher than the original RegNet model, and is higher than mainstream classification networks such as VGG16, ResNet50, InceptionV3 and ConvNeXt, indicating that this method has certain advantages in the classification and recognition of the degree of crop disease damage. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a statistical information diagram of a data set sample in the present invention;

[0031] Figure 2 is an example diagram of crop disease data samples in the present invention;

[0032] Figure 3 It is an example diagram of data preprocessing in the present invention;

[0033] Figure 4 It is a structural diagram of the RegNet model in the present invention;

[0034] Figure 5 It is the structural diagram of the ECA-Net model in the present invention;

[0035] Figure 6 It is a multi-scale feature fusion structure diagram in the present invention;

[0036] Figure 7 It is the RegNet-EMTL model diagram of the present invention;

[0037] Figure 8 It is a confusion matrix diagram of different attention mechanisms in the present invention; Fig. 9 It is a confusion matrix diagram of different attention mechanisms in the present invention;

[0038] Fig.10 It is a result diagram of recognition accuracy of different models in the present invention;

[0039] Fig.11 It is a curve diagram of recognition accuracy of different models in the present invention;

[0040] Fig.12 It is a test result diagram of the present invention;

[0041] Fig.13 It is a visualization diagram of the output of each module in the present invention. DETAILED DESCRIPTION

[0043] In order to explain the technical solution of the present invention in detail, the following is further described in conjunction with the drawings and specific embodiments of the specification. It should be understood that the described embodiments are only used to explain the present invention and are part of the embodiments of the present invention, rather than all of the embodiments.

[0044] The experimental environment of the present invention is Windows 10 operating system, running memory is 16 GB, equipped with Intel Core i710875 processor, GPU uses NVIDIA GTX2060 6 G, CUDA version is 10.1, deep learning framework is Pytorch1.7.1, and compilation environment is Pycharm / Python. The test batch (Batch Size) is 16, the number of iterations is 100, the momentum parameter is set to 0.9, and the stochastic gradient descent method (Stochastic Gradient Descent, SGD) is used to optimize the various parameters of the model, and the number of neurons is randomly inactivated by the Droupout function before the last fully connected layer, and the dropout rate is 0.25, which is used to alleviate the overfitting phenomenon of the model and speed up the training speed of the model. The initial learning rate (Learn Rate) is set to 0.001. In the present invention, each free variable of RegNet takes d=13, w0=24, b=1, and g=13 respectively.

[0045] In order to comprehensively evaluate the classification performance of the 19-category crop disease recognition model RegNet-EMTL proposed in the present invention, the present invention will use accuracy, precision, recall, F1 score and model size to evaluate the performance of the model.

[0046] like Fig.10 As shown in the figure, the RegNet-EMTL model proposed in this paper has an accuracy increase of 2.1 percentage points compared to ResNet50, and its model size is 0.6 times that of ResNet50. RegNet-EMTL has an accuracy increase of 1.6 percentage points compared to the latest network ConvNeXt, and its model size is only 50.1% of ConvNeXt. Compared with the latest non-convolutional classification model ViT, it is found that this model is not suitable for the classification task in this paper, with an accuracy of only 70.7% and a model size of 327 MB. Fig.11 It can be seen that the model proposed in this paper tends to be stable in the 30th generation and achieves rapid convergence compared with other models. However, other models have serious jitters, slow convergence speeds, and low recognition accuracy. The main reason is that the background of the training data set is complex and the data samples are small, which easily causes problems of network overfitting and weak generalization ability. In summary, the accuracy of the model proposed in this article is higher than that of other classic convolutional models, and the model size is smaller, which is convenient for deployment on mobile devices.

[0047] The recognition results of the improved RegNet-EMTL model on different crop diseases and their damage levels are shown in the figure below. Fig.12As shown in the figure, it can be seen that the model has a high classification and recognition accuracy on healthy leaves, and the recognition accuracy of healthy grape leaves and healthy apple leaves has reached 100%. Through calculation, it can be obtained that the model's precision is 94.5%, the recall rate is 94.4%, and the F1 score is 94.3%, indicating that the model has a good recognition accuracy.

[0048] Fig.13 That is, to improve the extraction effect of each layer output feature of different diseases before and after model training. It can be seen that the learning of convolutional neural network is hierarchical.

[0049] The visualization of the convolutional neural network model can help us understand the output of each layer of the model. Through the output of the middle layer of the model, we can know what features each layer has learned. According to the visualized feature map, we can further adjust the parameters of the model and improve the performance of the model.

[0050] The feature extraction of the RegNet network includes the previous input layer Steam and RegStage1 to RegStage4, and the output feature maps are shown in the figure below from a to e. The features of the original image did not change significantly after passing through the input layer Steam, and basically retained all the information of the original image. After passing through the feature extraction layers RegStage1 to RegStage4, as the number of convolutional layers increases, the relevance of the visual content becomes less and less, and more of the texture characteristics of crop diseases are presented. After passing through the deepest feature extraction layer RegStage4, its feature map becomes more and more abstract, and finally its features are classified through the classification layer RegHead. Fig.13 By comparing the feature maps extracted from different types of crops in each layer, it can be seen that the leaf contour features and disease characteristics of different types of crops are different. Fig.13 The final feature extraction map of the healthy grape leaves in the fourth column is all black, indicating that the leaves are not diseased, while the feature map of the grape leaf blight in the third column contains the lesion features. At the same time, according to the visualization output of the middle layer, it can be seen that the improved RegNet-EMTL model of the present invention can well extract the characteristic information of crop diseases and use it to classify and identify crop diseases.

Claims

1. A method for identifying the degree of damage of various crop diseases based on improved RegNet, which is characterized by the following steps: Step 1, crop image acquisition and data preprocessing; Step 2, construction of crop leaf disease model; Step 3: Building a crop disease identification model; Step 4: Conduct experimental verification.

2. The method for identifying the degree of damage of various crop diseases based on improved RegNet according to claim 1, characterized in that: The improved RegNet network is used to adjust the model distribution by adjusting parameters, so as to obtain different network structures to handle different classification tasks. The ECA channel attention mechanism is introduced in the feature extraction layer of the model to improve the feature extraction ability of the model. ECA-Net (Efficient Channel Attention) is an effective channel attention mechanism that adopts a local cross-channel interaction strategy without dimensionality reduction, that is, a one-dimensional convolution is used on the channel for sliding filtering. This strategy saves parameters while also performing cross-channel interactions and avoiding channel reduction. The input image first obtains all feature information without dimensionality reduction through a GAP, and then extracts feature weights through an adaptive one-dimensional convolution. Finally, the feature information is mapped to [0,1] through the Sigmoid activation function, which improves the acquisition of effective features in the image. The adaptive one-dimensional convolution mainly adjusts the size of the input channel C through the parameter K. The description is as follows: In the formula represents the nearest odd number t, and we set a and b to 2 and 1 respectively in all experiments. It can be seen from the formula that high-dimensional channels have longer interactions, while low-dimensional channels have shorter interactions.

3. The method for identifying the degree of damage of various crop diseases based on improved RegNet according to claim 1, characterized in that: Transfer learning is performed using deep learning methods, among which transfer learning based on domain adaptation (DA) is the representative of deep transfer learning. Depending on whether the target domain has a label, it can be further divided into supervised, semi-supervised, and unsupervised DA. The core of DA is to reduce the distribution difference between the source domain and the target domain.