Penerapan Arsitektur U-Net pada Segmentasi Cacat Biji Kopi untuk Optimalisasi Inspeksi Kualitas

Authors

  • Ami Rahmawati Universitas Nusa Mandiri
  • Ita Yulianti Universitas Bina Sarana Informatika
  • Ani Oktarini Sari Universitas Nusa Mandiri
  • Siti Nurajizah Universitas Bina Sarana Informatika

DOI:

https://doi.org/10.70340/jirsi.v5i2.365

Keywords:

Coffee Bean; Defect Detection; U-Net; Deep Learning; Binary Segmentation

Abstract

Manual visual inspection of coffee bean defects remains prone to subjectivity and inconsistency, necessitating a more accurate and efficient approach. This study proposes a deep learning-based coffee bean image segmentation method using the U-Net architecture to detect the presence of defects in coffee beans using a binary segmentation approach. The dataset consists of 300 coffee bean images evenly divided into 150 images of black coffee and 150 images of insect damage. Annotation was performed using a semi-automatic pseudo-labeling method based on Gaussian filtering, absolute difference, and thresholding to generate ground truth in binary mask format. Training data was enriched through augmentation techniques including horizontal flip, vertical flip, rotation, and brightness-contrast adjustment. The model was trained using a combined loss function of Dice Loss and Binary Cross-Entropy with the Adam optimizer over 15 epochs with an early stopping mechanism. Evaluation results demonstrate excellent performance with a Mean IoU of 0.9240, Precision of 0.9707, Recall of 0.9495, and F1 Score of 0.9600, with an overall correct prediction rate of 97.45% based on pixel-level confusion matrix analysis. These results indicate that the U-Net architecture is capable of segmenting defective coffee bean areas accurately and consistently, making it a promising foundation for the development of an automated coffee quality inspection system.

Downloads

Download data is not yet available.

References

S. M. Syadham and M. Akbar, “Klasifikasi Citra Biji Kopi Temanggung Menggunakan Gray Level Co-Ocurrence Matrix – Convolutional Neural Network,” JITET (Jurnal Inform. dan Tek. Elektro Ter., vol. 13, no. 3, 2025.

W. R. Hasibuan, I. P. Sari, and M. Basri, “Klasifikasi Kerusakan ( Cacat ) pada Biji Kopi Arabika Menggunakan Algoritma KNN (K-Nearest Neighbor),” Blend Sains J. Tek., vol. 3, no. 4, 2025.

H. Thai, H. Ko, and J. Huh, “Coffee Bean Defects Automatic Classification Realtime Application Adopting Deep Learning,” IEEE Access, vol. 12, no. August, pp. 126503–126517, 2024, doi: 10.1109/ACCESS.2024.3452552.

I. G. P. A. Saputra, P. W. Rahayu, and I. M. D. Ardiada, “Analisis Tingkat Kematangan Sangraian Biji Kopi Menggunakan Ekstraksi Fitur Warna,” J-INTECH (Journal Inf. Technol., no. 204, pp. 123–128, 2024.

G. A. Pratama, E. Y. Puspaningrum, and H. Maulana, “Convolutional Neural Network dan Faster Region Convolutional Neural Network Untuk Klasifikasi Kualitas Biji Kopi Arabika,” JITET (Jurnal Inform. dan Tek. Elektro Ter., vol. 12, no. 3, pp. 2776–2785, 2024.

M. Farhan, A. Fauzi, and H. Khair, “Identifikasi Kualitas Biji Kopi Pada Pengolahan Citra Menggunakan Metode Backpropagation,” Kohesi J. Multidisiplin Saintek, vol. 10, no. 5, pp. 1–12, 2025.

A. A. Hibatullah, A. Asriyanik, and W. Apriandari, “Klasifikasi Kualitas Jenis Kopi Halus Robusta Menggunakan Convolutional Neural Network (CNN) dan Mobilenet-V2,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 5, pp. 8650–8657, 2024.

A. Zandianto, M. Mahrijal, and I. Irwan, “Sistem Sortasi Biji Kopi Otomatis Menggunakan Sensor Warna TCS34725 dan Arduino Mega 2560,” J. Inov. Teknol. Terap., vol. 04, no. 1, 2026.

N. Krisdianto, R. K. Atharizqi, and W. T. Nurhasanaah, “Pengembangan Sistem Pengenalan Objek Multi-Kelas Berbasis Segmentasi Citra dengan YOLOv11 dan Streamlit,” IJINF (International J. Informatics), pp. 1–18, 2025.

S. A. Elvidamayantia and A. Ramadhanu, “Penerapan Algoritma K-Means Clustering dalam Segmentasi Citra Sayuran : Wortel, Kol, dan Terong Berbasis Matlab,” J. Sains Dan Teknol., vol. 5, no. 3, pp. 302–312, 2025.

A. Nurdiansyah and A. Ramadhanu, “Segmentasi Citra Buah Durian Dan Jagung Dengan Algoritma K-Nearest Neighbor Dan Principal Componen Analysis,” J. Inform. Teknol. dan Sains, vol. 7, no. 1, pp. 412–419, 2025.

F. A. Hermawati and V. A. Jaya, “Segmentasi Kepala Janin pada Citra Ultrasound Menggunakan Arsitektur Jaringan U-Net Fetal Head Segmentation in Ultrasound Images Using U-Net Network Architecture,” Komputika J. Sist. Komput., vol. 13, no. 2, pp. 193–199, 2024, doi: 10.5281/zenodo.1322001.

A. Li, D. Li, and A. Wang, “A Two-Stage YOLOv5s–U-Net Framework for Defect Localization and Segmentation in Overhead Transmission Lines,” Sensors (Basel), vol. 25, no. 9, 2025.

M. Adeva, “Arsitektur U-Net MobileNetV2 yang Efisien dan Akurat untuk Segmentasi Buah Multi-Kelas,” in Seminar Nasional Informatika Bela Negara (SANTIKA), 2025, vol. 5, no. 2, pp. 180–183.

P. Kuppusamy, P. Pranavi, R. Jyothsna, B. S. Sahana, and L. Meghana, “A Synergistic Approach of Coffee Leaf Pathology Segmentation with Self-Attentive U-Net,” in 2025 IEEE International Conference on Emerging Technologies and Applications (MPSec ICETA), 2025, pp. 1–6. doi: 10.1109/MPSecICETA64837.2025.11118788.

N. K. Diani, M. W. A. Kesiman, I. M. G. S. Sunarya, and P. Z. E. S. Nugraha, “Perangkat Cerdas Berbasis U-Net untuk Memantau Kerusakan Daun Pakcoy Akibat Serangan Hama,” J. Artif. Intell. Digit. Bus., vol. 5, no. 1, pp. 7097–7109, 2026.

Downloads

Published

2026-05-30

Issue

Section

Articles