APP下载

基于卷积神经网络的花生籽粒完整性识别算法及应用

2018-11-06赵志衡朱江波

农业工程学报 2018年21期
关键词:范数正则花生

赵志衡,宋 欢,朱江波,卢 雷,孙 磊



基于卷积神经网络的花生籽粒完整性识别算法及应用

赵志衡1,宋 欢1,朱江波1,卢 雷1,孙 磊2

(1. 哈尔滨工业大学电气工程及自动化学院,哈尔滨 150001;2. 上海安西机械制造有限公司,上海 201109)

针对现有色选设备在花生颗粒筛选过程中处理速度慢、准确率低的缺点,提出基于卷积神经网络的花生籽粒完整性识别算法。以完好花生、表皮破损花生和果仁破损花生的分类为例,构建花生图像库;搭造卷积神经网络,提取花生图像特征;为提高分类准确率和实时性,从训练集构成、减小过拟合、加快训练收敛速度、简化网络结构等几方面对卷积神经网络进行优化;最终利用含2个卷积层、2个池化层、2个全连接层的3层神经网络实现了上述3类花生的分类。试验结果表明:该方法对花生分类的准确率达到98.18%,平均检测一幅单粒花生图像的时间为18 ms,与现有色选设备相比有效提高了色选设备筛选的准确率和实时性。

农产品;图像处理;识别;卷积神经网络;特征提取;色选系统;花生颗粒筛选

0 引 言

色选机是采用色选技术的一种新型农副产品加工器械[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范数正则化、指数衰减法和滑动平均模型的方法优化卷积神经网络,提高分类的准确性;最后简化神经网络的结构,以期提高实时性。

1 基于CNN的花生完籽粒整性识别算法构建

1.1 数据采集及预处理

本文研究的图像分类算法应用于彩色色选设备。以花生颗粒作为研究对象,根据完整性将花生分为3类:完好的花生、表皮破损的花生、果仁破损花生。

色选系统实地采集407张有效的花生样品图像,每粒花生图像的分辨率为100×100像素,按上述特征分类并手工添加标签,然后将这些图像分为训练集和测试集,其中训练集占80%共325张,测试集占20%共82张,且训练集和测试集中上述3类花生图像呈均匀分布。训练集中部分花生图像如图1所示,从上至下依次为完好花生、表皮破损花生、果仁破损花生。

由于相机在拍摄过程中受环境因素干扰,原始图像中通常会含有各种噪声[23],干扰后续的图像分类,故分类前需要先对原始图像进行滤波。

图1 训练集部分花生图像

图2 滤波前后的花生图像

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语言进行深度学习编程。

1.3 评价指标

使用准确率(accuracy)指标来评价所提出分类算法的性能,定义如下:

图3 卷积神经网络结构

表1 卷积神经网络参数

将所建立的卷积神经网络在CPU+GPU平台上进行训练,迭代40次后,在测试集上分类准确率稳定达到90.91%。对比传统的BP神经网络[31],选用8-5-3的结构(输入层8个单元,隐藏层5个单元,输出层3个单元)在本文建立的数据集上进行相同环境的训练,学习100次后分类准确率为85.45%。可知本文构建的卷积神经网络算法有效提高了花生完整性分类的准确率。

2 基于CNN的花生完整性识别算法优化

为了进一步提高花生籽粒完整性识别的准确率和实时性,需要对所建立的卷积神经网络进行优化。

2.1 L1和L2范数正则化

过拟合指的是当一个模型过分复杂之后,它可以很好地“记忆”每一个训练数据中随机噪音的部分而忘记了要去“学习”训练数据中通用的趋势。为了避免过拟合问题,本文采用正则化的方法,其思想是在损失函数中加入刻画模型复杂程度的指标。假设用于刻画模型在训练数据上表现的损失函数为(),那么在优化时不是直接优化(),而是优化()+()。其中,为权值向量,()刻画的是模型的复杂程度,有2种形式:L1正则化和L2正则化,如式(2)、式(3)所示,表示模型复杂度损失在总损失中的比例,本文为0.1。

可知,L1和L2正则化的基本思想都是通过限制权值向量的大小,使得模型不能任意拟合训练数据中的随机噪音。

2.2 指数衰减法

神经网络在训练的过程中采用反向传播算法即梯度下降及链式求导法则来优化神经网络,梯度下降算法中一个重要的参数是学习率,学习率决定了参数移动到最优值的速度快慢。如果学习率过大,很可能会越过最优值;反之如果学习率过小,优化的效率可能过低,长时间算法无法收敛。本文采用指数衰减的方法设置学习率,首先使用较大的学习率来快速得到一个较优的解,然后随着迭代的继续逐步减小学习率,使得模型在训练后期更加稳定。学习率随迭代次数变化的计算公式为

式中为优化时使用的学习率;为迭代次数;0为初始学习率;为衰减系数,0<1,本文设置其数值为0.99;为衰减速度。在实际编程中选用TensorFlow中的tf.train. exponential_decay函数实现指数衰减法。

2.3 滑动平均模型

本文选用滑动平均模型来减小训练数据中的噪音对模型带来的影响,其计算公式为

式中θ+1表示本次迭代后输出的结果,θ表示上一次迭代后输出的结果,表示本次迭代的输入值,表示衰减率,0<1。由式(5)可知,衰减率决定了模型更新的速度,越大模型更新越慢。选用Tensorflow中的tf.train. ExponentialMovingAverage函数实现滑动平均模型,该函数提供了num_updates更新参数用来动态设置衰减率的数值,计算公式如式(6)所示,初始化的值为0.99。

2.4 神经网络结构的简化

初步构建的卷积神经网络结构中包括4个卷积层和4个池化层,网络结构较为复杂,而本文需要将该算法应用到色选机上,对传送带上的物料进行实时判断和处理,对实时性要求很高。又因本文筛选物料为花生,图像信息较为简单,故可以对网络结构进行简化以提高处理实时性。本文从减少卷积层和池化层的角度对该网络结构进行了优化,优化后的网络结构如图4所示,网络各层参数如表2所示。采用简化后的卷积神经网络在CPU+ GPU平台上测试,迭代40次后,在测试集上分类准确率稳定达到87.42%。

图4 简化卷积神经网络结构

表2 简化神经网络参数

3 算法优化结果

3.1 L1和L2范数正则化

对比仅选用L1范数正则化、仅选用L2范数正则化与最初构建的神经网络分类准确率如图5所示。

由图5可知,L2范数正则化后,准确率较原始准确率有明显提高,且准确率随着训练次数的增加基本呈单调上升趋势,故缓解了过拟合现象。而L1正则化后,虽然初期准确率数值较原始准确率有所下降,但随着训练次数的增加,准确率波动减小且基本呈单调上升趋势,故也缓解了过拟合的现象。分析L1、L2范数正则化后准确率出现明显差距的原因为:1)L1范数正则化会让参数更稀疏,即更多的参数变为0,而L2范数正则化不会;2)L1范数正则化的计算公式不可导,而L2范数正则化公式可导。由于在优化时需要计算损失函数的偏导数,故对含有L2范数正则化损失函数的优化要更加简洁。上述结果证明在本文建立的数据集上L2范数正则化有效地提高了识别的准确率,故本文选用L2范数正则化优化卷积神经网络。

图5 范数正则化前后准确率对比

3.2 指数衰减法

对比仅选用指数衰减法优化后和最初构建的神经网络在测试集上的分类准确率如图6所示,可知在前期训练的过程中优化算法的准确率增加幅度较大,后期增加幅度较小。这是由于在指数衰减法中先设置了一个较大的学习率,然后随着迭代次数增加学习率逐步减小。

图6 指数衰减法优化前后准确率对比

3.3 滑动平均模型

对比仅选用滑动平均模型优化后和最初构建的神经网络在测试集上的分类准确率如图7所示,可知优化后分类的准确率在训练前期低于优化前,但在后10次训练中,明显高于优化前,且滑动平均模型增加了模型的稳定性使得准确率波动减小。

图7 滑动平均模型优化前后准确率对比

3.4 综合优化方案

根据上述测试结果,最终选用的优化方案为:L2范数正则化+指数衰减学习率+滑动平均模型+简化网络结构。对比最初构建的卷积神经网络算法与最终优化算法在测试集上的分类准确率如图8所示。可知最终优化模型的准确率明显提高,在37次训练后准确率达到98.18%,且稳定不变,满足色选系统的性能需求。

运用优化前的卷积神经网络算法测试数据集中407张单粒花生图像,共用时12.51 s,平均一幅单粒花生图像的处理时间为30.7 ms。运用优化后算法的测试用时为7.44 s,即平均每张花生图像的处理时间为18.3 ms。对比传统的嵌入式平台,对一张单粒花生图像进行简单的中值滤波所需时间在数百ms量级[32]。可知基于CPU+GPU平台的深度学习算法极大的提高了运算速度,满足了色选设备在筛选物料时的实时性要求。

图8 综合优化前后准确率对比

4 色选系统实测实现分析

色选系统工作原理如图9所示。在色选系统履带尾部采用上下2组工业线阵CCD相机同时拍摄花生的正反面图像,以全方位识别破损。拍摄的线阵图像经拼接、边缘检测和分割后得到单粒花生图像[32],上述过程用时1~2 s,再使用本文的分类算法进行筛选,在检测到表皮破损和果仁破损的花生时通过控制空气喷枪动作将其剔除,调节传送带速度保证花生在指定区域完成筛选。

图9 色选系统工作原理图

实测结果表明采用本文识别算法的色选系统表现较为稳定,实时性满足要求,分类识别准确率与本文结果相近,多次试验准确率均在95%以上。由于受空气喷枪动作精度、力度影响,实际花生瑕疵品筛选精度在90%左右,较应用传统分类算法的色选系统筛选精度有明显提高。

5 结 论

本文提出将基于卷积神经网络的图像分类算法应用于色选设备农作物筛选过程。相比于传统的基于颜色值的图像分类算法,基于深度学习的图像分类算法不仅具有准确率高、速度快的优点,而且适用于颜色丰富、形状不一的复杂物料的筛选场合。选用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

猜你喜欢

范数正则花生
掏花生
基于同伦l0范数最小化重建的三维动态磁共振成像
J-正则模与J-正则环
π-正则半群的全π-正则子半群格
Virtually正则模
向量范数与矩阵范数的相容性研究
任意半环上正则元的广义逆
基于加权核范数与范数的鲁棒主成分分析
到底埋在哪棵树下
花生去哪儿了