Deteksi dan Klasifikasi Cacat Biji Kakao Varietas Forastero Berbasis Multi-Class Object Detection Menggunakan YOLO V8
Fauzan Abhirama, Anggoro Cahyo Sukartiko, S.T.P., M.P., Ph.D.; Dr. Ir. Radi, S.T.P., M.Eng., IPU, ASEAN Eng.
2026 | Skripsi | TEKNOLOGI INDUSTRI PERTANIAN
Proses sortasi biji
kakao yang masih dilakukan secara manual memiliki kelemahan berupa penilaian
yang bersifat subjektif, kurang konsisten, dan memerlukan waktu yang lama.
Selain itu, keberadaan berbagai jenis cacat biji kakao seperti biji berjamur,
biji berkecambah, biji berserangga, biji pipih dan kotoran/waste
menyebabkan proses identifikasi dan klasifikasi semakin kompleks. Oleh karena
itu, penelitian ini bertujuan untuk memperoleh ukuran model deteksi dan
klasifikasi terbaik dari cacat biji kakao berbasis YOLOv8 serta mendapatkan
konfigurasi pelatihan model terbaik dalam mengklasifikasikan cacat biji kakao untuk
mendukung proses sortasi biji kakao secara otomatis dan efisien. Penelitian
dilakukan melalui tahapan pengambilan citra biji kakao menggunakan webcam
yang dipasang pada Color Assessment Cabinet, kemudian dilanjutkan dengan
preprocessing data berupa labeling, resizing, splitting dataset,
dan augmentasi data. Dataset yang digunakan terdiri dari 1.019 citra dengan
total 14.456 anotasi objek yang merepresentasikan beberapa kategori cacat biji
kakao dan biji normal. Model YOLOv8 yang digunakan terdiri atas beberapa varian
ukuran model, yaitu YOLOv8n, YOLOv8s, YOLOv8m, YOLOv8l, dan YOLOv8x. Evaluasi
model dilakukan menggunakan parameter akurasi, presisi, recall, dan mean
average precision (mAP) untuk mengukur kemampuan model dalam mendeteksi dan
mengklasifikasikan objek secara tepat. Hasil penelitian menunjukan bahwa
model terbaik diperoleh pada YOLOv8m menggunakan Dataset Augmentasi. Kemudian, dilakukan penyetelan hyperparameter
berupa batch size, learning rate, dan epoch untuk
memperoleh performa terbaik. Hasil penyetelan hyperparameter pada model
YOLOv8m, diperoleh pada penggunaan batch size 24, learning rate
0.01, dan epochs 100. Konfigurasi tersebut menghasilkan nilai akurasi
sebesar 98,0%, presisi sebesar 99,2%, recall sebesar 98,7%, mAP50
sebesar 99,3%, dan mAP50-95 sebesar 92,2%. Penerapan teknologi ini diharapkan
dapat meningkatkan efisiensi sortasi, mengurangi ketergantungan pada pengamatan
manusia, serta mendukung pengendalian mutu biji kakao berbasis kecerdasan
buatan. Hasil penelitian juga diharapkan menjadi referensi pengembangan
teknologi otomatisasi pada industri pengolahan kakao.
The cocoa bean
sorting process, which is still carried out manually, has drawbacks such as
subjective assessment, a lack of consistency, and time-consuming procedures. In
addition, the presence of various types of cocoa bean defects such as moldy
beans, sprouted beans, insect-infested beans, flattened beans, and impurities
or waste makes the identification and classification process even more complex.
Therefore, this study aims to determine the optimal detection and
classification model for cocoa bean defects based on YOLOv8 and to identify the
best model training configuration for classifying cocoa bean defects to support
an automated and efficient cocoa bean sorting process. The research was
conducted by first capturing images of cocoa beans using a webcam mounted on a
Color Assessment Cabinet, followed by data preprocessing, including labeling,
resizing, splitting the dataset, and data augmentation. The dataset consisted
of 1,019 images with a total of 14,456 object annotations representing various
categories of cocoa bean defects and normal beans. The YOLOv8 model used
consists of several model size variants, namely YOLOv8n, YOLOv8s, YOLOv8m,
YOLOv8l, and YOLOv8x. Model evaluation was conducted using the metrics of
accuracy, precision, recall, and mean average precision (mAP) to measure the
model’s ability to accurately detect and classify objects. The results of the
study show that the best model performance was achieved with YOLOv8m using the
Augmented Dataset. Subsequently, hyperparameter tuning was performed on batch
size, learning rate, and epochs to achieve optimal performance. The optimal
hyperparameter settings for the YOLOv8m model were a batch size of 24, a
learning rate of 0.01, and 100 epochs. This configuration yielded an accuracy
of 98.0%, a precision of 99.2%, a recall of 98.7%, an mAP50 of 99.3%, and an
mAP50-95 of 92.2%. The implementation of this technology is expected to improve
sorting efficiency, reduce reliance on human observation, and support AI-based
quality control of cocoa beans. The research results are also expected to serve
as a reference for the development of automation technology in the cocoa
processing industry.
Kata Kunci : biji kakao, deep learning, deteksi objek, model, YOLOv8