## 5 Defect Detection Using ML Techniques and Sensors
### Vision Sensor
First, the CAE is used to process the meltpool images. Next, agglomerative clustering is performed to annotate the data, and then the control charting scheme is used to monitor the process stability and anomaly detection. Finally, Inconel 625 parts of 10 \(\times\) 10 \(\times\) 5 mm are built. The CAE results were compared to a neighboring-effect modeling method (NBEM), and an improvement in accuracy and precision and F1 score were noticed. The authors emphasize the capability of the CAE approach to obtain a set of intelligent features that can provide an in-depth description of meltpool data. Figure 21: Input images of meltpool at different frames for the ML model proposed by [PERSON] et al., (**a–d**) represent meltpool images captured at different laser power values [131]. Figure 16:0 The region of interest (ROI) of the meltpool, plume, and spatters extracted from the original image taken by [PERSON] et al. [130]. High-speed cameras are required to capture enough details to detect the meltpool plume and spatter and correlate it with process parameters. [PERSON] et al. (2018) proposed applying a DBN ML algorithm to detect the quality of parts using the plume and spatter signature of 304L stainless-steel parts. The model input was a series of meltpool images acquired during the printing process. Five melting states were tested: over-melted, middle over-melted, normal melted, middle under-melted, and under-melted. These conditions were obtained by changing the volumetric energy density fed to the powder bed. The authors demonstrated that the feature extraction step could be skipped, and minimal image processing can result in high classification accuracy (83.40%) when using DBN ML algorithms. However, they showed that complex image processing and time-consuming feature extraction did not improve classification accuracy when CNN models were used. A DBN was employed to predict the laser power value based on analyzing the meltpool images as an input to the model, as suggested by [PERSON] et al. (2018). The model objective was to classify and detect the defect formation during the printing of L-PBF. The monitoring of the meltpool was performed by reflecting the laser beam using a dichroic mirror and a galvanometer scanner. Seven specimens of 316L were produced at different laser power. The density of the parts was related to the sum of pixels intensity of the captured image. The authors compared two models; the first one, the ten hidden layers, and 360 nodes at all layers were used. In the second model, the number of layers and hidden nodes were varied (17,600 images for training + 2200 images for validation + 2200 images for test, resulting in a total of 22,000 images). The DBN with varying layers and nodes had a significantly higher accuracy rate. The authors suggest that a better classification can be obtained in higher laser power in general because the effect of blur images is not high. It was noted that the developed ML model works better as a classifier than a regression model. However, more input results and higher camera resolution are needed to enhance the classification results. Figure 16:1 Framework of proposed deep representation learning for anomaly detection methodology proposed by [PERSON] et al. (2018). Table 3 presents the ML algorithms used to integrate high-speed cameras with the L-PBF process for meltpool monitoring. It was observed that most experiments focused on analyzing laser tracks as the process signature. Installing the camera on-axis is a more complicated setup. However, it allows monitoring the meltpool as it moves from one position to the other. Although installing the camera off-axis is easier, image processing such as correction and identifying the region of interest is required. Therefore, it is expected that using an on-axis camera with a supervised learning approach such as CNN might result in the highest classification accuracy when monitoring the meltpool of the L-PBF process.