基于遗传算法与SVM的香蕉果实成熟度判别模型

莫松涛1,2,董 涛3,赵汐璇1,2,阚江明1,2*

1北京林业大学工学院,北京 100083;2林业装备与自动化国家林业和草原局重点实验室,北京 100083;3广东省农业科学院果树研究所,广州 510640)

摘 要:【目的】探究香蕉果实外形棱角特征与成熟度之间的关系,构建一种基于遗传算法与SVM的香蕉果实成熟度判别方法。【方法】采用同一种类不同成熟度的176个香蕉果实,根据果身长度进行横向平均切割,获取果实在上、中、下三个部位的横切面,再通过手工测量的方法获取横切面中每个棱角的夹角值,并以测量出的棱角特征作为判别成熟度的特征,通过遗传算法优化SVM分类模型参数,使成熟度判别模型能有效地将不同成熟度的香蕉果实进行区分。【结果】基于遗传算法与SVM的香蕉果实成熟度判别模型经过10次预测后,模型的平均准确率为86.20%。【结论】该方法能较为准确地得到香蕉果实成熟度判别结果,验证了香蕉果实的外形棱角特征与香蕉果实成熟度之间存在相关性,并可建立模型进行判别。

关键词:香蕉;果实棱角;支持向量机;遗传算法;成熟度判别

香蕉树属于热带、亚热带草本果树,果实营养丰富、经济价值高[1-2]。中国是香蕉生产大国,在广西、海南、云南、广东、福建等地均种植有大量的香蕉[3]。目前,中国香蕉果实的采收仍以人工为主,工作效率低且果实容易受到机械损伤,进而影响果实外观质量与果品保鲜效果[4-7]。由于香蕉果实是呼吸跃变型水果,采摘后容易发生后熟和腐烂,所以香蕉果实的采收一般在呼吸高峰前的硬绿期进行,到达目的地后再进行催熟。据统计,每年香蕉果实在运输途中由于采收成熟度不一致造成的损失率高达20%,极大地影响了经济效益并导致资源的浪费[8-9]。因此,对香蕉采收成熟度进行快速地自动判别,对提高香蕉的经济效益具有重要意义。

香蕉果实在成熟的过程中会发生许多物理和化学性质的变化[10-12],随着科学技术的发展,依靠香蕉果实特性实现香蕉成熟度检测的技术逐渐发展起来。Mendoza 等[13]根据香蕉果实表皮的颜色、褐斑以及图像纹理信息对香蕉果实成熟度进行分类,但香蕉果实在采收期内,表皮颜色大都为绿色,无褐斑并且图像纹理信息不明显,故上述特征不适合用于判别香蕉果实的采收成熟度。Rajkumar等[14]利用高光谱成像研究了香蕉果实在20、25 和30 ℃下的品质和成熟度,但光谱检测技术需要将果实采摘到特定的环境下进行单点检测,而且果实特征并不是均匀分布的,因此用单点检测来估计整体成熟度不可避免会产生误差。Soltani等[15]使用电容传感系统获取了香蕉果实在成熟过程中的相关电学特性,但电学特性检测法所构建的香蕉果实成熟度判别模型受环境温度和湿度影响较大。Sanaeifar等[16]利用电子鼻预测香蕉果实的成熟度,但电子鼻检传感器一致性较差,且气体的采样受环境影响严重。

目前,香蕉果实成熟度检测技术中利用光谱技术、电容传感器、气味传感器等检测方法都难以在果实采摘现场应用,而根据香蕉果实颜色信息检测成熟度的方法仅适合于商业贸易中使用。由于香蕉果实在成熟的过程中,外形会由发育初期的棱角尖锐逐渐变得圆润,即果棱消退,随着果肉发育愈充分,果实表面从凹陷状态逐渐饱满甚至隆起,故果农在采收香蕉果实时,主要是通过观察香蕉果实外形的饱满度即棱角大小进行判断是否采收[17]。笔者在本研究中根据判断香蕉果实采收成熟度中需要关注的果实饱满度问题,研究香蕉果身饱满度随时间的变化规律,利用果实棱角测量值,通过支持向量机来尝试预测香蕉果实的成熟度,建立一套基于遗传算法优化SVM参数的香蕉果实成熟度判别模型,为后续在香蕉果实的采收环节中快速准确地鉴别适收香蕉和研制香蕉采摘机器人奠定基础。

1 材料和方法

1.1 试验材料

试验样本于2021年5月18日至2021年6月9日在广东省湛江市香蕉种植基地进行采集,果实品种为巴西。试验选取11株香蕉树,果实成熟度均为五成熟。每株香蕉树果实的成熟度判断以每串香蕉果实头把蕉开始往下数的第3把香蕉果指的饱满度为准。每组样本采集间隔2 d,采集时在每株树的第3把蕉中随机割下2 个果指,对其进行标号后询问并记录蕉农对样本成熟度的判断。样本从香蕉果实五成熟开始采集直至八成熟,将采集到的香蕉样本按成熟度从低到高进行分组,其中不同成熟度的果实样本如图1 所示。试验期间共采集了8 组数据,采集香蕉果实176 份,其中五成熟样本45 份,六成熟样本43 份,七成熟样本44 份,八成熟样本44 份。

图1 采收后不同成熟度的香蕉果实样本
Fig.1 Samples of harvested banana fruits at different maturity

1.2 香蕉棱角数据获取

香蕉果实的成熟度判别标准之一为香蕉果指的饱满度,通俗来说即香蕉外形的棱角大小。在香蕉果实逐渐发育成熟的过程中棱角会由尖慢慢变钝,颜色由青逐渐变黄。为了更好地观察香蕉果实的外形棱角特征,笔者根据香蕉果身的长度进行横向的三刀平均切割,横向切割的每一刀对应着一类横切面。其中,在果身中点部位横向切割获取的横切面称为中部横切面,在靠近果梗部位横向切割获取的横切面称为上部横切面,在靠近花穗部位横向切割获取的横切面称为下部横切面。

为防止香蕉果实的外形在采摘后受时间与温度的影响发生变化,将采摘后的果实放置于通风透气的纸箱内带回并于2 h内进行处理。处理过程即对每个香蕉果实根据果身长度进行横向的三刀平均切割,获取果实在上、中、下三个部位的横切面,并将其印在纸上,画出不同部位的横切面轮廓线后对所画的棱角进行标号,最后再对每个棱角作出切线并量取夹角值。香蕉果实在不同部位的横切面棱角角度获取示意图如图2 所示,其中上部、中部、下部中棱角标号相同的表示香蕉果实的同一条棱。

图2 香蕉果实在不同部位的横切面棱角角度获取示意图
Fig.2 Schematic diagram of acquiring the angle of transverse section’s edges and corners of banana fruit in different parts

为了减少人工测量的误差,将5 人所测量的夹角数据进行对比,并计算它们的平均值作为最终的测量结果。根据观察,试验中的香蕉果实一般在八成熟以下时会出现个别果实只有3个或者4个棱角的情况,在试验样本中八成熟的香蕉果实均有5 个棱。设每个横切面具有5个特征值,即5个棱角的夹角值,不到5个棱角的空缺角以0表示。试验中按照香蕉果身长度进行横向的平均切割获取其上、中、下三个部位的横切面后,量取每个横切面的棱角夹角值,最终获取香蕉果实的棱角夹角数据528份,其中五成熟数据135 份,六成熟数据129 份,七成熟数据132份,八成熟数据132份。

在五成熟、六成熟、七成熟以及八成熟的香蕉果实样本中各随机选取3 个香蕉果实,将每类成熟度的3 个香蕉果实分别标记为1 号、2 号和3 号,选取出的不同成熟度香蕉果实在上、中、下三个部位的横切面棱角测量结果如表1、表2、表3 以及表4所示。

表1 五成熟香蕉果实的横切面棱角测量结果
Table 1 Measurement results of the transverse section’s edges and corners of level 5 mature banana fruits

香蕉横切面类别Banana transverse section category 1号上部No.1 upper part 1号中部No.1 middle part 1号下部No.1 lower part 2号上部No.2 upper part 2号中部No.2 middle part 2号下部No.2 lower part 3号上部No.3 upper part 3号中部No.3 middle part 3号下部No.3 lower part 95.62±1.58 94.41±1.17 100.26±1.03 101.23±1.15 95.35±1.16 97.03±1.22 115.25±1.41 94.62±1.17 96.21±0.68 133.23±1.33 124.85±1.26 136.41±1.51 139.35±0.86 133.16±1.19 133.24±0.73 127.15±1.45 132.62±1.32 124.83±1.09 117.84±0.65 105.41±1.01 109.36±0.89 110.56±1.23 98.13±0.77 100.26±0.95 113.62±1.23 105.33±0.99 107.02±0.38 118.65±1.35 108.47±0.76 113.82±1.05 126.16±0.76 111.32±1.10 128.07±1.24 129.73±0.62 137.03±1.51 127.63±0.62 0.00±0.00 0.00±0.00 0.00±0.00 131.26±0.31 124.52±0.55 135.14±1.32 127.28±1.21 131.74±0.52 126.38±0.81角1 Corners 1/(°)角2 Corners 2/(°)角3 Corners 3/(°)角4 Corners 4/(°)角5 Corners 5/(°)

表2 六成熟香蕉果实的横切面棱角测量结果
Table 2 Measurement results of the transverse section’s edges and corners of level 6 mature banana fruits

香蕉横切面类别Banana transverse section category 1号上部No.1 upper part 1号中部No.1 middle part 1号下部No.1 lower part 2号上部No.2 upper part 2号中部No.2 middle part 2号下部No.2 lower part 3号上部No.3 upper part 3号中部No.3 middle part 3号下部No.3 lower part角1 Corners 1/(°)112.05±1.09 105.48±1.12 108.46±1.14 113.29±0.63 107.86±0.93 112.42±1.46 109.75±1.22 102.93±1.16 107.28±0.95角2 Corners 2/(°)133.28±1.59 131.18±1.32 123.28±1.44 136.64±0.73 133.26±1.08 135.89±0.66 124.39±1.41 122.32±1.20 131.17±0.47角3 Corners 3/(°)113.76±1.42 112.15±0.93 124.31±1.00 123.63±1.37 110.25±1.24 118.47±0.69 128.86±0.47 109.65±1.16 122.36±1.38角4 Corners 4/(°)123.38±1.64 126.13±1.27 130.43±0.91 124.22±1.50 121.52±1.36 130.28±1.38 138.57±1.45 131.25±0.90 135.76±1.54角5 Corners 5/(°)120.74±1.49 114.51±1.24 119.53±1.33 138.54±0.57 134.21±0.89 135.88±1.14 128.75±1.40 120.15±1.35 130.53±1.26

表3 七成熟香蕉果实的横切面棱角测量结果
Table 3 Measurement results of the transverse section’s edges and corners of level 7 mature banana fruits

香蕉横切面类别Banana transverse section category 1号上部No.1 upper part 1号中部No.1 middle part 1号下部No.1 lower part 2号上部No.2 upper part 2号中部No.2 middle part 2号下部No.2 lower part 3号上部No.3 upper part 3号中部No.3 middle part 3号下部No.3 lower part角1 Corners 1/(°)139.32±0.79 120.16±1.13 135.02±1.19 144.36±0.92 138.15±1.51 139.24±1.04 124.81±0.63 121.24±0.98 140.36±1.33角2 Corners 2/(°)143.73±1.07 141.64±0.93 142.27±1.10 129.46±1.29 126.44±1.66 127.36±1.23 137.11±1.42 135.23±0.96 139.67±0.78角3 Corners 3/(°)129.49±1.24 120.11±1.01 119.63±0.74 139.32±0.96 132.75±1.18 123.10±1.31 122.67±0.65 121.43±1.73 136.85±1.19角4 Corners 4/(°)109.19±1.53 100.42±0.79 107.11±1.15 128.09±1.04 126.78±0.96 123.36±1.15 119.42±1.29 113.61±1.63 141.25±0.98角5 Corners 5/(°)147.57±1.98 138.46±1.57 144.52±1.32 135.23±1.25 127.41±0.38 129.48±1.47 147.27±1.19 145.33±0.48 142.80±1.36

表4 八成熟香蕉果实的横切面棱角测量结果
Table 4 Measurement results of the transverse section’s edges and corners of level 8 mature banana fruits

香蕉横切面类别Banana transverse section category 1号上部No.1 upper part 1号中部No.1 middle part 1号下部No.1 lower part 2号上部No.2 upper part 2号中部No.2 middle part 2号下部No.2 lower part 3号上部No.3 upper part 3号中部No.3 middle part 3号下部No.3 lower part角1 Corners 1/(°)145.64±0.83 139.13±1.02 143.25±1.32 141.93±0.99 140.10±0.69 131.82±1.32 142.66±1.01 140.48±0.74 142.27±0.88角2 Corners 2/(°)123.51±1.39 114.64±1.16 123.67±0.68 107.94±1.02 124.81±1.31 118.17±0.89 125.68±0.78 120.95±1.13 127.22±0.90角3 Corners 3/(°)104.64±0.97 102.25±1.25 108.79±0.65 148.26±1.16 140.06±1.27 137.35±1.44 109.75±1.35 105.23±1.19 116.46±1.73角4 Corners 4/(°)139.75±1.16 139.26±0.84 129.41±1.19 156.64±1.34 127.21±1.42 125.26±0.91 148.58±1.13 132.37±0.93 137.89±1.22角5 Corners 5/(°)122.42±1.21 128.23±1.14 139.95±0.88 144.29±1.10 140.25±1.29 128.68±1.35 126.39±1.53 123.42±0.96 129.53±1.63

1.3 构建香蕉成熟度判别模型

支持向量机(support vector machines,SVM)是一种高效的有监督学习模型。然而,SVM模型分类性能主要取决于模型参数的选择[18-19]。传统SVM模型随机生成参数值,分类精度存在不稳定因素,而遗传算法(genetic algorithm,GA)具有良好的全局寻优能力,能够用随机搜索的方法找出目标函数的全局最优点[20-22]。故笔者在本研究中利用遗传算法进行SVM的参数寻优,以便构建更好的香蕉果实成熟度判别模型。

笔者以香蕉果指上、中、下三个部位的横切面棱角特征值作为香蕉果实成熟度判别模型的输入向量,以香蕉果实成熟度等级作为模型的输出向量。首先,对香蕉果实数据进行预处理,即归一化处理,提升模型的收敛速度和精度。根据GA算法进行模型参数优化,先构建一定数量的初始种群,对初始值进行编码,然后计算适应度函数,判断优化结果是否满足GA 算法的结束条件,若满足则输出最优的参数组合,否则进行交叉、变异等操作产生新一代种群,开始新一轮的遗传。通过遗传算法获取最优的核参数g 和惩罚因子C 后代入SVM 模型中对训练集进行训练,利用训练好的模型对测试集数据进行判别,获取香蕉果实成熟度的等级与判别的准确率。算法流程框架图见图3。

图3 GA-SVM 香蕉成熟度判别模型流程框图
Fig.3 Flow diagram of GA-SVM discriminant model of banana maturity

2 结果与分析

2.1 香蕉棱角特征值分析

根据上述的实验方法测量了香蕉果实的5个棱角分量,不同成熟度香蕉果实的棱角角度分布情况见图4。

图4 香蕉棱角数据的箱线图
Fig.4 Box plot of banana’s edges and corners data

根据不同成熟度香蕉果实的棱角角度分布情况可以看出,香蕉果实的部分棱角随着果实成熟度的增加而表现出较明显的增加趋势,但也存在部分棱角随着果实成熟度的增加其角度分量没有明显的变化。由图4 可知,在528 份香蕉果实的棱角数据中,棱角1(图4-A)在各个成熟度之间为两两差异显著。棱角2(图4-B)在六成熟、七成熟以及八成熟之间为两两差异不显著,而该特征在五成熟与其他成熟度之间为两两差异显著。棱角3(图4-C)在七成熟与八成熟之间为差异不显著,在五成熟时分别与六成熟、七成熟、八成熟之间为两两差异显著,在六成熟时与五成熟、七成熟、八成熟之间为两两差异显著。棱角4(图4-D)在六成熟与七成熟之间为差异显著,在五成熟时分别与六成熟、七成熟、八成熟之间两两差异显著,在八成熟时与五成熟、六成熟、七成熟之间为两两差异显著。棱角5(图4-E)在七成熟与八成熟之间为差异不显著,在五成熟时分别与六成熟、七成熟、八成熟之间为两两差异显著,在六成熟时分别与五成熟、七成熟、八成熟之间为两两差异显著。上述分析表明,除了棱角2 之外的香蕉果实棱角特征在多类成熟度之间存在差异显著性。虽然单个香蕉果实中存在某个棱角特征在某些成熟度之间差异不显著,但香蕉果实的其他棱角特征可在上述差异不显著的成熟度之间表现为差异显著,故将单个香蕉果实的5 个棱角特征结合分析,则不同成熟度的单个香蕉果实根据整体棱角特征能够在一定程度上间隔开来,说明通过香蕉果实的5 个棱角特征可能可以判别出不同成熟度的香蕉。因此,在试验中基于遗传算法与SVM 的香蕉果实成熟度判别模型采用香蕉果实的5 个棱角分量值作为输入因子。

2.2 香蕉成熟度建模结果与分析

为了检测所述方法的准确率,笔者在总的样本集中任意抽取总样本的3/4 作为训练集,共396 份,剩下的132 份作为测试集,训练集与测试集中不同成熟度香蕉果实的样本分布如表5所示。为了达到交叉验证的目的,上述过程执行10次后求取准确率的平均值作为总测试的准确率。将预测准确率Rtest作为适应度评价函数,该方法能够有效地避免机器过学习现象,即避免学习精度过高而泛化能力较差的现象的产生。

表5 训练样本与测试样本分布
Table 5 Distribution of training samples and test samples

成熟度Maturity五成熟Level 5 maturity六成熟Level 6 maturity七成熟Level 7 maturity八成熟Level 8 maturity训练样本数The number of training samples 100 97 99 100测试样本数The number of test samples 35 32 33 32

选择遗传算法进行参数寻优,待优化的参数有惩罚参数C和核参数g,它无需遍历所有参数组合即可寻找到最优参数。GA优化的过程中设置其种群规模为50,惩罚参数C的范围为[0,100],核参数g的范围为[0,100],终止代数为200,在训练集中进行五折交叉验证,变异概率为0.9。用遗传算法对其进行参数寻优后,惩罚参数C的最佳值为14.84,核参数g的最佳值为73.93,此时算法的适应度即准确率最高。

遗传算法进化曲线如图5-A 所示,训练集中各代最佳适应度的曲线在10代之后达到一个稳定值,此时最佳适应度为76.77%。各代平均适应度随着进化代数增加而震荡幅度减小并有所提升,在20代之后达到一个相对稳定值,即在76%附近有较小波动。各代最佳适应度曲线与各代平均适应度曲线波动较小,可知GA优化后效果较好。

图5 遗传算法进化曲线(A)及测试集输出结果(B)
Fig.5 Genetic algorithm evolution curve(A)and test set output(B)

4 类香蕉果实成熟度样本分别为五成熟、六成熟、七成熟和八成熟,将4 类成熟度标签依次定义为1、2、3、4。由图5-B 可知,35 份五成熟的样本中有6 份被错误预测为六成熟,1 份被错误预测为七成熟,判别准确率为80.00%;32 份六成熟的样本中有4 份被错误预测为五成熟,判别准确率为87.50%;33 份七成熟的样本中有1 份被错误预测为五成熟,2 份被错误预测为六成熟,1 份被错误预测为八成熟,判别准确率为87.88%;32 份八成熟的样本中有1 份被错误预测为六成熟,1 份被错误预测为七成熟,判别准确率93.75%。图5 中共有17 份样本被预测错误,准确率为87.12%,整个模型训练并预测测试集共耗时约为147.29 s。该模型对测试集中132 份样本进行10 次预测,求取平均值后的准确率为86.20%。

3 讨 论

香蕉果实在成熟的过程中会发生许多物理和化学性质的变化,果实的表皮颜色、硬度、糖度、酸度、可溶性物含量、挥发性有机物含量、果身饱满度等都会随着香蕉果实成熟的过程不断变化,这些指标的变化可以反映出香蕉果实成熟度的变化[10]。因此,可以通过检测其中某个指标来确定香蕉果实的成熟度。根据Von Loesecke[23]的香蕉果实成熟度分类标准,香蕉果实的采收期处于果实成熟前的硬绿阶段,香蕉果实在采收后要经过一段时间才达到可食用的状态。确定香蕉果实的最佳采收期可以依据香蕉花序出现的时间、叶子干燥程度、花端脆弱程度、果肉稠度和果实棱角变化或消失的时间[12]。生活中常用的香蕉果实采收方法是根据果实生长的大小即其饱满的程度来确定,果实饱满度的大小可由香蕉外形棱角的大小判断。当果身近于平饱时为七成;果身圆满但尚见棱为八成;果身圆满无棱则为九成以上[24]

目前中国对水果成熟度的判别方法主要是依靠传统的人工判别法,依靠人工去观测果身的饱满度。人工分级方法会浪费大量的人力物力,而且人与人的感官不一样,对水果进行检测分级时的主观性比较强,长时间的观察还会造成人眼疲劳,这种方法不但效率低,而且在分级质量上得不到保证[25]。中国目前对香蕉果实的成熟度判别一般使用国际上通用的香蕉色卡,通过人工判别进行成熟度的分级,虽然国家对香蕉果实规定了收购的质量、规格、检验方法和包装要求等,但并没有能够对香蕉果实采收成熟度进行精确判别的分类模型[26]

由于当前香蕉果实成熟度判别方法均不能在采摘过程中使用,故笔者通过考虑当下蕉农常用的观察香蕉果实饱满度即棱角的方法,探究香蕉果实棱角与采收成熟度的关系。笔者在本研究中建立的香蕉果实成熟度判别模型是一种根据香蕉果实外形棱角特征所建立的果实成熟度判别方法,相较于常见的基于香蕉果实颜色、硬度、气味等判别成熟度的方法,本方法从香蕉果实的饱满度入手,利用遗传算法进行SVM模型的参数寻优,不仅避免了盲目地选择参数,而且相比于其他寻优算法也更为简单,能得到更为准确的解,并且算法也容易实现。该方法能得到较为准确的香蕉果实成熟度判别结果,为判断香蕉果实的采收成熟度研究提供了科学依据。在此后的研究中需要进一步深入研究香蕉果实外形棱角信息的无损获取方法,进一步探索香蕉果实成熟度的无损判别,为香蕉果实的采收提供一套智能化、自动化的成熟度判别方法。

4 结 论

基于同一品种的176份香蕉在上、中、下三个部位进行棱角参数获取,对获取的数据利用遗传算法优化SVM 参数的方法进行香蕉成熟度判别模型的构建。在对香蕉成熟度的预测上,该模型正确率能超过86%,证实了香蕉棱角特性信息对香蕉成熟度的可分类性,也表明了香蕉成熟度判别算法是一种新颖且行之有效的方法。

参考文献References:

[1]丰锋,叶春海,王季槐,李映志.种植密度对香蕉生长及产量的影响[J].热带作物学报,2007,28(1):40-43.FENG Feng,YE Chunhai,WANG Jihuai,LI Yingzhi. Effects of planting densities on the growth and yield of banana[J]. Chinese Journal of Tropical Crops,2007,28(1):40-43.

[2]王艳琼,魏守兴.不同种植模式对巴西香蕉生长及产量的影响[J].热带农业科学,2009,29(4):20-25.WANG Yanqiong,WEI Shouxing. Effect of different planting patterns on the growthand yield of Brazil banana[J]. Chinese Journal of Tropical Agriculture,2009,29(4):20-25.

[3]王全永,欧燕芳.我国香蕉产业标准化现状和对策[J].中国标准化,2021(3):147-152.WANG Quanyong,OU Yanfang. Present situation and countermeasures of banana industry standardization in China[J]. China Standardization,2021(3):147-152.

[4]杨培生,陈业渊,黎光华,钟思现.我国香蕉产业:现状、问题与前景[J].果树学报,2003,20(5):415-420.YANG Peisheng,CHEN Yeyuan,LI Guanghua,ZHONG Sixian.Analysis on the development of banana industry in China[J].Journal of Fruit Science,2003,20(5):415-420.

[5]王金丽,李明,邓怡国.我国香蕉采收技术现状与分析[J].中国热带农业,2005(3):17-19.WANG Jinli,LI Ming,DENG Yiguo.Current situation and analysis of banana harvesting technology in China[J]. China Tropical Agriculture,2005(3):17-19.

[6]苏继龙,刘远力,吴金东.香蕉采摘机械的研究现状与发展趋势[J].中国农业大学学报,2019,24(7):131-137.SU Jilong,LIU Yuanli,WU Jindong. Research status and development trend of banana picking machine[J]. Journal of China Agricultural University,2019,24(7):131-137.

[7]李壮哲,朱立学,马稚昱.香蕉采收技术现状及机械化生产对策[J].世界热带农业信息,2013(10):23-27.LI Zhuangzhe,ZHU Lixue,MA Zhiyu. Current situation of banana harvest techniques and countermeasures for banana harvest mechanization[J]. World Tropical Agriculture Information,2013(10):23-27.

[8]王顺.水果成熟度检测的机器视觉和嗅觉可视化技术研究[D].镇江:江苏大学,2018.WANG Shun. Study on the machine vision and olfactory visualization for fruit maturity detecting[D]. Zhenjiang:Jiangsu University,2018.

[9]邹冬梅,李敏,高兆银,李春霞,袁宏球,冯信平,胡美姣.香蕉采收及贮运保鲜技术[J].中国热带农业,2018(2):76-77.ZOU Dongmei,LI Min,GAO Zhaoyin,LI Chunxai,YUAN Hongqiu,FENG Xinping,HU Meijiao. Harvesting,storage,transportation and fresh- keeping technology of bananas[J].China Tropical Agriculture,2018(2):76-77.

[10]MAHMOUD S,REZA A,MAHMOUD O. Comparison some chromatic,mechanical and chemical properties of banana fruit at different stages of ripeness[J]. Modern Applied Science,2010,4(7):34-36.

[11]方昭,迟志广,马翠凤,王斌,李宝深.香蕉果实生长发育动态规律的研究[J].农业研究与应用,2015,28(6):27-32.FANG Zhao,CHI Zhiguang,MA Cuifeng,WANG Bin,LI Baoshen. Study on the dynamic law of banana fruit growth and development[J].Agricultural Research and Application,2015,28(6):27-32.

[12]SANTOS T C,AGUIAR F S,RODRIGUES M L M,MIZOBUTSI G P,PINHEIRO J M D. Quality of bananas harvested at different development stages and subjected to cold storage[J].Pesquisa Agropecuaria Tropical,2018,48(2):90-97.

[13]MENDOZA F,AGUILERA J M.Application of image analysis for classification of ripening bananas[J]. Journal of Food Science,2004,69(9):471-477.

[14]RAJKUMAR P,WANG N,EIMASRY G,RAGHAVAN G S V,GARIEPY Y. Studies on banana fruit quality and maturity stages using hyperspectral imaging[J].Journal of Food Engineering,2012,108(1):194-200.

[15]SOLTANI M,ALIMARDANI R,OMID M. Prediction of banana quality during ripening stage using capacitance sensing system[J].Australian Journal of Crop Science,2010,4(6):443-447.

[16]SANAEIFAR A,MOHTASEBI S S,GHASEMI- VARNAMKHASTI M,AHMADI H.Application of MOS based electronic nose for the prediction of banana quality properties[J].Measurement,2016,82:105-114.

[17]吴振先,苏美霞,陈维信,韩冬梅.香蕉贮藏保鲜及加工新技术[M].北京:中国农业出版社,2000:18-39.WU Zhenxian,SU Meixia,CHEN Weixin,HAN Dongmei.New technology of banana storage,preservation and processing[M].Beijing:China Agriculture Press,2000:18-39.

[18]PHAN AV,NGUYEN M L,BUI L T.Feature weighting and SVM parameters optimization based on genetic algorithms for classification problems[J].Applied Intelligence,2017,46(2):455-469.

[19]HSU C W,LIN C J.A comparison of methods for multiclass support vector machines[J]. IEEE Transactions on Neural Networks,2002,13(2):415-425.

[20]李华昌,谢淑兰,易忠胜. 遗传算法的原理与应用[J]. 矿冶,2005,14(1):87-90.LI Huachang,XIE Shulan,YI Zhongsheng. Theory and application of genetic algorithm[J]. Mining and Metallurgy,2005,14(1):87-90.

[21]杜洋.遗传算法原理和应用[J].才智,2010(9):49.DU Yang.Principle and application of genetic algorithm[J].Ability and Wisdom,2010(9):49.

[22]HE L M,YANG X B,KONG F S. Support vector machines ensemble with optimizing weights by genetic algorithm[C]//New York:IEEE International Conference on Machine Learning and Cybernetics,2006:3503-3507.

[23]VON LOESECKE H W. Bananas[M]. New York: Interscience,1950:52-66.

[24]邓义才.香蕉的贮藏保鲜技术[J].农村百事通,2001(19):38.DENG Yicai. Storage and preservation technology of banana[J].Nongcun Baishitong,2001(19):38.

[25]侯俊才,侯莉侠,胡耀华,郭康权,佐竹隆顕.石英晶体微天平传感器检测香蕉成熟度的试验[J]. 农业工程学报,2014,30(6):256-262.HOU Juncai,HOU Lixia,HU Yaohua,GUO Kangquan,TAKAAKI S. Experimental study on ripening stage of bananas based on quartz crystal microbalance sensor detection[J]. Transactions of the Chinese Society of Agricultural Engineering,2014,30(6):256-262.

[26]陈丽花,郝德兰,夏彬,王琴.香蕉催熟过程中生理生化指标变化分析及其品质评价模型的建立[J].现代食品科技,2018,34(10):147-155.CHEN Lihua,HAO Delan,XIA Bin,WANG Qin. Analysis of changes of physiological and biochemical parameters in banana ripening process and establishment of banana quality evaluation model[J]. Modern Food Science and Technology,2018,34(10):147-155.

Discriminant model of banana fruit maturity based on genetic algorithm and SVM

MO Songtao1,2,DONG Tao3,ZHAO Xixuan1,2,KAN Jiangming1,2*

(1School of Technology,Beijing Forestry University,Beijing 100083,China;2Key Laboratory of State Forestry Administration on Forestry Equipment and Automation, Beijing 100083, China;3Institute of Fruit Tree Research, Guangdong Academy of Agricultural Sciences,Guangzhou 510640,Guangdong,China)

Abstract:【Objective】Harvest maturity is the key factor affecting storage performance of banana fruits.The existing discriminant methods of banana fruit maturity, such as hardness sensor, odor sensor and spectral technology, cannot be applied to the picking site of banana fruits, and the discriminant method based on the pigment composition of banana fruit skin is only suitable for commercial trade.At present, in the process of banana fruit harvesting, experienced farmers still need to observe the fullness of fruit body by experience and judge whether banana fruits should be harvested according to the length of storage time.This method not only is inefficient but also may lead to wrong judgment.The purpose of this study is to explore the relationship between the appearance characteristics and maturity of banana fruits, so as to build a banana fruit maturity discrimination model depending upon the edge and corner characteristics of banana fruits as input vector, and propose a banana fruit maturity discrimination method based on genetic algorithm and SVM.【Methods】In this experiment, 11 banana plants were selected,and the maturity of their banana fruits were set to level 5 maturity.The test samples were selected from the third row on a banana hand from top to bottom, and two hands of bananas were randomly cut from each plant.Each group of samples was collected at an interval of two days,and the collected samples of bananas were labeled, and the judgment of banana farmer on the maturity of the collected samples was asked and recorded.Samples were collected from level 5 maturity to level 8 maturi-ty of banana fruits.During the experiment,a total of 176 banana fruits were collected from 8 sets of data.In this paper,the maturity of banana fruit samples was divided into four levels(level 5,level 6,level 7 and level 8). In this method, 176 banana fruit samples of the same species with different maturity were cut evenly according to the length of fruit body by three cuts. The transverse sections of the top,middle and bottom parts of the banana fruits were obtained, and the obtained transverse sections of the banana fruits were covered with the white paper.After drawing the transverse section contour line of banana fruits on paper, the edges and corners in the transverse section contour line of banana fruits were measured by manual measurement.In order to reduce the error due to manual measurement,the average of the angles measured by five people was used as the final result. The angles of each corner on the transverse section contour line of banana fruits were measured as the characteristic of maturity discrimination.The banana fruits collected in the experiment generally had only three or four edges and corners when their maturity levels were less than the level 8 maturity. In the experiment, the banana fruits with level 8 maturity had five edges and corners.Each transverse section had 5 eigenvalues,and the vacancy angle of less than five edges and corners was represented by 0. Firstly, the data of banana fruits were preprocessed, that is, normalized to improve the convergence speed and accuracy of the model, and then the parameters of classical SVM model were optimized by genetic algorithm.In the process of genetic algorithm optimization,the population size was set to 50,the range of penalty parameter C was[0 100],the range of kernel parameter g was[0 100],and the termination algebra was 200.The 50%cross validation was carried out in the training set,and the mutation probability was 0.9.【Results】In the evolutionary process of genetic algorithm, the optimal fitness of each generation in the training set increased with the increase of evolutionary algebra,and reached a stable value after the 10th generations.At this time,the optimal fitness was 76.77%.With the increase of evolutionary algebra,the average fitness of each generation increased and the oscillation amplitude decreased.After the 20th generation,the average fitness reached a relatively stable value,that is,it fluctuated slightly around 76%.After optimizing the parameters by genetic algorithm,the optimal value of penalty parameter C was 14.84 and the optimal value of kernel parameter g was 73.93.The experimental results showed that among the 35 samples with level 5 maturity,six were incorrectly predicted as level 6 maturity.The discrimination accuracy was 80.00%.Among the 32 samples with level 6 maturity,four were incorrectly predicted as level 5 maturity. The discrimination accuracy was 87.50%.Among the 33 samples with level 7 maturity, one was incorrectly predicted as level 5 maturity,two were incorrectly predicted as level 6 maturity,and one was incorrectly predicted as level 8 maturity. The discrimination accuracy was 87.88%.Among the 32 samples with level 8 maturity,one was incorrectly predicted as level 6 maturity and one was incorrectly predicted as level 8 maturity.The discrimination accuracy was 93.75%.A total of 17 samples were predicted incorrectly in this prediction, and the accuracy rate was 87.12%. The whole model training and prediction took about 147.29 s.The proposed model made 10 predictions for 132 samples in the test set,and the accuracy of the average was 86.20%.The experimental results showed that the accuracy of banana fruit maturity discrimination model based on SVM and genetic algorithm was more than 86%.The results also showed that this method can distinguish banana fruits with different maturity. In the subsequent research, it is necessary to further study the nondestructive acquisition method dealing with banana fruit shape and angle information, and further explore the nondestructive judgment technology of banana fruit maturity.【Conclusion】The banana fruit maturity discrimination model established in this study is a banana fruit maturity discrimination method based on the angular information of banana fruit shape. Compared with the common methods to judge the maturity of banana fruits based on the color,hardness and smell of banana fruits,the proposed method starts with the plumpness of banana fruits and uses genetic algorithm to optimize the parameters of SVM model.It not only avoids the blind selection of parameters,but also is simpler than other optimization algorithms.

Key words:Banana;Fruit edges and corners;Support vector machine;Genetic algorithm;Maturity discrimination

中图分类号:S668.1

文献标志码:A

文章编号:1009-9980(2022)12-2418-10

DOI:10.13925/j.cnki.gsxb.20210586

收稿日期:2021-11-23

接受日期:2022-07-14

基金项目:广东省重点领域研发计划(2019B020223003)

作者简介:莫松涛,女,在读硕士研究生,研究方向:机器视觉。Tel:17801059206,E-mail:2878249656@qq.com

*通信作者Author for correspondence.Tel:13671158294,E-mail:kanjm@bjfu.edu.cn