## 4 Conclusions  
This study demonstrated the significant potential of utilizing the YOLO (You Only Look Once) library for defect detection in powder bed fusion (PBF) 3D printing. The research began with the printing process, during which images were captured to identify and highlight various defects. These defects were categorized into three primary types: recoater vibration, super-elevation, and recoater streaking. The defective regions in the images were then annotated and assigned corresponding labels. Following this, the dataset was divided into training, validation, and test subsets, and data augmentation techniques were applied to expand the training dataset, enhancing the performance of the machine learning model. Finally, code was developed to automate the retrieval of the prepared training dataset, facilitating the subsequent steps in the machine learning pipeline. In the subsequent phase, an appropriate machine learning model was selected, and the training process was executed. Key tasks included integrating the Google Colaboratory environment for model training; downloading the necessary libraries (YOLO) and prepared training dataset; configuring the relevant parameters and file paths for the training process; validating the training outcomes; conducting evaluations using the test set; and ultimately saving the results of training, validation, and model predictions to the local system. Following the training, a comparative analysis was performed on three models trained with different configurations. This analysis involved comparing confusion matrices, examining graphs of the localization and classification loss functions, and evaluating images from the test set that were subjected to the prediction process. Based on this analysis, the most effective model was identified and selected for further implementation in the project. Based on the analysis and observations from the model development process, the following conclusions were drawn:  
* Increasing the size of the training dataset enhances the algorithm's efficiency and its ability to detect patterns in specific data. * Insufficient training epochs can lead to underfitting, where the model fails to adequately perform the assigned task due to inadequate learning. * By monitoring the training process, it is possible to identify the point at which the model's performance plateaus, beyond which continued training results in diminishing returns. Recognizing this point is crucial for the optimal allocation of computational resources. In this particular case, performance improvements ceased after 217 epochs, indicating that further training was unnecessary. * The model consistently achieved satisfactory results, with accuracy ranging from approximately 90% to 95%. However, the confusion matrix revealed that the model exhibited the lowest confidence in predicting defects related to recoater damage. This issue may stem from the variability in the appearance of recoater damage, which made it challenging for the model to discern clear patterns and relationships. The described limitations of the developed system will be the subject of detailed improvements in the near future. A extended training dataset will be generated that will include defects resulting from recoater streaking. * Based on the conducted research and obtained results, there is potential to increase the efficiency of defect detection, particularly for recoater streaking. In the next iteration, the plan is to develop an algorithm using a larger dataset, which will be the focus of further work. To sum up, currently, the powder bed is not directly monitored, and the focused is laid on checking the powder parameters before the process. The proposed algorithm provides the possibility to supervise the process and later relate the occurring defects to the course of the process, which is particularly important in the case of powders with low flowability.