In-Situ Melt Pool Characterization via Thermal Imaging for Defect Detection in Directed Energy Deposition Using Vision Transformers

Israt Zarin Era, Fan Zhou, Ahmed Shoyeb Raihan, Imtiaz Ahmed, Alan Abul-Haj, James E. Craig, Srinjoy Das, Zhichao Liu

Abstract

Directed Energy Deposition (DED) offers significant potential for manufacturing complex and multi-material parts. However, internal defects such as porosity and cracks can compromise mechanical properties and overall performance. This study focuses on in-situ monitoring and characterization of melt pools associated with porosity, aiming to improve defect detection and quality control in DED-printed parts. Traditional machine learning approaches for defect identification rely on extensive labeled datasets, often scarce and expensive to generate in real-world manufacturing. To address this, our framework employs self-supervised learning on unlabeled melt pool data using a Vision Transformer-based Masked Autoencoder (MAE) to produce highly representative embeddings. These fine-tuned embeddings are leveraged via transfer learning to train classifiers on a limited labeled dataset, enabling the effective identification of melt pool anomalies. Our framework achieves overall accuracy ranging from 95.44% to 99.17% and an average F1 score exceeding 80%, demonstrating the scalability and cost-effectiveness of our approach for automated quality control in DED.

The Challenge of Directed Energy Deposition

Directed Energy Deposition (DED) is a powerful additive manufacturing process used to build or repair high-value metal components. By using a laser to melt metal powder or wire as it is deposited, DED allows for the creation of complex geometries. However, the complex interaction between the energy source and the material often creates "melt pools" that can harbor internal defects like porosity (tiny gas bubbles) or cracks. If left undetected, these flaws compromise the structural integrity of the part.

Schematic of Coaxial nozzle powder feed DED and Off-axis wire feed DED processes.

The industry standard for finding these defects is "in-situ" monitoring—watching the melt pool with thermal cameras in real-time. The primary challenge lies in the "labeling bottleneck": training a machine learning model to recognize a defective melt pool typically requires thousands of labeled images. In manufacturing, obtaining these labels requires expensive X-ray Computed Tomography (XCT) on finished parts and painstakingly matching those 3D scans back to specific moments in the 2D thermal video.

Methodology: Self-Supervised Learning with Vision Transformers

To bypass the labeling bottleneck, this research introduces a self-supervised learning (SSL) framework. The approach follows a two-stage pipeline:

  1. Self-Supervised Pre-training: The researchers utilized a Masked Autoencoder (MAE) based on a Vision Transformer (ViT) architecture. During this phase, the model is shown thermal images of melt pools where 75% of the image is randomly masked. The model must reconstruct the missing pixels, forcing it to learn the underlying logic of melt pool shapes and temperature distributions using a large dataset of unlabeled images.
  2. Transfer Learning: Once the model understands the general characteristics of a melt pool, the encoder is "frozen" and a classification head is added. This model is then fine-tuned on a much smaller, labeled dataset to distinguish between "normal" and "porous" melt pools.

Vision Transformers process images as sequences of patches, allowing them to capture long-range spatial dependencies that traditional Convolutional Neural Networks (CNNs) might miss, which is crucial for identifying subtle thermal anomalies.

Experimental Setup and Datasets

The study utilized Inconel 718 samples to generate two distinct datasets:

  • Unlabeled Dataset: 7,812 thermal images used for initial self-supervised training.
  • Labeled Dataset: 1,447 images. Ground truth was established via 360° X-ray CT scans, identifying 76 "abnormal" (porous) melt pools and 1,371 "normal" ones.
In-situ thermal imaging capturing the melt pool area and temperature distribution during the DED process.

Key Results and Performance

The framework demonstrated exceptional performance across 6-fold cross-validation, achieving accuracies between 95.44% and 99.17%. Despite the extreme class imbalance (where only ~5% of the data contained defects), the model maintained an average F1 score above 80%.

Two specific architectures were compared: a standard ViT Classifier and an MAE Encoder combined with a Multi-Layer Perceptron (MLP). The ViT Classifier slightly outperformed the MAE-MLP combination, likely because its architecture is natively optimized for classification tasks. This study proves that a model pre-trained on general image reconstruction can be adapted to highly specific defect detection with minimal labeled data, making AI-driven quality control scalable for industrial applications.

Conclusion and Future Outlook

While the results are promising, deployment in high-speed factory environments will require further optimization. Future work may involve using Generative Adversarial Networks (GANs) to address class imbalance by creating synthetic defect images, or exploring more efficient attention mechanisms to reduce the computational cost of Vision Transformers for real-time monitoring.

Summary updated

Abstract

Directed Energy Deposition (DED) offers significant potential for manufacturing complex and multi-material parts. However, internal defects such as porosity and cracks can compromise mechanical properties and overall performance. This study focuses on in-situ monitoring and characterization of melt pools associated with porosity, aiming to improve defect detection and quality control in DED-printed parts. Traditional machine learning approaches for defect identification rely on extensive labeled datasets, often scarce and expensive to generate in real-world manufacturing. To address this, our framework employs self-supervised learning on unlabeled melt pool data using a Vision Transformer-based Masked Autoencoder (MAE) to produce highly representative embeddings. These fine-tuned embeddings are leveraged via transfer learning to train classifiers on a limited labeled dataset, enabling the effective identification of melt pool anomalies. We evaluate two classifiers: (1) a Vision Transformer (ViT) classifier utilizing the fine-tuned MAE Encoder's parameters and (2) the fine-tuned MAE Encoder combined with an MLP classifier head. Our framework achieves overall accuracy ranging from 95.44% to 99.17% and an average F1 score exceeding 80%, with the ViT Classifier slightly outperforming the MAE Encoder Classifier. This demonstrates the scalability and cost-effectiveness of our approach for automated quality control in DED, effectively detecting defects with minimal labeled data.
BibTeX
@article{era2025situ,
  author = {Israt Zarin Era and Fan Zhou and Ahmed Shoyeb Raihan and Imtiaz Ahmed and Alan Abul-Haj and James E. Craig and Srinjoy Das and Zhichao Liu},
  title = {{In-Situ Melt Pool Characterization via Thermal Imaging for Defect Detection in Directed Energy Deposition Using Vision Transformers}},
  journal = {Journal of Manufacturing Processes},
  year = {2025},
  doi = {10.1016/j.jmapro.2025.03.123},
}
Figure