YOLO-BP for detection of multi-scale and high intra-class variation electrode cap defects in resistance spot welding - Xiaomin Zhao; Siow Hoo Leong; Beng Yong Lee; Sofianita Mutalib; Bangchao Qiu; Meng Lyu; Zhijun Zuo (PLoS ONE, 2026)
Inspection of electrode cap surface conditions is crucial in resistance spot welding. Current solutions largely rely on manual inspection or sensor-based approaches, with limited exploration into vision-based approaches. This paper proposes a vision-based defect detection framework, YOLO-BP, for inspecting electrode cap tip surface defects, particularly the black burn mark defects that exhibit high variability in appearance. The key contribution is the incorporation of a new attention mechanism, BiLevel Spatial Selective Attention (BSSA), which synergistically integrates hierarchical and selective attentions within the YOLOv13 architecture. The hierarchical attention utilizes BiLevel Spatial Attention Module (BSAM) to strengthen extraction of global defect geometry when defects are spatially spread, and local defect irregularities when defects are small or dispersed. Meanwhile, the selective attention employs Partial Convolution (PConv) module to selectively detect defect-sensitive regions. To facilitate evaluation of defect detection, a new annotated Electrode Cap Tip Surface Defect (ECTSD) Dataset containing diverse electrode cap tip surface defects is constructed. The results show that YOLO-BP, achieves 66.5% mAP@0.5 and 31.3% mAP@0.5-0.95, corresponding to improvement of 2.9% and 2.1% respectively over the YOLOv13 baseline, along with gains of 1.7% in recall and 1.1% in F1-Score are observed, while maintains efficient inference time of 0.8 ms. Compared with YOLOv13 integrated with the Convolutional Block Attention Module (CBAM), YOLO-BP demonstrates a clear advantage in detecting the diverse defects, achieving 4.5% higher in mAP@0.5 and 8% higher in mAP@0.5-0.95. Furthermore, it attains the highest F1-Score of 67.7% when benchmarked against YOLOv5 through YOLOv12. The superiority of entire defect detection indicating the effectiveness of YOLO-BP in minimizing false negatives, underscoring its practical application in industrial inspection for defects.