## 3 Results  
The analysis of the results was conducted on three models, each trained with different training parameter settings to identify the most effective model for detecting defects in the powder spreading process preceding selective laser melting. The primary variable adjusted during training was the number of epochs, while other parameters remained constant. Each model underwent training for a different number of epochs. The first model was trained for 10 epochs (Figure 6). The second model was configured to train for 300 epochs, but the use of a patience parameter halted the training at 217 epochs due to the absence of significant improvement over 30 consecutive epochs (Figure 6b). The third model completed the full training process of 600 epochs without employing the patience parameter, allowing it to progress through all training stages (Figure 6c). Initially, the normalized confusion matrix generated during model training was examined. This matrix presents the percentages of objects correctly predicted according to their assigned labels, objects misclassified as background, and objects assigned incorrect labels. The model with the smallest number of epochs (10 epochs) showed the highest number of errors made during class prediction in the training process. Recoater vibration was predicted adequately, but images related to recoater streaking were recognized at 53%. Images containing super-elevation were predicted in accordance at 81%, an unsatisfactory result compared to the other models, as shown in Figure 6a. The model with 217 epochs successfully predicted images containing traces caused by recoater vibration. Images containing super-elevation were recognized at 93%, which is satisfactory. A decrease in performance was noted for images associated with recoater streaking, which were recognized at 62%, as shown in Figure 6b. The predictions shown were significantly more accurate compared to the model trained for 10 epochs. The model trained for 600 epochs exhibited results comparable to those of the model trained for 217 epochs. However, the accuracy of image predictions related to recoater failure was lower. Specifically, the model predicted the class of the recoater streaking with an accuracy of 44%, which is considered low given the number of epochs completed, as illustrated in Figure 6c. Next, the graphs of the location loss (box_loss) and classification loss (cls_loss) functions were analyzed. These graphs are crucial for evaluating the training process and determining the final outcomes. They provide insights into the model's fit and help identify the presence of underfitting or overfitting. Overfitting occurs when a model undergoes excessive training on the training data, leading it to memorize specific details and adjust weights to optimize performance on that data. This over-specialization reduces the model's ability to generalize, diminishing its effectiveness on new data, such as the test set or other unseen data. Figure 5: Validation data example: confusion matrix (**a**), overview for Fl-Curve, P-Curve, PR-Curve, R-Curve, general overview for images with defects. Underfitting happens when a model is too simplistic to capture the underlying complexity of the data. Underfitted models exhibit poor performance on both the training and test datasets. This condition can arise from an insufficient training duration, preventing the model from identifying relevant patterns in the data and adjusting weights appropriately to perform the task effectively. When analyzing the graphs of the location loss function, the presence of underfitting was found for a model that had been trained for 10 epochs. The underfitting was found based on the divergent values of the control points presented by the graphs (Figure 7a). The values of the loss function were significantly higher than for the other models, which was due to an insufficient number of training epochs.