Predicting the flavor potential of green coffee beans with machine learning-assisted visible/near-infrared hyperspectral imaging (Vis-NIR HSI): Batch effect removal and few-shot learning framework
Minping Wu , Zhuangwei Shi , Haiyu Zhang , Rui Wang , Jiayi Chu , Shao Quan Liu , Heming Zhang , Hai Bi , Weihua Huang , Rui Zhou , Chenhui Wang
{"title":"Predicting the flavor potential of green coffee beans with machine learning-assisted visible/near-infrared hyperspectral imaging (Vis-NIR HSI): Batch effect removal and few-shot learning framework","authors":"Minping Wu , Zhuangwei Shi , Haiyu Zhang , Rui Wang , Jiayi Chu , Shao Quan Liu , Heming Zhang , Hai Bi , Weihua Huang , Rui Zhou , Chenhui Wang","doi":"10.1016/j.foodcont.2025.111310","DOIUrl":null,"url":null,"abstract":"<div><div>The current study investigates the potential of machine learning-assisted visible/near-infrared hyperspectral imaging (Vis-NIR HSI) for rapid and non-invasive evaluation of the overall flavor quality of green coffee beans. Spectral data was subjected to preprocessing and machine learning (ML) batch effect removal. Multivariate statistical analysis and various ML classifiers were compared and optimized for pass/fail flavor quality grading following non-few-shot and few-shot learning frameworks. Involving the full training dataset, the non-few-shot learning binary grading model achieved 100% accuracy using linear discrimination analysis (LDA). The few-shot learning model trained with data from only four of the 13 coffee bean types yielded the highest discrimination accuracies of 99% and 97%, in the internal validation and external evaluation, respectively, using the ensemble learning algorithm of LightGBM. Furthermore, the incorporation of ML batch effect removal enhanced the few-shot learning LightGBM model accuracy by 27% in external evaluation. The results demonstrate that assisted by ML batch effect removal and classification, Vis-NIR HSI serves as a rapid, sensitive, robust, and practical tool for evaluating the flavor potential of green coffee beans, especially when labeled data for training is limited.</div></div>","PeriodicalId":319,"journal":{"name":"Food Control","volume":"175 ","pages":"Article 111310"},"PeriodicalIF":6.3000,"publicationDate":"2025-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Food Control","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0956713525001793","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/3/19 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"FOOD SCIENCE & TECHNOLOGY","Score":null,"Total":0}
引用次数: 0
Abstract
The current study investigates the potential of machine learning-assisted visible/near-infrared hyperspectral imaging (Vis-NIR HSI) for rapid and non-invasive evaluation of the overall flavor quality of green coffee beans. Spectral data was subjected to preprocessing and machine learning (ML) batch effect removal. Multivariate statistical analysis and various ML classifiers were compared and optimized for pass/fail flavor quality grading following non-few-shot and few-shot learning frameworks. Involving the full training dataset, the non-few-shot learning binary grading model achieved 100% accuracy using linear discrimination analysis (LDA). The few-shot learning model trained with data from only four of the 13 coffee bean types yielded the highest discrimination accuracies of 99% and 97%, in the internal validation and external evaluation, respectively, using the ensemble learning algorithm of LightGBM. Furthermore, the incorporation of ML batch effect removal enhanced the few-shot learning LightGBM model accuracy by 27% in external evaluation. The results demonstrate that assisted by ML batch effect removal and classification, Vis-NIR HSI serves as a rapid, sensitive, robust, and practical tool for evaluating the flavor potential of green coffee beans, especially when labeled data for training is limited.
期刊介绍:
Food Control is an international journal that provides essential information for those involved in food safety and process control.
Food Control covers the below areas that relate to food process control or to food safety of human foods:
• Microbial food safety and antimicrobial systems
• Mycotoxins
• Hazard analysis, HACCP and food safety objectives
• Risk assessment, including microbial and chemical hazards
• Quality assurance
• Good manufacturing practices
• Food process systems design and control
• Food Packaging technology and materials in contact with foods
• Rapid methods of analysis and detection, including sensor technology
• Codes of practice, legislation and international harmonization
• Consumer issues
• Education, training and research needs.
The scope of Food Control is comprehensive and includes original research papers, authoritative reviews, short communications, comment articles that report on new developments in food control, and position papers.