Visual Segmentation and Classification of Coffee Beans After Roasting

Authors

  • Firdaus Alamanda Informatics Engineering Study Program, Duta Bangsa University Surakarta
  • Rudy Susanto Faculty of Computer Science, Duta Bangsa University Surakarta
  • Wiji Lestari Informatics Engineering Study Program, Duta Bangsa University Surakarta

DOI:

https://doi.org/10.30871/jaic.v9i4.9758

Keywords:

Coffee Bean, Roasting Level, Image Segmentation, Image Classification, Deep Learning

Abstract

This research aims to develop an image-based system for segmenting and classifying coffee beans after roasting using deep learning. A U-Net architecture was applied to isolate coffee beans from the background with high spatial accuracy, achieving a mean Intersection over Union (IoU) of 0.8833 and Dice Coefficient of 0.9375. The segmented images were then classified into six roasting levels green, light, light to medium, medium, medium to dark, and dark using a modified ResNet-50 model, which reached an overall classification accuracy of 86%. The system demonstrates strong performance for clear categories but shows overlapping predictions for visually similar classes such as “medium” and its neighboring levels, indicating that boundaries between roasting stages can be ambiguous. This study provides an objective and automated alternative for roast quality inspection, reducing reliance on subjective human assessment. However, to meet industrial standards, further improvements are needed, such as integrating additional image features or ensemble models to increase discrimination power. This two-stage system serves as a promising foundation for future developments in automated coffee quality control.

Downloads

Download data is not yet available.

References

[1] A. Taslim, S. Sudin, M. Dzikrullah Suratin Identifikasi Mutu Roasting Biji Kopi Menggunakan Fitur Warna Dan Backpropagation, and M. Dzikrullah Suratin, “Identifikasi Mutu Roasting Biji Kopi Menggunakan Fitur Warna Dan Backpropagation Identification Of Roasting Quality Coffee Beans Using Color And Backpropagation Features,” 2023.

[2] Purnomo Haykal Mohammed, Raharjo Jangkung, and Magdelena Rita, “Deteksi Kualitas Biji Kopi Melalui Pengolahan Citra Digital Dengan Metode Adaptive Region Growing Dan Klasifikasi Decision Tree (Coffee Bean Quality Detection Through Digital Image Processing With Adaptive Region Growing Method And Decision Tree Classification),” 2021.

[3] D. Aditya Nugraha and A. Sartika Wiguna, “Seleksi Fitur Warna Citra Digital Biji Kopi Menggunakan Metode Principal Component Analysis Digital Image Selection of Coffee Seed Using Component Analysis Method,” 2020.

[4] J. Khatib Sulaiman, N. Amelia, M. Garonga, J. Rusman, and I. Artikel Abstrak, “Penerapan Metode K-Nearest Neighbor (Knn) Untuk Klasifikasi Kematangan Buah Kopi,” Indonesian Journal of Computer Science Attribution, vol. 12, no. 2, 2023.

[5] Firmansyah Tegar, Kurniawan Rudi, and Hidayat Toyib Asep, “Klasfikasi Tingkat Kematangan Roasting Biji Kopi Berbasis Deep Learning dengan Arsitektur MobileNet,” 2025, doi: 10.47065/josh.v6i2.6811.

[6] R. Janandi and T. W. Cenggoro, An Implementation of Convolutional Neural Network for Coffee Beans Quality Classification in a Mobile Information System. 2020. doi: 10.1109/ICIMTech50083.2020.9211257.

[7] A. Ridhovan et al., “Penerapan Metode Residual Network (RESNET) Dalam Klasifikasi Penyakit Pada Daun Gandum,” 2022.

[8] M. A. Djohar et al., “Liver Segmentation Using Convolutional Neural Network Method with U-Net Architecture,” Journal of Informatics And Telecommunication Engineering, vol. 6, no. 1, pp. 221–234, Jul. 2022, doi: 10.31289/jite.v6i1.6751.

[9] A. Di Benedetto, M. Fiani, and L. M. Gujski, “U-Net-Based CNN Architecture for Road Crack Segmentation,” Infrastructures (Basel), vol. 8, no. 5, May 2023, doi: 10.3390/infrastructures8050090.

[10] A. I. Mohammed and A. AK. Tahir, “A New Optimizer for Image Classification using Wide ResNet (WRN),” Academic Journal of Nawroz University, vol. 9, no. 4, p. 1, Sep. 2020, doi: 10.25007/ajnu.v9n4a858.

[11] A. Kaur, Y. Singh, N. Neeru, L. Kaur, and A. Singh, “A Survey on Deep Learning Approaches to Medical Images and a Systematic Look up into Real-Time Object Detection,” Jun. 01, 2022, Springer Science and Business Media B.V. doi: 10.1007/s11831-021-09649-9.

[12] J. Jumadi and D. Sartika, “Pengolahan Citra Digital Untuk Identifikasi Objek Menggunakan Metode Hierarchical Agglomerative Clustering,” 2021.

[13] Y. Prastyaningsih, W. Kusrini, P. Negeri Tanah Laut, J. A. Yani KM, D. Panggung KecPelaihari KabTanah Laut, and K. Selatan, “Sistem Temu Kembali Citra Pada Level Roasting Biji Kopi Menggunakan Ekstraksi Fitur Warna,” vol. 6, no. 2, 2021.

[14] Y. Hafifah, K. Muchtar, A. Ahmadiar, and S. Esabella, “Perbandingan Kinerja Deep Learning Dalam Pendeteksian Kerusakan Biji Kopi,” JURIKOM (Jurnal Riset Komputer), vol. 9, no. 6, p. 1928, Dec. 2022, doi: 10.30865/jurikom.v9i6.5151.

[15] B. T. W. Putra, R. Amirudin, and B. Marhaenanto, “The Evaluation of Deep Learning Using Convolutional Neural Network (CNN) Approach for Identifying Arabica and Robusta Coffee Plants,” Journal of Biosystems Engineering, vol. 47, no. 2, pp. 118–129, 2022, doi: 10.1007/s42853-022-00136-y.

Downloads

Published

2025-08-05

How to Cite

[1]
Firdaus Alamanda, Rudy Susanto, and Wiji Lestari, “Visual Segmentation and Classification of Coffee Beans After Roasting”, JAIC, vol. 9, no. 4, pp. 1354–1362, Aug. 2025.

Issue

Section

Articles