Gayo Arabica coffee is one of Indonesia’s leading agricultural commodities with high economic value, especially in the export market. However, the process of classifying coffee bean varieties is still mostly performed manually, which can lead to misidentification and inconsistency in quality control. This study aims to develop an automatic classification system for Gayo Arabica coffee bean varieties using a deep learning approach based on the You Only Look Once version 5 (YOLOv5) model. The dataset consisted of 1,500 images of three main varieties: Tim-tim (Gayo 1), Bor-bor (Gayo 2), and Ateng Super (Gayo 3), with 500 images per class. The images were collected through direct observation and documentation in Aceh Tengah and labeled using LabelImg. The model was trained using the Python programming language with the Ultralytics YOLOv5 library based on PyTorch. Model performance was evaluated using precision, recall, and mean Average Precision (mAP) metrics, as well as a confusion matrix. The final model achieved an accuracy of 96% with an mAP50–95 value of 0.99, indicating that the YOLOv5-based system can effectively and consistently classify coffee bean varieties in real-time. The results of this study are expected to assist farmers and coffee industry stakeholders in improving the efficiency and accuracy of post-harvest quality control
Copyrights © 2026