融合ECA机制与DenseNet201的水稻病虫害识别方法
收稿日期: 2023-05-07
网络出版日期: 2023-07-05
基金资助
2020年江苏省现代农业发展项目(2020-SJ-003-YD03);扬州大学学科特区学科交叉课题(yzuxk202008);2022年江苏省大学生创新训练计划项目重点项目(国家级)(202211117065Z)
Rice Disease and Pest Recognition Method Integrating ECA Mechanism and DenseNet201
Received date: 2023-05-07
Online published: 2023-07-05
Supported by
2020 Jiangsu Province Modern Agriculture Development Project (2020-SJ-003-YD03); Interdisciplinary Project of Yangzhou University Discipline Zone (yzuxk202008); 2022 Jiangsu Province College Student Innovation Training Program Key Project (National Level) (202211117065Z)
[目的/意义] 针对传统人工识别病虫害存在的效率过低、成本过高等问题,提出一种融合ECA(Efficient Channel Attention)注意力机制与DenseNet201的水稻图像识别模型GE-DenseNet(G-ECA DenseNet)。 [方法] 首先在ECA机制上引入Ghost模块的思想构成G-ECA Layer结构,增强其提取特征的能力。其次,在DenseNet201原有的Dense Block前引入G-ECA Layer,使模型具有更优的通道特征提取能力。由于实验所用的数据集较小,将DenseNet201在ImageNet数据集上预训练的权重参数迁移到GE-DenseNet中。训练时,采用Focal Loss函数来解决各分类样本不均衡的问题。同时,使用Adam优化器以避免在模型训练初期由于部分权重随机初始化而导致反向传播的梯度变化剧烈的问题,在一定程度上削弱了网络训练的不确定性。[结果和讨论]在包含水稻胡麻斑病、水稻铁甲虫、稻瘟病与健康水稻的3355张图像数据集上进行了实验测试,识别准确率达到83.52%。由GE-DenseNet模型的消融对比实验可得,引入了Focal Loss函数与G-ECA Layer层之后,模型准确率上升2.27%。将所提模型与经典NasNet(4@1056)、VGG-16和ResNet50模型相比,分类准确率分别提高了6.53%、4.83%和3.69%;相较于原始的DenseNet201,对水稻铁甲虫的识别准确率提升达20.32%。 [结论] 加入G-ECA Layer结构能够使模型更为准确地捕捉适合于水稻病虫害识别的特征信息,从而使GE-DenseNet模型能够实现对不同水稻病虫害图像更为准确地识别,为及时防治病虫害,减少各类损失提供技术支持。
潘晨露 , 张正华 , 桂文豪 , 马家俊 , 严晨曦 , 张晓敏 . 融合ECA机制与DenseNet201的水稻病虫害识别方法[J]. 智慧农业, 2023 , 5(2) : 45 -55 . DOI: 10.12133/j.smartag.SA202305002
[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.
1 | 徐春春, 纪龙, 陈中督, 等. 2022年我国水稻产业发展分析及2023年展望[J]. 中国稻米, 2023, 29(2): 1-4. |
XU C C, JI L, CHEN Z D, et al. Analysis of China's rice industry in 2022 and the outlook for 2023[J]. China rice, 2023, 29(2): 1-4. | |
2 | 刘震, 纪明妹, 郭志顶, 等. 图像识别技术在病虫害防治方面的应用与展望[J]. 沧州师范学院学报, 2022, 38(1): 119-123. |
LIU Z, JI M M, GUO Z D, et al. Application and prospect of image recognition technology in pest control[J]. Journal of Cangzhou normal university, 2022, 38(1): 119-123. | |
3 | 朱成宇. 基于轻量级卷积神经网络的水稻病害识别[D]. 南宁: 广西大学, 2022. |
ZHU C Y. Rice desease recognition based on lightweight convolutional neural network[D]. Nanning: Guangxi University, 2022. | |
4 | BRAHIMI M, BOUKHALFA K, MOUSSAOUI A. Deep learning for tomato diseases: Classification and symptoms visualization[J]. Applied artificial intelligence, 2017, 31(4): 299-315. |
5 | RAHMAN C R, ARKO P S, ALI M E, et al. Identification and recognition of rice diseases and pests using convolutional neural networks[J]. Biosystems engineering, 2020, 194: 112-120. |
6 | 李淼, 王敬贤, 李华龙, 等. 基于CNN和迁移学习的农作物病害识别方法研究[J]. 智慧农业, 2019, 1(3): 46-55. |
LI M, WANG J X, LI H L, et al. Method for identifying crop disease based on CNN and transfer learning[J]. Smart agriculture, 2019, 1(3): 46-55. | |
7 | SHARMA V, TRIPATHI A K, MITTAL H. DLMC-Net: Deeper lightweight multi-class classification model for plant leaf disease detection[J]. Ecological informatics, 2023, 75: ID 102025. |
8 | MONU B, DILIP K, SUNIL K. Bell pepper leaf disease classification with LBP and VGG-16 based fused features and RF classifier[J]. International journal of information technology, 2022, 15(1): 465-475. |
9 | 王东方, 汪军. 基于迁移学习和残差网络的农作物病害分类[J]. 农业工程学报, 2021, 37(4): 199-207. |
WANG D F, WANG J. Crop disease classification with transfer learning and residual networks[J]. Transactions of the Chinese society of agricultural engineering, 2021, 37(4): 199-207. | |
10 | 高友文, 周本君, 胡晓飞. 基于数据增强的卷积神经网络图像识别研究[J]. 计算机技术与发展, 2018, 28(8): 62-65. |
GAO Y W, ZHOU B J, HU X F. Research on image recognition of convolution neural network based on data enhancement[J]. Computer technology and development, 2018, 28(8): 62-65. | |
11 | HUANG G, LIU Z, VAN DER MAATEN L, et al. Densely connected convolutional networks[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2017: 2261-2269. |
12 | HAN K, WANG Y H, TIAN Q, et al. GhostNet: more features from cheap operations[C]// 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2020: 1577-1586. |
13 | WANG Q L, WU B G, ZHU P F, et al. ECA-net: Efficient channel attention for deep convolutional neural networks[C]// 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2020: 11531-11539. |
14 | 张善文, 张晴晴, 李萍. 基于改进深度卷积神经网络的苹果病害识别[J]. 林业工程学报, 2019, 4(4): 107-112. |
ZHANG S W, ZHANG Q Q, LI P. Apple disease identification based on improved deep convolutional neural network[J]. Journal of forestry engineering, 2019, 4(4): 107-112. | |
15 | 周飞燕, 金林鹏, 董军. 卷积神经网络研究综述[J]. 计算机学报, 2017, 40(6): 1229-1251. |
ZHOU F Y, JIN L P, DONG J. Review of convolutional neural network[J]. Chinese journal of computers, 2017, 40(6): 1229-1251. | |
16 | 罗大为, 方建军, 刘艳霞. 基于通道域注意力机制的特征融合方式[J]. 东北师大学报(自然科学版), 2021, 53(3): 44-48. |
LUO D W, FANG J J, LIU Y X. Feature fusion methods based on channel domain attention mechanism[J]. Journal of northeast normal university (natural science edition), 2021, 53(3): 44-48. | |
17 | 杨莲, 石宝峰. 基于Focal Loss修正交叉熵损失函数的信用风险评价模型及实证[J]. 中国管理科学, 2022, 30(5): 65-75. |
YANG L, SHI B F. Credit risk evaluation model and empirical research based on focal loss modified cross-entropy loss function[J]. Chinese journal of management science, 2022, 30(5): 65-75. | |
18 | LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[C]// 2017 IEEE International Conference on Computer Vision (ICCV). Piscataway, NJ, USA: IEEE, 2017: 2999-3007. |
19 | 卫雅娜, 王志彬, 乔晓军, 等. 基于注意力机制与EfficientNet的轻量化水稻病害识别方法[J]. 中国农机化学报, 2022, 43(11): 172-181. |
WEI Y N, WANG Z B, QIAO X J, et al. Lightweight rice disease identification method based on attention mechanism and EfficientNet[J]. Journal of Chinese agricultural mechanization, 2022, 43(11): 172-181. | |
20 | SENGUPTA A, YE Y T, WANG R, et al. Going deeper in spiking neural networks: VGG and residual architectures[EB/OL]. arXiv: , 2018. |
21 | HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2016: 770-778. |
22 | ZOPH B, VASUDEVAN V, SHLENS J, et al. Learning transferable architectures for scalable image recognition[C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway, NJ, USA: IEEE, 2018: 8697-8710. |
23 | 黎英, 宋佩华. 迁移学习在医学图像分类中的研究进展[J]. 中国图象图形学报, 2022, 27(3): 672-686. |
LI Y, SONG P H. Review of transfer learning in medical image classification[J]. Journal of image and graphics, 2022, 27(3): 672-686. | |
24 | 黄浩, 徐海华, 王羡慧, 等. 自动发音错误检测中基于最大化F1值准则的区分性特征补偿训练算法[J]. 电子学报, 2015, 43(7): 1294-1299. |
HUANG H, XU H H, WANG X H, et al. Maximum F1 score criterion based discriminative feature compensation training algorithm for automatic mispronunciation detection[J]. Acta electronica sinica, 2015, 43(7): 1294-1299. |
/
〈 |
|
〉 |