Klasifikasi Tingkat Kematangan Roasting Biji Kopi Berbasis Ekstraksi Fitur Warna HSV Menggunakan Metode Naïve Bayes - Gusti Ayu Devani Zelvia; I Made Gede Sunarya; I Gde Made Hanura; Ida Bagus Gede Putra Kenaka (Forum Kerjasama Pendidikan Tinggi (FKPT), 2026)
Manual determination of coffee bean roasting levels through visual inspection has limitations, particularly in terms of subjectivity and human error. To address this, the present study develops an automatic classification system based on digital images to identify the roasting maturity level of coffee beans. The system uses six-dimensional HSV (Hue, Saturation, Value) color features — specifically the mean and standard deviation of each channel classified using the Naive Bayes Classifier (NBC) algorithm. Primary data (145 images) were collected only for the medium and dark classes, as these are the most common roasting levels in the local industry and were underrepresented in the secondary dataset from Kaggle (1,600 images), covering four classes: green, light, medium, and dark. A pixel normalization step was applied prior to HSV conversion to mitigate sensor bias between the primary (smartphone) and secondary (Kaggle) data sources. The images underwent size normalization to 224×224 pixels, then split into training data (75%) and test data (25%). Performance evaluation was carried out using a confusion matrix and metrics such as accuracy, precision, recall, and F1-score. The classification results show that the model achieves an accuracy of 83.48% (compared to 79.82% using only mean features), with the best performance in the light class (F1-score: 0.97) and medium class (F1-score: 0.90). The dark class had the lowest performance (recall: 0.61) due to spectral similarity with adjacent classes. These findings establish a lightweight baseline (inference time: 2.3 ms/image, model size: <1 KB) suitable for embedded and IoT implementations in small-scale coffee processing industries.