## 5 Conclusions  
An image preprocessing method to be applied before the development of a detection algorithm for ship welding defects was developed by sequentially performing CLAHE, denoising, and thresholding of radiographic inspection images to increase the pixel intensity difference between the defect and background parts of the welding bead and to reveal the characteristics of the defect.  
First, a large contrast effect was revealed by contrasting each defect according to the region using CLAHE. The sharpness of the image was then improved by denoising the image. To remove pixel values other than the defect and background parts of the welding image, a threshold was set, and the images were processed accordingly. Next, the final preprocessed images were obtained by concatenating the thresholded image for a welding defect with a low pixel value, the image threshold-processed by reversing the pixel values for a welding defect with a high pixel value, and the raw image to grayscale so that the pixel values had three channels.  
The training mAP derived by training the YOLO algorithm with the images obtained through the preprocessing was 84.9%, whereas the training mAP derived by training the YOLO algorithm with the typical preprocessed image and raw image was 82.0%, 78.0%. Thus, the mAP of the model trained with the preprocessed image was 2.9% points higher than that of the typical preprocessed image learning model, and 6.9% points higher than that of the raw image learning model. Furthermore, the mAP for the test dataset of the preprocessed image learning model was 51.2%, whereas that for the test dataset of the typical preprocessed image learning model and for the test dataset of the raw image learning model was 43.5%, 40.8%, respectively. Thus, the mAP of the preprocessed image learning model was 7.7% points higher than that of the typical preprocessed image learning model, and 10.8% points higher than that of the raw image learning model.  
Object detection algorithm technology is evolving, and the mAP is improving by approximately 3-10% per year [27]. This study achieved a comparable performance improvement by only preprocessing with data, rather than through the development of an object detection algorithm.  
Figure 16: (**a**) PR curve for the training dataset of the preprocessed image, (**b**) PR curve for the test dataset of the preprocessed image, (**c**) PR curve for the training dataset of the typical preprocessed image, (**d**) PR curve for the test dataset of the typical preprocessed image, (**e**) PR curve for the training dataset of the raw image, and (**f**) PR curve for the test dataset of the raw image.  
Image preprocessing of welding defects is a time-consuming process. The denoising after CLAHE in the preprocessing step improved the sharpness by removing several noises, but small defects were removed in some cases because the details of the image were lost. If the time requirement of preprocessing can be reduced, it should facilitate the dataset building process for the welding defect detection algorithm.  
Conceptualization, G.-h.Y, S.-j.O. and S.-c.S.; Formal analysis, G.-h.Y.; Investigation, G.-h.Y. and S.-j.O.; Methodology, G.-h.Y., S.-j.O. and S.-c.S.; Project administration and S.-c.S.; Supervision and S.-c.S.; Validation, S.-j.O. and S.-c.S.; Writing--original draft, G.-h.Y.; Writing--review & editing, G.-h.Y. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
The authors declare no conflict of interest.