食品科学 ›› 2021, Vol. 42 ›› Issue (10): 284-289.doi: 10.7506/spkx1002-6630-20200412-155

• 安全检测 • 上一篇    下一篇

基于轻量卷积网络的马铃薯外部缺陷无损分级

杨森,冯全,张建华,王关平,张鹏,闫红强   

  1. (1.甘肃农业大学机电工程学院,甘肃 兰州 730070;2.中国农业科学院农业信息研究所,北京 100081)
  • 出版日期:2021-05-25 发布日期:2021-06-02
  • 基金资助:
    国家自然科学基金面上项目(31971792);国家自然科学基金地区科学基金项目(61461005)

Nondestructive Classification of Defects in Potatoes Based on Lightweight Convolutional Neural Network

YANG Sen, FENG Quan, ZHANG Jianhua, WANG Guanping, ZHANG Peng, YAN Hongqaing   

  1. (1. College of Mechanical and Electrical Engineering, Gansu Agricultural University, Lanzhou 730070, China;2. Agricultural Information Institute, Chinese Academy of Agricultural Sciences, Beijing 100081, China)
  • Online:2021-05-25 Published:2021-06-02

摘要: 目前马铃薯外部缺陷检测方法主要依靠人工提取特征,且检测精度不高,为了更好地对马铃薯外部缺陷进行快速、准确在线分级,本实验提出一种基于轻量卷积网络的在线分级方法。首先,利用ImageNet数据集训练Xception网络模型,建立马铃薯预训练网络模型;然后,重新构建5 类缺陷全连接层,并通过迁移学习在预训练网络模型上训练马铃薯缺陷数据集;最后,基于外部缺陷识别模型分别测试5 类缺陷的分级性能。结果表明,学习率为0.000 01时,网络模型整体性能最优,训练准确率为98.88%,损失值为0.034 9;在相同样本条件下,与9 种不同深度的网络进行对比,本实验构建的轻量级网络模型识别效果最好,平均识别准确率达到96.04%,且运行时间比识别效果较好的ResNet152网络更短,本实验网络模型的识别速率为6.4 幅/s,本研究结果可为马铃薯在线分级提供理论支持。

关键词: 马铃薯;外部缺陷;迁移学习;Xception网络;分级

Abstract: At present, the detection of external defects in potatoes mainly depends on manual feature extraction and is consequently inaccurate. A classification method for fast and accurate online grading of potatoes based on the lightweight convolutional neural network is proposed in this paper. First, the Xception network model was trained using ImageNet dataset to establish a pre-trained network model. Then, based on the trained Xception network, this method replaced the Softmax classifier in the original Xception network with category 5 tags, and the potato defect dataset was trained in the Xception framework with transfer learning.Finally, based on the trained external defect recognition model, the classification performance of 5 tags defects was tested. The experimental results showed that when the learning rate was 0.000 01, the overall performance of the network model was optimal, the training accuracy rate was 98.88%, and the loss value was 0.034 9. Compared with nine other neural networks with different depths, the proposed lightweight network model had better recognition performance with average recognition accuracy of 96.04% under the same sample conditions. The model’s processing time was shorter than that of the ResNet152 network, with better recognition effect, and the recognition rate of the network model was 6.4 frames/s. This study could provide theoretical support for online classification of potatoes.

Key words: potato; external defect; transfer learning; Xception network; grading

中图分类号: