分析与检测

高光谱技术结合网格搜索优化支持向量机的桃缺陷检测

  • 张立秀 ,
  • 张淑娟 ,
  • 孙海霞 ,
  • 薛建新 ,
  • 任锐 ,
  • 刘文俊
展开
  • (山西农业大学 农业工程学院,山西 晋中,030801)
第一作者:硕士研究生(张淑娟教授为通信作者,E-mail:zsujuan1@163.com)

收稿日期: 2022-09-06

  修回日期: 2022-10-13

  网络出版日期: 2023-09-12

基金资助

国家自然科学基金青年基金项目(31801632);山西省重点研发计划项目(201903D221027)

Hyperspectral technology combined with grid search optimized support vector machines to detect defects of peach

  • ZHANG Lixiu ,
  • ZHANG Shujuan ,
  • SUN Haixia ,
  • XUE Jianxin ,
  • REN Rui ,
  • LIU Wenjun
Expand
  • (College of Engineering, Shanxi Agricultural University, Jinzhong 030801, China)

Received date: 2022-09-06

  Revised date: 2022-10-13

  Online published: 2023-09-12

摘要

为快速区分完好桃、疮痂桃、腐烂桃(虫咬桃、鸟啄桃),实现久保桃外部缺陷的无损检测,该研究利用高光谱技术对久保桃的外部缺陷进行了研究。共采集302个久保桃样本(120个完好桃样本、120个缺陷桃样本、62个验证桃样本),对比经光谱学、基线校正、中值滤波(median filter,MF)等5种预处理方法建立偏最小二乘法模型的准确率,选取经MF预处理后的光谱数据进行后续建模研究。采用回归系数法、竞争性自适应重加权算法(competitive adaptive reweighted sampling,CARS)提取特征波长,建立网格搜索法优化支持向量机(grid search optimized support vector machines,GS-SVM)模型、遗传算法优化SVM模型、粒子群算法优化的SVM模型并进行对比分析。结果表明,CARS-GS-SVM模型预测效果最好,其训练集的判别率为93.33%,预测集的判别率为96.77%,验证集的判别准确率为91.94%,运行时间为11.5 s。该研究利用高光谱技术结合CARS-GS-SVM模型实现了久保桃外部缺陷的检测,为开发水果的分级分选设备提供了理论基础。

本文引用格式

张立秀 , 张淑娟 , 孙海霞 , 薛建新 , 任锐 , 刘文俊 . 高光谱技术结合网格搜索优化支持向量机的桃缺陷检测[J]. 食品与发酵工业, 2023 , 49(16) : 269 -275 . DOI: 10.13995/j.cnki.11-1802/ts.033557

Abstract

To quickly distinguish intact peaches, scab peaches, and rotten peaches (insect-eaten peaches and bird-pecked peaches) and realize nondestructive testing of external defects of Kubo peaches, hyperspectral technology was used to study the external defects of Kubo peaches. A total of 302 Kubo peach samples (120 intact peach samples, 120 defective peach samples, and 62 verified peach samples) were collected, and the five pretreatment methods such as spectroscopy, baseline correction, and median filtering (MF) were used for spectral pretreatment and partial least squares method (PLS) model was carried out to obtain the better performance. Finally, MF was selected as the pretreatment method, and based on the pre-treated spectral data. The regression coefficient method and competitive adaptive reweighting algorithm (CARS) were used to extract the important wavelength. The grid search method optimized SVM (GS-SVM) model, genetic algorithm optimized SVM model, and particle swarm optimization algorithm optimized SVM model were established and compared. Results showed that the CARS-GS-SVM model had the best prediction effect on the three types, the discrimination rate of the training set was 93.33%, the discrimination rate of the prediction set was 96.77%, the discrimination accuracy of the validation set was 91.94%, and the running time was 11.55 s. In this study, hyperspectral technology combined with the CARS-GS-SVM model was used to detect the external defects of Kubo peach, which provided a theoretical basis for the development of fruit grading and sorting equipment.

参考文献

[1] 贾壮壮. 65个大久保桃实生后代优系的调查与复选[D]. 秦皇岛: 河北科技师范学院, 2018.
JIA Z Z. Investigation and selection of 65 excellent progenies of’Okubo’ peach[D]. Qinhuangdao: Hebei Normal University of Science & Technology, 2018.
[2] 任锐, 张淑娟, 赵华民, 等. 基于机器视觉的辣椒外部品质检测[J]. 食品与机械, 2021, 37(1):165-168.
REN R, ZHANG S J, ZHAO H M, et al. Study on external quality detection of pepper based on machine vision[J]. Food & Machinery, 2021, 37(1):165-168.
[3] 孙海霞, 张淑娟, 刘蒋龙, 等. 基于高光谱和卷积神经网络的鲜枣黑斑病检测[J]. 山西农业大学学报(自然科学版), 2018, 38(11):15-19, 26.
SUN H X, ZHANG S J, LIU J L, et al. Detection of black rot of fresh jujube fruits using hyperspectral imaging and a convolutional neural network[J]. Journal of Shanxi Agricultural University (Natural Science Edition), 2018, 38(11):15-19, 26.
[4] BARANOWSKI P, MAZUREK W, WOZNIAK J, et al. Detection of early bruises in apples using hyperspectral data and thermal imaging[J]. Journal of Food Engineering, 2012, 110(3):345-355.
[5] WANG J, NAKANO K, OHASHI S, et al. Detection of external insect infestations in jujube fruit using hyperspectral reflectance imaging[J]. Biosystems Engineering, 2011, 108(4):345-351.
[6] LORENTE D, ALEIXOS N, GÓMEZ-SANCHIS J, et al. Selection of optimal wavelength features for decay detection in citrus fruit using the ROC curve and neural networks[J]. Food and Bioprocess Technology, 2013, 6(2):530-541.
[7] 许建东, 张淑娟, 郑小南, 等. 高光谱技术结合变量选择方法的甘薯冻害检测研究[J]. 食品与发酵工业, 2021, 47(8):197-203.
XU J D, ZHANG S J, ZHENG X N, et al. Study on the detection of sweet potato freezing damage based on hyperspectral technology and variable selection method[J]. Food and Fermentation Industries, 2021, 47(8):197-203.
[8] 池江涛, 张淑娟, 任锐, 等. 基于高光谱的茄子外部缺陷检测[J]. 现代食品科技, 2021, 37(9):279-284;178.
CHI J T, ZHANG S J, REN R, et al. Detection of eggplant external defects using hyperspectral technology[J]. Modern Food Science and Technology, 2021, 37(9):279-284;178.
[9] 吉亚敏. 基于高光谱和机器学习的马铃薯缺陷分类研究[D]. 哈尔滨: 黑龙江大学,2020 .
JI Y M. Study on potato defect classification based on hyperspectral and machine learning[D].Harbin: Helongjiang University, 2020.
[10] 章海亮, 高俊峰, 何勇. 基于高光谱成像技术的柑橘缺陷无损检测[J]. 农业机械学报, 2013, 44(9):177-181.
ZHANG H L, GAO J F, HE Y. Nondestructive detection of citrus defection using hyper-spectra imaging technology[J]. Transactions of the Chinese Society for Agricultural Machinery, 2013, 44(9):177-181.
[11] LI Y J, MA B X, LI C, et al. Accurate prediction of soluble solid content in dried Hami jujube using SWIR hyperspectral imaging with comparative analysis of models[J]. Computers and Electronics in Agriculture, 2022, 193:106655.
[12] ZHAO C H, GAO B, ZHANG L J, et al. Classification of Hyperspectral Imagery based on spectral gradient, SVM and spatial random forest[J]. Infrared Physics & Technology, 2018, 95:61-69.
[13] SARANWONG S, HAFF R P, THANAPASE W, et al. A feasibility study using simplified near infrared imaging to detect fruit fly larvae in intact fruit[J]. Journal of Near Infrared Spectroscopy, 2011, 19(1):55-60.
[14] WANG K J, GUO D M, ZHANG Y, et al. Detection of Huanglongbing (Citrus greening) based on hyperspectral image analysis and PCR[J]. Frontiers of Agricultural Science and Engineering, 2019, 6(2):172.
[15] 王梓萌. 基于近红外光谱与密度特征的苹果霉心病无损检测方法研究[D]. 保定: 河北农业大学, 2020.
WANG Z M. Nondestructive testing technology of apple moldy heart disease based on density and near infrared spectrum[D]. Baoding: Hebei Agricultural University, 2020.
[16] 黄林生, 张寒苏, 阮超, 等. 基于近地高光谱数据和遗传算法优化的支持向量机麦穗尺度赤霉病识别[J]. 农业工程技术, 2020, 40(24):87.
HUANG L S, ZHANG H S, RUAN C, et al. Identification of wheat head scab based on near-earth hyperspectral data and genetic algorithm optimization by support vector machine[J]. Agricultural Engineering Technology, 2020, 40(24):87.
[17] 罗强. 基于高光谱技术的茶叶内部品质检测研究[D]. 雅安: 四川农业大学, 2020.
LUO Q. A method of tea quality inspection based on hyperspectral imagine[D].Yaan: Sichuan Agricultural University, 2020.
[18] 谈文艺. 基于高光谱成像技术的苹果外部损伤精确识别与分级方法研究[D]. 哈尔滨: 黑龙江大学, 2018.
TAN W Y. Research on accurate identification and classification method of apple external damage based on hyperspectral imaging technology[D].Harbin: Helongjiang University, 2018.
[19] 莫松涛, 董涛, 赵汐璇, 等. 基于遗传算法与SVM的香蕉果实成熟度判别模型[J]. 果树学报, 2022, 39(12):2418-2427.
MO S T, DONG T, ZHAO X X, et al. Discriminant model of banana fruit maturity based on genetic algorithm and SVM[J]. Journal of Fruit Science, 2022, 39(12):2418-2427.
[20] ZHOU T, LU H L, WANG W W, et al. GA-SVM based feature selection and parameter optimization in hospitalization expense modeling[J]. Applied Soft Computing, 2019, 75:323-332.
[21] BONAH E, HUANG X Y, YI R, et al. Vis-NIR hyperspectral imaging for the classification of bacterial foodborne pathogens based on pixel-wise analysis and a novel CARS-PSO-SVM model[J]. Infrared Physics & Technology, 2020, 105:103220.
[22] HUANG W C, LIU H Y, ZHANG Y, et al. Railway dangerous goods transportation system risk identification: Comparisons among SVM, PSO-SVM, GA-SVM and GS-SVM[J]. Applied Soft Computing, 2021, 109:107541.
[23] XUAN G T, GAO C, SHAO Y Y. Spectral and image analysis of hyperspectral data for internal and external quality assessment of peach fruit[J]. Spectrochimica Acta-Part A, Molecular and Biomolecular Spectroscopy, 2022, 272:121016.
[24] 卢伟, 蔡苗苗, 张强, 等. 高光谱和集成学习的黑枸杞快速分级方法[J]. 光谱学与光谱分析, 2021, 41(7):2196-2204.
LU W, CAI M M, ZHANG Q, et al. Fast classification method of black goji berry (Lycium ruthenicum Murr.) based on hyperspectral and ensemble learning[J]. Spectroscopy and Spectral Analysis, 2021, 41(7):2196-2204.
[25] 黄锋华, 张淑娟, 杨一, 等. 油桃外部缺陷的高光谱成像检测[J]. 农业机械学报, 2015, 46(11):252-259.
HUANG F H, ZHANG S J, YANG Y, et al. Application of hyperspectral imaging for detection of defective features in nectarine fruit[J]. Transactions of the Chinese Society for Agricultural Machinery, 2015, 46(11):252-259.
[26] 王胜鹏, 郑鹏程, 桂安辉, 等. 基于近红外光谱技术的远安黄茶品质快速无损检测方法[J]. 华中农业大学学报, 2022, 41(1):238-245.
WANG S P, ZHENG P C, GUI A H, et al. Fast and non-destructive quality evaluation of Yuan’an yellow tea based on near-infrared spectroscopy[J]. Journal of Huazhong Agricultural University, 2022, 41(1):238-245.
[27] 袁瑞瑞, 刘贵珊, 何建国, 等. 可见近红外高光谱成像对灵武长枣定量损伤等级判别[J]. 光谱学与光谱分析, 2021, 41(4):1182-1187.
YUAN R R, LIU G S, HE J G, et al. Quantitative damage identification of Lingwu long jujube based on visible near-infrared hyperspectral imaging[J]. Spectroscopy and Spectral Analysis, 2021, 41(4):1182-1187.
[28] 任显丞. 基于高光谱技术和化学计量学方法的苹果身份识别方法研究[D]. 阿拉尔: 塔里木大学, 2021.
REN X C. Research on apple identification method based on hyperspectral technology and chemometrics method[D]. Ala′er: Tarim University, 2021.
[29] LIU W Y, LI Q. An efficient elastic net with regression coefficients method for variable selection of spectrum data[J]. PLoS One, 2017, 12(2): e0171122.
[30] 李晓丽, 张东毅, 董雨伦, 等. 基于卷积神经网络的茶鲜叶主要内含物的光谱快速检测方法[J]. 中国农业大学学报, 2021, 26(11):113-122.
LI X L, ZHANG D Y, DONG Y L, et al. Spectral rapid detection of phytochemicals in tea(Camellia sinensis)based on convolutional neural network[J]. Journal of China Agricultural University, 2021, 26(11):113-122.
文章导航

/