Science and engineering

Machine learning for in-situ monitoring during metal additive manufacturing

In metal additive manufacturing, machine learning analyses layer images, melt-pool cameras and acoustic or thermal signals to flag spreading defects, porosity risk and process drift while a part is being built, so operators can stop or adjust a build early.

How machine learning is used for in-situ monitoring in metal AM

Flagging anomalies in layer images

Cameras photograph each powder layer before and after melting, and segmentation models label anomalies such as recoater streaks, spatter or part distortion pixel by pixel. Operators get an alert while the build can still be paused or adjusted.

Real examplePeregrine layer-wise anomaly detection (Oak Ridge National Laboratory)ORNL researchers described a machine-agnostic algorithm for real-time, pixel-wise semantic segmentation of anomalies in powder bed additive manufacturing layer images.

Predicting porosity from thermal images

Thermal cameras record how each layer heats and cools, and models relate these signals to pores found later by X-ray CT. The goal is a porosity map built while the part is printing.

Real exampleThermoPore (2024)Used in-situ thermal images from laser powder bed fusion to predict pore counts with a convolutional neural network and to localise porosity with a video vision transformer.

Monitoring the melt pool

High-speed cameras watch the melt pool, whose size and shape show whether layers are fusing properly. Models map surface measurements to quantities that cannot be seen directly, such as melt pool depth.

Real exampleMelt pool depth from thermal images (Ogoke et al., 2024)Trained a hybrid CNN and transformer model to predict melt pool cross-section depth contours from two-colour surface thermal images, with the aim of detecting lack-of-fusion risk.

Linking machine data to defects

Machine logs such as laser commands and scan positions can be mapped onto the part geometry and related to defects found after the build. Interpretable models show which process signals matter most.

Real exampleLocalised defect detection from in-situ process data (Frontiers in Mechanical Engineering, 2021)Mapped temporal machine data onto the scan path and trained an XGBoost model to predict soot defects, using feature importance to relate process data to the defects.

Can you learn machine learning for additive manufacturing monitoring?

Yes. Engineers who know the additive manufacturing process can learn the machine learning they need: Python, image and signal handling, classical classifiers for imbalanced data, then convolutional networks for layer and thermal images. The hardest part is good labels, which come from CT scans and metallography that process experts understand.

  1. PythonRead layer images, thermal video and machine logs, and align them by layer and position.Learn it in Python
  2. Data handlingOrganise build data per layer and per part with pandas and NumPy arrays.Learn it in Data Tools
  3. Classical models for rare defectsDefects are rare, so learn precision, recall and class weighting with simple classifiers first.Learn it in Machine Learning
  4. Computer visionSegmentation and video models for layer images and melt pool footage.Learn it in Deep Learning
  5. Ground truth from CTRegister X-ray CT and metallography results to build coordinates so models learn from real defects.

Moving into machine learning for additive manufacturing

If you already work in the field

Additive manufacturing engineers understand process parameters, defect mechanisms and the machines, and they can produce labelled builds. Add Python and computer vision, then start with layer images from a machine you run and CT data from a few builds, and train a simple anomaly classifier. Machine makers, aerospace and medical device manufacturers and national laboratories work on this.

If you come from data science or ML

Machine learning engineers should learn how powder bed fusion works, the main defect types (lack of fusion, keyhole porosity, spatter and cracking) and what each sensor actually measures. Reading the open literature and working with a process engineer on real builds is the quickest route.

Roles that do this workAdditive manufacturing engineerProcess monitoring engineerManufacturing data scientistMachine vision engineer

Tools you will use

ToolWhat you use it for
OpenCVRegister, crop and filter layer and melt-pool images.
scikit-imageExtract texture, intensity and shape features from layer images.
PyTorchTrain convolutional networks and autoencoders on in-situ images.
scikit-learnClassify sensor-feature windows and build simple baselines.

Public data to practise on

  • NIST AM-Bench: Benchmark metal additive builds with in-situ process measurements and post-build characterisation for model validation.

Your first project

Download NIST AM-Bench in-situ data for one build, flag anomalous layers with an autoencoder on melt-pool or layer images, and compare it with a simple intensity-threshold rule using precision and recall against the published measurements.

Common questions

What is in-situ monitoring in additive manufacturing?

It is measurement during the build: cameras, photodiodes, thermal sensors and microphones that record each layer and the melt pool. The aim is to find defects while the part is being made rather than only afterwards.

Can machine learning detect porosity during printing?

Research shows models can estimate porosity risk from thermal and optical data, but accuracy varies and CT scanning is still used to confirm part quality. Results depend heavily on the machine, the material and the labels.

What sensors are used for melt pool monitoring?

Common choices are high-speed visible and infrared cameras, photodiodes, pyrometers and acoustic sensors. Many commercial machines include some of these, and research systems add more.

Why is labelled data hard to get in additive manufacturing?

Defects are small and rare, and confirming them needs X-ray CT or sectioning, which is slow and expensive. Labels must also be aligned to the exact layer and location where the sensor saw them.

Courses for these skills

New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.