Welcome to Smart Agriculture

Smart Agriculture ›› 2023, Vol. 5 ›› Issue (2): 45-55.doi: 10.12133/j.smartag.SA202305002

• Topic--Machine Vision and Agricultural Intelligent Perception • Previous Articles     Next Articles

Rice Disease and Pest Recognition Method Integrating ECA Mechanism and DenseNet201

PAN Chenlu(), ZHANG Zhenghua(), GUI Wenhao, MA Jiajun, YAN Chenxi, ZHANG Xiaomin   

  1. College of information engineering (College of Artificial Intelligence), Yangzhou University, Yangzhou 225127, China
  • Received:2023-05-07 Online:2023-06-30

Abstract:

[Objective] To address the problems of low efficiency and high cost of traditional manual identification of pests and diseases, improve the automatic recognition of pests and diseases by introducing advanced technical means, and provide feasible technical solutions for agricultural pest and disease monitoring and prevention and control, a rice image recognition model GE-DenseNet (G-ECA DenseNet) based on improved ECA (Efficient Channel Attention) mechanism with DenseNet201 was proposed. [Methods] The leaf images of three pests and diseases, namely, brownspot, hispa, leafblast and healthy rice were selected as experimental materials. The images were captured at the Zhuanghe Rice Professional Cooperative in Yizheng, Jiangsu Province, and the camera was used to manually take pictures from multiple angles such as the top and side of rice every 2 h, thus acquiring 1250 images of rice leaves under different lighting conditions, different perspectives, and different shading environments. In addition, samples about pests and diseases were collected in the Kaggle database. There were 1488 healthy leaves, 523 images of brownspot, 565 images of hispa, and 779 images of leafblast in the dataset. Since the original features of the pest and disease data were relatively close, firstly, the dataset was divided into a training set and a test set according to the ratio of 9:1, and then data enhancement was performed on the training set. A region of interest (ROI) was randomly selected to achieve a local scale of 1.1 to 1.25 for the sample images of the dataset, thus simulating the situation that only part of the leaves were captured in the actual shooting process due to the different distance of the plants from the camera. In addition, a random rotation of a certain angle was used to crop the image to simulate the different angles of the leaves. Finally, the experimental training set contains 18,018 images and the test set contains 352 images. The GE-DenseNet model firstly introduces the idea of Ghost module on the ECA attention mechanism to constitute the G-ECA Layer structure, which replaces the convolution operation with linear transformation to perform efficient fusion of channel features while avoiding dimensionality reduction when learning channel attention information and effectively enhancing its ability to extract features. Secondly, since the original Dense Block only considered the correlation between different layers and ignores the extraction of important channel information in the image recognition process, introducing G-ECA Layer before the original Dense Block of DenseNet201 gives the model a better channel feature extraction capability and thus improved the recognition accuracy. Due to the small dataset used in the experiment, the weight parameters of DenseNet201 pre-trained on the ImageNet dataset were migrated to GE-DenseNet. During the training process, the BatchSize size was set to 32, the number of iterations (Epoch) was set to 50, and the Focal Loss function was used to solve the problem of unbalanced samples for each classification. Meanwhile, the adaptive moment estimation (Adam) optimizer was used to avoid the problem of drastic gradient changes in back propagation due to random initialization of some weights at the early stage of model training, which weakened the uncertainty of network training to a certain extent. [Results and Discussions] Experimental tests were conducted on a homemade dataset of rice pests and diseases, and the recognition accuracy reached 83.52%. Comparing the accuracy change graphs and loss rate change graphs of GE-DenseNet and DenseNet201, it could be found that the proposed method in this study was effective in training stability, which could accelerate the speed of model convergence and improve the stability of the model, making the network training process more stable. And observing the visualization results of GE-DenseNet and DenseNet201 corresponding feature layers, it could be found that the features were more densely reflected around the pests and diseases after adding the G-ECA Layer structure. From the ablation comparison experiments of the GE-DenseNet model, it could be obtained that the model accuracy increased by 2.27% after the introduction of the Focal Loss function with the G-ECA Layer layer. Comparing the proposed model with the classical NasNet (4@1056), VGG-16 and ResNet50 models, the classification accuracy increased by 6.53%, 4.83% and 3.69%, respectively. Compared with the original DenseNet201, the recognition accuracy of hispa improved 20.32%. [Conclusions] The experimental results showed that the addition of G-ECA Layer structure enables the model to more accurately capture feature information suitable for rice pest recognition, thus enabling the GE-DenseNet model to achieve more accurate recognition of different rice pest images. This provides reliable technical support for timely pest and disease control, reducing crop yield loss and pesticide use. Future research can lighten the model and reduce its size without significantly reducing the recognition accuracy, so that it can be deployed in UAVs, tractors and various distributed image detection edge devices to facilitate farmers to conduct real-time inspection of farmland and further enhance the intelligence of agricultural production.

Key words: DensetNet201, attention mechanism, pest and disease identification, transfer learning, CNN, Ghost module

CLC Number: