李大湘,曾小通,劉 穎
耦合全局與局部特征的蘋果葉部病害識別模型
李大湘,曾小通,劉 穎
(西安郵電大學通信與信息工程學院,西安 710121)
為充分利用蘋果葉部病害圖像類間差異小且類內差異大的特點,該研究基于全局與局部特征的交互式耦合對特征提取方法進行了優化,設計出一種蘋果葉部病害識別模型。首先,在全局特征提取分支設計了一個注意力融合模塊,以融合通道和空間上的信息而增強卷積提取到的特征圖,并由增強后的特征圖生成全局特征以及注意力激活圖;然后,在局部特征提取分支,利用注意力激活圖的引導,設計了一個裁剪模塊對原圖像進行裁剪,以得到可能包含病害信息的圖像塊且嵌入生成局部特征;最后,通過設計多頭交叉注意力特征耦合模塊,實現全局特征和局部特征的雙向交叉耦合。基于蘋果病害圖像數據集的試驗結果表明,將全局與局部特征進行交互耦合能有效提升模型對蘋果葉部病害圖像的特征提取能力,其識別準確率可達到98.23%,且較之單純的局部或全局特征提取分支,準確率分別提高了3.39與4.61個百分點,所提模型可用于實現自然場景下的蘋果葉部病害自動識別。
計算機視覺;蘋果葉;病害;圖像識別;交叉注意力特征耦合;卷積神經網絡
2020年,中國蘋果產量達到了4 407萬t,已經成為世界最大的蘋果生產國與消費國,其生產和消費規模均占全球50%以上[1]。蘋果樹在種植過程中常見的病害主要有斑點落葉病、褐斑病、花葉病、灰斑病與銹病等,而傳統的蘋果葉部病害識別主要是依靠具有專業知識的病蟲害專家或有經驗的農民[2]。基于人工的識別方法耗時耗力,且無法滿足現代農業大規模生產的需求[3]。蘋果樹病害的發生往往表現在根莖、果實以及葉片等區域,而葉部病害由于其發生頻率高,且具有特征明顯、數據易采集與易處理等特點,葉部病變癥狀成為判斷蘋果病害類型的重要依據之一[4]。所以,基于計算機視覺技術研究面向蘋果葉部的病害識別算法,是確保蘋果高效生產且可持續發展的一個重要方式,在智慧農業中具有重要意義[5]。
近年來,許多學者利用機器學習技術設計各種病蟲害智能識別算法[6],譚峰等[7]通過計算葉片的色度值,同時建立多層后向傳播神經網絡,運用區域標記法對病斑的特征參數進行計算,最終識別率可達到92.1%;宋雙[8]基于支持向量機利用一對一投票策略設計出分類模型,該方法實現了對3種蘋果葉面病害的有效識別;陳麗等[9]對田間玉米葉病害圖像進行分割和特征提取,最后采用概率神經網絡進行病害識別,識別率達到90.4%。盡管這些機器學習方法在特定病害識別上取得了理想的識別精度,但這些方法的精度在很大程度上依賴于提取的顏色、紋理與形狀等特征,由于同種病害在不同發病階段病癥差異明顯,且多種病害又可能表現出相似的病理特點,這些原因不但導致傳統方法特征層次關系設計困難,而且當面向復雜任務時,存在因特征具有局限性而導致算法泛化能力弱等問題[10]。
針對上述問題,以卷積神經網絡(Convolutional Neural Networks,CNN)為代表的深度學習方法被引入植物病害檢測與識別,因其具有特征提取能力強、適應性好與性能上限高的優勢[11],且較之上述傳統機器學習方法,其識別精度也得到顯著提高。例如:在AlexNet網絡的基礎上,孫俊等[12]對其批歸一化層與池化層進行改進,在14種植物26類病害圖像中實現了99.56%的平均識別準確率,郭小清等[13]對其局部響應歸一化層、全連接層與不同尺度卷積核進行改進,設計了一種多尺度番茄病害識別模型,平均識別準確率達到92.7%;王春山等[14]通過分解大卷積核進行群卷積操作,設計了一種輕量級的多尺度殘差病害識別模型,在7種真實環境病害圖像數據中取得了93.05%的準確率;甘雨等[15]通過引入坐標注意力機制與Adam優化算法,改進了EfficientNet主體結構而提高其泛化能力,在大規模作物害蟲數據集IP102上的識別準確率達到69.45%;劉陽等[16]對輕量級卷積神經網絡SqueezeNet進行改進,在PlantVillage數據集中的平均識別準確率達到98.13%;許景輝等[17]面向小樣本復雜田間背景下的玉米病害識別問題,設計了一種改進VGG-16網絡,實現了對玉米大斑病葉、銹病葉病害圖像95.33%的平均識別準確率。
基于CNN的葉部病害識別方法雖然取得了較大進展,能夠實現較高識別準確率,但蘋果葉部病害圖像具有類間差異小、類內差異大的特點,為了能夠同時獲取蘋果葉部病害圖像的細粒度與粗粒度特征從而提高識別準確率,現有方法主要是在經典CNN網絡中采用多尺度卷積核[13-14]或嵌入注意力模塊[15],對蘋果葉部病害圖像進行多尺度特征提取或定位特征所在區域。這些方法一定程度上提高了模型的識別準確率,但由于未充分考慮蘋果葉部圖像全局與局部特征之間的聯系,因此對提升模型的特征提取和語義表達能力作用有限,其識別準確率仍有提升空間。針對這些問題,本研究充分利用蘋果葉部病害圖像類間差異小且類內差異大的特點,將蘋果葉部病害圖像全局與局部特征相聯系,設計了一種全局和局部特征交互耦合(Global and Patch Features Interactively Coupling, GPF-IC)模型,對現有CNN模型的特征提取能力進行優化以得到更高識別準確率。
為了檢驗所提模型的識別性能,選用包含5種常見蘋果葉部的病害圖像集進行試驗。該圖像集由西北農林科技大學制作,分別采集于西北農林科技大學白水蘋果試驗站、洛川蘋果試驗站、慶城蘋果試驗站,即在蘋果的不同生長期及天氣(雨后,陰天、晴天)條件下,使用ABM-500GE/BB-500GE彩色數碼相機和手機,拍攝距離為10~15 cm,拍攝了常見且對蘋果生長影響大的斑點落葉病、灰斑病、褐斑病、花葉病、銹病和健康葉片的彩色圖像共計2 545張,圖像分辨率為 2 448×3 264,部分葉部病害樣圖如圖1所示。

圖1 蘋果葉部病害圖像示例
為了保證模型的學習效果,避免因訓練數據不足導致過擬合,同時構建自然條件下的病害識別場景,使模型能夠更加適應惡劣條件下的工作環境,增強模型的魯棒性,所以使用Python中的工具庫OpenCV對原始數據集進行以下3種數據增強操作:1)隨機光照增強和減弱:模擬果園在自然環境下不同的光照條件;2)上下左右翻轉:模擬識別設備的不同拍攝角度;3)高斯模糊:模擬拍攝到的含噪聲圖像。最終獲得樣本數量充足且分布均衡的蘋果葉部病害圖像數據集,包含6類葉部圖像共30 540張,詳細信息如表1所示。
所有試驗都是在Nvidia TITAN顯卡上進行實現,且在Linux+python3.8的開發環境中,安裝了PyTorch1.6深度學習工具箱,配合具有GPU加速的CUDA 10.1環境,用于模型的訓練與測試。
試驗過程中對蘋果葉部病害數據集按8∶2隨機劃分為訓練集和測試集,分別用于模型的訓練與測試。全局特征提取分支采用經Plant Village開源數據庫預先訓練過的ResNet18進行微調。在每次試驗的訓練與測試過程中,批處理大小(batch size)設置為32,迭代(epoch)設置為600,采用隨機梯度下降法(Stochastic Gradient Descent,SGD)訓練模型,學習率設置為0.001,輸入圖像分辨率均調整為224像素×224像素×3通道。

為充分利用蘋果葉部病害圖像“類間差異小且類內差異大”的特點,本研究針對當前研究未充分考慮全局與局部特征之間的聯系而存在的不足,設計了一個GPF-IC高精度蘋果葉部病害識別模型,如圖2所示。該模型主要由三大部分組成,即:全局特征提取分支、局部特征提取分支與特征交互耦合模塊。具體來說,通過在全局與局部特征提取分支分別引入注意力融合(Attention Fusion,AF)模塊、注意力激活圖生成(Attention Activation Maps Generation,AAMG)模塊和裁剪模塊,并經多頭交叉注意力耦合(Multi-Head Cross-Attention Coupling,MHCAC)模塊對兩個分支的特征進行交互融合,以增強模型的多粒度特征提取能力而提升識別準確率。

注:IMGn為第n張訓練圖像,為卷積得到的特征圖,為修正后的特征圖,1×1表示卷積核尺寸,為線性投影矩陣,為全局類別特征,為全局特征信息,為第n張訓練圖像裁剪得到的第j個子圖像塊,為局部類別特征,為局部特征信息。
2.1.1 注意力融合模塊
在全局特征提取分支中,為了使CNN卷積操作更加關注特征圖的重要通道及病斑區域,在SENet[18]與CBAM[19]的啟發下,如圖3所示,設計了一個AF模塊,并將其嵌入到ResNet18網絡的第五個卷積模塊之后,以在特征提取過程中融合通道和空間信息而提高該分支的全局特征提取能力。



圖3 注意力融合模塊
Fig.3 Attention Fusion(AF) module
在通道注意力子模塊中:首先,使用平均池化和全局最大池化分別獲取特征圖在空間維度上的壓縮信息;然后,分別將這兩種壓縮信息送入共享權值的全連接層中,處理結果相加之后而得到通道注意力圖F∈1×1×C,其過程可用式(3)表示。




2.1.2 全局特征生成



2.2.1 注意力激活圖生成模塊



2.2.2 裁剪模塊
通過觀察注意力激活圖,可發現:激活響應值高的區域往往分布在圖像中的病害區域,由此可認為激活圖的響應值越高,則該區域所含的病理信息量也越大,其屬于病害目標區域的可能性就越大。所以,基于注意力激活圖與非極大值抑制(Non-Maximum Suppression,NMS)方法,設計了一個圖像裁剪模塊,以從原圖像中挑選出響應值最高的若干個圖像子塊,用于圖像的局部特征提取。



為了增加全局與局部特征之間的聯系,從而增強模型對蘋果葉部病害圖像的特征表達能力,以提升模型分類性能,受CrossViT[21]融合不同尺度Transformer編碼器的啟發,通過疊加個多頭交叉注意力編碼器,設計了一個MHCAC模塊,以對全局和局部特征提取分支提取到的特征進行交互藕合,最后再經過一個多層感知機分類頭可得到病害識別結果。






圖4 一次單向交叉注意力特征耦合過程
Fig.4 A one-way cross-attention features coupling process
為了驗證所提GPF-IC模型的有效性,本研究采用的對照組網絡分為經典CNN模型,即ResNet18、ResNet50等,以及近年來用于蘋果葉部病害識別的先進模型。試驗過程中,所有的CNN網絡均在 Plant Village數據集上完成預訓練,然后將參數遷移到蘋果葉部病害識別任務之中,比對試驗結果如表2所示。

表2 不同模型的對比試驗
由表2中的數據可知,在識別準確率方面,所提GPF-IC模型均優于ResNet50、VGG-INCEP與DBNet等其他各種先進方法;在模型大小方面,除了輕型的ResNet18網絡之外(模型大小增加了約38%,但識別準確率提高了5.4個百分點),GPF-IC的模型大小明顯少于其他模型。因此,所提GPF-IC模型在實現高準確率病害識別的同時,也兼顧了模型的參數量和復雜度,使模型更適合部署于硬件受限的農業物聯網終端設備。
同時,也將GPF-IC模型應用到蘋果葉部病理數據集中的測試集上,得到的混淆矩陣如圖5所示。在混淆矩陣中,主對角線的數字表示預測正確的圖像數量,其他位置的數字表示預測錯誤的圖像數量。

注:0為健康蘋果葉,1為蘋果銹病,2為蘋果灰斑病,3為蘋果花葉病,4為蘋果褐斑病,5為蘋果斑點落葉病;主對角線數字為預測正確圖像數量,其余數字為預測錯誤圖像數量。


注:激活圖色條權重越大表示模塊越關注該區域。
為了探究GPF-IC模型各個模塊及分支是如何影響模型性能的,設計了如下8種消融試驗,即:1)試驗Ⅰ:僅采用ResNet-18網絡對圖像進行識別;2)試驗Ⅱ:在試驗Ⅰ的基礎上增加AF模塊,引入了通道與空間注意力機制;3)試驗Ⅲ:在試驗Ⅱ的基礎上增加裁剪模塊,增加了局部特征提取分支;4)試驗Ⅳ:在試驗Ⅲ的基礎上增加MHCAC模塊,對全局與局部特征實施交互耦合;5)試驗Ⅴ~Ⅷ:均在試驗Ⅳ的基礎上,將圖像裁剪模塊的子圖數量分別設置為6、8、12與16,以探討該參數對模型性能的影響,消融試驗結果如表3所示。
從表3所示的試驗結果可知,試驗Ⅱ的識別準確率比試驗Ⅰ提升了0.79個百分點,證明在ResNet18基礎上加入AF模塊,即通過融合通道和空間注意力,可以增強全局特征提取分支的特征表示能力,一定程度上提升了識別準確率;試驗Ⅲ的識別準確率較之試驗Ⅱ提升了1.22個百分點,證明在注意力激活圖的引導下局部特征提取分支,對于提升模型的識別準確率也是有效的;試驗Ⅳ通過加入MHCAC模塊,較之試驗Ⅲ準確率又提高了2.73個百分點,則說明本文設計的MHCAC模塊,即對提取的全局特征與局部特征進行雙向交叉耦合,確實能增強模型對病害特征的表示能力。試驗Ⅳ~Ⅷ將圖像裁剪模塊的子圖數量分別設置為4、6、8、12與16,多次試驗結果證明:當圖像塊數量為6時,即當來自局部特征提取分支的信息數為6時,模型實現最佳性能,相比試驗Ⅲ中單純的局部特征提取分支和試驗Ⅱ中單純的全局特征提取分支,識別準確率分別提高了3.39與4.61個百分點,當圖像塊數量超過6時,模型不但具有更多的計算量,且在病害識別任務上的識別準確率也難以提升。綜上所述,GPF-IC模型所設計的AF模塊、AAMG模塊、裁剪模塊與MHCAC模塊,能夠有效地增強網絡對圖像的細粒度特征提取與表達能力,提高整個模型的識別準確率,在智慧農業中具有廣闊應用前景。

表3 蘋果葉部病害圖像數據集上的消融試驗
注:√表示試驗中采用了該模塊,×表示試驗中未采用該模塊,MHCAC為多頭交叉注意力耦合模塊。
Note: √means the module was used in the experiment, × means the module was not used in the experiment, MHCAC represents the multi-head cross-attention coupling module.
本研究面向自然場景中的蘋果葉部病害識別問題,針對當前研究無法充分聯系全局與局部特征的不足,設計了一個基于全局與局部特征交互耦合的病害識別模型,其特點包括:
1)提出了全局特征提取分支,通過引入注意力融合模塊,使病害識別準確率提升0.79個百分點;
2)提出了局部特征提取分支,且引入裁剪模塊實施局部特征提取,模型準確率提升了1.22個百分點;
3)提出多頭交叉注意力耦合模塊,使模型能夠耦合來自不同分支的特征,增強模型的特征提取和表達能力,使識別準確率提升了3.39個百分點,從而取得了98.23%的最高識別準確率。
綜上所述,GPF-IC模型中設計的全局與局部特征提取分支,可有效優化對病害圖像的粗粒度和細粒度特征提取能力,且MHCAC模塊能夠進一步增強模型的特征表達能力,所提GPF-IC模型識別準確率均優于ResNet50、VGG-INCEP與DBNet等其他各種先進方法,在實現高識別準確率的同時,也保持了較少的參數量,可用于自然場景中,根據蘋果葉部圖像對斑點落葉病、褐斑病、花葉病、灰斑病與銹病等5種常見病害實施自動精準識別。
[1] 中華人民共和國國家統計局. 中國統計年鑒[M]. 北京:中國統計出版社,2021.
[2] Khan M A, Lali M I U, Sharif M, et al. An optimized method for segmentation and classification of apple diseases based on strong correlation and genetic algorithm based feature selection[J]. IEEE Access, 2019, 7: 46261-46277.
[3] Singh V, Misra A K. Detection of plant leaf diseases using image segmentation and soft computing techniques[J]. Information Processing in Agriculture, 2017, 4(1): 41-49.
[4] 王云露,吳杰芳,蘭鵬,等. 基于改進Faster R-CNN的蘋果葉部病害識別方法[J]. 林業工程學報,2022,7(1):153-159.
Wang Yunlu, Wu Jiefang, Lan Peng, et al. Apple disease identification using improved Faster R-CNN[J]. Journal of Forestry Engineering, 2022, 7(1): 153-159. (in Chinese with English abstract)
[5] 邵明月,張建華,馮全,等. 深度學習在植物葉部病害檢測與識別的研究進展[J]. 智慧農業(中英文),2022,4(1):29-46.
Shao Mingyue, Zhang Jianhua, Feng Quan, et al. Research progress of deep learning in detection and recognition of plant leaf diseases[J]. Smart Agriculture, 2022, 4(1): 29-46. (in Chinese with English abstract)
[6] Tian Y W, Li T L, Li C H, et al. Method for recognition of grape disease based on support vector machine[J]. Trans. Chin. Soc. Agric. Eng, 2007, 23(6): 175-180.
[7] 譚峰,馬曉丹. 基于葉片的植物病蟲害識別方法[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)
[8] 宋雙. 黃土高原蘋果葉面病害圖像識別方法研究[D]. 楊凌:西北農林科技大學,2017.
Song Shuang. Image Recognition Method of Apple Leaf Diseases on Loess Plateau[D]. Yangling: Northwest Agriculture and Forestry University, 2017. (in Chinese with English abstract)
[9] 陳麗,王蘭英. 概率神經網絡在玉米葉部病害識別中的應用[J]. 農機化研究,2011,33(6):145-148.
Chen Li, Wang Lanying. Research on application of probability neural network in maize leaf disease ldentification[J]. Journal of Agricultural Mechanization Research, 2011, 33(6): 145-148. (in Chinese with English abstract)
[10] 岑海燕,朱月明,孫大偉,等. 深度學習在植物表型研究中的應用現狀與展望[J]. 農業工程學報,2020,36(9):1-16.
Cen Haiyan, Zhu Yueming, Sun Dawei, et al. Current status and future perspective of the application of deep learning in plant phenotype research[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(9): 1-16. (in Chinese with English abstract)
[11] Zhang Q, Liu Y, Gong C, et al. Applications of deep learning for dense scenes analysis in agriculture: A review[J]. Sensors, 2020, 20(5): 1520.
[12] 孫俊,譚文軍,毛罕平,等. 基于改進卷積神經網絡的多種植物葉片病害識別[J]. 農業工程學報,2017,33(19):209-215.
Sun Jun, Tan Wenjun, Mao Hanping, et al. 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)
[13] 郭小清,范濤杰,舒欣. 基于改進Multi-Scale AlexNet的番茄葉部病害圖像識別[J]. 農業工程學報,2019,35(13):162-169.
Guo Xiaoqing, Fan Taojie, Shu Xin. Tomato leaf diseases recognition based on improved Multi-Scale AlexNet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(13): 162-169. (in Chinese with English abstract)
[14] 王春山,周冀,吳華瑞,等. 改進Multi-scale ResNet的蔬菜葉部病害識別[J]. 農業工程學報,2020,36(20):209-217.
Wang Chunshan, Zhou Ji, Wu Huarui, et al. Identification of vegetable leaf diseases based on improved Multi-scale ResNet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2020, 36(20): 209-217. (in Chinese with English abstract)
[15] 甘雨,郭慶文,王春桃,等. 基于改進EfficientNet模型的作物害蟲識別[J]. 農業工程學報,2022,38(1):203-211.
Gan Yu, Guo Qingwen, Wang Chuntao, et al. Recognizing crop pests using an improved EfficientNet model[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2022, 38(1): 203-211. (in Chinese with English abstract)
[16] 劉陽,高國琴. 采用改進的SqueezeNet模型識別多類葉片病害[J]. 農業工程學報,2021,37(2):187-195.
Liu Yang, Gao Guoqin. Identification of multiple leaf diseases using improved SqueezeNet model[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2021, 37(2): 187-195. (in Chinese with English abstract)
[17] 許景輝,邵明燁,王一琛,等. 基于遷移學習的卷積神經網絡玉米病害圖像識別[J]. 農業機械學報,2020,51(2):230-236,253.
Xu Jinghui, Shao Mingye, Wang Yichen, et al. Recognition of corn leaf spot and rust based on transfer learning with convolutional neural network[J]. Transactions of the Chinese Society for Agricultural Machinery, 2020, 51(2): 230-236, 253. (in Chinese with English abstract)
[18] Hu J, Shen L, Sun G. Squeeze-and-excitation networks[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018: 7132-7141.
[19] Woo S, Park J, Lee J Y, et al. Cbam: Convolutional block attention module[C]//Proceedings of the European Conference on Computer Vision (ECCV). 2018: 3-19.
[20] Wei X S, Luo J H, Wu J, et al. Selective convolutional descriptor aggregation for fine-grained image retrieval[J]. IEEE Transactions on Image Processing, 2017, 26(6): 2868-2881.
[21] Chen C F R, Fan Q, Panda R. Crossvit: Cross-attention multi-scale vision transformer for image classification[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021: 357-366.
[22] 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.
[23] Krizhevsky A, Sutskever I, Hinton G E. ImageNet classification with deep convolutional neural networks[J]. Advances in Neural Information Processing Systems, 2012, 25: 1097-1105.
[24] Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition[EB/OL]. (2014-12-19)[2022-04-26]. https://arxiv.org/abs/1409.1556.
[25] Luo Y, Sun J, Shen J, et al. Apple leaf disease recognition and sub-class categorization based on improved multi-scale feature fusion network[J]. IEEE Access, 2021, 9: 95517-95527.
[26] Jiang P, Chen Y, Liu B, et al. Real-time detection of apple leaf diseases using deep learning approach based on improved convolutional neural networks[J]. IEEE Access, 2019, 7: 59069-59080.
[27] 陸仲達,張春達,張佳奇,等. 雙分支網絡的蘋果葉部病害識別[J]. 計算機科學與探索,2022,16(4):917-926.
Lu Zhongda, Zhang Chunda, Zhang Jiaqi, et al. Identification of apple leaf disease based on dual branch network[J]. Journal of Frontiers of Computer Science and Technology, 2022, 16(4): 917-926. (in Chinese with English abstract)
Apple leaf disease identification model by coupling global and patch features
Li Daxiang, Zeng Xiaotong, Liu Ying
(,,710121,)
Apples in China accounts for more than 50% of the global production and consumption at present. However, the quantity and quality of apples have been threaten by the various diseases, such as alternaria boltch, brown spot, mosaic disease, gray spot, and rust. The CNN-based methods can be expected to recognize the crop leaf disease for the high recognition rates. But, there is still lacking on the recognition accuracy, due mainly to the lack of linkage between global and patch features of disease images in the general disease recognition models. In this study, a disease recognition model was proposed using the patch and global features interactively coupling model (GPF-IC). The main characteristics were also addressed for the small inter-class and large intra-class differences in the apple leaf disease images under natural conditions. Firstly, an attention fusion module was designed in the global feature extraction branch. The convolutionally extracted feature maps were then enhanced to fuse the information on the channels and spaces. The global features and attention activation maps were generated from the enhanced feature maps. Secondly, a cropping module was designed to crop the original image using the attention activation maps. The blocks of images were obtained with the disease information in the patch feature extraction branch, particularly with the patch features. Thirdly, the multi-head cross-attention feature coupling module was designed to realize the bi-directional cross-coupling of patch and global features. As such, the recognition accuracy was improved to enhance the representation capability of fine-grained features of disease images. Finally, three operations of data enhancement were used to evaluate the learning effect of the model for the less overfitting, due to the insufficient training data. A total of 30 540 disease images of six types of apple leaves were obtained with the sufficient number of samples and balanced distribution. The improved model was included as follows. 1) The global feature extraction branch was proposed to promote the disease recognition accuracy by 0.79 percentage points using the attention fusion module. 2) A patch feature extraction branch and a cropping module were introduced to implement the local feature extraction. The model accuracy was then improved by 1.22 percentage points than before. 3) A multi-head cross-attention coupling module was proposed to couple the features from the different branches for the feature extraction and expression capability of the model. The recognition accuracy was improved by 3.39 percentage points, which was the highest recognition accuracy of 98.23%. The experiment demonstrated that the feature extraction can effectively exclude the non-target noises to locate the most discriminative region using the global feature extraction branch. The patch feature extraction branch was efficiently acquired the patch information using the image block embedding. The feature coupling module was realized the interactive coupling of global and patch tokens for the better fine-grained feature representation using multi-headed cross-attention. The GPF-IC was achieved in the 98.23% recognition accuracy of apple leaf disease. The finding can provide a technical support for the automatic recognition of apple leaf diseases in natural scenes.
computer vision; apple tree leaf; disease; image recognition; cross-attention features coupling; convolutional neural networks
10.11975/j.issn.1002-6819.2022.16.023
TP391.4;S431.9
A
1002-6819(2022)-16-0207-08
李大湘,曾小通,劉穎. 耦合全局與局部特征的蘋果葉部病害識別模型[J]. 農業工程學報,2022,38(16):207-214.doi:10.11975/j.issn.1002-6819.2022.16.023 http://www.tcsae.org
Li Daxiang, Zeng Xiaotong, Liu Ying. Apple leaf disease identification model by coupling global and patch features[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2022, 38(16): 207-214. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2022.16.023 http://www.tcsae.org
2022-05-26
2022-07-16
國家自然科學基金項目(62071379);陜西省自然科學基金項目(2017KW-013)
李大湘,博士,副教授,碩士生導師,研究方向為遙感圖像分類、目標檢測與跟蹤、醫學圖像識別、多實例學習和深度學習等。Email:www_ldx@163.com