Applying Artificial Intelligence to Classify the Maturity Level of Coffee Beans During Roasting

Dede Herman Suryana, Wahyu Kusuma Raharja


Coffee is a highly popular beverage worldwide. The quality of coffee is often judged based on its aroma and taste. Good coffee quality is influenced by various parameters during the coffee bean roasting process. Roasting is a crucial step where green coffee beans are heated at high temperatures, undergoing chemical reactions such as hydrolysis, polymerization, and pyrolysis. The color changes during the roasting process are caused by melanoidin, which results from Maillard and caramelization reactions, also impacting the flavor profile. Therefore, it is essential to accurately classify the level of coffee bean maturity. In the development of supercomputer technology, particularly with high-speed GPU microprocessors and large memory capacities, artificial intelligence algorithms have been widely implemented in various applications. Research on smart machines has been conducted to create systems resembling human intelligence. One of its applications is in recognizing the maturity level of coffee beans during roasting. In this study, image segmentation using ROI (Region Of Interest) and RGB color features are utilized to identify the characteristics of each coffee bean image. Additionally, CNN (Convolutional Neural Network) is employed for the classification stage, and this model is implemented into an Android smartphone device to detect the type of coffee bean being roasted. After the training process with 100 epochs, the model achieved a loss of 0.12 and a training accuracy of 94.79%. The model is capable of classifying images from the test data with an average accuracy of 85.83% and a loss value of 0.35.


CNN, ROI, Smartphone, Coffee Beans

Full Text:



T. L. Negara, “94 Ll2,” vol. 2019, no. 019457, 2019.

E. R. Arboleda, A. C. Fajardo, and R. P. Medina, “An Image Processing Technique for Coffee Black Beans Identification: 2018 IEEE International Conference on Innovative Research and Development (ICIRD), 11-12 May 2018, Bangkok Thailand,” 2018 IEEE Int. Conf. Innov. Res. Dev., no. May, pp. 1–5, 2018.

D. S. Leme, S. A. da Silva, B. H. G. Barbosa, F. M. Borém, and R. G. F. A. Pereira, “Recognition of coffee roasting degree using a computer vision system,” Comput. Electron. Agric., vol. 156, no. October 2018, pp. 312–317, 2019, doi: 10.1016/j.compag.2018.11.029.

Purwono, A. Ma’arif, W. Rahmaniar, H. I. K. Fathurrahman, A. Z. K. Frisky, and Q. M. U. Haq, “Understanding of Convolutional Neural Network (CNN): A Review,” Int. J. Robot. Control Syst., vol. 2, no. 4, pp. 739–748, 2022, doi: 10.31763/ijrcs.v2i4.888.

A. Elhassouny and F. Smarandache, “Smart mobile application to recognize tomato leaf diseases using Convolutional Neural Networks,” Proc. 2019 Int. Conf. Comput. Sci. Renew. Energies, ICCSRE 2019, pp. 1–4, 2019, doi: 10.1109/ICCSRE.2019.8807737.

M. Sardogan, A. Tuncer, and Y. Ozen, “Plant Leaf Disease Detection and Classification Based on CNN with LVQ Algorithm,” UBMK 2018 - 3rd Int. Conf. Comput. Sci. Eng., pp. 382–385, 2018, doi: 10.1109/UBMK.2018.8566635.

J. S. Pasaribu, “Development of a Web Based Inventory Information System,” Int. J. Eng. Sci. InformationTechnology, vol. 1, no. 2, pp. 24–31, 2021, doi: 10.52088/ijesty.v1i2.51.

V. Tiwari, C. Pandey, A. Dwivedi, and V. Yadav, “Image Classification Using Deep Neural Network,” Proc. - IEEE 2020 2nd Int. Conf. Adv. Comput. Commun. Control Networking, ICACCCN 2020, pp. 730–733, 2020, doi: 10.1109/ICACCCN51052.2020.9362804.

Chidinma-Mary-Agbai, “Application of artificial intelligence (AI) in food industry,” GSC Biol. Pharm. Sci., vol. 13, no. 1, pp. 171–178, 2020, doi: 10.30574/gscbps.2020.13.1.0320.

J. McCarthy, “Artificial intelligence, logic, and formalising common sense,” Mach. Learn. City Appl. Archit. Urban Des., pp. 71–90, 2022, doi: 10.1007/978-94-009-2448-2_6.

J. Sen, Machine Learning Algorithms, Models and Applications Edited by Jaydip Sen, vol. 7. 2021.

S. Z. M. Zaki, M. A. Zulkifley, M. Mohd Stofa, N. A. M. Kamari, and N. A. Mohamed, “Classification of tomato leaf diseases using mobilenet v2,” IAES Int. J. Artif. Intell., vol. 9, no. 2, pp. 290–296, 2020, doi: 10.11591/ijai.v9.i2.pp290-296.

M. Agarwal, A. Singh, S. Arjaria, A. Sinha, and S. Gupta, “ToLeD: Tomato Leaf Disease Detection using Convolution Neural Network,” Procedia Comput. Sci., vol. 167, no. 2019, pp. 293–301, 2020, doi: 10.1016/j.procs.2020.03.225.

H. Hendriyana and Yazid Hilman Maulana, “Identification of Types of Wood using Convolutional Neural Network with Mobilenet Architecture,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 4, no. 1, pp. 70–76, 2020, doi: 10.29207/resti.v4i1.1445.


N. Hnoohom, S. Yuenyong, and P. Chotivatunyu, “MEDiDEN: Automatic Medicine Identification Using a Deep Convolutional Neural Network,” 2018 Int. Jt. Symp. Artif. Intell. Nat. Lang. Process. iSAI-NLP 2018 - Proc., pp. 1–5, 2018, doi: 10.1109/iSAI-NLP.2018.8692824.

L. P. Tuti Ariani, “The Effect Of Repetition Sprint Training Method Combined With The Level Of Physical Fitness Toward The Speed Of 100 Meter Run,” Int. J. Eng. Sci. Inf. Technol., vol. 1, no. 3, 2021, doi: 10.52088/ijesty.v1i3.89.

J. Xiao, J. Wang, S. Cao, and B. Li, “Application of a Novel and Improved VGG-19 Network in the Detection of Workers Wearing Masks,” J. Phys. Conf. Ser., vol. 1518, no. 1, 2020, doi: 10.1088/1742-6596/1518/1/012041.

O. Alsing, “Mobile Object Detection using TensorFlow Lite and Transfer Learning TT - Objektigenkänning i mobila enheter med TensorFlow Lite (swe),” Trita-Eecs-Ex Nv - 2018535, vol. Independen, 2018.

T. Sutabri, Pamungkur, A. Kurniawan, and R. E. Saragih, “Automatic attendance system for university student using face recognition based on deep learning,” Int. J. Mach. Learn. Comput., 2019, doi: 10.18178/ijmlc.2019.9.5.856.


Article Metrics

Abstract view : 0 times
PDF - 0 times


  • There are currently no refbacks.

Copyright (c) 2023 Dede Herman Suryana, Wahyu Kusuma Raharja

International Journal of Engineering, Science and Information Technology (IJESTY) eISSN 2775-2674