Skip to content

aman-17/3dprinting-extrusion-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Printing Extrusion Detection using Multi-Head Attention Model

This project focuses on developing a deep learning model using a Multi-Head Attention architecture to detect extrusion defects in 3D printing processes. The goal is to identify and classify anomalies in the extrusion patterns, which can help improve the quality and reliability of 3D printed objects. In 3D printing, extrusion defects can occur during the process, leading to structural weaknesses, inaccuracies, or failures in the printed objects. This project aims to develop a deep learning model to detect and classify these defects using a Multi-Head Attention architecture. The Multi-Head Attention model can capture complex patterns and dependencies in the extrusion patterns by attending to different parts of the input sequence simultaneously. By training the model on a labeled dataset of normal and defective extrusion patterns, it can learn to identify and classify anomalies in real-time.

Technologies Used

  • Python
  • PyTorch
  • Keras
  • NumPy
  • OpenCV

Dataset

A labeled dataset of 3D printing extrusion patterns is required for training the model. This dataset should include samples of both normal and defective extrusions. Each sample should be accompanied by its corresponding label, indicating whether it is normal or defective.

It's essential to ensure that the dataset is diverse, containing various types of defects and normal patterns to enable the model to generalize well to unseen data.

Model Architecture

The model architecture consists of a Multi-Head Attention mechanism combined with Convolutional Neural Networks (CNNs) to capture both spatial and temporal information from the extrusion patterns. The attention mechanism allows the model to focus on relevant parts of the input sequence, enhancing its ability to detect anomalies.

The Multi-Head Attention model comprises multiple attention heads, each attending to different parts of the input sequence simultaneously. This enables the model to capture different aspects and dependencies within the extrusion patterns effectively.

Training

The training process involves the following steps:

  • Preprocess the dataset: Convert the extrusion patterns into appropriate numerical representations and split the dataset into training and validation sets.
  • Define the Multi-Head Attention model: Configure the model architecture with attention layers, convolutional layers, and other necessary components.
  • Compile the model: Specify the loss function, optimizer, and evaluation metrics for training the model.
  • Train the model: Fit the model to the training data, optimizing its parameters using backpropagation and gradient descent. Monitor the validation metrics to assess the model's performance.
  • Evaluate the model: Measure the model's performance on the validation set, including metrics such as accuracy, precision, recall, and F1 score.
  • Fine-tune the model: Iterate on the model architecture, hyperparameters, or data preprocessing techniques to improve its performance. Experiment with different configurations to enhance accuracy and minimize false positives or false negatives.
  • Save the trained model: Once satisfied with the model's performance, save its parameters to be used for inference in the detection application.

Usage

To use the trained model for extrusion detection, follow these steps:

Load the trained model parameters into memory. Preprocess the input extrusion pattern to match the model's required input format. This may involve converting it into a numerical representation and resizing if necessary. Feed the preprocessed input to the loaded model. Retrieve the model's prediction.

Releases

No releases published

Packages

No packages published

Languages