Implementation of Image Processing and CNN for Roasted-Coffee Level Classification

Irfan Asfy Fakhry Anto, Jony Winaryo Wibowo, Taufik Ibnu Salim, Aris Munandar

Abstract


The roasting process of coffee beans plays a crucial role in the development of chemicals responsible for the rich color and complex flavors characteristic of well-roasted coffee. One approach to understanding this process involves assessing the roast level, which varies in color from light to dark, with intermediate levels in between. In this study, image processing was performed using Convolutional Neural Networks (CNNs), a widely used method for image classification. The objective was to utilize the LAB color model and the CNN framework to classify the roast levels of coffee beans based on images from files or video streams. The study also details the hardware and software tools employed. A user-friendly graphical interface was developed to ensure ease of use, requiring minimal training for efficient operation. The research successfully designed, developed, and implemented an application for classifying coffee bean roast levels using two methods: LAB color model image processing and the CNN model. Consequently, the system can recognize roast levels based on the outputs from both the LAB model and the CNN model. This research represents a preliminary effort and requires further development to support more extensive studies. Ultimately, it serves as a foundation for future exploration and the application of embedded system-based solutions for assessing coffee bean maturity levels in alignment with Agtron classification standards.


Keywords


roast coffee level;roasted coffee;convolutional neural network;image processing;lab color model

References


B. Folmer, The Craft and Science of Coffee. London: Academic Press - Elsevier, 2017.

A. N. Gloess et al., “Comparison of nine common coffee extraction methods: instrumental and sensory analysis,” European Food Research and Technology, vol. 236, no. 4, pp. 607–627, Apr. 2013, doi: 10.1007/s00217-013-1917-x.

E. K. Bekedam, M. J. Loots, H. A. Schols, M. A. J. S. Van Boekel, and G. Smit, “Roasting Effects on Formation Mechanisms of Coffee Brew Melanoidins,” J Agric Food Chem, vol. 56, no. 16, pp. 7138–7145, Aug. 2008, doi: 10.1021/jf800999a.

The Specialty Coffee Association (SCA), “About.” Accessed: Nov. 21, 2023. [Online]. Available: https://sca.coffee/about

S. Schenker, C. Heinemann, M. Huber, R. Pompizzi, R. Perren, and R. Escher, “Impact of Roasting Conditions on the Formation of Aroma Compounds in Coffee Beans,” J Food Sci, vol. 67, no. 1, pp. 60–66, Jan. 2002, doi: 10.1111/j.1365-2621.2002.tb11359.x.

M. Bozzola et al., The Coffee Guide Fourth edition TRADE IMPACT FOR GOOD, 4th ed. Geneva: International Trade Centre, 2021. Accessed: Feb. 11, 2024. [Online]. Available: https://www.researchgate.net/publication/355928597_The_Coffee_Guide_Fourth_Edition

J. Avelino et al., “The coffee rust crises in Colombia and Central America (2008–2013): impacts, plausible causes and proposed solutions,” Food Secur, vol. 7, no. 2, pp. 303–321, Apr. 2015, doi: 10.1007/s12571-015-0446-9.

I. Santoso, S. A. Mustaniroh, and A. Choirun, “Methods for quality coffee roasting degree evaluation: A literature review on risk perspective,” in IOP Conference Series: Earth and Environmental Science, IOP Publishing Ltd, Dec. 2021. doi: 10.1088/1755-1315/924/1/012058.

B. Odžaković, N. Džinić, Z. Kukrić, and S. Grujić, “Effect of roasting degree on the antioxidant activity of different Arabica coffee quality classes,” Acta Sci Pol Technol Aliment, vol. 15, no. 4, pp. 409–417, Dec. 2016, doi: 10.17306/J.AFS.2016.4.39.

Coffee Laboratory, “ColorTrack RT.” Accessed: Nov. 14, 2023. [Online]. Available: https://www.coffeelabequipment.com/COLORTRACKRT.html

I. A. F. Anto, A. Munandar, J. W. Wibowo, T. I. Salim, and O. Mahendra, “Coffee Bean Roasting Levels Detection: A Systematic Review,” in 2023 IEEE 7th International Conference on Information Technology, Information Systems and Electrical Engineering (ICITISEE), IEEE, Nov. 2023, pp. 146–151. doi: 10.1109/ICITISEE58992.2023.10404775.

C. Somporn, A. Kamtuo, P. Theerakulpisut, and S. Siriamornpun, “Effects of roasting degree on radical scavenging activity, phenolics and volatile compounds of Arabica coffee beans (Coffea arabica L. cv. Catimor),” Int J Food Sci Technol, vol. 46, no. 11, pp. 2287–2296, Nov. 2011, doi: 10.1111/j.1365-2621.2011.02748.x.

The Specialty Coffee Association (SCA), “About Us.” Accessed: Mar. 07, 2024. [Online]. Available: https://sca.coffee/about

C. Q. da Silva et al., “Risk assessment of coffees of different qualities and degrees of roasting,” Food Research International, vol. 141, p. 110089, Mar. 2021, doi: 10.1016/j.foodres.2020.110089.

F. de C. Pires, R. G. F. A. Pereira, M. R. Baqueta, P. Valderrama, and R. Alves da Rocha, “Near-infrared spectroscopy and multivariate calibration as an alternative to the Agtron to predict roasting degrees in coffee beans and ground coffees,” Food Chem, vol. 365, p. 130471, Dec. 2021, doi: 10.1016/j.foodchem.2021.130471.

N. Caporaso, M. B. Whitworth, and I. D. Fisk, “Prediction of coffee aroma from single roasted coffee beans by hyperspectral imaging,” Food Chem, vol. 371, p. 131159, Mar. 2022, doi: 10.1016/j.foodchem.2021.131159.

N. Caporaso, M. B. Whitworth, C. Cui, and I. D. Fisk, “Variability of single bean coffee volatile compounds of Arabica and robusta roasted coffees analysed by SPME-GC-MS,” Food Research International, vol. 108, pp. 628–640, Jun. 2018, doi: 10.1016/j.foodres.2018.03.077.

Mario Fernández-Alduenda et al., “A System to Assess Coffee Value Understanding the Specialty Coffee Association’s Coffee Value Assessment,” 2024. [Online]. Available: https://sca.coffee/research/coffee-standards

V. V. Freitas et al., “Impact of different roasting conditions on the chemical composition, antioxidant activities, and color of Coffea canephora and Coffea arabica L. samples,” Heliyon, vol. 9, no. 9, p. e19580, Sep. 2023, doi: 10.1016/j.heliyon.2023.e19580.

B. C. K. Ly, E. B. Dyer, J. L. Feig, A. L. Chien, and S. Del Bino, “Research Techniques Made Simple: Cutaneous Colorimetry: A Reliable Technique for Objective Skin Color Measurement,” Journal of Investigative Dermatology, vol. 140, no. 1, pp. 3-12.e1, Jan. 2020, doi: 10.1016/j.jid.2019.11.003.

Coffee Laboratory, “ColorTrack Coffee Color Selector.” Accessed: Oct. 14, 2023. [Online]. Available: https://www.coffeelabequipment.com/Color_Selector_cl.pdf

G. Xie et al., “Generating Neural Networks for Diverse Networking Classification Tasks via Hardware-Aware Neural Architecture Search,” IEEE Transactions on Computers, vol. 73, no. 2, pp. 481–494, Feb. 2024, doi: 10.1109/TC.2023.3333253.

J. I. Pilataxi, J. E. Zambrano, C. A. Perez, and K. W. Bowyer, “Improved Search in Neuroevolution Using a Neural Architecture Classifier With the CNN Architecture Encoding as Feature Vector,” IEEE Access, vol. 12, pp. 11987–12000, 2024, doi: 10.1109/ACCESS.2024.3355804.

Mamadou Keita, “HyperResNet,” Jul. 2022. Accessed: Nov. 12, 2023. [Online]. Available: https://github.com/Mamadou-Keita/HyperResNet

T. H. Nasution and U. Andayani, “Recognition of Roasted Coffee Bean Levels using Image Processing and Neural Network,” IOP Conf Ser Mater Sci Eng, vol. 180, p. 012059, Mar. 2017, doi: 10.1088/1757-899X/180/1/012059.

H. S. Metha, K. Kusrini, and D. Ariatmanto, “Classification of types Roasted Coffee Beans using Convolutional Neural Network Method,” Sinkron, vol. 8, no. 2, pp. 846–851, Mar. 2024, doi: 10.33395/sinkron.v8i2.13517.

N. K. Naik and P. K. Sethy, “Roasted Coffee beans Classification based on Convolutional Neural Network,” in 2022 International Conference on Futuristic Technologies (INCOFT), IEEE, Nov. 2022, pp. 1–3. doi: 10.1109/INCOFT55651.2022.10094378.

B. Chu, K. Yu, Y. Zhao, and Y. He, “Development of Noninvasive Classification Methods for Different Roasting Degrees of Coffee Beans Using Hyperspectral Imaging,” Sensors, vol. 18, no. 4, p. 1259, Apr. 2018, doi: 10.3390/s18041259.

I. A. F. Anto, J. W. Wibowo, A. Munandar, and T. I. Salim, “Dataset citra roast-level Biji Kopi berdasarkan skala Agtron.” Accessed: Dec. 16, 2023. [Online]. Available: https://hdl.handle.net/20.500.12690/RIN/CYFYAQ

J. Ansel et al., “PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation,” in Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2, New York, NY, USA: ACM, Apr. 2024, pp. 929–947. doi: 10.1145/3620665.3640366.



Refbacks

  • There are currently no refbacks.


 

Indonesian Journal of Electrical Engineering and Informatics (IJEEI)
ISSN 2089-3272

Creative Commons Licence

This work is licensed under a Creative Commons Attribution 4.0 International License.

web analytics
View IJEEI Stats

Error. Page cannot be displayed. Please contact your service provider for more details. (6)