張善文,許新華,齊國紅,邵 彧
基于可形變VGG-16模型的田間作物害蟲檢測方法
張善文,許新華,齊國紅,邵 彧※
(鄭州西亞斯學(xué)院電子信息工程學(xué)院,鄭州 451150)
由于田間害蟲種類多,大小、形態(tài)、姿態(tài)、顏色和位置變化多樣,且田間害蟲的周圍環(huán)境比較復(fù)雜,使傳統(tǒng)田間害蟲檢測方法的性能不高,而現(xiàn)有基于卷積神經(jīng)網(wǎng)絡(luò)的作物害蟲檢測方法采用固定的幾何結(jié)構(gòu)模塊,不能有效應(yīng)用于田間多變的害蟲檢測。該研究在VGG-16模型的基礎(chǔ)上構(gòu)建了一種可形變VGG-16模型(Deformable VGG-16,DVGG-16),并應(yīng)用于田間作物害蟲檢測。在DVGG-16模型中,引入可形變卷積后能夠適應(yīng)不同形狀、狀態(tài)和尺寸等幾何形變的害蟲圖像,提高了對形變圖像的特征表達(dá)能力,然后利用1個全局平均池化層替代VGG-16模型中的3個全連接層,以加快模型的訓(xùn)練。通過DVGG-16模型與VGG-16模型對比試驗發(fā)現(xiàn),DVGG-16模型提升了對田間害蟲圖像的形狀、大小等幾何形變的適應(yīng)能力,在不改變圖像空間分辨率的情況下,實現(xiàn)了對不規(guī)則田間害蟲圖像的特征提取,在實際田間害蟲圖像數(shù)據(jù)庫上的檢測準(zhǔn)確率為91.14%。試驗結(jié)果表明,DVGG-16模型提升了VGG-16模型對害蟲多樣性圖像的特征表達(dá)能力,具有一定的圖像形變適應(yīng)能力,能夠較準(zhǔn)確地檢測到田間形狀變化多樣的害蟲,可為田間復(fù)雜環(huán)境下作物害蟲檢測系統(tǒng)提供技術(shù)支持。
模型;卷積神經(jīng)網(wǎng)絡(luò);作物;圖像識別;害蟲;分類
作物害蟲防治對作物產(chǎn)量和質(zhì)量以及農(nóng)業(yè)經(jīng)濟的穩(wěn)定至關(guān)重要。作物害蟲檢測與識別是害蟲防治的前提,利用機器視覺檢測和識別作物害蟲是近年來一個重要的研究方向,目前已有很多作物害蟲檢測和識別方法[1-3]。為了快速檢測和識別作物害蟲,Deng等[4]提出了一種基于人類視覺系統(tǒng)的害蟲快速識別方法,利用自然統(tǒng)計模型在害蟲圖像中生成顯著性映射并檢測感興趣區(qū)域,提取代表害蟲外觀的不變特征,最后利用支持向量機(Support Vector Machine,SVM)進(jìn)行害蟲識別,識別率為85.5%。Xie等[5]開發(fā)了一個基于多任務(wù)稀疏表示和多核學(xué)習(xí)的昆蟲識別系統(tǒng),并將多任務(wù)稀疏表示與多種昆蟲種類特征相結(jié)合,通過共同優(yōu)化權(quán)值進(jìn)行系統(tǒng)優(yōu)化。Ebrahimi等[6]提取害蟲圖像的色相、飽和度和強化度等特征,利用SVM進(jìn)行害蟲分類,并利用均方誤差、均方根誤差、平均絕對誤差和平均百分比誤差評估不同特征的分類性能。Dey等[7]提出了一種基于統(tǒng)計特征提取和圖像分類的作物害蟲自動檢測方法,能夠從各種植物葉片圖像中檢測白蠅害蟲。針對目前田間害蟲檢測方法的不足,肖德琴等[8]提出了一種基于黃色粘捕器的蔬菜害蟲檢測算法,包括結(jié)構(gòu)化隨機森林模型的害蟲圖像分割、不規(guī)則結(jié)構(gòu)的特征提取、去除干擾目標(biāo)和背景以及害蟲計數(shù)等模塊。為了監(jiān)測溫室黃瓜害蟲的種類、數(shù)量和變化趨勢,楊信廷等[9]提出了一種基于不同邊緣檢測算子和SVM的溫室捕集板上害蟲的識別方法,該方法利用害蟲圖像的5種形態(tài)特征和9種顏色特征監(jiān)測溫室黃瓜害蟲的種類、數(shù)量和變化趨勢。以上方法存在檢測和識別性能過于依賴預(yù)先設(shè)計的特征和分類器、提取的特征的魯棒性不高、泛化能力不強等不足,其主要原因是害蟲種類繁多,且同種害蟲在不同時間和不同時期可能具有不同的形狀、顏色、大小和背景等,所以經(jīng)典的害蟲識別方法的識別率較低。盡管一些學(xué)者研究了害蟲姿態(tài)的多樣性,但由于實際害蟲的種類和姿態(tài)多種多樣,所以很多研究成果難以應(yīng)用于實際田間作物害蟲檢測任務(wù)中[2]。
卷積神經(jīng)網(wǎng)絡(luò)(Convolutional Neural Network,CNN)具有良好的特征提取能力,已經(jīng)在很多研究領(lǐng)域中成功應(yīng)用[10-12],并被廣泛應(yīng)用于作物病害識別[13]。Liu等[14]從分類網(wǎng)絡(luò)、檢測網(wǎng)絡(luò)和分割網(wǎng)絡(luò)等方面概述了近年來基于CNN的作物病蟲害檢測方法,總結(jié)了每種方法的優(yōu)缺點,并給出了該領(lǐng)域研究的發(fā)展趨勢。Wang等[15]提出了一種基于視頻信息的害蟲檢測系統(tǒng),能夠?qū)Τ墒祀A段的白粉虱進(jìn)行自動檢測和計數(shù)。Li等[16]提出了一種基于深度CNN和視頻圖像的害蟲檢測方法,能夠從比較模糊的視頻圖像中檢測到害蟲。Li等[17]提出了一種粗CNN與精CNN相結(jié)合的兩級蚜蟲檢測方法。其中,粗CNN用于蚜蟲區(qū)域檢測,精CNN用于蚜蟲類型識別。為了檢測自然場景下的水稻害蟲,錢蓉等[18]利用水稻害蟲的個體特征和自然場景,對VGG-16模型的卷積層局部調(diào)整,優(yōu)化模型的主要參數(shù),構(gòu)建了一種基于VGG-16模型的水稻害蟲識別方法。由于傳統(tǒng)CNN模型采用的卷積核為固定大小,池化為固定比例,所以不能有效處理具有形變的不規(guī)則大田害蟲圖像[19-20]。Ma等[21]通過在CNN的卷積核中每個采樣點的位置增加一個偏移量,構(gòu)建了一個可形變卷積網(wǎng)絡(luò)模型(Deformable Convolutional Network,DCN),能夠在當(dāng)前位置附近隨意采樣,極大提高了對復(fù)雜形變圖像的處理能力[21-22]。
綜上,現(xiàn)有基于CNN的害蟲檢測方法能夠從大量圖像中學(xué)習(xí)到有效特征,避免了傳統(tǒng)方法人工設(shè)計特征的不足,通過增強數(shù)據(jù)集的多樣性、增加網(wǎng)絡(luò)層數(shù)和優(yōu)化模型參數(shù)等方法提高模型對形變多樣的害蟲的檢測識別能力,但模型內(nèi)部并不具有適應(yīng)幾何形變的機制,沒有從根本上解決田間害蟲識別方法的形變問題??尚巫兙矸e通過引入采樣位置的偏移量來改變采樣位置,以增強模型的特征提取能力。本研究在VGG-16和DCN模型的啟發(fā)下,構(gòu)造一種可形變VGG-16模型(Deformable VGG-16,DVGG-16),并應(yīng)用于田間害蟲檢測。
利用8種常見的農(nóng)作物害蟲圖像進(jìn)行試驗,包括玉米螟、飛蛾、毛毛蟲、棉鈴蟲、蠐螬幼蟲、豆蟲、蝗蟲和粘蟲。本研究對8種害蟲沒有專業(yè)命名,僅采用農(nóng)業(yè)生產(chǎn)者的傳統(tǒng)命名,能夠滿足實際害蟲防治需要。利用智能手機、攝像機和物聯(lián)網(wǎng)等圖像采集設(shè)備,在田間采集了2 000多幅害蟲圖像,每種害蟲250幅,每幅圖像的分辨率為416×416像素的彩色圖像(圖1)。由圖1可知,害蟲的形狀、顏色、大小、姿態(tài)、位置和背景環(huán)境各不相同。為了加快網(wǎng)絡(luò)訓(xùn)練,將采集到的每幅圖像的尺寸裁剪至分辨率為224×224像素,然后批量壓縮成三通道圖像,作為網(wǎng)絡(luò)輸入數(shù)據(jù)。
為了克服CNN及其改進(jìn)模型出現(xiàn)過擬合現(xiàn)象,對每幅圖像進(jìn)行裁剪、旋轉(zhuǎn)、隨機翻轉(zhuǎn)、亮度抖動等處理,擴充害蟲圖像數(shù)據(jù)集[23]。裁剪角度間隔為45°、旋轉(zhuǎn)角度范圍為-15°~15°、抖動范圍為±0.1,將每幅原始圖像擴增了20幅。通過增加訓(xùn)練樣本,提高模型的泛化能力;通過增加噪聲,提升模型的魯棒性。最后,構(gòu)建了一個包含42 000幅圖像的擴展數(shù)據(jù)集。
在傳統(tǒng)CNN模型中,設(shè)輸入特征圖為,卷積核為,上任意點0的1個3×3卷積區(qū)域為={(-1, -1),(1,0),…,(0,1),(1,1)},則上0點的卷積操作如式(1)所示。
與傳統(tǒng)卷積不同,可形變卷積通過引入偏移量改變采樣位置,以增強模型的特征提取能力。在特征圖上0點的可形變卷積操作如式(2)所示。
由于可形變卷積在不規(guī)則區(qū)域內(nèi)進(jìn)行,所以在卷積層提取的特征圖的像素偏移值可能為小數(shù),不能直接得到像素點的坐標(biāo)。一般通過雙線性插值獲取特征圖在任一像素偏移位置的采樣值()如式(3)所示。
可通過2個一維線性插值核函數(shù)實現(xiàn)雙線性插值操作,如式(4)所示。
在可形變CNN模型訓(xùn)練時,用于生成輸出特征的卷積核與用于生成偏移量的卷積核同步學(xué)習(xí),其中,偏移量由雙線性插值算法學(xué)習(xí)得到,卷積核由反向傳播進(jìn)行學(xué)習(xí)。
在經(jīng)典VGG-16模型的基礎(chǔ)上,研究構(gòu)建一種可形變VGG-16模型(Deformable VGG-16,DVGG-16),其基本架構(gòu)如圖2所示,包括6個卷積層、4個可形變卷積層、5個池化層和1個全局平均池化層。與VGG-16模型相比,DVGG-16模型的優(yōu)勢在于:1)引入4個可形變卷積層,并由1個全局平均池化層代替VGG-16模型的3個全連接層,極大地降低了網(wǎng)絡(luò)參數(shù)量;2)每個網(wǎng)格點都可以通過一個可學(xué)習(xí)的偏移量移動,所以DVGG-16模型中的網(wǎng)格可形變,能夠適應(yīng)田間害蟲圖像的多樣性。
在可形變卷積層,可形變卷積過程描述如下:1)原始圖像經(jīng)過一個傳統(tǒng)卷積,輸出的結(jié)果為原圖像中每個像素的偏移量;2)將圖像的像素索引值與偏移量相加,得到偏移后的位置,再將該位置轉(zhuǎn)換為坐標(biāo)值,表示像素點的坐標(biāo);3)將步驟2中的任一坐標(biāo)點(,)轉(zhuǎn)換為4個整數(shù):floor()、ceil()、floor()和ceil(),再整合為整數(shù),得到4對坐標(biāo)(floor(),floor())、(floor(), ceil())、(ceil(), floor())、(ceil(), ceil())。4對坐標(biāo)的每個坐標(biāo)對應(yīng)圖像中的一個像素值,其中floor和ceil都為Python編程語言中的取整運算函數(shù),其區(qū)別在于floor()返回的是小于或等于的最大整數(shù),ceil()返回的是大于的最小整數(shù);4)采用雙線性差值算法得到(,)的像素值,再進(jìn)行反向傳播;5)得到圖像中任一位置的所有像素后,得到新特征圖,作為下一層的輸入。
在DVGG-16模型訓(xùn)練中,以均值為0、標(biāo)準(zhǔn)差為0.01的隨機正態(tài)矩陣初始化權(quán)重,設(shè)置最大迭代次數(shù)為3 000、批處理數(shù)為32;以計算機編程語言Python編寫的深度學(xué)習(xí)庫Keras中的分類交叉熵為損失函數(shù),利用殘差回傳算法進(jìn)行參數(shù)更新;采用隨機梯度下降法訓(xùn)練模型,3個訓(xùn)練參數(shù)學(xué)習(xí)率、權(quán)重衰減和動量分別設(shè)置為0.001、0.001和0.9,每500次迭代進(jìn)行學(xué)習(xí)率衰減。
所有試驗在Ubuntu16.04 LTS系統(tǒng)和TensorFlow框架下進(jìn)行,使用Python和C++語言編寫網(wǎng)絡(luò)訓(xùn)練、測試和應(yīng)用程序。在采集到的田間害蟲圖像數(shù)據(jù)庫及其擴展數(shù)據(jù)庫上分別進(jìn)行試驗,驗證基于DVGG-16模型的作物害蟲檢測方法,并與4種作物害蟲檢測方法進(jìn)行試驗比較。這4種作物害蟲檢測方法包括基于圖像處理的果園昆蟲自動識別與分類方法(Image-based Insect Automated Identification,IIAI)[24]、基于局部顏色均值特征和SVM的害蟲檢測方法(Local Mean Colour Feature and Support Vector Machine,LMCFSVM)[25]、基于改進(jìn)CNN(Improved Convolutional Neural Network,ICNN)的害蟲檢測方法[26]和基于VGG-16模型的害蟲檢測方法[22]。其中,IIAI和LMCFSVM為2種傳統(tǒng)的基于特征提取的害蟲檢測方法,ICNN和VGG-16模型為2種基于深度學(xué)習(xí)的害蟲檢測方法。作物害蟲平均檢測準(zhǔn)確率作為模型的評價指標(biāo),其計算如式(7)所示。
采用五折交差驗證法進(jìn)行試驗,即將42 000幅圖像隨機劃分為5個子集,每個子集包含8 400幅圖像,然后將每個子集作為1次測試集,其余的4個子集作為訓(xùn)練集,共進(jìn)行5次試驗,其檢測準(zhǔn)確率的平均值作為進(jìn)行1次五折交差驗證試驗的檢測準(zhǔn)確率。采用3種大小不同的卷積核3×3、5×5和7×7訓(xùn)練VGG-16模型,3種卷積核及其對應(yīng)的特征圖如圖 3所示。
由圖3可以看出,3×3卷積核得到的特征圖能夠較好地反映害蟲的輪廓信息。所以,本研究在DVGG-16模型中采用3×3卷積核。將訓(xùn)練圖像集輸入到DVGG-16模型,通過多個卷積層和池化層逐步提取深層次的特征圖,再經(jīng)過全局平均池化(Global average Pooling,GAP)得到分類特征向量,最后由Softmax分類器分類害蟲圖像,其中Softmax為深度學(xué)習(xí)應(yīng)用中最常用的一種有監(jiān)督分類器。得到DVGG-16和VGG-16模型中前5個卷積層的5幅特征圖,如圖4所示。由圖4可以看出,DVGG-16模型的5幅特征圖能夠較好地反映圖像的基本輪廓特征,明顯優(yōu)于VGG-16模型的特征圖。
為了顯示擴展數(shù)據(jù)集上DVGG-16模型的有效性,在原始數(shù)據(jù)集和擴展數(shù)據(jù)集上分別訓(xùn)練DVGG-16模型,試驗參數(shù)設(shè)置與以上試驗相同。DVGG-16模型在兩個數(shù)據(jù)集上進(jìn)行1次五折交差驗證,試驗的檢測準(zhǔn)確率隨迭代次數(shù)的變化情況如圖5所示。由圖5可以看出,DVGG-16模型在擴展數(shù)據(jù)集上的檢測準(zhǔn)確率總是大于在原始數(shù)據(jù)集上的檢測準(zhǔn)確率,最大檢測準(zhǔn)確率分別為91.76%和74.82%;在擴展數(shù)據(jù)集和原始數(shù)據(jù)集上模型收斂時的迭代次數(shù)分別為1 600和2 800,且在擴展數(shù)據(jù)集上的檢測準(zhǔn)確率曲線比較平穩(wěn),收斂較快。其主要原因是,原始訓(xùn)練數(shù)據(jù)集較小導(dǎo)致DVGG-16模型過擬合,使得在訓(xùn)練集上的誤差較小但在測試集上的誤差較大,不能得到模型的最佳參數(shù)。所以,文中試驗均在擴展數(shù)據(jù)集上進(jìn)行。
CNN模型的3個改進(jìn)模型ICNN、VGG-16和DVGG-16模型在擴展數(shù)據(jù)集上的檢測準(zhǔn)確率隨迭代次數(shù)的變化情況如圖6所示。由圖6看出,3個模型DVGG-16、ICNN和VGG-16的最大檢測準(zhǔn)確率分別為91.16%、83.44%和82.14%,迭代次數(shù)大于1 000后,DVGG-16模型的檢測準(zhǔn)確率曲線明顯高于ICNN和VGG-16模型。其主要原因是DVGG-16利用可形變卷積,能夠提取到可形變的多樣性害蟲的分類特征;而ICNN和VGG-16模型采用固定的幾何結(jié)構(gòu),導(dǎo)致對田間害蟲的幾何形變的建模受到限制。由圖6還可看出,DVGG-16模型的收斂速度比ICNN和VGG-16模型都快。主要原因是,DVGG-16模型利用全局平均池化替代全連接操作,極大減少了訓(xùn)練的參數(shù)和模型的訓(xùn)練時間;隨著迭代次數(shù)的增加,3個模型的檢測準(zhǔn)確率不斷上升,在1 500次迭代前,3個模型的檢測準(zhǔn)確率上升較快,由30%增加到80%,經(jīng)過1 500次迭代后,3個模型的檢測準(zhǔn)確率曲線趨于穩(wěn)定,但DVGG-16檢測準(zhǔn)確率曲線的平滑度比ICNN和VGG-16都好。
為了合理有效地比較害蟲檢測方法的性能,本研究選擇所有方法的訓(xùn)練終止條件均為2次連續(xù)迭代的檢測準(zhǔn)確率差的絕對值小于0.01。所有試驗中的圖像都為沒有經(jīng)過圖像降噪、增強、分割等預(yù)處理的擴展數(shù)據(jù)集,并利用所有方法進(jìn)行10次五折交差驗證試驗,分別計算各個方法的10次試驗結(jié)果的平均檢測準(zhǔn)確率及其對應(yīng)的訓(xùn)練時間和測試時間的平均值,作為不同方法的檢測結(jié)果。5種方法的害蟲檢測結(jié)果如表1所示。由表1可知,基于DVGG-16模型方法的平均檢測準(zhǔn)確率最高,為91.14%,2種傳統(tǒng)方法IIAI和LMCFSVM方法的檢測準(zhǔn)確率遠(yuǎn)小于3種基于改進(jìn)CNN的方法,基于DVGG-16模型的方法比IIAI和LMCFSVM方法的檢測準(zhǔn)確率分別提高了28.60和26.97個百分點,比基于ICNN模型和基于VGG-16模型的方法的檢測準(zhǔn)確率分別提高了7.72和9.01個百分點。其原因為田間害蟲圖像中包含葉片和環(huán)境背景,IIAI和LMCFSVM方法不能直接從原始圖像中提取不變的分類特征,導(dǎo)致2種方法的檢測準(zhǔn)確率較低。ICNN和VGG-16模型的訓(xùn)練時間較長,因為這2種模型中含有大量的訓(xùn)練參數(shù)?;贒VGG-16與VGG-16模型的方法比較,訓(xùn)練時間減少了2.87 h。其原因是,DVGG-16模型引入了可形變卷積,提升了模型對田間害蟲的多樣性圖像的特征表達(dá)能力,從而提高了模型對害蟲多樣性圖像的檢測準(zhǔn)確率;在DVGG-16模型中,用全局平均池化代替VGG-16模型中的3個全連接操作,減少了模型的訓(xùn)練參數(shù),加快了模型的訓(xùn)練過程,減少了訓(xùn)練時間。ICNN模型與DVGG-16模型都使用了全局平均池化,但由于可形變卷積操作借助雙線性插值實現(xiàn),增加了模型運算的復(fù)雜度,導(dǎo)致DVGG-16模型的訓(xùn)練時間比ICNN模型長7.98 h,但測試時間分別比ICNN和VGG-16模型快0.02和0.17 s。
表1 5種作物害蟲檢測方法的比較
注:IIAI為基于圖像處理的害蟲識別方法;LMCFSVM為基于局部顏色均值特征和支持向量機。
Note: IIAI is image-based insect automated identification; LMCFSVM is local mean colour feature and support vector machine.
基于卷積神經(jīng)網(wǎng)絡(luò)(Convolutional Neural Network,CNN)及其改進(jìn)模型的作物害蟲識別方法不能兼顧田間害蟲圖像的外形、大小和姿態(tài)的多樣性,而可形變卷積神經(jīng)網(wǎng)絡(luò)模型能夠考慮田間害蟲圖像的形變,能夠提取多形變害蟲圖像的更多分類特征,而不需要額外的監(jiān)督信息。在VGG-16模型基礎(chǔ)上,構(gòu)建一種可形變VGG-16模型(Deformable VGG-16,DVGG-16),并應(yīng)用于田間作物害蟲檢測。DVGG-16模型將VGG-16模型中的4個卷積層替換為4個可形變卷積層,提高了對田間害蟲的可形變圖像的特征表達(dá)能力,使用1個全局池化層替代VGG-16模型的3個全連接層,減少了模型的訓(xùn)練參數(shù),加快了模型的訓(xùn)練速度,并在一定程度上能夠避免過擬合現(xiàn)象。試驗結(jié)果表明,DVGG-16模型比基于圖像處理的害蟲自動識別方法(Image-based Insect Automated Identification,IIAI)和基于局部顏色均值特征和SVM的害蟲檢測方法(Local Mean Colour Feature and Support Vector Machine,LMCFSVM)的檢測準(zhǔn)確率分別提高了28.60和26.97個百分點,比基于改進(jìn)CNN模型(Improved Convolutional Neural Network,ICNN)和基于VGG-16模型的害蟲檢測方法的檢測準(zhǔn)確率分別提高了7.72和9.01個百分點;基于DVGG-16模型的害蟲檢測方法的測試時間比基于ICNN和VGG-16模型的測試時間分別快0.02 和0.17 s。由于感興趣區(qū)域池化具有幾何約束能力,能夠?qū)⑷我獯笮〉母信d趣區(qū)域進(jìn)行劃分和降采樣,適用于田間復(fù)雜害蟲檢測,因此如何利用感興趣區(qū)域池化也是今后優(yōu)化和改進(jìn)DVGG-16模型及其應(yīng)用的研究方向。
[1] Xiao D Q, Feng J Z, Lin T Y, et al. Classification and recognition scheme for vegetable pests based on the BOF-SVM model[J]. International Journal of Agricultural and Biological Engineering, 2018, 11(3): 190-196.
[2] 雷聲淵. 機器學(xué)習(xí)結(jié)合Android手機的病蟲害棉葉識別研究[D]. 石河子:石河子大學(xué),2020.
Lei Shengyuan. Identification of Cotton Leaf Diseases and Pests Based on Machine Learning and Android[D]. Shihezi: Shihezi Universivity, 2020. (in Chinese with English abstract)
[3] 黃文江,張競成,師越,等.作物病蟲害遙感監(jiān)測與預(yù)測研究進(jìn)展[J]. 南京信息工程大學(xué)學(xué)報:自然科學(xué)版,2018,10(1):30-43.
Huang Wenjiang, Zhang Jingcheng, Shi Yue, et al. Progress in monitoring and forecasting of crop pests and diseases by remote sensing[J]. Journal of Nanjing University of Information Science & Technology: Natural Science Edition, 2018, 10(1): 30-43. (in Chinese with English abstract)
[4] Deng L M, Wang Y J, Han Z Z, et al. Research on insect pest image detection and recognition based on bio-inspired methods[J]. Biosystems Engineering, 2018, 169: 139-148.
[5] Xie C J, Zhang J, Li R, et al. Automatic classification for field crop insects via multiple-task sparse representation and multiple-kernel learning[J]. Computers and Electronics in Agriculture, 2015, 119: 123-132.
[6] Ebrahimi M A, Khoshtaghaza M H, Minaei S, et al. Vision-based pest detection based on SVM classification method[J]. Computers and Electronics in Agriculture, 2017, 137: 52-58.
[7] Dey A, Bhoumik D, Dey K N. Automatic detection of whitefly pest using statistical feature extraction and image classification methods[J]. International Research Journal of Engineering and Technology, 2016, 3(9): 950-959.
[8] 肖德琴,張玉康,范梅紅. 基于視覺感知的蔬菜害蟲誘捕計數(shù)算法[J]. 農(nóng)業(yè)機械學(xué)報,2018,49(3):51-58.
Xiao Deqin, Zhang Yukang, Fan Meihong. Vegetable pest counting algorithm based on visual perception[J]. Transactions of the Chinese Society for Agricultural Machinery, 2018, 49(3): 51-58. (in Chinese with English abstract)
[9] 楊信廷,劉蒙蒙,許建平,等.自動監(jiān)測裝置用溫室粉虱和薊馬成蟲圖像分割識別算法[J]. 農(nóng)業(yè)工程學(xué)報,2018,34(1):164-170.
Yang Xinting, Liu Mengmeng, Xu Jianping, et al. Image segmentation and recognition algorithm of greenhouse whitefly and thrip adults for automatic monitoring device[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(1): 164-170. (in Chinese with English abstract)
[10] Liu W B, Wang Z D, Liu X H, et al. A survey of deep neural network architectures and their applications[J]. Neurocomputing, 2017, 234: 11-26.
[11] 張順,龔怡宏,王進(jìn)軍.深度卷積神經(jīng)網(wǎng)絡(luò)的發(fā)展及其在計算機視覺領(lǐng)域的應(yīng)用[J]. 計算機學(xué)報,2019,42(3):453-482.
Zhang Shun, Gong Yihong, Wang Jinjun. The development of deep convolutional neural network and its application on computer vision[J]. Chinese Journal of Computers, 2019, 42(3): 453-482. (in Chinese with English abstract)
[12] 陳超,齊峰.卷積神經(jīng)網(wǎng)絡(luò)的發(fā)展及其在計算機視覺領(lǐng)域中的應(yīng)用綜述[J]. 計算機科學(xué),2019,46(3):69-79.
Chen Chao, Qi Feng. Review on development of convolutional neural network and its application in computer vision[J]. Computer Science, 2019, 46(3): 69-79. (in Chinese with English abstract)
[13] Zhang S W, Zhang S B, Zhang C L, et al. Cucumber leaf disease identification with global pooling dilated convolutional neural network[J]. Computers and Electronics in Agriculture, 2019, 162: 422-430.
[14] Liu J, Wang X W. Plant diseases and pests detection based on deep learning: A review[J]. Plant Methods, 2021, 17(1): 1-18.
[15] Wang D W, Deng L M, Ni J G, et al. Recognition pest by image-based transfer learning[J]. Journal of the Science of Food & Agriculture, 2019, 99(10): 4524-4531.
[16] Li D S, Wang R J, Xie C J, et al. A recognition method for rice plant diseases and pests video detection based on deep convolutional neural network[J/OL]. Sensors, 2020, 20(3), [2020-01-20], https: //doi. org/10. 3390/s20030578.
[17] Li R, Wang R J, Xie C J, et al. A coarse-to-fine network for aphid recognition and detection in the field[J]. Biosystems Engineering, 2019, 187: 39-52.
[18] 錢蓉,孔娟娟,朱靜波,等.基于VGG-16卷積神經(jīng)網(wǎng)絡(luò)的水稻害蟲智能識別研究[J]. 安徽農(nóng)業(yè)科學(xué),2020,48(5):235-238.
Qian Rong, Kong Juanjuan, Zhu Jingbo, et al. Research on intelligent identification of rice pests based on VGG-16 convolutional neural network[J]. Anhui Agricultural Sciences, 2020, 48(5): 235-238. (in Chinese with English abstract)
[19] Lei Z, Da F P, Gai S Y, et al. Transformation-invariant Gabor convolutional networks[J]. Signal Image and Video Processing, 2020, 14: 1413-1420.
[20] Wang Q C, Zheng Y J, Yang G P, et al. Multiscale rotation-invariant convolutional neural networks for lung texture classification[J]. IEEE Journal of Biomedical and Health Informatics, 2018, 22(1): 184-195.
[21] Ma P F, Ma J, Wang X J, et al. Deformable convolutional networks for multi-view 3D shape classification[J]. Electronics Letters, 2018, 54: 1373-1375.
[22] 高鑫,李慧,張義,等.基于可形變卷積神經(jīng)網(wǎng)絡(luò)的遙感影像密集區(qū)域車輛檢測方法[J]. 電子與信息學(xué)報,2018,40(12):2812-2819.
Gao Xin, Li Hui, Zhang Yi, et al. Vehicle detection in remote sensing images of dense areas based on deformable convolution neural network[J]. Journal of Electronics and Information Technology, 2018, 40(12): 2812-2819. (in Chinese with English abstract)
[23] Shorten C, Khoshgoftaar T M. A survey on image data augmentation for deep learning[J]. Journal of Big Data, 2019, 6(60): 1-48.
[24] Wen C L, Guyer D. Image-based orchard insect automated identification and classification method[J]. Computers and Electronics in Agriculture, 2012, 89: 110-115.
[25] Zhu L Q, Zhang Z. Automatic insect classification based on local mean colour feature and supported vector machines[J]. Oriental Insects, 2012, 46: 260-269.
[26] Xia D N, Chen P, Wang B, et al. Pest detection and classification based on an improved convolutional neural network[J]. Sensors, 2018, 18(12): 1-12.
Detecting the pest disease of field crops using deformable VGG-16 model
Zhang Shanwen, Xu Xinhua, Qi Guohong, Shao Yu※
(,,451150,)
Detection of crop pest has widely been one of the most challenges in modern agriculture, due to the intra- and inter-class pests in the field with various colors, sizes, shapes, postures, positions, and complex backgrounds. Convolutional Neural Network (CNN) has presented an excellent performance on the detection and recognition of complex images. However, the current CNN models cannot adapt to the geometric deformation of pests. In this study, a deformable VGG-16 (DVGG-16) model was constructed and then applied for the detection of crop pest in the field. The framework consisted of six convolutional layers, four deformable convolutional layers, five pooling layers, and one global average pooling layer. Furthermore, the network training was utilized to speed up the global average pooling operation, instead of three fully connected layers of VGG-16. Four convolutional layers in VGG-16 were replaced by four deformable convolutional layers, in order to improve the characteristic expression ability of network and the practicality of VGG-16 to insect image deformation. Moreover, a global pooling layer was used instead of three fully connected layers of VGG-16, in order to reduce the number of the training parameters, while accelerate the network training speed free of the over-fitting. The offset was added in the deformable convolution unit, thereby to serve one part of DVGG-16 structure. Among them, another parallel standard convolution unit was used to calculate and then learn end-to-end through gradient backpropagation. Subsequently, the size of deformable convolution kernels and position were adjusted, according to the current need to identify the dynamic image content of crop pests, particularly suitable for different shapes, sizes, and other geometric deformation of the object. Moreover, data augmentation was performed on the original dataset to increase the number of training samples. A series operations were also included for the better generalization ability and robustness of model, such as bilinear interpolation, cropping and rotating images, and adding salt-pepper noise to the images. A parallel convolution layer was used in DVGG-16 to learn the offset corresponding to the input feature map. The constraint was easily broken for the regular grid of normal convolution, where an offset was added at the corresponding position of each sampling point, while the arbitrary sampling was performed around the sampling location. More importantly, the deformable convolution was greatly contributed to the DVGG-16 model for better suitable for various insect images with different shapes, states, and sizes. An image database of actual field pest was evaluated to compare with two feature extraction and two deep learning, including image-based Orchard Insect Automated Identification (IIAI), Local Mean Color Feature and Support Vector Machine (LMCFSVM), Improved Convolutional Neural Network (ICNN), and VGG-16. Specifically, the detection accuracy of DVGG-16 was 91.14%, which was 28.60 and 26.97 percentage higher than that of IIAI and LMCFSVM, and 7.72 and 9.01 percentage higher than that of ICNN and VGG-16 based models, respectively. The training time of DVGG-16 was 7.98 h longer than that of the ICNN, because the deformable convolution operation was realized by bilinear interpolation, which resulted in the increase of computational complexity and training time of DVGG-16 compared with ICNN. The test time of DVGG-16 based model was 0.02 and 0.17 s faster than that ICNN and VGG-16 based models, respectively. Consequently, the DVGG-16 was effective and feasible to detect the variable pests in the field. The finding can provide a strong reference for the effective detection of pests in the complex field background, further to realize the feature extraction of irregular field insect images without changing the spatial resolution.
models; convolutional neural network; crops; image recognition; pests; classification
張善文,許新華,齊國紅,等. 基于可形變VGG-16模型的田間作物害蟲檢測方法[J]. 農(nóng)業(yè)工程學(xué)報,2021,37(18):188-194.doi:10.11975/j.issn.1002-6819.2021.18.022 http://www.tcsae.org
Zhang Shanwen, Xu Xinhua, Qi Guohong, et al. Detecting the pest disease of field crops using deformable VGG-16 model[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(18): 188-194. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2021.18.022 http://www.tcsae.org
2020-11-06
2021-08-22
國家自然科學(xué)基金資助項目(62172338);河南省科技攻關(guān)項目(202102210157,202102210386,212102210406);河南省高等學(xué)校重點科研項目(20A520044)
張善文,博士,教授,博士生導(dǎo)師,研究方向為模式識別及其在作物病蟲害檢測中的應(yīng)用。Email:wjdw716@163.com
邵彧,副教授,研究方向為復(fù)雜圖像處理方法。Email:zswwyy125@163.com
10.11975/j.issn.1002-6819.2021.18.022
TP311.13
A
1002-6819(2021)-18-0188-07