Classification of Arabica Coffee Bean Images from Roasting Using the Convolutional Neural Network Resnet50v2 Method with Transfer Learning

Authors

  • Syukur Halim UIN Maulana Malik Ibrahim Malang, Indonesia
  • Suhartono MTS-MA Luqman Al Hakim Samarinda, Indonesia
  • M. Imamudin Sekolah Tinggi Ilmu Tarbiyah Hidayatullah Samarinda, Indonesia

DOI:

https://doi.org/10.54518/rh.5.6.2025.923

Keywords:

Classification, Coffee Bean Image, Convolutional Neural Network, ResNet50V2, Roasting, Transfer Learning

Abstract

The roasting level of Arabica coffee beans plays a crucial role in determining product quality, sensory characteristics, and market value, yet its assessment in practice is often subjective and inconsistent due to manual visual inspection. This study aims to develop a roasting level classification model for Arabica coffee beans using the ResNet50V2 Convolutional Neural Network (CNN) architecture based on transfer learning. The dataset used consists of Arabica coffee bean images with four roasting levels (Green, Light, Medium, and Dark) obtained from a publicly available dataset. Three training scenarios were applied using data split ratios of 60:40, 70:30, and 80:20, with each model trained for 10 epochs under identical experimental settings. Model performance was evaluated using accuracy and F1-score. The best results were achieved in the 80:20 scenario, with a validation accuracy of 98.75% and an F1-score of 0.9875. These results indicate that increasing the proportion of training data significantly improves model stability and classification accuracy. This study contributes by providing an objective, image-based approach for roasting level classification and demonstrating the effect of training data proportion on CNN performance to support coffee quality control.

Downloads

Download data is not yet available.

References

Abdula, S. P., Llagas, M. J., & Arboleda, E. (2024). Convolutional neural network in exclusive approaches to coffee beans: A literature review. Research Horizon, 7(4), 696–706.

Amrine, D. E., McLellan, J. G., White, B. J., Larson, R. L., Renter, D. G., & Sanderson, M. (2019). Evaluation of three classification models to predict risk class of cattle cohorts developing bovine respiratory disease within the first 14 days on feed using on-arrival and/or pre-arrival information. Computers and Electronics in Agriculture, 156(2), 439–446.

Anto, I. A. F., Wibowo, J. W., Salim, T. I., & Munandar, A. (2024). Implementation of image processing and CNN for roasted-coffee level classification. Indonesian Journal of Electrical Engineering and Informatics (IJEEI), 12(4), 1005–1018.

Ardian, Y., Irawan, N. D., Sutoko, S., & Astawa, I. N. G. A. (2024). A novel approach to defect detection in arabica coffee beans using deep learning: investigating data augmentation and model optimization. Knowledge Engineering and Data Science, 7(1), 9-14.

Barve, T. D., Samant, A. Y., & Kulaye, M. S. (2025). A comparative study of optimization algorithms in deep learning: Sgd, Adam, and beyond. International Journal of Computer Technology and Electronics Communication, 8(4), 11018-11021.

Bazame, H. C., Molin, J. P., Althoff, D., & Martello, M. (2021). Detection, classification, and mapping of coffee fruits during harvest with computer vision. Computers and Electronics in Agriculture, 183(2), 106-126.

Chang, Y. T., Hsueh, M. C., Hung, S. P., Lu, J. M., Peng, J. H., & Chen, S. F. (2021). Prediction of specialty coffee flavors based on near‐infrared spectra using machine and deep‐learning methods. Journal of the Science of Food and Agriculture, 101(11), 4705-4714.

Dhillon, A., & Verma, G. K. (2020). Convolutional neural network: a review of models, methodologies and applications to object detection. Progress in Artificial Intelligence, 9(2), 85-112

Esgario, J. G. M., Krohling, R. A., & Ventura, J. A. (2020). Deep learning for classification and severity estimation of coffee leaf biotic stress. Computers and Electronics in Agriculture, 169(3), 105-109.

Gerry. (2025). Coffee bean dataset resized (224 x 224). Kaggle. Retrieved November 23, 2025, from https://www.kaggle.com/datasets/gpiosenka/coffee-bean-dataset-resized-224-x-224

Halim, R., & Riftiarrasyid, M. F. (2025). Hybrid CNN-based classification of coffee bean roasting levels using RGB and GLCM features. Engineering, Mathematics and Computer Science Journal (EMACS), 7(3), 249–261.

Hassan, E. (2024). Enhancing coffee bean classification: a comparative analysis of pre-trained deep learning models. Neural Computing and Applications, 36(16), 9023-9052.

He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 770–778). New York: IEEE.

Kingma, D. P., & Ba, J. (2017). Adam: A method for stochastic optimization. arXiv preprint arXiv:14(2), 12-19.

Kurniawan, A. A., Hartanto, A. D., & Hartatik, H. (2022). Implementasi metode CNN dan deep learning untuk menentukan tingkat roasting biji kopi. Intechno Journal: Information Technology Journal, 4(2), 48-54.

Lavanya, A., Arakeri, M., & Ambika, B. J. (2025). Advancements in coffee bean quality assessment using computer vision and deep learning techniques. In 2025 International Conference on Next Generation Communication & Information Processing (INCIP) (pp. 758-763). New York: IEEE.

Liu, Y., Pu, H., & Sun, D. W. (2021). Efficient extraction of deep image features using convolutional neural network (CNN) for applications in detecting and analysing complex food matrices. Trends in Food Science & Technology, 113(4), 193-204.

Marzuki, K., Apriani, & Qulub, M. (2025). Coffee roaster maturity level classification based on convolutional neural network. Mathematical Modelling of Engineering Problems, 12(1), 46–54.

Motta, I. V. C., Vuillerme, N., Pham, H.-H., & De Figueiredo, F. A. P. (2024). Machine learning techniques for coffee classification: A comprehensive review of scientific research. Artificial Intelligence Review, 58(1), 15.

Pratondo, A., Zani, T., Novianty, A., & Pudjoatmodjo, B. (2023). Raw coffee bean classification for roasting suitability assessment using transfer learning. In 2023 IEEE 11th conference on systems, process & control (ICSPC) (pp. 1-6). New York: IEEE.

Putra, B. T. W., Amirudin, R., & Marhaenanto, B. (2022). The evaluation of deep learning using convolutional neural network (CNN) approach for identifying Arabica and Robusta coffee plants. Journal of Biosystems Engineering, 47(2), 118-129.

Razavi, M., Mavaddati, S., & Koohi, H. (2024). ResNet deep models and transfer learning technique for classification and quality detection of rice cultivars. Expert Systems with Applications, 247(3), 123-127.

Rivas, R. E. G., Bertarini, P. L. L., & Fernandes, H. (2025). Automated coffee roast level classification using machine learning and deep learning models. Journal of Food Science, 90(9), 70-83.

Sagita, D., Mardjan, S. S., Suparlan, Purwandoko, P. B., & Widodo, S. (2024). Low-cost IoT-based multichannel spectral acquisition systems for roasted coffee beans evaluation: Case study of roasting degree classification using machine learning. Journal of Food Composition and Analysis, 133(2), 106-108.

Saleh, H., & As’ad, M. (2025). Application of computer vision for customer insights: demographics and visit duration in coffee shops. Research Horizon, 5(5), 2153-2164.

Santos, F. F. L. D., Rosas, J. T. F., Martins, R. N., Araújo, G. D. M., Viana, L. D. A., & Gonçalves, J. D. P. (2020). Quality assessment of coffee beans through computer vision and machine learning algorithms. Coffee Science, 15(5), 1–9.

Sarino, J. N. C., Bayas, M. M., Arboleda, E. R., Guevarra, E. C., & Dellosa, R. M. (2019). Classification of coffee bean degree of roast using image processing and neural network. 8(10), 74-79.

Vanegas-Ayala, S.-C., Leal-Lara, D.-D., & Barón-Velandia, J. (2023). Roasted coffee beans characterization through optoelectronic color sensing. Coffee Science, 18(2), 1–7.

Vegro, C. L. R., & de Almeida, L. F. (2020). Global coffee market: Socio-economic and cultural dynamics. In Coffee consumption and industry strategies in Brazil (pp. 3-19). London: Woodhead Publishing.

Zhao, X., Wang, L., Zhang, Y., Han, X., Deveci, M., & Parmar, M. (2024). A review of convolutional neural networks in computer vision. Artificial Intelligence Review, 57(4), 99-105.

Downloads

Published

2025-12-31

How to Cite

Halim, S., Suhartono, & M. Imamudin. (2025). Classification of Arabica Coffee Bean Images from Roasting Using the Convolutional Neural Network Resnet50v2 Method with Transfer Learning. Research Horizon, 5(6), 3347–3358. https://doi.org/10.54518/rh.5.6.2025.923

Similar Articles

1 2 3 4 5 6 7 8 9 10 11 > >> 

You may also start an advanced similarity search for this article.