DETEKSI CACAT PADA KEMASAN KALENG MINUMAN MENGGUNAKAN CNN (CONVOLUTIONAL NEURAL NETWORK)
JULIO ALIFIANSYAH, Dr. Andi Dharmawan, S.Si., M.Cs; Dr.techn. Aufaclav Zatu Kusuma Frisky, S.Si., M.Sc.
2025 | Skripsi | ELEKTRONIKA DAN INSTRUMENTASI
Kondisi fisik kemasan kaleng sebelum didistribusikan oleh industri minuman merupakan aspek penting karena menyangkut kualitas produk, keselamatan konsumen, serta standar mutu industri. Untuk mendukung proses inspeksi, penelitian ini bertujuan mengimplementasikan metode Convolutional Neural Network (CNN) untuk mendeteksi cacat pada kemasan kaleng minuman dan mengukur tingkat akurasinya. Model yang digunakan dibangun menggunakan arsitektur MobileNetV2 dengan pendekatan transfer learning, serta dilatih pada 200 gambar yang diklasifikasikan ke dalam dua kelas: normal dan cacat. Dataset diperoleh melalui pengambilan gambar langsung, kemudian diproses melalui augmentasi dan normalisasi.
Hasil evaluasi model menunjukkan akurasi sebesar 60%, dengan recall tertinggi pada kelas normal sebesar 0,80 dan precision tertinggi pada kelas cacat sebesar 0,67. Sistem juga diuji secara real-time menggunakan kamera, dengan rata-rata waktu inferensi sekitar 59 milidetik dan probabilitas deteksi yang mencapai lebih dari 90% pada sebagian besar prediksi. Temuan ini menunjukkan bahwa metode CNN dapat diterapkan untuk klasifikasi kaleng minuman berdasarkan kondisi fisiknya, dan memiliki potensi untuk dikembangkan lebih lanjut dalam sistem inspeksi visual di masa mendatang.
The physical condition of canned beverage packaging prior to distribution is an important aspect as it relates to product quality, consumer safety, and industrial quality standards. To support the inspection process, this study aims to implement the Convolutional Neural Network (CNN) method to detect defects in can packaging and to evaluate its classification accuracy. The model was built using the MobileNetV2 architecture with a transfer learning approach and trained on 200 images categorized into two classes: normal and defective. The dataset was obtained through direct image capture and processed using augmentation and normalization techniques.
Model evaluation results showed an accuracy of 60%, with the highest recall of 0.80 in the normal class and the highest precision of 0.67 in the defective class. The system was also tested in real-time using a webcam, achieving an average inference time of approximately 59 milliseconds and a detection probability exceeding 90% in most predictions. These findings indicate that the CNN method can be applied to classify canned beverages based on their physical condition and has potential for further development in future visual inspection systems.
Kata Kunci : CNN, MobileNetV2, klasifikasi gambar, kemasan kaleng, deteksi cacat, transfer learning