欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2023, Vol. 5 ›› Issue (1): 111-121.doi: 10.12133/j.smartag.SA202301005

• 信息处理与决策 • 上一篇    下一篇

基于弱监督下改进的CBAM-ResNet18模型识别苹果多种叶部病害

张文景1,2(), 蒋泽中1, 秦立峰1,3()   

  1. 1.西北农林科技大学 机械与电子工程学院,陕西杨凌 712100
    2.农业农村部农业物联网重点实验室,陕西杨凌 712100
    3.陕西省农业信息感知与智能服务重点实验室,陕西杨凌 712100
  • 收稿日期:2023-01-09 出版日期:2023-03-30
  • 基金资助:
    陕西省科学技术研究发展计划项目(2020NY-101)
  • 作者简介:张文景,本科,研究方向为模式识别。E-mail:1418454277@qq.com
  • 通信作者: 秦立峰,博士,副教授,研究方向为农业信息化技术、图像处理与模式识别等。E-mail:fuser@nwafu.edu.cn

Identifying Multiple Apple Leaf Diseases Based on the Improved CBAM-ResNet18 Model Under Weak Supervision

ZHANG Wenjing1,2(), JIANG Zezhong1, QIN Lifeng1,3()   

  1. 1.College of Mechanical and Electronic Engineering, Northwest A&F University, Yangling 712100, China
    2.Key Laboratory of Agricultural Internet of Things, Ministry of Agriculture and Rural Affairs, Yangling 712100, China
    3.Key Laboratory of Agricultural Information Perception and Intelligent Services, Yangling 712100, China
  • Received:2023-01-09 Online:2023-03-30

摘要:

针对苹果叶部病害图像在仅有图像类别标注的弱监督的条件下识别准确率低的问题,提出了一种基于改进的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模型可进行苹果叶部病害识别且具有良好的识别结果,可为苹果叶部病害智能识别提供技术支撑。

关键词: 病害识别, 残差网络, 注意力机制, 余弦退火学习率, 迁移学习, 卷积块注意力模块, 多层感知机

Abstract:

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.

Key words: disease identification, residual network, attentional mechanisms, cosine annealing learning rate, transfer learning, convolutional block attention module (CBAM), multilayer perceptron (MLP)

中图分类号: