Abstract
The study evaluates the feasibility of classifying Arabica and Robusta coffee beans using convolutional neural networks (CNNs). A custom CNN model (CNN_Coffee_Classifier) was developed and its performance was compared to that of three state-of-the-art architectures: MobileNet, ResNet50, and ResNet101. The models were trained both from scratch and using transfer learning on a dataset comprising 495 standardized images. The aforementioned dataset was derived from both public repositories and original photographs. Given the limited number of images in the training set, the models were trained using 10-fold cross-validation to ensure robust results. The custom CNN demonstrated an average accuracy of 75% (with 95% confidence interval of [0.68, 0.83]), while models employing transfer learning - particularly ResNet101 - exhibited superior performance, achieving up to 95% accuracy (with 95% confidence interval of [0.92, 0.96]). The findings substantiate the hypothesis that CNNs, particularly when integrated with transfer learning, provide a robust methodology for automated coffee variety classification, even when operating with a modest dataset.