基于贝叶斯优化XGBoost的真空包装玉米均匀性检测
Bayesian Optimization-Based XGBoost for Uniformity Detection in Vacuum-Packed Corn
DOI: 10.12677/airr.2026.152051, PDF,    科研立项经费支持
作者: 杨子琳, 张勇斌:北京印刷学院机电工程学院,北京;付秀丽:北京石油化工学院信息工程学院,北京
关键词: 玉米均匀性分析XGBoost贝叶斯优化SHAPCorn Uniformity Analysis XGBoost Bayesian Optimization SHAP
摘要: [目的]针对真空包装玉米外观均匀性人工检测效率低、主观性强的问题,提出基于机器视觉的自动化检测方法。[方法] 首先采集真空包装玉米图像,预处理后提取颜色、纹理和空间分布特征,然后采用贝叶斯优化(BO)的XGBoost算法进行特征筛选并建立均匀性预测模型,最后结合SHAP方法分析关键特征的非线性效应。[结果]实验表明,用贝叶斯优化的XGBoost模型在测试集上R2达到0.864,RMSE为3.16,显著优于传统方法,相较于原始XGBoost、RF随机森林、SVM支持向量机、LASSO最小绝对收缩和选择算子模型精度均有不同程度提升;通过关键特征分析发现GLCM纹理熵、L通道四分位距、色差均值、色调标准差、相异性等特征是影响均匀性的主要因素。[结论]所提方法能定量检测真空包装玉米均匀性,为玉米质量自动化分级提供技术支持。
Abstract: [Objective] To address the low efficiency and high subjectivity of manual inspection for uniformity in vacuum-packed corn, this study proposes an automated detection method based on machine vision. [Methods] Images of vacuum-packed corn were first captured, preprocessed to extract color, texture, and spatial distribution features, then subjected to feature selection using the Bayesian Optimization (BO)-based XGBoost algorithm to establish a uniformity prediction model. Finally, the SHAP method was applied to analyze the nonlinear effects of key features. [Results] Experiments demonstrate that the Bayesian-optimized XGBoost model achieves an R2 of 0.864 and an RMSE of 3.2 on the test set, significantly outperforming traditional methods. Compared to the original XGBoost, RF Random Forest, SVM Support Vector Machine, and LASSO Least Absolute Shrinkage and Selection Operator models, it exhibits varying degrees of accuracy improvement. Key feature analysis revealed that GLCM texture entropy, L-channel interquartile range, mean chromaticity difference, hue standard deviation, and dissimilarity are primary factors influencing uniformity. [Conclusion] The proposed method enables accurate and rapid detection of uniformity in vacuum-packed corn, providing technical support for automated quality grading of vacuum-packed corn.
文章引用:杨子琳, 张勇斌, 付秀丽. 基于贝叶斯优化XGBoost的真空包装玉米均匀性检测[J]. 人工智能与机器人研究, 2026, 15(2): 527-537. https://doi.org/10.12677/airr.2026.152051

参考文献

[1] 徐丽, 赵久然, 卢柏山, 等. 我国鲜食玉米种业现状及发展趋势[J]. 中国种业, 2020(10): 14-18.
[2] 吴坤龙, 刘标, 刘辉, 等. 杀菌条件、包装材料对真空包装甜玉米挥发性风味物质的影响[J]. 食品与机械, 2024, 40(11): 102-114.
[3] [赵威, 马睿, 王佳, 等. 基于果穗图像的玉米品种分类识别[J]. 中国农业科技导报, 2023, 25(6): 97-106.
[4] 杨东, 王舒卉, 吴建华, 等. 玉米籽粒霉变等级高光谱图像检测方法研究[J]. 中国粮油学报, 2022, 37(11): 46-53.
[5] 曾柯宜, 刘禹彤, 张倩, 等. 基于多模态融合的玉米种子成熟度的无损检测[J]. 食品安全质量检测学报, 2025, 16(2): 171-177.
[6] Bautista, K., Delgado, J.T., Urrea, S., Arguello, H. and Garcia, H. (2025) Estimation of a Color Uniformity Index in Mandarins Using an Artificial Intelligence-Based System. 2025 XXV Symposium of Image, Signal Processing, and Artificial Vision (STSIVA), Armenia, 27-29 August 2025, 1-5. [Google Scholar] [CrossRef
[7] 李悦. 基于光学特性和感官分析的烤烟不同品种和叶位烟叶外观质量差异性研究[D]: [硕士学位论文]. 郑州: 河南农业大学, 2017.
[8] Reta, C., Cantoral-Ceballos, J.A., Solis-Moreno, I., Gonzalez, J.A., Alvarez-Vargas, R. and Delgadillo-Checa, N. (2018) Color Uniformity Descriptor: An Efficient Contextual Color Representation for Image Indexing and Retrieval. Journal of Visual Communication and Image Representation, 54, 39-50. [Google Scholar] [CrossRef
[9] Wang, J., Xia, D., Wan, J., Hou, X., Shen, G., Li, S., et al. (2024) Color Grading of Green Sichuan Pepper (Zanthoxylum armatum DC.) Dried Fruit Based on Image Processing and BP Neural Network Algorithm. Scientia Horticulturae, 331, Article ID: 113171. [Google Scholar] [CrossRef
[10] 刘瑶, 左进华, 高丽朴, 等. 流态冰预冷处理对甜玉米贮藏品质的影响[J]. 制冷学报, 2020, 41(3): 83-90.
[11] 刘文淇, 赵时雨, 肖展鹏, 等. 富铁玉米品种的营养评价及加工适用性研究[J]. 食品安全导刊, 2025, 19(33): 121-123.
[12] 李晶晶, 张钟莉莉, 闫华, 等. 基于多特征选择的鲜食玉米需水量预测及可解释性分析[J]. 农业工程学报, 2025, 41(10): 101-108.
[13] 冯建英, 李子涵, 卢浩成, 等. 基于机器学习的气象因子与酿酒葡萄代谢组预测建模[J]. 农业工程学报, 2025, 41(22): 334-341.
[14] Mockus, J. (2005) The Bayesian Approach to Global Optimization. In: Drenick, R.F. and Kozin, F., Eds., System Modeling and Optimization, Springer, 473-481. [Google Scholar] [CrossRef
[15] 薛一阳, 竞霞, 叶启星, 等. 利用约束随机森林和贝叶斯优化算法的小麦条锈病遥感监测[J]. 遥感技术与应用, 2025, 40(1): 69-76.
[16] 王火根, 胡梦婷, 刘小春. 基于机器学习和SHAP算法的我国粮食安全水平测度重构及可解释性分析[J]. 中国农业大学学报, 2025, 30(7): 264-274.