基于弱监督下改进的CBAM-ResNet18模型识别苹果多种叶部病害
收稿日期: 2023-01-09
网络出版日期: 2023-04-14
基金资助
陕西省科学技术研究发展计划项目(2020NY-101)
Identifying Multiple Apple Leaf Diseases Based on the Improved CBAM-ResNet18 Model Under Weak Supervision
Received date: 2023-01-09
Online published: 2023-04-14
Supported by
Shaanxi Provincial Science and Technology Research and Development Plan Project (2020NY-101)
针对苹果叶部病害图像在仅有图像类别标注的弱监督的条件下识别准确率低的问题,提出了一种基于改进的CBAM-ResNet算法进行苹果叶部病害识别。以ResNet18作为基础模型,对轻量级卷积块注意力模块(Convolutional Block Attention Module,CBAM)注意力机制中通道注意力模块中的多层感知机(Multilayer Perceptron,MLP)进行升维改进,放大苹果叶部病害特征细节;将改进的CBAM融入残差模块中,以加强对关键细节特征的提取,将AlphaDropout配合SeLU(Scaled Exponential Linearunits)融入网络中,防止其网络的过拟合化,加速模型收敛效果;最后,采用单周期余弦退火算法调整学习率,得到病害识别模型。训练在样本图像均只进行图像级标注的弱监督下进行,大大降低标注成本。通过消融实验,探究出改进CBAM中MLP最佳升维维度为2,相对于原CBAM,准确率提升0.32%,并在参数量增加17.59%的情况下,每轮训练时长减少8 s。在包含苹果斑点落叶病、褐斑病、花叶病、灰斑病、锈病等5种病害的6185幅图像数据集上进行了试验测试,结果显示,在弱监督学习下,识别准确率方面,该模型对苹果5种病害的平均识别准确率达到98.44%,改进的CBAM-ResNet18相比改进前的ResNet18提高了1.47%,且高于VGG16,DesNet121,ResNet50,ResNeXt50,EfficientNet-B0和Xception对照模型;在学习效率方面,改进的CBAM-ResNet18相对于ResNet18在参数量增加24.9%的条件下,每轮的训练时间减少6 s,且在VGG16,DesNet121,ResNet50,ResNeXt50,EfficientNet-B0和Xception对照模型中以每轮137 s最快速度完成模型训练。通过混淆矩阵结果,计算出模型的精确度平均值、召回率平均值和F1分数平均值分别达到了98.43%、98.46%和0.9845。该结果表明,改进的CBAM-ResNet模型可进行苹果叶部病害识别且具有良好的识别结果,可为苹果叶部病害智能识别提供技术支撑。
张文景, 蒋泽中, 秦立峰 . 基于弱监督下改进的CBAM-ResNet18模型识别苹果多种叶部病害[J]. 智慧农业, 2023 , 5(1) : 111 -121 . DOI: 10.12133/j.smartag.SA202301005
To deal with the issues of low accuracy of apple leaf disease images recognition under weak supervision with only image category labeling, an improved CBAM-ResNet-based algorithm was proposed in this research. Using ResNet18 as the base model, the multilayer perceptron (MLP) in the lightweight convolutional block attention module (CBAM) attention mechanism channel was improved by up-dimensioning to amplify the details of apple leaf disease features. The improved CBAM attention module was incorporated into the residual module to enhance the key details of AlphaDropout with SeLU (Scaled Exponential Linearunits) to prevent overfitting of its network and accelerate the convergence effect of the model. Finally, the learning rate was adjusted using a single-cycle cosine annealing algorithm to obtain the disease recognition model. The training test was performed under weak supervision with only image-level annotation of all sample images, which greatly reduced the annotation cost. Through ablation experiments, the best dimensional improvement of MLP in CBAM was explored as 2. Compared with the original CBAM, the accuracy rate was increased by 0.32%, and the training time of each round was reduced by 8 s when the number of parameters increased by 17.59%. Tests were conducted on a dataset of 6185 images containing five diseases, including apple spotted leaf drop, brown spot, mosaic, gray spot, and rust, and the results showed that the model achieved an average recognition accuracy of 98.44% for the five apple diseases under weakly supervised learning. The improved CBAM-ResNet18 had increased by 1.47% compared with the pre-improved ResNet18, and was higher than VGG16, DesNet121, ResNet50, ResNeXt50, EfficientNet-B0 and Xception control model. In terms of learning efficiency, the improved CBAM-ResNet18 compared to ResNet18 reduced the training time of each round by 6 s under the condition that the number of parameters increased by 24.9%, and completed model training at the fastest speed of 137 s per round in VGG16, DesNet121, ResNet50, ResNeXt50, Efficient Net-B0 and Xception control models. Through the results of the confusion matrix, the average precision, average recall rate, and average F1 score of the model were calculated to reach 98.43%, 98.46%, and 0.9845, respectively. The results showed that the proposed improved CBAM-ResNet18 model could perform apple leaf disease identification and had good identification results, and could provide technical support for intelligent apple leaf disease identification providing.
1 | ZHU X L, ZHU M, REN H E. Method of plant leaf recognition based on improved deep convolutional neural network[J]. Cognitive systems research, 2018, 52: 223-233. |
2 | 丁永军, 张晶晶, 李民赞. 基于卷积胶囊网络的百合病害识别研究[J]. 农业机械学报, 2020, 51(12): 246-251, 331. |
DING Y J, ZHANG J J, LI M Z. Disease detection of lily based on convolutional capsule network[J]. Transactions of the Chinese society for agricultural machinery, 2020, 51(12): 246-251, 331. | |
3 | LI D S, WANG R J, XIE C J, et al. A recognition method for rice plant diseases and pests video detection based on deep convolutional neural network[J]. Sensors (basel, Switzerland), 2020, 20(3): ID 578. |
4 | 周巧黎, 马丽, 曹丽英, 等. 基于改进轻量级卷积神经网络MobileNetV3的番茄叶片病害识别[J]. 智慧农业(中英文), 2022, 4(1): 47-56. |
ZHOU Q L, MA L, CAO L Y, et al. Identification of tomato leaf diseases based on improved lightweight convolutional neural networks MobileNetV3[J]. Smart agriculture, 2022, 4(1): 47-56. | |
5 | 任冬伟, 王旗龙, 魏云超, 等. 视觉弱监督学习研究进展[J]. 中国图象图形学报, 2022, 27(6): 1768-1798. |
REN D W, WANG Q L, WEI Y C, et al. Progress in weakly supervised learning for visual understanding[J]. Journal of image and graphics, 2022, 27(6): 1768-1798. | |
6 | MEI S A, YANG H A, YIN Z P. An unsupervised-learning-based approach for automated defect inspection on textured surfaces[J]. IEEE transactions on instrumentation and measurement, 2018, 67(6): 1266-1277. |
7 | 孙美君, 吕超章, 韩亚洪, 等. 弱监督学习下的融合注意力机制的表面缺陷检测[J]. 计算机辅助设计与图形学学报, 2021, 33(6): 920-928. |
SUN M J, LYU C Z, HAN Y H, et al. Weakly supervised surface defect detection based on attention mechanism[J]. Journal of computer-aided design & computer graphics, 2021, 33(6): 920-928. | |
8 | DESELAERS T, ALEXE B, FERRARI V. Weakly supervised localization and learning with generic knowledge[J]. International journal of computer vision, 2012, 100(3): 275-293. |
9 | RUSSAKOVSKY O, LIN Y Q, YU K, et al. Object-centric spatial pooling for image classification[C]// European conference on computer vision. Berlin, Heidelberg, Germany: Springer, 2012: 1-15. |
10 | DURAND T, MORDAN T, THOME N, et al. WILDCAT: weakly supervised learning of deep ConvNets for image classification, pointwise localization and segmentation[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2017: 5957-5966. |
11 | CHOE J, SHIM H. Attention-based dropout layer for weakly supervised object localization[C]// 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2020: 2214-2223. |
12 | ZHOU B L, KHOSLA A, LAPEDRIZA A, et al. Learning deep features for discriminative localization[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2016: 2921-2929. |
13 | 王云露, 吴杰芳, 兰鹏, 等. 基于改进Faster R-CNN的苹果叶部病害识别方法[J]. 林业工程学报, 2022, 7(1): 153-159. |
WANG Y L, WU J F, LAN P, et al. Apple disease identification using improved Faster R-CNN[J]. Journal of forestry engineering, 2022, 7(1): 153-159. | |
14 | 周敏敏. 基于迁移学习的苹果叶面病害Android检测系统研究[D]. 杨凌: 西北农林科技大学, 2019. |
ZHOU M M. Apple foliage diseases recognition in android system with transfer learning-based[D]. Yangling: Northwest A & F University, 2019. | |
15 | 谢秋菊, 吴梦茹, 包军, 等. 融合注意力机制的个体猪脸识别[J]. 农业工程学报, 2022, 38(7): 180-188. |
XIE Q J, WU M R, BAO J, et al. Individual pig face recognition combined with attention mechanism[J]. Transactions of the Chinese society of agricultural engineering, 2022, 38(7): 180-188. | |
16 | 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. |
17 | 涂雪滢, 刘世晶, 钱程. 基于ResNet的典型养殖鱼类识别方法研究[J]. 渔业现代化, 2022, 49(3): 81-88. |
TU X Y, LIU S J, QIAN C. Study on the identification methods of typical cultured fish based on ResNet[J]. Fishery modernization, 2022, 49(3): 81-88. | |
18 | WOO S, PARK J, LEE J Y, et al. CBAM: Convolutional block attention module[C]// Computer Vision-ECCV 2018. Berlin, Heidelberg, Germany: Springer International Publishing, 2018: 3-19. |
19 | FU J L, ZHENG H L, MEI T. Look closer to see better: Recurrent attention convolutional neural network for fine-grained image recognition[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Piscataway, NJ, USA: IEEE, 2017: 4476-4484. |
20 | HU J, SHEN L, SUN G. Squeeze-and-excitation networks[C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway, NJ, USA: IEEE, 2018: 7132-7141. |
21 | KLAMBAUER G, UNTERTHINER T, MAYR A, et al. Self-normalizing neural networks[J/OL]. arXiv: , 2017. |
22 | GLOROT X, BORDES A, BENGIO Y. Deep sparse rectifier neural networks[C]// Artificial Intelligence and Statistics Conference. Cambridge, US: MIT Press, 2011: 315-323. |
23 | LOSHCHILOV I, HUTTER F. SGDR: Stochastic gradient descent with warm restarts[J/OL]. arXiv: ,2016. |
/
〈 | 〉 |