孫 俊,譚文軍,毛罕平,武小紅,陳 勇,汪 龍
?
基于改進卷積神經(jīng)網(wǎng)絡的多種植物葉片病害識別
孫 俊1,譚文軍1,毛罕平2,武小紅1,陳 勇1,汪 龍1
(1. 江蘇大學電氣信息工程學院,鎮(zhèn)江 212013;2. 江蘇大學江蘇省現(xiàn)代農業(yè)裝備與技術重點實驗室,鎮(zhèn)江 212013)
針對訓練收斂時間長,模型參數(shù)龐大的問題,該文將傳統(tǒng)的卷積神經(jīng)網(wǎng)絡模型進行改進,提出一種批歸一化與全局池化相結合的卷積神經(jīng)網(wǎng)絡識別模型。通過對卷積層的輸入數(shù)據(jù)進行批歸一化處理,以便加速網(wǎng)絡收斂。進一步縮減特征圖數(shù)目,并采用全局池化的方法減少特征數(shù)。通過設置不同尺寸的初始層卷積核和全局池化層類型,以及設置不同初始化類型和激活函數(shù),得到8種改進模型,用于訓練識別14種不同植物共26類病害并選出最優(yōu)模型。改進后最優(yōu)模型收斂時間小于傳統(tǒng)卷積神經(jīng)網(wǎng)絡模型,僅經(jīng)過3次訓練迭代,就能達到90%以上的識別準確率;參數(shù)內存需求僅為2.6 MB,平均測試識別準確率達到99.56%,查全率和查準率的加權平均分數(shù)為99.41%。改進模型受葉片的空間位置的變換影響較小,能識別多種植物葉片的不同病害。該模型具有較高的識別準確率及較強的魯棒性,該研究可為植物葉片病害的識別提供參考。
病害;植物;圖像處理;識別;卷積神經(jīng)網(wǎng)絡;批歸一化;全局池化;深度學習
植物的病害問題與人們的日常生活密切相關,雖然使用化學農藥能夠控制植物病害,但是由于病害種類繁多,僅靠人工肉眼觀察及經(jīng)驗判斷容易發(fā)生誤診,植物病害得不到及時診治[1-2][1]。治理植物病害最關鍵的是快速且精確診斷病害類型,防止農藥的錯誤使用。
隨著計算機技術的不斷發(fā)展,關于植物葉片病害的智能識別研究也取得了良好的進展。譚峰等[3]通過計算葉片色度值,建立多層BP神經(jīng)網(wǎng)絡模型,實現(xiàn)大豆葉片的病害識別。田有文等[4]通過提取葡萄病葉的顏色與紋理特征,利用支持向量機(support vector machine,SVM)識別的方法取得了比神經(jīng)網(wǎng)絡識別更好的效果。王獻鋒等[5]提取葉片病斑顏色、形狀、紋理等特征,結合環(huán)境信息,利用判別分析法,識別黃瓜病斑類別。Zhang等[6]也是將斑點分割之后再提取病斑的顏色、形狀和紋理特征,然后通過K最近鄰(K-nearest neighbor,KNN)分類算法對5種玉米葉片進行識別。以上文獻均是通過提取植物特定圖像特征結合傳統(tǒng)分類方法對病害進行識別。雖然取得了較好的識別效果,但是由于特定特征并非能夠完全或者較好地表征植物病害信息,且病害葉片不一定出現(xiàn)病斑,可能出現(xiàn)粉狀物,這使得分割工作更加困難,從而對識別效果產(chǎn)生不利影響。且上述方法所選試驗樣本數(shù)目有限,或所選葉片僅來自一種植物,這些方法僅局限于對同一種植物的葉片病害識別。
近些年興起的卷積神經(jīng)網(wǎng)絡[7](convolutional neural network,CNN)能夠不依賴特定特征,在圖像識別領域(如手寫字體識別[8]、人臉識別[9-10]以及物體檢測[11-12]等方面)已經(jīng)得到廣泛應用。在廣義識別上,AlexNet[13]、GoogLeNet[14]和ResNet[15]等卷積神經(jīng)網(wǎng)絡模型都取得較好的效果。越來越多的學者將這些模型用于狹義的圖像識別中,龔丁禧等[16-17]采用卷積神經(jīng)網(wǎng)絡對植物葉片分類進行了相關研究。Sladojevic等[18]、Brahimi等[19]與Amara等[20]將卷積神經(jīng)網(wǎng)絡用于植物葉片病害識別,分別在模型CaffeNet和AlexNet上使用微調方法進行改進,取得了較好的識別效果。以上文獻證明卷積神經(jīng)網(wǎng)絡識別植物葉片病害是可行的,但這些模型參數(shù)量大,訓練時間長,且模型不易使用。
針對訓練收斂時間長,模型參數(shù)龐大的問題。本文提出一種批歸一化與全局池化相結合的新型模型識別方法,對含有14種不同品種植物共26類病害的葉片圖片集進行訓練與測試,并與傳統(tǒng)卷積神經(jīng)網(wǎng)絡AlexNet模型識別方法以及傳統(tǒng)葉片病害識別方法相比較分析。以期為植物葉片病害的識別提供參考。
PlantVillage工程(www.plantvillage.org)為解決植物病害診斷的問題,面向所有用戶開放數(shù)據(jù)庫,數(shù)據(jù)庫中包含多類植物的患病與健康葉片圖像數(shù)據(jù)。本文采用PlantVillage工程所收集的21 917張葉片圖像作為試驗數(shù)據(jù),其中包含14種植物共26類病害葉片以及部分植物的健康葉片,如圖1所示。
注:標號1-4依次為蘋果瘡痂病、黑腐病、銹病和健康葉;5為藍莓健康葉;6-7依次為白粉病、櫻桃健康葉;8-11依次為玉米灰斑病、銹病、枯葉病和健康葉;12-15依次為葡萄黑腐病、黑痘病、葉枯病和健康葉;16為橘子黃龍病葉;17-18依次為桃子細菌性斑點病和健康葉;19-20依次為辣椒細菌性斑點病和健康葉;21-23依次為土豆早疫病、晚疫病和健康葉;24為覆盆子健康葉;25為黃豆健康葉;26為南瓜白粉病葉;27-28依次為草莓葉焦病和健康葉;29-38依次為番茄細菌性斑點病、早疫病、晚疫病、葉霉病、斑枯病、健康、輪斑病、黃曲病、花葉病和二斑葉螨病葉。
卷積神經(jīng)網(wǎng)絡包含多層卷積和池化層,用于逐層提取圖片深層特征[13]。AlexNet卷積神經(jīng)網(wǎng)絡作為一個經(jīng)典網(wǎng)絡,其包含輸入層、卷積層、池化層、全連接層和Softmax分類器,在圖像識別任務上取得了重大突破。但由于網(wǎng)絡結構使用全連接層,需計算大量權值參數(shù),內存占用大且收斂慢。再者由于采用批量訓練的方法,每訓練一個批次數(shù)據(jù)更新一次網(wǎng)絡參數(shù),不同批次圖片數(shù)據(jù)分布不同,如果數(shù)據(jù)分布差異非常大,則需要重新大幅調整參數(shù)以適應當前批次數(shù)據(jù)。且由于層與層互相連接,隨著網(wǎng)絡層次增多,前面層的參數(shù)的微小改變會導致后面層參數(shù)發(fā)生巨大變化,增大了計算量和收斂時間[21]。
為解決模型收斂時間長和參數(shù)內存需求大的問題,本文在AlexNet的基礎上做了以下2個方面的改進:1)采用批歸一化方法加速網(wǎng)絡收斂;2)采用加入全局池化層和縮減特征圖數(shù)目的方法減少模型參數(shù)。
式中和分別為批次均值和方差,接著將數(shù)據(jù)歸一化
傳統(tǒng)的卷積神經(jīng)網(wǎng)絡模型通常設置全連接層級聯(lián)(concatenate)在池化層后,但如果設置神經(jīng)元數(shù)目較多,將使全連接層參數(shù)占據(jù)模型總參數(shù)的較大比重,且訓練時間長。Hinton等[22]提出在全連接層設置Dropout,隨機的抑制一定數(shù)目的神經(jīng)元,使被抑制神經(jīng)元暫時不參與網(wǎng)絡的前向傳播,但保留其權值,這能防止過擬合[23],同時提高模型的泛化能力[24]。全局池化[25]相比傳統(tǒng)的全連接層,具有增強特征圖與類別的關系、防止過擬合、對圖像的空間變換保持近似不變性等優(yōu)點,使用全局池化的方法可避免Dropout參數(shù)尋優(yōu)。
圖2為批歸一化與全局池化相結合的卷積神經(jīng)網(wǎng)絡模型,該模型對輸入卷積層的數(shù)據(jù)進行了批歸一化,且將全連接層替換為全局池化層,同時調節(jié)了原始AlexNet模型部分參數(shù)。改進模型的卷積層與池化層共9層,為畫圖方便,圖中部分層次(激活層)未展示出來,但改進之處圖中都有呈現(xiàn)。模型包含5層卷積層(Conv 1~Conv 5)和4層池化層(pooling1~global pooling 4),分類器采用Softmax分類器??紤]到不同參數(shù)設置會對模型性能產(chǎn)生相應的影響,本文主要比較Conv1層卷積核尺寸與初始化類型、全局池化類型以及各層激活函數(shù)類型對病害識別平均準確率(average accuracy,AA)的影響,進而對模型優(yōu)化。利用平均準確率和查全率與查準率加權平均分數(shù)(1)指標來評價模型效果。
注:Conv1、Conv2、…、Conv5的卷積核數(shù)目分別為96、128、192、192、128;Conv 2的卷積核大小為5′5 dpi, Conv3、…、Conv5 卷積核大小均為3′3 dpi。
感受野(receptive field)負責直接由原始輸入圖像提取最低層特征,不同尺寸卷積核提取低層特征能力不同[26]。將Conv1層卷積核尺寸從11′11 dpi、9′9 dpi和7′7 dpi中選擇,為了保證全局池化后的特征圖大小為1′1 dpi,需調整全局池化層池化尺寸,Conv1層使用7′7 dpi時全局池化層也使用7′7 dpi大小的池化尺寸。
AlexNet中采用修正線性單元激活函數(shù)[27](rectified linear units,Relu),使梯度在反向傳播時能夠很好地傳到前面的網(wǎng)絡層,能防止梯度彌散的問題,同時加速網(wǎng)絡訓練。He等[28]提出PRelu激活函數(shù),將Relu函數(shù)的負軸斜率從0改為可變參數(shù)a,在模型訓練中也能取得很好效果。本文改進模型采用Relu和PRelu 2種激活函數(shù)分別訓練,式(9)與式(10)分別為Relu激活函數(shù)和PRelu激活函數(shù)的表達式。
權重的初始化會對網(wǎng)絡性能產(chǎn)生影響,本文選擇其中最常用的高斯和Xavier方法初始卷積層Conv1,觀察不同初始化方法對模型識別準確率的影響。模型的全局池化層分別使用全局平均池化和全局最大池化類型,比較不同池化類型對模型性能的影響。
試驗軟件環(huán)境為Ubuntu 16.04 LTS 64位系統(tǒng),采用Caffe[29]深度學習開源框架,選用Python作為編程語言。計算機內存為16 GB,搭載Intel? Core? i7-6700KCPU @ 4.00 GHz x8處理器,并采用英偉達GTX980Ti顯卡加速圖像處理。
采用批量訓練的方法將訓練集與測試集分為多個批次(batch),每個批次訓練64張圖片,即train batch設置為64。當訓練完所有訓練集圖片后對測試集進行測試,每次測試圖片為50張,即test batch設置為50。遍歷一次訓練集中的所有圖片作為一次迭代(epoch),共迭代100次。采用隨機梯度下降優(yōu)化算法(stochastic gradient descent,SGD)優(yōu)化模型,設置初始學習率為0.01,為防止過擬合,將正則化系數(shù)設為0.005,學習率分階段逐次減小為原來的0.1倍。對于原始圖片集,每訓練8 000個批次,改變一次學習率,對于擴充后圖片集,每訓練20 000個批次改變一次學習率。
模型的識別平均準確率AA計算如下
模型Conv1層卷積層中使用卷積核尺寸不同使感受野不同,對圖像特征的提取能力也不同。模型1、2都是使用11′11 dpi的卷積核初始化模型。由表1可見,使用卷積核尺寸為9′9 dpi的模型3和4比使用大尺寸卷積核的模型1、2及使用小尺寸卷積核的模型5、6好,但在2個數(shù)據(jù)集上不同模型之間的最高與最低準確率相差僅為0.24個百分點和0.35個百分點。總體來說,使用不同尺寸卷積核對模型的識別準確率產(chǎn)生的影響較小。為進一步觀察模型的特征提取效果,將模型2、4、6的第一層卷積核進行可視化,如圖3所示。由圖3可見,模型2、4的Conv1層卷積核可視化圖像包含的粗糙區(qū)域較多(粗糙區(qū)域表示的卷積核主要提取邊緣和紋理特征),對細粒度特征響應充分,提取的紋理特征信息更豐富。不同植物的葉片病害圖片在顏色上和輪廓上差異較大,所以僅需根據(jù)顏色和輪廓特征就能區(qū)分開,而區(qū)分相同植物不同病害的葉片圖片需要進一步提取出葉片的紋理信息。大尺寸卷積核易提取葉片整體信息(如顏色和輪廓特征),但對紋理特征的響應沒有小尺寸卷積核充分。為獲取模型識別性能,將Conv1層卷積核尺寸確定為9′9 dpi較為合適。
表1 模型參數(shù)設置與測試準確率
a. 模型2a. Model 2b. 模型4b. Model 4c. 模型6c. Model 6
圖3 改進模型卷積核可視化
Fig.3 Visualizing the convolutional kernel of improved model
池化通常使用最大池化和平均池化2種類型,中間層使用最大池化能夠提取出最利于區(qū)分不同葉片病害的特征,丟棄冗余特征。表1中模型1、3、5與模型2、4、6分別采用全局最大池化和全局平均池化類型,結果表明使用全局平均池化比使用全局最大池化效果更優(yōu)。這說明使用全局最大池化容易造成提取的深層特征信息流失,從而降低識別準確率,而全局平局池化則對整張?zhí)卣鲌D所有值求平均,充分利用了每張?zhí)卣鲌D所有信息,利于提取關鍵特征。
訓練AlexNet模型需要花費大量時間,且訓練后的模型參數(shù)內存需求(模型本身所占計算機存儲空間的大小)較大。為了驗證改進后的網(wǎng)絡模型收斂效果,將改進后的最優(yōu)模型4與原始的AlexNet模型在2個圖片集上進行準確率和收斂迭代次數(shù)的比較。圖4是模型4與原始AlexNet模型迭代次數(shù)與測試準確率關系圖。
圖4 模型測試準確率與迭代次數(shù)關系
2個模型訓練迭代100次后,其測試集識別總體準確率都能達到97%以上,模型4與AlexNet模型在擴充后的數(shù)據(jù)集上最高測試準確率分別為99.56%和99.37%。從圖4中可以清楚地看到,模型4的收斂時間較AlexNet模型短,由于初始學習率較高,模型4在3次迭代訓練后,測試準確率快速提升至90%以上,而AlexNet僅能達到77%左右。且在未調節(jié)學習率至0.001之前,AlexNet的測試準確率不穩(wěn)定,上下波動大,而加入批歸一化層的模型4測試準確率雖然也有些波動,但幅度不大,這說明使用批歸一化方法的模型能適應大學習率,使網(wǎng)絡收斂更快。本文為便于改進模型和AlexNet模型進行對比,將學習率下降步長都統(tǒng)一設置為20 000,從圖4可以看出改進模型在迭代10次后準確率已經(jīng)趨于穩(wěn)定,調小學習率為0.001之后,測試準確率迅速提升且很快穩(wěn)定,這說明改進之后的模型在迭代次數(shù)上可做進一步的優(yōu)化。
AlexNet模型在卷積層和池化層后級聯(lián)全連接層將所有特征圖拉伸為4 096維的特征向量,通過Softmax分類器對葉片病害分類,訓練之后模型參數(shù)內存需求為217 MB。改進模型的參數(shù)內存需求大小以及前向傳播和反向傳播速率(進行一次前向/反向傳播所需要的時間)如表2所示,由表2可見,初始層卷積核尺寸越小,模型參數(shù)內存需求也越小,同時訓練時間也將縮短。改進后的最優(yōu)模型參數(shù)內存需求僅占2.6 MB,縮小至AlexNet模型的0.01倍,測試一張圖片所需時間為20.79 ms,而AlexNet模型測試一張圖片所需時間為25.51 ms。
表2 模型參數(shù)內存需求與訓練速度
為了更好地評價一個模型是否具有較強魯棒性,選取測試準確率最高的模型4與原始AlexNet模型以及顏色、紋理特征+SVM[30]進行對比見表3,將每類樣本分別進行測試,計算每個類別查準率(precision(i))、查全率(recall(i))以及查全率與查準率加權平均分數(shù)(1(i)),最后取平均值(1)作為模型評價標準。
式中n為類別預測為第類的樣本數(shù)。
顏色和紋理特征是葉片識別常用的特征,它們能夠反映出葉片的全局信息,將提取的顏色和紋理特征融合之后用支持向量機分類是葉片病害識別的常見方法。在樣本量比較少的時候,支持向量機容易抓住數(shù)據(jù)和特征之間的非線性關系,識別效果往往較好,由于本文試驗采用的圖片集中葉片類別和數(shù)目較多,且同一植物不同的病害葉片顏色相似度大,導致支持向量機分類方法時間和空間復雜度增大、識別準確率下降。從表3可見,基于卷積神經(jīng)網(wǎng)絡模型的葉片病害識別方法性能較好,并對圖像的旋轉、位移能保持近似不變性,所以AlexNet模型和改進模型在擴充后圖片集上的性能都有所提升。改進模型由于采用了全局池化的方法,增強了特征圖與類別的關系、對輸入的空間變換的不變性,故性能比原始的AlexNet模型好,在擴充后的圖片集上,模型4的查全率與查準率加權平均分數(shù)能達到99.41%。
表3 不同識別方法的性能對比
本文提出將卷積神經(jīng)網(wǎng)絡用于大量不同種類的植物葉片病害識別,在傳統(tǒng)的AlexNet模型上改進,采用批歸一化與全局池化相結合的卷積神經(jīng)網(wǎng)絡模型識別多種葉片病害。將改進模型與原始AlexNet模型進行對比,改進模型在訓練時間和參數(shù)內存需求上都具有較大優(yōu)越性,僅迭代訓練3次就能達到90%以上準確率,改進的模型精簡了模型參數(shù),模型參數(shù)內存需求從217 MB縮小到2.6 MB,同時也提高模型泛化能力,性能較原始AlexNet模型有所提升,改進后最優(yōu)模型在擴充后圖片集上的查全率和查準率的加權平均分數(shù)為99.41%,測試準確率為99.56%。將改進模型與傳統(tǒng)方法進行對比,改進模型對圖像空間位置變化的適應性較好,具有較好魯棒性,能夠識別多種植物葉片的不同病害,而不局限于同一植物的不同病害。
本文提出模型對復雜的植物病害葉片識別效果較好,避免了特定特征選取,且訓練后的模型易于使用,可為后續(xù)的植物葉片病害智能識別裝置的研制提供理論依據(jù)。
[1] 李凱,袁鶴.植物病害生物防治概述[J].山西農業(yè)科學,2012,40(7):807-810. Li Kai,Yuan He.Review on biological control of plant diseases[J]. Journal of Shanxi Agricultural Siences, 2012, 40(7): 807-810. (in Chinese with English abstract)
[2] 陳志誼.植物病害生防芽孢桿菌研究進展[J].江蘇農業(yè)學報,2012,28(5):999-1006. Chen Zhiyi.Research progress in biocontrol of bacillus spp. Against plant diseases[J]. Jiangsu Journal of Agricultural Sciences, 2012, 28(5): 999-1006. (in Chinese with English abstract)
[3] 譚峰,馬曉丹.基于葉片的植物病蟲害識別方法[J].農機化研究,2009,31(6):41-43. Tan Feng, Ma Xiaodan.The method of recognition of damage by disease and insect based on laminae[J]. Journal of Agricultural Mechanization Research, 2009, 31(6): 41-43. (in Chinese with English abstract)
[4] 田有文,李天來,李成華,等. 基于支持向量機的葡萄病害圖像識別方法[J]. 農業(yè)工程學報,2007,23(6):175-180. Tian Youwen, Li Tianlai, Li Chenghua, et al. Method for recognition of grape disease based on support vector machine[J]. Transactions of The Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2007, 23(6): 175-180. (in Chinese with English abstract)
[5] 王獻鋒,張善文,王震,等. 基于葉片圖像和環(huán)境信息的黃瓜病害識別方法[J]. 農業(yè)工程學報,2014,30(14):148-153. Wang Xianfeng, Zhang Shanwen, Wang Zhen, et al. Recognition of cucumber diseases based on leaf image and environmental information[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2014, 30(14): 148-153. (in Chinese with English abstract)
[6] Zhang S W, Shang Y J, Wang L.Plant disease recognition based on plant leaf image[J]. Journal of Animal & Plant Sciences, 2015, 25(3): 42-45.
[7] Zeiler M D, Fergus R. Visualizing and understanding convolutional networks[C]//European Conference on Computer Vision. Springer, Cham, 2014:818-833.
[8] LeCun Y, Bottou L, Bengio Y, et al. Gradient-based learning applied to document recognition[J]. Proceedings of the IEEE, 1998, 86(11): 2278-2324.
[9] Wen Y, Zhang K, Li Z, et al.A discriminative feature learning approach for deep face recognition[C]//European Conference on Computer Vision, Springer International Publishing, 2016: 499-515.
[10] Sun Y, Wang X, Tang X. Deep learning face representation from predicting 10, 000 classes[C]//Computer Vision and Pattern Recognition. IEEE, 2014: 1891-1898.
[11] Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]//IEEE Conference on Computer Vision and Pattern Recognition. IEEE Computer Society, 2013: 580-587.
[12] Ren S, He K, Girshick R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017, 39(6):1137-1149.
[13] Krizhevsky A, Sutskever I, Hinton G E. Imagenet classification with deep convolutional neural networks[C]// Advances in Neural Information Processing Systems, 2012: 1097-1105.
[14] Szegedy C, Liu W, Jia Y, et al. Going deeper with convolutions[C]//IEEE Computer Society. IEEE Conference on Computer Vision and Pattern Recognition, 2014: 1-9.
[15] He K, Zhang X, Ren S, et al. Deep residual learning for image recognition[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016: 770-778.
[16] 龔丁禧. 基于卷積神經(jīng)網(wǎng)絡的植物葉片分類[J]. 計算機與現(xiàn)代化,2014(4):12-15. Gong Dingxi. Plant leaf classification based on CNN[J]. Computer and Modernization, 2014(4): 12-15. (in Chinese with English abstract)
[17] 張帥, 淮永建. 基于分層卷積深度學習系統(tǒng)的植物葉片識別研究[J]. 北京林業(yè)大學學報,2016,38(9):108-115. Zhang Shuai, Huai Yongjian.Leaf image recognition based on layered convolutions neural network deep learning[J]. Journal of Beijing Forestry University, 2016, 38(9): 108-115. (in Chinese with English abstract)
[18] Sladojevic S, Arsenovic M, Anderla A, et al. Deep neural networks based recognition of plant diseases by leaf image classification[J]. Computational Intelligence and Neuroscience,2016(6): 1-11.
[19] Brahimi M, Boukhalfa K, Moussaoui A. Deep learning for tomato diseases: Classification and symptoms visualization[J]. Applied Artificial Intelligence, 2017: 1-17.
[20] Amara J, Bouaziz B, Algergawy A, et al. A deep learning- based approach for banana leaf diseases classification[C]// Datenbanksysteme Für Business, Technologie Und Web, 2017: 79-88.
[21] Ioffe S, Szegedy C. Batch normalization: Accelerating deep network training by reducing internal covariate shift[C]// International Conference on Machine Learning, 2015: 448-456.
[22] Hinton G E, Srivastava N, Krizhevsky A, et al. Improving neural networks by preventing co-adaptation of feature detectors[J]. Computer Science, 2012, 3(4): 212-223.
[23] Wan L, Zeiler M, Zhang S, et al. Regularization of neural networks using dropconnect[C]//Proceedings of the 30th International Conference on Machine Learning (ICML-13), 2013:1058-1066.
[24] Wang X Z, Xing H J, Li Y, et al. A study on relationship between generalization abilities and fuzziness of base classifiers in ensemble learning[J]. IEEE Transactions on Fuzzy Systems, 2015, 23(5): 1638-1654.
[25] Lin M, Chen Q, Yan S. Network in network[C]//Computer Vision and Pattern Recognition. ICLR, 2014.
[26] 楊國國,鮑一丹,劉子毅. 基于圖像顯著性分析與卷積神經(jīng)網(wǎng)絡的茶園害蟲定位與識別[J]. 農業(yè)工程學報,2017,33(6): 156-162. Yang Guoguo, Bao Yidan, Liu Ziyi. Localization and recognition of pests in tea plantation based on image saliency analysis and convolutional neural network[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(6): 156-162. (in Chinese with English abstract)
[27] Glorot X, Bordes A, Bengio Y. Deep sparse rectifier neural networks[C]//Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, 2011: 315-323.
[28] He K, Zhang X, Ren S, et al. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification[C]// IEEE International Conference on Computer Vision. IEEE Computer Society, 2015: 1026-1034.
[29] Jia Y, Shelhamer E, Donahue J, et al. Caffe: Convolutional architecture for fast feature embedding[J]. Eprint Arxiv, 2014: 675-678.
[30] 楊倩,高曉陽,武季玲,等. 基于顏色和紋理特征的大麥主要病害識別研究[J]. 中國農業(yè)大學學報,2013,18(5):129-135. Yang Qian, Gao Xiaoyang, Wu Jiling, et al.Identification of barley diseases based on texture color feature[J].Journal of China Agricultural University,2013, 18(5): 129-135. (in Chinese with English abstract)
孫 俊,譚文軍,毛罕平,武小紅,陳 勇,汪 龍.基于改進卷積神經(jīng)網(wǎng)絡的多種植物葉片病害識別[J]. 農業(yè)工程學報,2017,33(19):209-215. doi:10.11975/j.issn.1002-6819.2017.19.027 http://www.tcsae.org
Sun Jun, Tan Wenjun, Mao Hanping, Wu Xiaohong, Chen Yong, Wang Long. Recognition of multiple plant leaf diseases based on improved convolutional neural network[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(19): 209-215. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2017.19.027 http://www.tcsae.org
Recognition of multiple plant leaf diseases based on improved convolutional neural network
Sun Jun1, Tan Wenjun1, Mao Hanping2, Wu Xiaohong1, Chen Yong1, Wang Long1
(1.212013,; 2.212013,)
Plant leaf diseases are a serious problem in agricultural production. To solve this problem and prevent diseases deterioration, accurate identification of diseases types is of great significance. In this paper, we proposed a recognition model of plant leaf diseases based on convolutional neural network (CNN), which combines the batch normalization and global pooling methods. The parameters of the traditional CNN model are large and have difficulty to converge. The proposed model was modified in the traditional structure of the CNN, which could optimize the training time and achieve the higher accuracy, and also reduce the size of model. In order to speed up the training convergence, we used the batch normalization layers. We put the input of every convolutional layer in batch, calculated the mean and variance of the batch, and then normalized this batch. We reduced some feature maps of some layers and removed the last full connect layer, with the global pooling layer instead. The proposed model has 5 convolutional layers and 4 pooling layers. In the last pooling layer pool5, the same kernel size of convolutional layer Conv5 was used to take advantage of the information of Conv5’s feature map comprehensively. For the image preprocessing, we had zoomed, flipped and rotated the original pictures of dataset randomly to get the augmented dataset, and used the 80% of pictures as the train dataset and the rest as the test dataset. These pictures were quantized to 256×256 dpi for CNN training, and the original dataset and augmented dataset were used to train models. To look for the best size of the first layer kernel, in the first convolutional layer, different kernel sizes i.e. 11×11, 9×9 and 7×7 dpi were used respectively. Furthermore, we chose the type of global pooling layer, like max pooling and average pooling. Then we designed 8 models with different Conv1 kernel sizes or global pooling types. To further improve the efficiency of this model, besides using the Gaussian initialization, we used the other common type of convolutional initialization such as Xavier initialization, and also used the PRelu activation function for each convolution layer. So the optimal model could be selected to recognize the 26 kinds of leaf diseases which involved 14 kinds of plants, and then we analyzed the model’s convergence rate, memory usage and robustness. After the experiment, we compared the test accuracy between the traditional model and the proposed model based on original dataset and augmented dataset. The proposed model could accelerate the training convergence, and the test accuracy could achieve about 90% while the traditional model was only about 77% after 3 training epochs. Different kernel sizes of Conv1 had little impact on the accuracy but small kernel was proved to be more beneficial to the recognition of plant diseases, which could get more texture features than the big kernel size filter, and average pooling also made better results than max pooling. We got the best performance model which used the 9×9 dpi kernel size and global average pooling layer. To show the proposed model’s performance, we tested the accuracy on each class, and the mean accuracy of augmented test dataset was 99.56%, and the weighted average score of recall and precision rate achieved 99.41%. The proposed model had the size of only 2.6 MB. In addition, compared with the traditional methods, the change of the spatial position of the pictures had little effect on the performance of the improved model, and the proposed model could identify different diseases of various plant leaves. The results show that the model has higher recognition accuracy and stronger robustness, and can be used for the identification of plant leaf diseases.
diseases; plants; image processing; recognition; convolutional neural network; batch normalization; global pooling; deep learning
10.11975/j.issn.1002-6819.2017.19.027
S126
A
1002-6819(2017)-19-0209-07
2017-05-17
2017-09-13
國家自然科學基金資助項目(No.31471413);江蘇高校優(yōu)勢學科建設工程資助項目PAPD(蘇政辦發(fā)2011 6號);江蘇省六大人才高峰資助項目(ZBZZ-019);江蘇大學大學生科研立項資助項目(Y15A039);江蘇大學大學生實踐創(chuàng)新訓練項目(No.46)
孫 俊,江蘇泰興人,教授,博士,博士生導師,研究方向為計算機技術在農業(yè)工程中的應用。Email:sun2000jun@ujs.edu.cn
中國農業(yè)工程學會會員:孫俊(E041200652S)