## 5 Defect Detection Using ML Techniques and Sensors
### Temperature Sensors  
The most common temperature sensors used for L-PBF process monitoring reported in the literature are photodiodes, pyrometers, and infrared cameras. The use of three photodiodes and ML algorithms were employed by [PERSON] et al. (2013) to investigate the feasibility of predicting the density of parts manufactured using the L-PBF process. The ML model used the input from photodiodes which detected radiations from the meltpool while printing. The authors used singular value decomposition (SVD) to extract the essential features from the large dataset collected by the photodiode. An unsupervised approach (K-means and Gaussian mixture model) and a supervised approach (Gaussian process) were compared to predict the build density of the manufactured parts. An accuracy as high as 93% was achieved using K-means and GMM. The density could be predicted with a relatively low root mean square (RMS) error of 3.65% using the Gaussian process, as illustrated by Figure 23. The high accuracy of their developed model was attributed to the high sample rate of the photodiodes. Moreover, as these sensors are more cost-efficient than cameras, this approach offers a feasible methodology integrated with commercial L-PBF processes. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Camera Location** & **Specifications** & **Material** & **Part Geometry** & **ML Algorithm** & **Accuracy \%** & **Objective** & **Ref** \\ \hline Off-axis & 6.35 mm \(\times\) 6.35 mm & & Laser tracks (supported and unsupported) & BoW (unsupervised) & NA & Detect keyholing porosity and balling instability & [101] \\ \hline Off-axis & 250 \(\mu\)m/pixel & & & & & & \\ outside chamber & 1000 fps & & & & & & \\ \hline Off-axis & 250 \(\mu\)m/pixel & & & & & & \\ outside chamber & 1000 fps & & & & & & \\ \hline Off-axis & 12 \(\times\) 5 mm & & & & & \\ outside chamber & 2000 fps & & & & & \\ \hline Coaxial & 14 \(\mu\)m/pixel & & & & & \\ Outside & 256 \(\times\) 256 mm & & & & & \\ chamber/above & 14 kHz frame rate & & & & & \\ \hline Coaxial & 12-50 frames & & & & & \\ \hline Coaxial & 128 \(\times\) 120 mm & & & & & & \\ Outside & 2.5 kHz & & & & & \\ chamber/above & & & & & & \\ \hline Off-axis & 1 Megapixel & & & & & \\ Outside & 1024 \(\times\) 1024 pixels & 304 L & Laser tracks & & & & \\ chamber/side & 5000 fps & & & & & \\ \hline Coaxial & 1.3 M & & & & & \\ Outside & 512 \(\times\) 512 mm & 316L & & & & & \\ chamber/above & 2.5 kHz & & & & & \\ \hline \hline \end{tabular}  
* BoW: bag of words; LR: linear regression; PCA: principal component analysis; SVM: support vector machines; CNN: convolution neural network; NBEM: naive Bayes; DL-CAE: deep learning; DBN: deep believe neural networks, MLP: multilayer perceptron.  
\end{table} 
Table 3: Machine learning application of in situ monitoring of L-PBF processes meltpool using high-speed cameras. Features extraction on pyrometer data was investigated by [PERSON] et al. [134]. A pyrometer was used to link the optical signal collected during the L-PBF process with the manufactured part's density. The pyrometer was installed coaxial to the laser, and the authors compared it to ML models to classify parts printed at different density levels. First, the authors extracted the features from the collected data, and SVM and MLP classifiers were then used. The second approach, a deep learning model with a 1D-CNN, was used to eliminate the need for feature extraction. The results have shown that the feature extraction before classification improves accuracy, around 90% compared to 80%. The authors also highlighted that the statistical feature extraction approach is a fast response method and will not affect the classification time. On the other hand, [PERSON] et al. [100] found that cleaning the pyrometer data did not impact their accuracy results. Parts with intentional defects were printed, and two pyrometers were installed off-axis to collect temperature data of each scan vector per layer per part. A classification accuracy between 92-94% was achieved using K-nearest neighboring model.