Weld defects on steel structural members can significantly impact the members' quality. Therefore, it is essential to detect these defects. This study created a dataset by capturing images of weld defects using X‐ray nondestructive testing technology. Then, an enhanced You Only Look Once version 5 s (YOLOv5s) algorithm was developed by incorporating Coordinate Attention (CA) attention, replacing the original C3 with GhostC3, and replacing the original complete intersection over union (CIoU) with focal‐efficient intersection over union (EIoU). Experiments were conducted using the dataset. The results showed that the CA attention mechanism utilized in this study outperformed squeeze‐and‐excitation attention and other attention mechanisms in weld defect detection. The improvements made to other components also contributed to improved precision and speed. Compared to the single shot multibox detector, the You Only Look Once version 8 s (YOLOv8s) algorithm, and other algorithms, the enhanced YOLOv5s model achieved a detection speed of 24.56 frames per second and a mean average percentage of 96.72%, demonstrating the best overall performance. These results validate the reliability of the enhanced YOLOv5s algorithm for weld defect detection and its potential practical applications. © 2025 Institute of Electrical Engineers of Japan and Wiley Periodicals LLC.
Miao et al. (Wed,) studied this question.