Skip to main content
QUICK REVIEW

[Paper Review] Coffee Roast Intelligence

Sakdipat Ontoum, Thitaree Khemanantakul|arXiv (Cornell University)|Jun 3, 2022
Coffee research and impactsMedicine5 citations
TL;DR

This paper presents 'Coffee Roast Intelligence,' an Android application that uses a convolutional neural network (CNN) to classify coffee bean roast levels from smartphone images, achieving ~82% accuracy in predicting four roast classes (green, light, medium, dark). The system provides real-time text labels and prediction confidence scores, enabling baristas and roasters to maintain consistent roast quality despite human perceptual variability.

ABSTRACT

As the coffee industry has grown, there would be more demand for roasted coffee beans, as well as increased rivalry for selling coffee and attracting customers. As the flavor of each variety of coffee is dependent on the degree of roasting of the coffee beans, it is vital to maintain a consistent quality related to the degree of roasting. Each barista has their own method for determining the degree of roasting. However, extrinsic circumstances such as light, fatigue, and other factors may alter their judgment. As a result, the quality of the coffee cannot be controlled. The Coffee Roast Intelligence application is a machine learning-based study of roasted coffee bean degrees classification produced as an Android application platform that identifies the color of coffee beans by photographing or uploading them while roasting. This application displays the text showing at what level the coffee beans have been roasted, as well as informs the percent chance of class prediction to the consumers. Users may also keep track of the result of the predictions related to the roasting level of coffee beans.

Motivation & Objective

  • To develop a machine learning-based system for accurately classifying coffee bean roast levels using image analysis.
  • To reduce human error in roast level estimation caused by environmental factors like lighting and fatigue.
  • To provide baristas and coffee shop owners with a reliable, real-time tool for monitoring roast progression during roasting.
  • To enable users to store and annotate roast prediction results for quality control and recipe tracking.
  • To ensure consistent coffee flavor by standardizing roast level identification through automated image classification.

Proposed method

  • A convolutional neural network (CNN) is trained on a dataset of 1,000+ coffee bean images captured at four distinct roast levels: green (unroasted), light, medium, and dark roast.
  • Images are captured using an iPhone 12 Mini with consistent lighting and camera positioning to ensure image quality and reduce variability.
  • RGB values from the images are used as input features for the CNN model, which learns to classify roast levels based on color and texture patterns.
  • The model is trained using a 5-fold cross-validation strategy to evaluate generalization performance and prevent overfitting.
  • The Android application is built using Flutter and integrates a backend with Firebase (for user data) and MongoDB (for storing prediction results, timestamps, and descriptions).
  • Prediction results are displayed with both textual roast level labels and confidence percentages, and users can save results with custom descriptions for future reference.

Experimental results

Research questions

  • RQ1Can a CNN-based image classification system accurately determine the roast level of coffee beans from smartphone photographs?
  • RQ2How does the model’s performance vary across different roast levels (e.g., green, light, medium, dark) in terms of precision and recall?
  • RQ3To what extent can the system reduce human variability in roast level estimation due to lighting, fatigue, or subjective judgment?
  • RQ4How effective is the system in maintaining consistent roast quality across repeated roasting sessions?
  • RQ5Can users effectively track and recall roast outcomes using the application’s history and annotation features?

Key findings

  • The model achieved an overall accuracy of approximately 82% on the test dataset, with most class predictions falling within the 0.7 to 0.9 range.
  • The confusion matrix showed strong performance for dark and green roast classifications, with 193 and 200 correct predictions out of 250 samples, respectively.
  • Medium roast had the highest misclassification rate, with 35 out of 247 samples incorrectly predicted as dark roast.
  • Light roast showed moderate accuracy, with 283 correct predictions out of 300 samples, though 8 were misclassified as medium.
  • The system successfully displayed prediction results with confidence scores, and users could store and annotate roast outcomes using the app’s history feature.
  • The training-validation accuracy and loss curves indicated stable convergence over epochs, suggesting effective model training with minimal overfitting.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.