摘要
该文以花生质量自动化检测为研究目标,提出了一种基于机器视觉与自适应卷积神经网络的花生质量检测方法。构建花生图像数据库用于识别花生的常见缺陷,包括霉变、破碎、干瘪等;然后建立卷积神经网络自动提取花生图像特征。为避免深层网络训练时间过长,分别将二次函数与正态分布模型引入网络损失中,同时从网络的损失与权值2方面提出自适应学习率,并分别结合梯度下降与梯度上升法更新网络。为提高模型的泛化能力,引进迁移学习算法,分别在网络的特征层与分类层后加入领域自适应,实现跨领域与跨任务的检测。试验结果表明,该方法对花生常见缺陷的平均识别率达99.7%,与传统的深度网络相比实现了更高的收敛速度与识别精度。
Aiming at the shortcomings of the traditional image recognition,including low accuracy and relying on experienced staff,a peanut kernel quality detection method based on machine vision and adaptive convolutional neural network(DAL-ACNN)is proposed in this paper.An image acquisition system was built to obtain the color images of peanuts which included normal peanuts,broken peanuts,shriveled peanuts and mildew peanuts,and a black background was selected in the system.Then,a convolutional neural network(CNN)based on Alexnet was selected to automatically extract and detect the peanut defects.To improve the accuracy and generalization of detection,it is necessary to optimize the existed network.Firstly,the key of the stochastic gradient descent is the choice of the learning rate,which directly influences the convergence speed and testing accuracy of the network.In this paper,an adaptive learning rate based on the changes in the loss and the weight was proposed,respectively.A larger learning rate was obtained to accelerate convergence in the initial training stage,and a smaller learning rate produced due to a higher accuracy in the later of network,which can avoid the oscillation.In the process of parameters update,a quadratic function was introduced to the loss to combine with the adaptive learning rate based on loss change for parameters update,and a normal distribution model was introduced to combine with the adaptive learning rate based on weight change to further update parameters.Secondly,to improve the generalization performance of the model,the domain adaption learning(DAL)for transfer learning was joined to the network.A domain classifier was introduced behind the feature layer,which can measure the difference of feature distribution between domains by the domain classification loss,and minimize difference of feature distribution by the marginal distribution adaption loss.A conditional distribution adaptation was introduced behind the Softmax layer,which can measure and adjust the category distribution difference by the conditional distribution adaption loss.These losses for domain adaption learning were optimized by backpropagation,which can locally and globally adjust the distribution to minimize the difference between domains,then the source domain information was migrated to the target domain,so the network trained on source data can also perform well on target data.The loss of marginal distribution adaption and conditional distribution adaption were combined with the classification loss to form the loss of the proposed model.The loss of conditional distribution adaption and classification were used to update the parameters by the adaptive learning rate based on loss change,and the marginal distribution adaption loss was used to further update the feature parameters by the adaptive learning rate based on weight change.The additional domain classifier parameter was updated by the adaptive learning rate based on domain classification loss variation.Finally,to verify the proposed method,the background above was seen as source domain,and a white background was selected as target domain.The parameters trained on source domain were used to initialize the proposed model,the source data and target data were taken as input to train the model.The result showed that the average accuracy for peanut detection in the target domain was 99.7%.And a higher convergence and accuracy generated by comparing with the traditional CNN at different learning rates and training sample sizes.To further prove the performance of the proposed approach,it was compared with the classic VGGNet、GoogLeNet、ResNet and DenseNet,which produced a satisfactory result.
作者
张思雨
张秋菊
李可
Zhang Siyu;Zhang Qiuju;Li Ke(College of Mechainical Engineering,Jiangnan University,Wuxi 214122,China)
出处
《农业工程学报》
EI
CAS
CSCD
北大核心
2020年第4期269-277,共9页
Transactions of the Chinese Society of Agricultural Engineering
基金
国家自然科学基金资助项目(51775243)
江苏省重点研发计划·产业前瞻与共性关键技术(BE2017002)。
关键词
农产品
机器视觉
无损检测
自适应卷积神经网络
自适应学习率
迁移学习
领域自适应
agricultural products
machine vision
nondestructive detection
adaptive convolutional neural network
adaptive learning rate
transfer learning
domain adaption
作者简介
张思雨,博士生,研究方向为机器视觉及智能检测技术。Email:1466944512@qq.com;通信作者:李可,教授,研究方向为机械系统动态监测与智能故障诊断。Email:like@jiangnan.edu.cn。