汤文亮 黄梓锋



摘要: 目前,基于迁移学习诊断农作物病害已經成为一种趋势,然而大多数研究使用的模型参数众多,占用了大量设备空间并且推理演算耗时较长,导致对存储和计算资源有严格限制的设备无法利用深度神经网络的优势。为此,本研究以PlantVillage数据集中的番茄病害样本为研究对象,基于条件卷积及通道注意力机制,提出1种新颖的轻量级模型,同时使用知识蒸馏法指导模型训练,在保证模型性能的前提下压缩模型大小。将AlexNet、VGG16、GoogLeNet、ResNet50及DenseNet121进行对比,并利用类激活图(CAM)可视化模型分类决策的图像区域。结果表明,经过蒸馏的自定义模型可以精准定位番茄病叶的发病区域,在测试集中的平均识别准确率达97.6%,不仅优于其他模型,而且模型大小仅为4.4 M。
关键词: 番茄病害;识别模型;条件卷积;注意力机制;知识蒸馏
中图分类号: TP391.41 文献标识码: A 文章编号: 1000-4440(2021)03-0570-09
Lightweight model of tomato leaf diseases identification based on knowledge distillation
TANG Wen-liang, HUANG Zi-feng
(School of Information Engineering, East China Jiaotong University, Nanchang 330013, China)
Abstract: At present, crop disease diagnosis based on transfer learning has become a trend. However, models used in most studies had a large number of parameters, which occupied a lot of equipment space and took much time for inference. The above conditions make devices with strict restrictions on storage and computing resources cannot take advantage of deep neural networks. Thus, tomato disease samples from the PlantVillage dataset were used as the research object in this study, a novel lightweight model based on conditional convolution and channel attention mechanism was proposed. At the same time, knowledge distillation method was used to train the custom model, which could greatly reduce the model volume while ensuring the performance of the model. The AlexNet, VGG16, GoogLeNet, ResNet50 and DenseNet121 were compared, and the class activation map (CAM) was used to visualize the image area in the model classification decision. The results showed that the distilled user-defined model could accurately locate the diseased tomato leaves. The average recognition accuracy in the test set was 97.6%, which was higher than other models and the model size was only 4.4 M.
Key words: tomato disease;identification model;conditional convolution;attention mechanism;knowledge distillation
中国番茄的常年种植面积达6×104hm2,对经济发展和提高农户收入具有重要意义[1]。然而,由于番茄易受多种病虫害威胁,导致其产量降低歉收[2]。传统的人工鉴定农作物病害的方式依赖菜农或指导专家的经验,容易出现错诊、漏诊,导致农民错过防控病害的最佳时间[3]。目前,人们更偏向于选择高效精准的图像识别技术来诊断农作物病害。早期智能化诊断农作物病害的方式需要人工针对特定病害提取病斑纹理、形状及颜色等建立特征向量,再利用支持向量机法[4]、随机森林法[5]、K-均值法[6]等机器学习算法进行分类。……