趙志衡,宋 歡,朱江波,盧 雷,孫 磊
?
基于卷積神經網絡的花生籽粒完整性識別算法及應用
趙志衡1,宋 歡1,朱江波1,盧 雷1,孫 磊2
(1. 哈爾濱工業大學電氣工程及自動化學院,哈爾濱 150001;2. 上海安西機械制造有限公司,上海 201109)
針對現有色選設備在花生顆粒篩選過程中處理速度慢、準確率低的缺點,提出基于卷積神經網絡的花生籽粒完整性識別算法。以完好花生、表皮破損花生和果仁破損花生的分類為例,構建花生圖像庫;搭造卷積神經網絡,提取花生圖像特征;為提高分類準確率和實時性,從訓練集構成、減小過擬合、加快訓練收斂速度、簡化網絡結構等幾方面對卷積神經網絡進行優化;最終利用含2個卷積層、2個池化層、2個全連接層的3層神經網絡實現了上述3類花生的分類。試驗結果表明:該方法對花生分類的準確率達到98.18%,平均檢測一幅單粒花生圖像的時間為18 ms,與現有色選設備相比有效提高了色選設備篩選的準確率和實時性。
農產品;圖像處理;識別;卷積神經網絡;特征提取;色選系統;花生顆粒篩選
色選機是采用色選技術的一種新型農副產品加工器械[1-2],利用農副產品不同的光學特性,在大量的物料中將顏色異常或表面有缺陷的疵品和雜質檢測出來,并自動進行分選剔除[3-4]。在合格品與不合格品非常相似、傳統篩選難以識別或在篩選效率要求較高的場合,色選機的優勢非常明顯[5-6]。目前已有許多從業者對色選系統中的農作物篩選算法進行了一定的研究。Wang等分析了不同光照條件下櫻桃成像中、、數值的變化特點,設計了櫻桃的顏色評級系統[7]。Pearson等在RGB、HSV、CIE Lab 3種顏色模型下,分析了病變玉米粒與正常玉米粒在各種顏色分量數值上的區別,并基于色度和-分量設計了玉米篩選系統,精度達到90%[8]。 趙吉文等根據西瓜子的特征,采用灰度帶比例作為分類特征參數,分選出合格的瓜子,準確率達到95%[9]。以上3種方法在篩選農作物時,都依賴于某一點具體的顏色數值。但在實際應用過程中,農作物種類不一,個體差異性較大,僅通過顏色值限定進行篩選將出現誤差。
近年來深度學習[10]迅猛發展,Hinton[11]、Bengio[12-13]等研究團隊相繼提出深度神經網絡結構,其研究成果開啟了學術界和工業界的深度學習浪潮[14-18]。卷積神經網絡(convolutional neural network, CNN)是一種具有代表性的深度學習方法,已廣泛應用于圖像識別領域[19-22]。本文將卷積神經網絡應用于花生籽粒完整性識別,并改進和優化神經網絡,以期提高識別的準確率和實時性。
本文以完好花生、表皮破損花生和果仁破損花生的分類為例,建立卷積神經網絡;然后采用L2范數正則化、指數衰減法和滑動平均模型的方法優化卷積神經網絡,提高分類的準確性;最后簡化神經網絡的結構,以期提高實時性。
本文研究的圖像分類算法應用于彩色色選設備。以花生顆粒作為研究對象,根據完整性將花生分為3類:完好的花生、表皮破損的花生、果仁破損花生。
色選系統實地采集407張有效的花生樣品圖像,每粒花生圖像的分辨率為100×100像素,按上述特征分類并手工添加標簽,然后將這些圖像分為訓練集和測試集,其中訓練集占80%共325張,測試集占20%共82張,且訓練集和測試集中上述3類花生圖像呈均勻分布。訓練集中部分花生圖像如圖1所示,從上至下依次為完好花生、表皮破損花生、果仁破損花生。
由于相機在拍攝過程中受環境因素干擾,原始圖像中通常會含有各種噪聲[23],干擾后續的圖像分類,故分類前需要先對原始圖像進行濾波。


圖1 訓練集部分花生圖像

圖2 濾波前后的花生圖像
典型卷積神經網絡的結構[28-29]包含卷積層、池化層和全連接層。參照文獻[30]中卷積神經網絡的結構,建立如圖3所示的卷積神經網絡,各層參數如表1所示。
卷積神經網絡訓練過程最耗時的部分就是卷積運算。卷積運算處理的圖像數據通常都是以矩陣形式有序儲存的,且這些圖像數據之間耦合性低,故需要運算速度快、數據吞吐量大、存儲空間大的硬件平臺。
本文選用GPU+CPU平臺,該平臺中GPU具有極強的數據運算能力,在PC機中專門用于圖像處理。CPU與GPU組成了協同處理環境。CPU運算非常復雜的序列代碼,而GPU則運行大規模并行應用程序,從而大大提高了運行速度,且PC機內存遠大于嵌入式系統內存。
本文選用技嘉公司GV-N75TWF2OC型號的顯卡,搭載NVIDIA GTX 750Ti核心的GPU,顯存為4GB/128Bit GDDR5,PCI-E 3.0接口,選用CPU為Intel Core i3-2120處理器,并安裝Linux系統、Python3.5編譯環境、Anaconda軟件、CUDA架構、cuDNN開發庫以及Tensorflow深度學習框架。在此基礎上采用Python語言進行深度學習編程。
使用準確率(accuracy)指標來評價所提出分類算法的性能,定義如下:


圖3 卷積神經網絡結構

表1 卷積神經網絡參數
將所建立的卷積神經網絡在CPU+GPU平臺上進行訓練,迭代40次后,在測試集上分類準確率穩定達到90.91%。對比傳統的BP神經網絡[31],選用8-5-3的結構(輸入層8個單元,隱藏層5個單元,輸出層3個單元)在本文建立的數據集上進行相同環境的訓練,學習100次后分類準確率為85.45%。可知本文構建的卷積神經網絡算法有效提高了花生完整性分類的準確率。
為了進一步提高花生籽粒完整性識別的準確率和實時性,需要對所建立的卷積神經網絡進行優化。
過擬合指的是當一個模型過分復雜之后,它可以很好地“記憶”每一個訓練數據中隨機噪音的部分而忘記了要去“學習”訓練數據中通用的趨勢。為了避免過擬合問題,本文采用正則化的方法,其思想是在損失函數中加入刻畫模型復雜程度的指標。假設用于刻畫模型在訓練數據上表現的損失函數為(),那么在優化時不是直接優化(),而是優化()+()。其中,為權值向量,()刻畫的是模型的復雜程度,有2種形式:L1正則化和L2正則化,如式(2)、式(3)所示,表示模型復雜度損失在總損失中的比例,本文為0.1。


可知,L1和L2正則化的基本思想都是通過限制權值向量的大小,使得模型不能任意擬合訓練數據中的隨機噪音。
神經網絡在訓練的過程中采用反向傳播算法即梯度下降及鏈式求導法則來優化神經網絡,梯度下降算法中一個重要的參數是學習率,學習率決定了參數移動到最優值的速度快慢。如果學習率過大,很可能會越過最優值;反之如果學習率過小,優化的效率可能過低,長時間算法無法收斂。本文采用指數衰減的方法設置學習率,首先使用較大的學習率來快速得到一個較優的解,然后隨著迭代的繼續逐步減小學習率,使得模型在訓練后期更加穩定。學習率隨迭代次數變化的計算公式為

式中為優化時使用的學習率;為迭代次數;0為初始學習率;為衰減系數,0<1,本文設置其數值為0.99;為衰減速度。在實際編程中選用TensorFlow中的tf.train. exponential_decay函數實現指數衰減法。
本文選用滑動平均模型來減小訓練數據中的噪音對模型帶來的影響,其計算公式為

式中θ+1表示本次迭代后輸出的結果,θ表示上一次迭代后輸出的結果,表示本次迭代的輸入值,表示衰減率,0<1。由式(5)可知,衰減率決定了模型更新的速度,越大模型更新越慢。選用Tensorflow中的tf.train. ExponentialMovingAverage函數實現滑動平均模型,該函數提供了num_updates更新參數用來動態設置衰減率的數值,計算公式如式(6)所示,初始化的值為0.99。

初步構建的卷積神經網絡結構中包括4個卷積層和4個池化層,網絡結構較為復雜,而本文需要將該算法應用到色選機上,對傳送帶上的物料進行實時判斷和處理,對實時性要求很高。又因本文篩選物料為花生,圖像信息較為簡單,故可以對網絡結構進行簡化以提高處理實時性。本文從減少卷積層和池化層的角度對該網絡結構進行了優化,優化后的網絡結構如圖4所示,網絡各層參數如表2所示。采用簡化后的卷積神經網絡在CPU+ GPU平臺上測試,迭代40次后,在測試集上分類準確率穩定達到87.42%。

圖4 簡化卷積神經網絡結構

表2 簡化神經網絡參數
對比僅選用L1范數正則化、僅選用L2范數正則化與最初構建的神經網絡分類準確率如圖5所示。
由圖5可知,L2范數正則化后,準確率較原始準確率有明顯提高,且準確率隨著訓練次數的增加基本呈單調上升趨勢,故緩解了過擬合現象。而L1正則化后,雖然初期準確率數值較原始準確率有所下降,但隨著訓練次數的增加,準確率波動減小且基本呈單調上升趨勢,故也緩解了過擬合的現象。分析L1、L2范數正則化后準確率出現明顯差距的原因為:1)L1范數正則化會讓參數更稀疏,即更多的參數變為0,而L2范數正則化不會;2)L1范數正則化的計算公式不可導,而L2范數正則化公式可導。由于在優化時需要計算損失函數的偏導數,故對含有L2范數正則化損失函數的優化要更加簡潔。上述結果證明在本文建立的數據集上L2范數正則化有效地提高了識別的準確率,故本文選用L2范數正則化優化卷積神經網絡。

圖5 范數正則化前后準確率對比
對比僅選用指數衰減法優化后和最初構建的神經網絡在測試集上的分類準確率如圖6所示,可知在前期訓練的過程中優化算法的準確率增加幅度較大,后期增加幅度較小。這是由于在指數衰減法中先設置了一個較大的學習率,然后隨著迭代次數增加學習率逐步減小。

圖6 指數衰減法優化前后準確率對比
對比僅選用滑動平均模型優化后和最初構建的神經網絡在測試集上的分類準確率如圖7所示,可知優化后分類的準確率在訓練前期低于優化前,但在后10次訓練中,明顯高于優化前,且滑動平均模型增加了模型的穩定性使得準確率波動減小。

圖7 滑動平均模型優化前后準確率對比
根據上述測試結果,最終選用的優化方案為:L2范數正則化+指數衰減學習率+滑動平均模型+簡化網絡結構。對比最初構建的卷積神經網絡算法與最終優化算法在測試集上的分類準確率如圖8所示。可知最終優化模型的準確率明顯提高,在37次訓練后準確率達到98.18%,且穩定不變,滿足色選系統的性能需求。
運用優化前的卷積神經網絡算法測試數據集中407張單粒花生圖像,共用時12.51 s,平均一幅單粒花生圖像的處理時間為30.7 ms。運用優化后算法的測試用時為7.44 s,即平均每張花生圖像的處理時間為18.3 ms。對比傳統的嵌入式平臺,對一張單粒花生圖像進行簡單的中值濾波所需時間在數百ms量級[32]。可知基于CPU+GPU平臺的深度學習算法極大的提高了運算速度,滿足了色選設備在篩選物料時的實時性要求。

圖8 綜合優化前后準確率對比
色選系統工作原理如圖9所示。在色選系統履帶尾部采用上下2組工業線陣CCD相機同時拍攝花生的正反面圖像,以全方位識別破損。拍攝的線陣圖像經拼接、邊緣檢測和分割后得到單粒花生圖像[32],上述過程用時1~2 s,再使用本文的分類算法進行篩選,在檢測到表皮破損和果仁破損的花生時通過控制空氣噴槍動作將其剔除,調節傳送帶速度保證花生在指定區域完成篩選。

圖9 色選系統工作原理圖
實測結果表明采用本文識別算法的色選系統表現較為穩定,實時性滿足要求,分類識別準確率與本文結果相近,多次試驗準確率均在95%以上。由于受空氣噴槍動作精度、力度影響,實際花生瑕疵品篩選精度在90%左右,較應用傳統分類算法的色選系統篩選精度有明顯提高。
本文提出將基于卷積神經網絡的圖像分類算法應用于色選設備農作物篩選過程。相比于傳統的基于顏色值的圖像分類算法,基于深度學習的圖像分類算法不僅具有準確率高、速度快的優點,而且適用于顏色豐富、形狀不一的復雜物料的篩選場合。選用L2范數正則化、指數衰減法和滑動平均模型的方法優化卷積神經網絡,以提高分類的準確性,同時簡化神經網絡的結構以提高實時性。試驗結果表明優化后的卷積神經網絡具有98.18%的分類準確率和幅單粒花生圖像18.3 ms/粒的處理速度。實測結果驗證了深度學習在農作物篩選領域的應用是切實可行的。
[1] 林茂先. 新型雜糧色選機的應用[J]. 糧油加工,2014(10):24-27. Lin Maoxian. Application of a new type of hybrid grain selection machine[J]. Cereals and Oils Processing, 2014(10): 24-27. (in Chinese with English abstract)
[2] 姚惠源,方輝.色選技術在糧食和農產品精加工領域的應用及發展趨勢[J].糧食與食品工業, 2011, 18(2):4-6. Yao Huiyuan, Fang Hui. Application and development trend of color selection technology in food and agricultural products finishing[J]. Cereal and Food Industry, 2011, 18(2): 4-6. (in Chinese with English abstract)
[3] 白穎杰. 基于機器視覺的圖像處理與特征識別方法的研究[D]. 重慶:重慶大學,2010. Bai Yingjie. Research on Image Processing and Feature Recognition Method Based on Machine Vision[D]. Chongqing: Chongqing University, 2010. (in Chinese with English abstract)
[4] 張五一, 趙強松, 王東云. 機器視覺的現狀及發展趨勢[J].中原工學院學報, 2008(1): 9-12,15. Zhang Wuyi, Zhao Qiangsong, Wang Dongyun. Actualities and developing trend of machine vision[J]. Journal of Zhongyuan University of Technology, 2008(1): 9-12, 15. (in Chinese with English abstract)
[5] 王潤濤, 張長利, 房俊龍, 等. 基于機器視覺的大豆籽粒精選技術[J]. 農業工程學報,2011, 27(8):355-359. Wang Runtao, Zhang Changli, Fang Junlong, et al. Soybean seeds selection based on computer vision[J].Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2011, 27(8): 355-359. (in Chinese with English abstract)
[6] 周竹, 黃懿, 李小昱, 等. 基于機器視覺的馬鈴薯自動分級方法[J]. 農業工程學報, 2012, 28(7): 178-183. Zhou Zhu, Huang Yi, Li Xiaoyu, et al. Automatic detecting and grading method of potatoes based on machine vision[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2012, 28(7): 178-183. (in Chinese with English abstract)
[7] Wang Qi, Wang Hui, Xie Lijuan, et al. Outdoor color rating of sweet cherries using computer vision[J]. Computers and Electronics in Agriculture, 2012, 87: 113-120.
[8] Pearson T, Dan M, Pearson J. A machine vision system for high speed sorting of small spots on grains[J]. Journal of Food Measurement & Characterization, 2012, 6(1/2/3/4): 27-34.
[9] 趙吉文,魏正翠,汪洋,等. 基于灰度帶比例的優質西瓜子識別算法研究與實現[J]. 農業工程學報,2011,27(4):340-344. Zhao Jiwen, Wei Zhengcui, Wang Yang, et al. Research and implementation of recognition algorithm based on gray scale of watermelon seeds[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2011, 27(4): 340-344. (in Chinese with English abstract)
[10] 何希平,劉波. 深度學習理論與實踐[M]. 北京:科學出版社,2017.
[11] Hinton G E, Osindero S, Teh Y W. A fast learning algorithm for deep belief nets[J]. Neural Computation, 2014, 18(7): 1527-1554.
[12] Bengio Y, Vincent P, Janvin C. A neural probabilistic language model[J]. Journal of Machine Learning Research, 2003, 3(6): 113-1155.
[13] Bengio Y, Lecun Y. Scaling learning algorithms towards AI[C]// Large-Scale Kernel Machines. 2007:321-359.
[14] 盧宏濤,張秦川. 深度卷積神經網絡在計算機視覺中的應用研究綜述[J]. 數據采集與處理,2016,31(1):1-17. Lu Hongtao, Zhang Qinchuan. Applications of deep convolutional neural network in computer vision[J]. Journal of Data Acquisition and Processing, 2016, 31(1):1-17. (in Chinese with English abstract)
[15] 孫志軍,薛磊,許陽明,等. 深度學習研究綜述[J]. 計算機應用研究,2012,29(8):2806-2810. Sun Zhijun, Xue Lei, Xu Yangming, et al. Overview of deep learning[J]. Application Research of Computers, 2012, 29(8): 2806-2810. (in Chinese with English abstract)
[16] 楊斌,鐘金英. 卷積神經網絡的研究進展綜述[J]. 南華大學學報:自然科學版,2016,30(3):66-72. Yang Bin, Zhong Jinying. Review of convolution neural network[J]. Journal of University of South China(Science and Technology), 2016, 30(3): 66-72. (in Chinese with English abstract)
[17] 胡正平,陳俊嶺,王蒙,等. 卷積神經網絡分類模型在模式識別中的新進展[J]. 燕山大學學報,2015,39(4): 283-291.Hu Zhengping, Chen Junling, Wang Meng, et al. Recent progress on convolutional neural network in pattern recognition[J]. Journal of Yanshan University, 2015, 39(4): 283-291. (in Chinese with English abstract)
[18] 高震宇,王安,劉勇,等. 基于卷積神經網絡的鮮茶葉智能分選系統研究[J/OL]. 農業機械學報,2017,48(7):53-58. Gao Zhenyu, Wang An, Liu Yong, et al. Intelligent fresh-tea- leaves sorting system research based on convolution neural network[J]. Transactions of the Chinese Society for Agricultural Machinery, 2017, 48(7): 53-58. (in Chinese with English abstract)
[19] Szegedy C, Toshev A, Erhan D. Deep neural networks for object detection[J]. Advances in Neural Information Processing Systems, 2013, 26: 2553-2561.
[20] Szegedy C, Liu W, Jia Y, et al. Going deeper with convolutions[C]//IEEE Conference on Computer Vision and Pattern Recognition, 2015: 1-9.
[21] Krizhevshy A, Sutskever I, Hinton G E. Image net classification with deep convolutional neural networks[C]// Advances in Neural Information Processing Systems, 2012: 1-9.
[22] 黃凱奇,任偉強,譚鐵牛. 圖像物體分類與檢測算法綜述[J]. 計算機學報,2014,37(6),1225-1240. Huang Kaiqi, Ren Weiqiang, Tan Tieniu. A review on image object classification and detection[J]. Chinese Journal of Computers, 2014, 37(6): 1225-1240. (in Chinese with English abstract)
[23] Bailey D G. The advantages and limitations of high level synthesis for FPGA based image processing[C]// Proceedings of the 9th International Conference on Distributed Smart Cameras, 2015: 134-139.
[24] 王科俊,熊新炎,任楨. 高效均值濾波算法[J]. 計算機應用研究,2010,27(2):434-438 Wang Kejun, Xiong Xinyan, Ren Zhen. High efficiency mean value filtering algorithm[J]. Computer Applications, 2010, 27(2): 434-438. (in Chinese with English abstract)
[25] 趙高長,張磊,武風波. 改進的中值濾波算法在圖像去噪中的應用[J]. 應用光學,2011,32(4):678-682. Zhao Gaochang, Zhang Lei, Wu Fengbo. Application of improved median filtering algorithm in image denoising[J]. Journal of Applied Optics, 2011, 32(4): 678-682. (in Chinese with English abstract)
[26] 王海菊,譚常玉,王坤林,等. 自適應高斯濾波圖像去噪算法[J]. 福建電腦, 2017,33(11):5-6.
[27] 姒紹輝,胡伏原,顧亞軍,等. 一種基于不規則區域的高斯濾波去噪算法[J]. 計算機科學,2014(11):313-316. Si Shaohui, Hu Fuyuan, Gu Yajun, et al. Improved denoising algorithm based on non-regular area gaussian filtering[J]. Computer Science, 2014(11): 313-316. (in Chinese with English abstract)
[28] 常亮,鄧小明,周明全. 圖像理解中的卷積神經網絡[J].自動化學報,2016,9(42):1302-1303.Chang Liang, Deng Xiaoming, Zhou Mingquan. Convolutionalneural networks in image understanding[J]. Acta Automatica Sinica, 2016, 9(42): 1302-1303. (in Chinese with English abstract)
[29] Bouvrie J. Notes on convolutional neural networks[EB/OL]. [2018-05-01].https://pdfs.semanticscholar.org/714a/c6c7dbb83d69b8118e5138b3a50d8feb789b.pdf?_ga=2.255005896.1551754364.1538209923-2104266169.1536045423.
[30] 劉園園. 基于卷積神經網絡的花卉圖像分類算法的研究[D].北京:華北電力大學,2017. Liu Yuanyuan. Research on Flower Image Classification Algorithm Based on Convolutional Neural Network[D]. Beijing: North China Electric Power University, 2017. (in Chinese with English abstract)
[31] 王樹文,張長利,房俊龍. 基于計算機視覺的番茄損傷自動檢測與分類研究[J]. 農業工程學報,2005,21(8):98-101. Wang Shuwen, Zhang Changli, Fang Junlong. Automatic detection and classification of tomato damage based on computer vision[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2005, 21(8): 98-101.(in Chinese with English abstract)
[32] 馬涌. 基于機器視覺的顆粒狀農作物色選系統研究[D]. 哈爾濱:哈爾濱工業大學,2016. Ma Yong. Research on Granular Plant Color Selection System Based on Machine Vision[D]. Harbin: Harbin Institute of Technology, 2016.(in Chinese with English abstract)
Identification algorithm and application of peanut kernel integrity based on convolution neural network
Zhao Zhiheng1,Song Huan1, Zhu Jiangbo1, Lu Lei1, Sun Lei2
(1.150001,; 2.201109,)
Aiming at the shortcomings of the existing color sorter machine for crop sorting, such as slow processing speed, low accuracy, and the dependence on experience value, a granular crop integrity identification algorithm based on convolutional neural network was proposed. Taking the classification of intact peanuts, skin damaged peanuts and half peanuts as instance, the three types of peanut images were acquired. After comparing the filtering effects of mean filtering, median filtering and Gaussian filtering, median filtering was adopted for image preprocessing. 407 effective peanut images were divided into the above three categories and manually labeled. Then the images were divided into training sets and validation sets, and the above three types of peanut pictures in the training set and the validation set were evenly distributed. A convolutional neural network with 4 convolutional layers, 4 pooling layers and 3 fully connected layers was built to extract the peanut image features. The accuracy of testing peanut classification on the CPU(central processing unit) platform combined GPU(graphics processing unit) was 90.91%. In contrast, the classification accuracy of the traditional BP neural network was 85.45%. It could be seen that the convolutional neural network algorithm constructed in this paper effectively improved the accuracy of granular crop recognition. In order to further improve the accuracy and real-time performance of the classification algorithm, it was necessary to optimize the established convolutional neural network. Over-fitting referred to the fact that when a model was overly complex, it could "memorize" the portion of random noise in each training data and forgot to "learn" the tendencyof the training data. In this paper, the regularization method was used to reduce the over-fitting, and the experimental results of L1 regularization and L2 regularization were compared. It was proved that the L2 regularization on the data set effectively improved the classification accuracy and reduced the over-fitting. In the process of training, the neural network used the back propagation algorithm, namely gradient descent and chain derivation rule, to optimize the neural network. The learning rate was an important parameter in the gradient descent algorithm. In this paper, the exponential decay method was used to set the learning rate. Firstly, a large learning rate was used to quickly obtain a better solution. Then, as the iteration continued, the learning rate was gradually reduced, making the model more stable in the later stage of training. The accuracy increase was larger, the latter was smaller, and the overall improvement was better than that before optimization, and the expected effect was achieved. In this paper, the moving average model was used to reduce the influence of noise in the training data on the model, and the training convergence speed was accelerated. The experiment proved that the accuracy fluctuation was reduced and the model stability was enhanced. Since the algorithm needed to be applied to the color sorting system, real-time judgment and processing of the materials on the conveyor belt required high real-time performance. Considering that the image information of peanut was relatively simple, the network structure could be simplified to improve the real-time performance. The simplified convolutional neural network consisted of 2 convolutional layers, 2 pooling layers, and 2 fully connected layers. The final optimization scheme included L2 norm regularization, exponential decay learning rate, moving average model and simplified network structure. The accuracy of optimized classification algorithm applied on the peanut data set was 98.18%, and the average processing time for detecting one peanut image was 18.3 ms, which demonstrated that the optimized convolutional neural network significantly improved the classification accuracy and real-time performance. The research work in this paper showed that the application of deep learning in the crop sorting field was feasible and effective.
agricultural products; image processing; recognition; convolutional neural network; feature extraction; color sorting system; peanut particle screening
10.11975/j.issn.1002-6819.2018.21.023
TP391.41
A
1002-6819(2018)-21-0195-07
2018-05-01
2018-09-26
國家科技重大專項(2014zx04001171)
趙志衡,黑龍江哈爾濱人,教授,博士生導師,研究方向為電磁場和嵌入式系統。Email:zhzhhe@hit.edu.cn
趙志衡,宋 歡,朱江波,盧 雷,孫 磊.基于卷積神經網絡的花生籽粒完整性識別算法及應用[J]. 農業工程學報,2018,34(21):195-201. doi:10.11975/j.issn.1002-6819.2018.21.023 http://www.tcsae.org
Zhao Zhiheng, Song Huan, Zhu Jiangbo, Lu Lei, Sun Lei. Identification algorithm and application of peanut kernel integrity based on convolution neural network[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(21): 195-201. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2018.21.023 http://www.tcsae.org