Manufacturing Quality Control with Deep Learning

3D Printing Defect Detection

An ensemble deep learning system to detect under-extrusion defects in 3D printing processes in real-time using transfer learning.

PyTorchResNetTransfer LearningComputer VisionClassification

Introduction

In an era where manufacturing efficiency and precision are paramount, this project focused on early detection of 3D printing issues. The initiative was rooted in the social value of reducing material waste and enhancing the quality of 3D printed products. The objective was to develop a machine learning model capable of identifying under-extrusion defects - pivotal for maintaining the integrity of printed objects.

Dataset

The dataset originated from seven different 3D printers, each contributing 6 to 20 individual prints. Snapshots were captured every 0.5 seconds by a nozzle-mounted camera. Every print was labeled as either successful or exhibiting under-extrusion symptoms. To prevent overfitting, data from two printers was reserved exclusively for testing, and several prints were withheld from training for validation. The dataset included train.csv and test.csv with columns for img_path, printer_id, print_id, and has_under_extrusion.

Methods

Leveraging transfer learning, multiple deep learning architectures were deployed within PyTorch: ResNet18, ResNet34, AlexNet, VGG16, and GoogLeNet. Pre-trained models were fine-tuned on the 3D printing dataset to adapt them to under-extrusion detection. An ensemble approach combining the two best-performing models was then applied.

Results

  • Ensemble of ResNet18 and ResNet34 achieved the best performance with an F1 score of 0.71
  • The ensemble method demonstrated a robust balance between precision and recall
  • Transfer learning significantly reduced training time while maintaining competitive accuracy
  • Model generalized well to unseen printers and print runs held out during training

Media

Accuracy vs Epochs Curve
Accuracy vs Epochs Curve