Use of NIR spectroscopy to improve coffee quality and traceability.
Post-harvest processing (PHP) is a key factor in the quality, flavour profile and commercial classification of coffee. The aim of a recent study, carried out by a group of British researchers (Santos-Rivera et al., 2025), was to use near-infrared (NIR) spectroscopy, in combination with chemometrics, for the rapid and non-destructive classification of this product based on its post-harvest processing (PHP).
In particular, during the experiment, seven distinct PHP categories — Alchemy, Anaerobic Processing (Deep Fermentation), Dry-Hulled, Honey, Natural, Washed and Wet-Hulled — were differentiated using NIR spectroscopy, encompassing 20 different processing protocols under varying environmental and fermentation conditions. The NIR spectra (350–2500 nm) of 524 samples of green Arabica coffee were analysed using PCA-LDA models, achieving classification accuracies of up to 100 per cent for under-represented categories and high performance (91–95 per cent) for the dominant PHP groups in an independent test set.
These results demonstrate that NIR spectroscopy is capable of detecting subtle chemical characteristics associated with different PHP techniques, offering a scalable tool for quality control, fraud prevention and traceability within global coffee supply chains. Although the limited sample sizes for certain PHP categories may affect the model’s generalisation, this study lays the foundations for future work involving larger datasets and integration with digital traceability systems. The approach has direct implications for producers, traders and certification bodies seeking reliable systems for real-time verification of PHP type.
Automated classification of coffee roast levels using machine learning and deep learning models.
The coffee roasting process is crucial to the final quality of the product, as it influences its flavour, aroma and acidity. Traditionally, classifying the stage of this process has relied on manual inspection, a method that is time-consuming, subjective and prone to inconsistencies. However, advances in machine learning (ML) and computer vision, particularly in convolutional neural networks (CNNs), show great promise for automating this inspection and improving its accuracy.
In this context, the aim of a recent study, carried out by a group of international researchers (García Rivas et al., 2025), was to evaluate various ML models for classifying the degree of coffee roasting, including a CNN using Xception as a feature extractor, as well as AdaBoost, Random Forest (RF) and Support Vector Machine (SVM). These models were trained and tested on a dataset of 1,600 high-quality images, balanced across four roast levels – green, light, medium and dark – to ensure robust performance.
The experimental results demonstrate that all algorithms achieve 100 per cent accuracy and an F1 score of 100 per cent, confirming their effectiveness in accurately classifying the samples. Finally, image augmentation techniques were applied to improve flexibility in real-world applications. In conclusion, the study presents a reliable, scalable and fully automated solution for roast level classification, making a significant contribution to quality control in the coffee industry.
References: Santos-Rivera et al., Spectroscopy Journal, 3, 2025, 1–17.; R.E. García Rivas et al., Journal of Food Science, 90, 2025, e70532.



