## 5 Defect Detection Using ML Techniques and Sensors
### Temperature Sensors
In addition, some approaches, such as the approximate nearest neighbor and conservative redundancy removals, were applied to speed up the computation time. One limitation of using single-wavelength pyrometers lies in the variation in the emissivity (ability to emit infrared radiation) [135]. The term emissivity is used to describe the radiation efficiency of a target compared to a blackbody at the same wavelength, angle, and temperature. A more reliable method is two-wavelength pyrometers [136], which results in less noise and higher accuracy. Therefore, [PERSON] et al. [137] proposed using a two-wavelength pyrometer in an off-axis setup for layerwise anomaly detection during the L-PBF process. Then, a screening step was used to reduce the amount of data and focus on the region of interest where anomalies are expected. The novelty of this approach is that a Gaussian process model is used to account for the spatial dependence of the region of interests. Then, four classifiers were used to classify the anomalies in each layer: logistic regression, K-NN, support vector machines, and random forests. The logistic regression model resulted in the highest accuracy, around 96%. [PERSON] et al. [138] investigated the relationship between the online thermal signature and intentional cavities in a body manufactured by the L-PBF process. The main objective of using ML models was to predict defect occurrence in the printed parts. An unsupervised ML model (k-d tree) was used to predict outliers in the meltpool conditions identified by the pyrometer. The pyrometer used in this study can generate images. Metrics of the meltpool size, shape, and orientation were estimated from the pyrometer images. Then, information from the heat-affected zone was used to create the thermal history per layer, and vertical volume slices were created. Finally, spatially registration was used to correlate the pyrometer and microCT data, as shown by Figure 24. The pyrometer resolution was  
Figure 23: Different clusters represented in different shapes achieved by [PERSON] et al. [133]. less than the microCT because of the relatively low sampling rate and the fast nature of the L-PBF. Moreover, the meltpool information obtained from pyrometers was used to classify their behavior as an anomaly or normal. A higher detection rate of pores was found in outlier meltpool images, demonstrating the approach's effectiveness. Although this technique offers a good solution for in situ monitoring, a concern about the response time for control is raised. An infrared camera was employed by [PERSON] et al. [139] to investigate the use of CNN to predict defects in the powder bed layers of the L-PBF process. The images were taken after sintering four different geometric features at different sizes and represented defects. Their research aimed to investigate the accuracy of the CNN to detect different geometric at different sizes. Their accuracy was limited to 61% due to the insufficient number of layers used. In addition, they suggest the use of a higher-resolution camera to enhance the accuracy. [PERSON] et al. [105] also used an off-axis infrared camera image as a source for the deep learning-based neural network. The main aim of their work was to detect defects such as delamination and spatter. The authors used deep CNN to architecture for the ML model; the accuracy of detecting delamination and splatter was around 96%. However, detecting cracks, balling, pores, and unfused powder might be harder to detect using the same ML model. Table 4 summarizes most articles that used ML models with temperature sensors for in situ monitoring of the L-PBF processes. The signature being monitored here is either the meltpool temperature or the temperature of the scanned layer. Comparable accuracies can be obtained by using pyrometers and infrared cameras; however, it must be kept in mind that the use of photodiode is less expensive.