基于深度残差网络的番茄叶片病害识别方法
Method of tomato leaf diseases recognition method based on deep residual network
收稿日期: 2019-08-14 修回日期: 2019-11-07 网络出版日期: 2019-10-30
基金资助: |
|
Received: 2019-08-14 Revised: 2019-11-07 Online: 2019-10-30
作者简介 About authors
通信作者:吴华瑞(1975-),男,博士,研究员,研究方向:农业智能系统,电话:13910293903,Email:
传统深度学习模型在用于蔬菜病害图像识别时,存在由于网络梯度退化导致的识别性能下降问题。为此,本文研究了一种基于深度残差网络模型的番茄叶片病害识别方法。该方法首先利用贝叶斯优化算法自主学习网络中难以确定的超参数,降低了深度学习网络的训练难度。在此基础上,通过在传统深度神经网络中添加残差单元,解决了由于梯度爆炸/消失造成的过深层次病害识别网络模型性能下降的问题,能够实现番茄叶片图像的高维特征提取,根据该特征可进行有效病害鉴定。试验结果表明,本研究中基于超参数自学习构建的深度残差网络模型在番茄病害公开数据集上取得了良好的识别性能,对白粉病、早疫病、晚疫病和叶霉病等4种番茄叶片常见病害的识别准确率达到95%以上。本研究可为快速准确识别番茄叶片病害提供参考。
关键词:
Intelligent recognition of greenhouse vegetable diseases plays an important role in the efficient production and management. The color, texture and shape of some diseases in greenhouse vegetables are often very similar, it is necessary to construct a deep neural network to judge vegetable diseases. Based on the massive image data of greenhouse vegetable diseases, the depth learning model can automatically extract image details, which has better disease recognition effect than the artificial design features. For the traditional deep learning model of vegetable disease image recognition, the model recognition accuracy can be improved by increasing the network level. However, as the network level increases to a certain depth, it will lead to the degradation / disappearance of the network gradient, which degrades the recognition performance of the learning model. Therefore, a method of vegetable disease identification based on deep residual network model was studied in this paper. Firstly, considering that the super parameter value in the deep network model has a great influence on the accuracy of network identification, Bayesian optimization algorithm was used to autonomously learn the hyper-parameters such as regularization parameters, network width, stochastic momentum et al, which are difficult to determine in the network, eliminate the complexity of manual parameter adjustment, and reduce the difficulty of network training and saves the time of network construction. On this basis, the gradient could flow directly from the latter layer to the former layer through the identical activation function by adding residual elements to the traditional deep neural network. The deep residual recognition model takes the whole image as the input, and obtains the optimal feature through multi-layer convolution screening in the network, which not only avoids the interference of human factors, but also solves the problem of the performance degradation of the disease recognition model caused by the deep network, and realizes the high-dimensional feature extraction and effective disease recognition of the vegetable image. Relevant simulation results show that compared with other traditional models for vegetable disease identification, the deep residual neural network shows better stability, accuracy and robustness. The deep residual network model based on hyperparametric self-learning achievesd good recognition performance on the open data set of tomato diseases, and the recognition accuracy of 4 common diseases of tomato leaves reached more than 95%. The researth can provide a basic methed for fast and accurate recognition of tomato leaf diseases.
Keywords:
本文引用格式
吴华瑞.
Wu Huarui.
1 引言
视觉技术与数字产品的普及为设施蔬菜图像病害识别带来了新机遇,由计算机自动完成病害诊断,可降低农业人员对植物保护专家的依赖,减少由于病害知识缺乏造成的误判[3]。如张云龙等[4]将叶部病斑颜色特征与差直方图作为分类依据,利用支持向量机(Support Vector Machine,SVM)方法自动识别苹果叶部的3种病害,识别率达96%。夏永泉等[5]引入主颜色符描述病斑颜色特征,同时结合Tamura纹理特征区分小麦的3种病害叶片与健康叶片,实验结果优于同等条件下的SVM。基于高分辨率图像,国外有学者[6]采用简单线性迭代聚类方法检测大豆叶片的颜色、形状、纹理与梯度等视觉属性特征,描述了植物叶片的物理特性,但该方法计算开销过大。魏丽冉等[7]则通过图像预处理,增强了病害部分的明显度,使用基于核函数的支持向量机算法进行病害分类。除此之外,文献[8,9,10,11]等研究与上述方法类似,主要通过病害阈值分割构建有效特征矩阵,然后利用不同分类器识别植物病害。但现实中,植物病害形状位置多变,图像背景复杂,人工设计的特征越来越难以准确识别规模庞大的病害图像数据。
深度学习是目前较先进的机器学习方法,它利用具有隐藏层的人工神经网络,不依靠图像分割与特征提取自动完成高层次的特征学习。深度学习在病害诊断方面已取得了较好的研究成果。Zhang等[12]提出一种基于改进GoogLeNet和Cifar 10网络的深度学习模型用于叶片识别。宋丽娟[13]结合区分深度置信网络对病斑颜色、形状等底层特征进行高层表示,能够在没有充足标注数据时稳定完成四种枸杞病害识别。王艳玲等[14]采用了AlexNet卷积神经网络迁移学习,实现了番茄叶片病害图像快速准确分类。文献[15,16,17,18,19]等将离散小波变换、区域生长法等特征提取技术与深度神经网络学习相结合,利用特征提取技术检索病害特征,然后通过概率神经网络对植物疾病成功进行了分类。
基于设施蔬菜病害的海量图像数据和深度学习模型可自动提取图像细节特征,且相较于人工设计特征具有更好的病害识别效果[20]。但由于大多数蔬菜疾病是由真菌、细菌与病毒引起的,导致很多设施蔬菜病害的表象相似,需要构建较深的神经网络才能取得良好的病害鉴定结果。本研究针对深度学习网络模型因层次过深存在的性能下降问题,提出了一种基于深度残差神经网络的番茄叶片病害鉴定方法,将底层病害特征与高层病害特征合并运算,避免了深度神经网络的梯度消失与梯度爆炸问题。同时通过利用贝叶斯理论优化深度残差网络超参数,降低模型陷入局部最优的概率,从而提高了以番茄叶片为代表的设施蔬菜病害图像的识别准确度。
2 基于深度残差网络的病害图像识别方法
2.1 深度残差网络结构
深度卷积神经网络主要由数据输入层、隐藏层与输出层构成。隐藏层中包含多级神经网络,主要依靠Conv卷积层、pooling池化层与全连接层配合搭建,利用卷积特征提取器获得输入图像的边缘、纹理与隐藏的细节特征,最后通过全连接层(Fully Connected layers,FC)根据提取特征进行病害分类,如图1所示。为了提高网络性能,深度卷积神经网络通常都包括非线性激活函数与批量归一化层(Batch Normalization layers,BN)。隐藏层中每层的每个神经单元与下一层所有神经单元相连,所有连接都有一个权值,网络训练过程中,对于每层输出结果需要通过损失函数计算衡量分类错误程度,使用梯度下降更新各层权值。
图1
在卷积神经网络中,由于对于一个L层卷积神经网络,它的训练网络梯度计算如公式(1)所示[26]:
其中,
通过式(1)可知,随着网络深度增加,梯度幅度会急剧减小/增大,导致浅层神经元权重更新过慢/快,从而发生梯度消失/梯度爆炸,造成模型性能下降。因此,He和Sun[22]提出利用残差映射优化深度学习网络,通过利用跳跃连接跳过卷积层形成残差块,在很大程度上解决了网络模型退化问题,并大大提高了训练效率。
基于He和Sun提出的残差网络模型,本研究构建了用于番茄叶片病害鉴定的深度残差网络,其整体框架如图2所示。
图2
番茄叶片病害鉴定过程为:将
深度残差网络在更新叠加层参数的同时更新直接连接的输入数据的参数,将浅层网络得到的低阶病害特征和深层网络提取的高阶病害特征进行合并运算,梯度可以直接通过恒等激活函数从后一层流到前一层,使残差网络具有比传统卷积神经网络更快的收敛速度,更强的特征表达能力。
2.2 基于贝叶斯理论的超参数优化
构建深度残差神经网络往往首先需要确定超参数,这些参数包括网络深度、过拟合正则化参数与学习速率等。超参数值是影响训练时间和分类精度的重要因素,而人工调整需要耗费大量时间。
有研究发现残差网络是由若干浅层网络组合而成,优化其网络宽度比增加网络深度更有意义[14]。因此,如式(3)所示,本研究假设
在本研究中,贝叶斯优化通过令验证数据分类误差最小化,确定最佳网络架构和超参数值。寻找最优超参数的目标函数可以被建模为:
其中,
3 试验结果及分析
通过提取PlantVillag公开数据集中番茄的病害叶片与健康叶片,本研究构建了番茄病害数据库。数据集分布如表2所示。
表2 试验数据库
Table 2
叶片类型 | 训练数量(张) | 验证数量(张) | 总数(张) |
---|---|---|---|
健康叶片 | 534 | 159 | 693 |
白粉病叶片 | 603 | 184 | 787 |
早疫病叶片 | 316 | 99 | 415 |
晚疫病叶片 | 569 | 190 | 759 |
叶霉病叶片 | 259 | 94 | 353 |
总数(张) | 2281 | 726 | 3007 |
该数据集包含白粉病、早疫病、晚疫病与叶霉病等4种真菌导致的番茄叶片常见病害,病害表现如图3所示。
图3
图4
根据2.2节所述,利用贝叶斯优化算法对网络超参数进行调优,其过程如图5所示。基于高斯过程回归对超参数建模得到目标函数的替代概率模型,在代理模型上找到最佳超参数组合(最小预测点),将该组合用于真正目标函数(验证集分类错误率)获得最小观测值,然后更新包含新最小观测点的代理模型,重复上述步骤,得到最优超参数组合。通过贝叶斯优化,本研究确定训练深度残差网络宽度
图5
基于上述参数,构建第2节所述的深度残差网络和传统卷积神经网络对番茄叶片图像集进行训练分类。利用随机梯度下降算法更新网络权重,通过1360次迭代,可得到深度残差网络与传统卷积神经网络对相同验证数据集的误差曲线。图6中深度残差网络的曲线收敛速度更快。
图6
基于相同验证集与测试集,构建番茄叶片图像的灰度和GLCM特征矩阵,并分别利用SVM与含5个隐藏节点的误差反向传播(Back Propagation,BP)神经网络进行病害鉴定,结果如表3所示。
表3 不同识别模型对比
Table 3
识别 模型 | 单个病害识别准确率(%) | 平均准确率(%) | ||||
---|---|---|---|---|---|---|
叶片白粉 | 叶片早疫 | 叶片晚疫 | 叶片叶霉 | 健康叶片 | ||
SVM | 83.7 | 52.5 | 68.9 | 66.0 | 92.5 | 72.7 |
BP神经网络 | 78.8 | 51.5 | 71.1 | 60.6 | 93.7 | 74.0 |
DCNN | 95.0 | 99.5 | 81.8 | 94.7 | 94.7 | 94.2 |
本研究模型 | 96.7 | 98.9 | 96.0 | 95.8 | 95.7 | 96.8 |
表中DCNN为22层卷积神经网络。本研究模型对比传统SVM与BP神经网络,识别精度有明显提升;对比DCNN学习模型,深度残差网络模型收敛更快,同时识别准确率提高。对健康叶片与感染白粉、早疫、晚疫和叶霉的病害叶片,本研究模型的识别准确率依次是95.7%、96.7%、98.9%、96.0%、95.8%。
4 结论
本研究通过分析深度学习应用于病害鉴定的研究现状,针对目前随着网络深度增加,病害识别模型存在的梯度爆炸与梯度消失问题,研究了基于深度残差网络的番茄叶片病害智能识别方法。同时,考虑到网络模型参数调整的困难,本研究利用贝叶斯优化算法确定了训练网络的最优超参数。由试验结果得到,该深度残差网络模型可对番茄叶片的白粉病、早疫病、晚疫病和叶梅病4种病害进行有效分类,分类准确度达到95%以上。
自然环境中,受光照与遮挡等因素影响,病害叶片图像往往具有复杂背景,所以需要进一步研究有效的背景分割方法以提高病害识别正确率。而由于深度残差网络通过增加跳跃连接改善深度学习模型性能,网络训练时间较长,因此在实际应用中,如何优化深度残差网络的训练时长将是以后的研究方向之一。
参考文献
Crops disease diagnosing using image-based deep learning mechanism
[C]//
Dempster-Shafer method for diagnose diseases on vegetable
[C]//
Robotic disease detection in greenhouses: combined detection of powdery mildew and tomato spotted wilt virus
[J].
基于随机森林方法的小麦叶片病害识别研究
[J].
Identification of wheat leaf disease based on random forest method
[J].
Identification of soybean foliar diseases using unmanned aerial vehicle images
[J].
基于核函数支持向量机的植物叶部病害多分类检测方法
[J].
Multi-classification detection method of plant leaf disease based on kernel function SVM
[J].
高光谱和图像特征相融合的生菜病害识别
[J].
Disease recognition of lettuce with feature fusion based on hyperspectrum and image
[J].
基于Variance-SFFS的小麦叶部病害图像识别
[J].
Identification of wheat leaf diseases based on Variance-SFFS algorithm
[J].
复杂背景下植物叶片病害的图像特征提取与识别技术研究
[J].
Image feature extraction and recognition of plant leaf disease in complex background
[J].
Semi-automatic leaf disease detection and classification system for soybean culture
[J].
Identification of maize leaf diseases using improved deep convolutional neural networks
[J].
基于区分深度置信网络的病害图像识别模型
[J].
Recognition model of disease image based on discriminative deep belief networks
[J].
基于迁移学习的番茄叶片病害图像分类
[J].
Image classification of tomato leaf diseases based on transfer learning
[J].
Identification and classification of diseases in carrot vegetable using discrete wavelet transform
[C]//
Bacterial foraging optimization based radial basis function neural network (BRBFNN) for identification and classification of plant leaf diseases: An automatic approach towards plant pathology
[J].
基于迁移学习与卷积神经网络的玉米植株病害识别
[J].
Corn plant disease recognition based on migration learning and convolutional neural network
[J].
一种基于卷积神经网络的小麦病害识别方法
[J].
A method of wheat disease identification based on convolutional neural network
[J].
基于病斑形状和神经网络的黄瓜病害识别
[J].
Recognition for cucumber disease based on leaf spot shape and neural network
[J].
Identification of leaf diseases in pepper plants using soft computing techniques
[C]//
ImageNet classification with deep convolutional neural networks
[C]// NIPS.
Convolutional neural networks at constrained time cost
[C]//
Going deeper with convolutions
[C]//
Deep residual learning for image recognition
[C]//
Steganalysis via deep residual network
[C]//
基于残差网络的小型车辆目标检测算法
[J].
Small vehicle target detection algorithm based on residual network
[J].
残差网络研究综述
[J].
Survey of residual network
[J].
A case for efficient accelerator design space exploration via Bayesian optimization
[C]//
/
〈 |
|
〉 |
