OPTIMASI HYBRID VISION TRANSFORMER-YOLO UNTUK DETEKSI DINI CACAT SPAGHETTI DAN STRINGING PADA 3D PRINTING BERBASIS EKSTRUSI
Raynaldi Farhan Ghiffary, Prof. Dr. Eng. Ir. Herianto, S.T., M.Eng., IPU., ASEAN Eng.
2026 | Skripsi | TEKNIK INDUSTRI
Teknologi 3D printing berbasis Fused Deposition Modeling dengan material Polylactic Acid banyak digunakan karena biaya relatif rendah dan kemudahan operasional, namun proses ini rentan terhadap cacat ekstrusi seperti spaghetti defect dan stringing defect. Cacat tersebut dapat menurunkan kualitas hasil cetak dan memicu kegagalan cetak total. Pemantauan manual sulit dilakukan secara konsisten karena proses pencetakan berlangsung lama dan membutuhkan pengawasan kontinu, sehingga diperlukan sistem deteksi dini cacat otomatis berbasis computer vision yang mampu bekerja secara real-time.
Penelitian ini membuat model deteksi cacat berbasis deep learning dengan arsitektur hibrida YOLOv11–MobileViT untuk mendeteksi spaghetti defect dan stringing defect pada proses 3D printing PLA. Tahapan pengolahan data meliputi eliminasi duplikasi gambar, cropping, downscaling, serta anotasi bounding box untuk dua kelas cacat dan kelas normal. Dataset akhir terdiri dari 3.800 gambar dengan komposisi 1.600 spaghetti defect, 1.600 stringing defect, dan 600 gambar normal yang dibagi menjadi 70?ta pelatihan, 20% validasi, dan 10% pengujian. Modifikasi arsitektur dilakukan dengan mengganti backbone konvolusional YOLOv11 standar menggunakan backbone MobileViT yang menggabungkan blok MobileNetV2 dan blok MobileViT berbasis self-attention untuk menangkap informasi lokal dan global secara simultan, kemudian model dilatih selama 200 epoch dengan konfigurasi pelatihan yang disesuaikan dengan keterbatasan GPU. Hasil pengujian menunjukkan bahwa model YOLOv11–MobileViT mencapai nilai precision 78,9%, recall 67,7%, F1-score 72,9%, mAP0.5 sebesar 76,8%, dan mAP0.5:0.95 sebesar 37,0% serta memberikan peningkatan pada seluruh metrik utama dibandingkan YOLOv11 standar, khususnya dalam mendeteksi detail cacat berukuran kecil dan pola spaghetti yang menyebar. Model juga direalisasikan pada prototipe sistem monitoring berbasis IoT menggunakan webcam laptop untuk menangkap gambar proses cetak pada 3D printer Ender 3, inferensi dijalankan melalui Jupyter, layanan dengan Docker pada localhost, monitoring melalui Flask API dari perangkat lain, dan notifikasi otomatis dikirim melalui Telegram bot ketika cacat terdeteksi. Temuan ini menunjukkan bahwa arsitektur hibrida YOLOv11–MobileViT layak dijadikan dasar sistem pemantauan kualitas otomatis untuk deteksi dini cacat spaghetti dan stringing pada 3D printing PLA, meskipun masih terdapat keterbatasan terkait jumlah data, ketelitian anotasi, dan tantangan membedakan cacat dengan kemiripan visual tinggi.
Fused Deposition Modeling (FDM) 3D printing using Polylactic Acid (PLA) is widely adopted due to its low cost and ease of operation; however, the process is prone to extrusion-related failures such as spaghetti defect and stringing defect. These defects can degrade the visual and functional quality of printed parts, lead to complete print failure, and cause significant material and time waste. Continuous manual monitoring is often impractical because printing jobs are long and require persistent attention, motivating the need for an automated, real-time defect detection system based on computer vision. This study created a deep-learning-based defect detection model using a hybrid YOLOv11–MobileViT architecture to identify spaghetti and stringing defects in PLA FDM printing. The data pipeline includes duplicate image removal, 1:1 cropping, resizing to 640×640 pixels, and YOLO-format bounding-box annotation for two defect classes and a normal class. The final dataset contains 3,800 images (1,600 spaghetti, 1,600 stringing, and 600 normal), split into 70% training, 20% validation, and 10% testing. The proposed model modifies YOLOv11 by replacing its standard convolutional backbone with a MobileViT backbone that combines MobileNetV2 blocks and self-attention-based MobileViT blocks to capture local and global features simultaneously, and the model is trained for 200 epochs under a configuration tailored to GPU constraints. Experimental results show that the YOLOv11–MobileViT model achieves 78.9% precision, 67.7% recall, 72.9?-score, 76.8% mAP0.5, and 37.0% mAP0.5:0.95, consistently outperforming a standard YOLOv11 baseline across key metrics, particularly for small defects and dispersed spaghetti like patterns. The trained model is also deployed in a proof-of-concept IoT monitoring system using a laptop webcam to capture live images from an Ender 3 printer; inference is executed via a Jupyter/Python environment, the service is containerized with Docker on localhost, monitoring is exposed through a Flask API for other devices on the network, and automatic alerts are delivered via a Telegram bot upon defect detection. These findings indicate that the proposed hybrid YOLOv11–MobileViT architecture is a viable foundation for automated, real-time quality monitoring in PLA FDM printing, while future work should address dataset scale, annotation precision, and robustness under diverse real-world conditions.
Kata Kunci : 3D printing, FDM, PLA, spaghetti defect, stringing defect, YOLOv11, MobileViT, Vision Transformer