Real-Time Coffee Bean Defect Detection Based on SNI 01-2907-2008 Standards Using Lightweight YOLOv5s Architecture - Nanda Aptana Irsyadul Bahy; Achmad Pratama Rifai (School of Computing, Telkom University, 2026)
Physical quality control of coffee beans in Indonesia, which relies heavily on manual sorting methods, has limitations in terms of consistency, time efficiency, and subjective observation. This study aims to develop an automated system for detecting physical defects in coffee beans using a Deep Learning-based Object Detection algorithm with the YOLOv5s architecture, aligned with SNI 01-2907-2008 regulations. Through a training mechanism that combined hyperparameter optimization and data augmentation across 20 defect classification classes, the developed model achieved robust generalization performance, with a global mAP@0.5 of 0.867 and a mAP@0.5-95 of 0.601. A prediction time evaluation of average 14 ms confirmed the model's capability for real-time sorting system implementation. However, a per-class metric decomposition analysis revealed performance heterogeneity, where the model showed superior accuracy on distinctive morphological features but struggled with texture bias and contrast ambiguity in minor defect classes and foreign materials. Crucially, the model's low computational demand presents a cost-effective solution for Small and Medium-sized Enterprises (SMEs), enabling the adoption of automated quality control without the need for expensive high-end hardware infrastructure. Overall, this study validates the effectiveness of YOLOv5 as an objective and standardized digital inspection instrument to support the modernization of the national coffee industry's post-harvest process.