New Infrared Coffee Scanner Sorts High Quality Beans With 97 Percent Accuracy
Chemistry

New Infrared Coffee Scanner Sorts High Quality Beans With 97 Percent Accuracy

Infrared light scans paired with open-source software offer a fast way to spot defective coffee batches before human tasters step in

By Anjali Singh
Published:
Email this Article
New Infrared Coffee Scanner Sorts High Quality Beans With 97 Percent Accuracy
Photo by Brent Ninaber on Unsplash

A new machine learning tool can quickly sort ground coffee beans into high-quality and defective categories with nearly 97 percent accuracy, potentially easing the workload of professional tasters. The method combines infrared light scans with open-source mathematics to objectively evaluate beverages that would otherwise require rigorous human sensory panels.

Coffee grading determines market value across the globe, yet traditional quality control relies heavily on certified human experts known as Q-Graders. While these professionals provide thorough evaluations, sensory perception can shift due to individual fatigue, psychological factors, and environmental influences. Researchers therefore sought an objective, rapid screening method that could support routine industrial decisions without replacing the human palate.

Led by Tárcila M. N. Silva and colleagues at Santa Maria Food Industry in Espírito Santo, Brazil, the research team analyzed 70 independent Coffea arabica coffee batches from the 2024 and 2025 harvest cycle. Each batch underwent physical inspection, cleaning, and a standardized medium-light roast in a gas-fired laboratory roaster operating between 180 and 220 degrees Celsius for about six minutes. Certified experts then blind-coded and classified the samples according to official Brazilian regulations, splitting them into 30 fine-grade beverages and 40 phenolic-off-flavor beverages characterized by undesirable iodine or medicinal notes.

Can Infrared Spectroscopy Tell Good Coffee From Bad?

To capture the chemical makeup of the beans, the researchers utilized Attenuated Total Reflectance-Fourier Transform Infrared spectroscopy, a technique that shines infrared light onto a sample to measure how different molecular bonds absorb energy. Each of the 70 coffee batches was homogenized and fractionated into ten sub-samples to account for natural bag heterogeneity. One sub-sample was divided into three technical replicates, generating 210 spectra in total across measurements spanning a 60-day period.

Fig. 1: Representation of the sampling procedure for ATR-FTIR analysis of coffee batches
Representation of the sampling procedure for ATR-FTIR analysis of coffee batches Credit: Silva et al. / Food Analytical Methods

Initial exploratory analysis using Principal Component Analysis, a statistical method that simplifies complex datasets while retaining key trends, showed a general separation between the two quality tiers, though some overlap occurred among borderline samples. To build a robust decision tool, the team applied Partial Least Squares Discriminant Analysis, a supervised classification algorithm implemented entirely within the open-source programming environment GNU Octave. As detailed in a study published in Food Analytical Methods, the researchers partitioned their dataset by keeping all three replicate spectra of any given coffee batch together in either the training set or the test set to prevent data leakage.

How Well Does the Machine Learning Model Perform?

The resulting classification model achieved an overall accuracy of 96.83 percent on the external test set. When restricted specifically to the fingerprint region of the infrared spectrum, which encompasses wavelengths between 650 and 1500 inverse centimeters, the model matched the performance of the full-spectrum analysis while reducing data dimensionality by about 74.6 percent. The method achieved 100 percent sensitivity, meaning it correctly identified every fine coffee sample, and 94.44 percent specificity, with only two defective samples incorrectly grouped into the fine category.

Fig. 2: Mean average spectra obtained by ATR-FTIR for samples classified as Fine group (blue line) and Phenicated group (red line)
Mean average spectra obtained by ATR-FTIR for samples classified as Fine group (blue line) and Phenicated group (red line) Credit: Silva et al. / Food Analytical Methods

The variable importance in projection analysis highlighted several influential wavenumbers driving the classification, notably around 1457 inverse centimeters, which corresponds to bending vibrations of molecular groups found in lipids and plant materials. Other notable spectral contributions appeared near 1489, 669, 1418, and 950 inverse centimeters, reflecting complex mixtures of carbohydrates, chlorogenic acids, and degradation products formed during roasting.

What Are the Limitations and Future Steps?

The authors emphasize that this screening tool is designed to triage incoming industrial batches rather than replace professional cuppers. By pre-sorting obviously compliant fine lots for streamlined quality clearance, the technique can significantly reduce sensory fatigue during high-volume processing.

Before the methodology sees wide commercial deployment, further validation is required across different geographical origins, multi-year harvests, alternative post-harvest processing methods, and distinct analytical instruments. Expanding the test pipeline through interlaboratory studies will ensure the chemical models remain robust against broader agricultural variability.

The research was published in Food Analytical Methods on November 25, 2026.

Fact Checked

This article has been fact checked for accuracy, with information verified against reputable sources. Learn more about us and our editorial process.

Last reviewed on .

Article history

  • Latest version

Reference(s)

  1. da Silva, Tárcila M. N.., et al. “ATR-FTIR Spectroscopy and PLS-DA as a Screening tool to Support Q-Grader Classification of Brazilian Arabica Coffee into Fine and Phenicated Categories.” Food Analytical Methods, vol. 20, no. 1, November 25, 2026 Springer Science and Business Media LLC, doi: 10.1007/s12161-026-03391-3. <https://doi.org/10.1007/s12161-026-03391-3>.

Cite this page:

Singh, Anjali. “New Infrared Coffee Scanner Sorts High Quality Beans With 97 Percent Accuracy.” BioScience. BioScience ISSN 2521-5760, 25 November 2026. <https://www.bioscience.com.pk/en/subject/chemistry/atr-ftir-spectroscopy-and-pls-da-as-a-screening-tool-to-support-q-grader-classification-of-brazilian-arabica-coffee-into-fine-and-phenicated-categories>. Singh, A. (2026, November 25). “New Infrared Coffee Scanner Sorts High Quality Beans With 97 Percent Accuracy.” BioScience. ISSN 2521-5760. Retrieved November 25, 2026 from https://www.bioscience.com.pk/en/subject/chemistry/atr-ftir-spectroscopy-and-pls-da-as-a-screening-tool-to-support-q-grader-classification-of-brazilian-arabica-coffee-into-fine-and-phenicated-categories Singh, Anjali. “New Infrared Coffee Scanner Sorts High Quality Beans With 97 Percent Accuracy.” BioScience. ISSN 2521-5760. https://www.bioscience.com.pk/en/subject/chemistry/atr-ftir-spectroscopy-and-pls-da-as-a-screening-tool-to-support-q-grader-classification-of-brazilian-arabica-coffee-into-fine-and-phenicated-categories (accessed November 25, 2026).
End of the article