Sagita Diang, Widodo Slamet, Mardjan Sutrisno Suro, Purwandoko Pradeka Brilyan, Hariadi Hari, Darniadi Sandi
Agricultural Engineering Sciences, Graduate School, IPB University, Bogor 16680, Indonesia; Research Center for Appropriate Technology, National Research and Innovation Agency, Subang 41213, Indonesia.
Department of Mechanical and Biosystem Engineering, IPB University, Bogor 16680, Indonesia.
Food Res Int. 2025 Jun;211:116501. doi: 10.1016/j.foodres.2025.116501. Epub 2025 Apr 18.
The rapid identification of coffee species and origin is critical for ensuring quality control and authenticity in the coffee industry. This study explores the use of an affordable multi-channel spectral sensor, AS7265X (410-940 nm), combined with machine learning techniques to achieve accurate classification of coffee species and origins rapidly and non-destructively. Spectral data were collected in three LED configurations: the original 18 spectral bands and two additional configurations of the data into 24 and 30 spectral features using configured LED emitters. The coffee samples included two species, Arabica and Robusta, with four distinct origins from Indonesia: Arabica Flores (AF), Arabica Gayo (AG), Robusta Dampit (RD), and Robusta Temanggung (RT). Four machine learning algorithms viz. Linear Discriminant Analysis (LDA), Artificial Neural Networks (ANN), Random Forest (RF), and Support Vector Machines (SVM) were employed, with hyperparameter tuning executed through cross-validation techniques. Additionally, physicochemical analysis was performed randomly on each coffee bean sample and principal component analysis (PCA) was performed as an exploratory analysis of the data. Our findings demonstrate that coffee species identification achieved a perfect accuracy of 100 % using LDA on the 24 and 30 spectral features. For coffee origin identification, the highest validation accuracy of 0.917 was attained with LDA using the 24 raw spectral features. Additionally, data pretreatment methods were applied and their impact on classification performance was evaluated. Still, all of them did not provide any improvement to the classification performance. The results underscore the efficacy of the AS7265X sensor combined with LDA for reliable and rapid coffee species identification. Furthermore, this approach presents a promising, cost-effective solution for coffee origin identification, enhancing quality control processes in the coffee industry.
快速识别咖啡品种和产地对于确保咖啡行业的质量控制和产品真实性至关重要。本研究探索了使用一种经济实惠的多通道光谱传感器AS7265X(410 - 940纳米),结合机器学习技术,以快速、无损地实现咖啡品种和产地的准确分类。光谱数据是在三种LED配置下收集的:原始的18个光谱带以及另外两种配置,即使用配置好的LED发射器将数据转换为24个和30个光谱特征。咖啡样品包括两种品种,阿拉比卡和罗布斯塔,有来自印度尼西亚的四个不同产地:阿拉比卡弗洛雷斯(AF)、阿拉比卡加约(AG)、罗布斯塔罗坎皮(RD)和罗布斯塔坦江贡(RT)。采用了四种机器学习算法,即线性判别分析(LDA)、人工神经网络(ANN)、随机森林(RF)和支持向量机(SVM),并通过交叉验证技术进行超参数调整。此外,对每个咖啡豆样品进行了随机的理化分析,并进行主成分分析(PCA)作为数据的探索性分析。我们的研究结果表明,使用LDA对24个和30个光谱特征进行咖啡品种识别时,准确率达到了100%的完美水平。对于咖啡产地识别,使用24个原始光谱特征的LDA获得了最高验证准确率0.917。此外,应用了数据预处理方法并评估了它们对分类性能的影响。然而,所有这些方法都没有对分类性能带来任何提升。结果强调了AS7265X传感器与LDA相结合在可靠、快速识别咖啡品种方面的有效性。此外,这种方法为咖啡产地识别提供了一种有前景、经济高效的解决方案,增强了咖啡行业的质量控制流程。