摘要: 针对苹果叶部病害图像在仅有图像类别标注的弱监督的条件下识别准确率低的问题，提出了一种基于改 进的CBAM-ResNet算法进行苹果叶部病害识别。以ResNet18作为基础模型，对轻量级卷积块注意力模块（Convo⁃ lutional 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.