Laporkan Masalah

Deteksi Cacat dan Penentuan Mutu Biji Kopi Hijau Sesuai Standar Nasional Indonesia 01-2907-2008 Menggunakan Convolutional Neural Network Versi Small

NANDA APTANA IRSYADUL BAHY, Ir. Achmad Pratama Rifai, S.T., M.Eng., Ph.D.

2026 | Tesis | S2 Teknik Industri

Kopi merupakan komoditas perdagangan yang sedang populer diseluruh dunia saat ini. Tren tersebut memberikan kesempatan peningkatan devisa bagi negara pengekspor kopi dunia seperti Indonesia. Indonesia merupakan negara ke empat penyumbang kopi terbesar di dunia yang memiliki produksi total diprediksi hingga 750.000 ton dengan total ekspor biji kopi hijau mencapai 427.000 ton pada tahun 2025. Seluruh produksi tersebut didominasi oleh Perkebunan Rakyat (PR) dengan persentase sebesar 99,56%. Dengan volume produksi yang besar dan ketatnya persaingan diperlukan efisiensi pada proses pengolahan yang masih manual yaitu proses inspeksi dan klasifikasi biji kopi. Ketepatan dan konsistensi inspeksi dan klasifikasi biji kopi penting dilakukan karena telah diatur pada SNI 01-2907-2008 dan mempengaruhi harga dari biji kopi hijau. Penelitian ini bertujuan untuk mencitpakan deteksi cacat biji kopi serta mengkategorikan menjadi mutu sesuai SNI 01-2907-2008 berbasis computer vision 

Convolutional Neural Network (CNN) digunakan untuk deteksi cacat secara visual fisik biji kopi hijau. Dalam CNN terdapat algortima untuk deteksi objek yang digunakan adalah You Only Look Once (YOLO) yang dikembangkan melalui transfer learning pada versi YOLOv5s, YOLOv7-Tiny, dan YOLOv8s. Versi small digunakan untuk mengurangi beban komputasi penggunaan dan mempercepat waktu inferensi. Tahapan penelitian meliputi proses pelabelan, validasi kesesuaian label, augmentasi data, penentuan hyperparameter, pembuatan model deteksi, pembuatan aplikasi deteksi, dan deteksi gambar. 

Model YOLOv8s menunjukkan hasil terbaik dengan perfroma mAP@50 sebesar 98,10%, posisi kedua YOLOv7-Tiny dengan mAP@50 sebesar 97,4%, dan posisi ketiga YOLOv5s dengan mAP@50 sebesar 90,70%. Pada perhitungan weighted average YOLOv8s masih menjadi model terbaik dengan nilai precision 0,987 dan recall 0,983 sehingga dipilih menjadi model terbaik. Pada penerapannya proses deteksi mendapatkan MAPE rata-rata sebesar 17,13% yang masih tergolong baik dalam memprediksi. Hasil yang memuaskan ini menunjukkan kegunaan praktis model tersebut dalam meningkatkan proses penyortiran kualitas di industri kopi. 

Coffee is currently a globally prominent trade commodity. This trend provides an opportunity to increase foreign exchange for coffee-exporting countries, including Indonesia. As the world's fourth-largest coffee contributor, Indonesia’s total production is projected to reach 750,000 tons, with green bean coffee exports totaling 427,000 tons in 2025. This production is predominantly driven by smallholder plantations, accounting for 99.56% of the total output. Given the high production volume and intense market competition, efficiency is required in the processing stage, which remains manual, particularly in the inspecting and classification of coffee beans. Precision and consistency in these processes are critical, as they are regulated by the SNI 01-2907-2008 standard and directly influence the market price of green bean coffee. Consequently, this research aims to develop a computer vision-based system for detecting coffee bean defects and categorizing them into quality grades in accordance with the SNI 01-2907-2008 standard.

In this study, Convolutional Neural Networks (CNN) are employed for the visual detection of defects in green bean coffee. The object detection algorithm utilized within the CNN framework is You Only Look Once (YOLO), which was developed through transfer learning using the YOLOv5s, YOLOv7-Tiny, and YOLOv8s architectures. The 'small' versions of these models were specifically selected to minimize computational overhead and accelerate inference time. The research methodology encompasses several critical stages: data labeling, label validation, data augmentation, hyperparameter tuning, model development, application building, and image detection testing.

The experimental results indicate that the YOLOv8s model achieved the highest performance with a mAP@50 of 98.10%, followed by YOLOv7-Tiny at 97.4%, and YOLOv5s at 90.70%. Based on the weighted average calculations, YOLOv8s remained the top-performing model, achieving a precision of 0.987 and a recall of 0.983, and was consequently selected as the optimal model. In its practical implementation, the detection process yielded an average MAPE of 17,13%, which is considered a reliable level for predictive accuracy. These favorable results demonstrate the practical utility of the model in optimizing quality sorting processes within the coffee industry.

Kata Kunci : Biji Kopi Hijau, Cacat, Deep Learning, Deteksi Objek, YOLO

  1. S2-2026-547578-abstract.pdf  
  2. S2-2026-547578-bibliography.pdf  
  3. S2-2026-547578-tableofcontent.pdf  
  4. S2-2026-547578-title.pdf