CAEFRER-YOLO11: An Adaptive Feature Refinement-Based Hybrid Model and Dataset for Weld Defect Detection
Adem Dilbaz, Ilker Ali OzkanWeld quality inspection is essential for ensuring structural integrity, product reliability, and manufacturing safety in industrial applications. However, conventional visual inspection methods can be time-consuming, operator-dependent, and prone to overlooking subtle weld defects. YOLO11-based detectors employ feature extraction and aggregation mechanisms that may be insufficient to reliably distinguish informative from ambiguous feature responses under challenging industrial imaging conditions, making the localization of small and subtle weld defects difficult. This study proposes the CAEFRER (Context-Aware Enhanced Feature Refinement Encoder with Re-parameterization) framework for weld defect detection and employs post hoc explainability analysis to investigate whether model predictions correspond to defect-relevant regions. The proposed CAEFRER-YOLO11 introduces an adaptive feature map refinement strategy that integrates feature regeneration and re-parameterization within a hybrid architecture. The proposed Hybrid Weld Defect (HWD) dataset comprises approximately 3500 images of ST37 steel, Hardox 450 steel, and aluminum welds produced using metal active gas (MAG), metal inert gas (MIG) and submerged arc welding (SAW) processes. Experiments were conducted on the HWD and the Weld Defect Detection (WDD) datasets using YOLO- and DETR-based architectures. On the HWD dataset, the proposed model incorporating the CAEFRER framework achieved improved performance, with mAP50–95 gains of up to 2.09 percentage points (pp) over the baseline YOLO11-L and 0.75 pp over RT-DETR-L. Furthermore, Eigen-CAM-based activation map analysis demonstrated that CAEFRER-YOLO11 trained on the proposed dataset focused more accurately on the actual weld defect regions. Overall, the proposed CAEFRER framework and HWD dataset contribute to improved weld defect detection performance and enable more reliable explainability by generating activation maps that are better aligned with the true defect regions.