High-Precision Welding Defect Detection Practice: An Innovative YOLOv12 Model with Pinwheel Convolution and Adaptive Attention
Contributors
Md Helal Miah
Shashi Kant Gupta
Keywords
Proceeding
Track
Engineering, Sciences, Mathematics & Computations
License
Copyright (c) 2026 Sustainable Global Societies Initiative

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Abstract
This research introduces an innovative approach to enhance the accuracy and speed of weld defect detection by integrating attention mechanisms and Pinwheel-Shaped Convolution (PConv) into the YOLOv12 framework. Addressing the limitations of traditional CNNs and transformer-based models, which often struggle with either missing subtle defects or incurring high computational costs, this study achieves precise, real-time detection, outperforming existing solutions in complex industrial environments. A systematic methodology was adopted to train and validate the proposed model on four benchmark datasets, employing diverse data augmentation techniques such as Mosaic, Mixup, and Copy-Paste to improve generalization. Quantitative performance evaluation was conducted using established metrics, including recall, F1-score, and mean Average Precision (mAP), enabling rigorous comparison with baseline YOLO models and attention-based architectures under realistic industrial inspection conditions. The innovative PConv based YOLOv12 model demonstrated outstanding performance in weld defect detection. It achieved an F1-score of 0.941 and mAP@0.5 of 0.989 in single-class detection, and an F1-score of 0.848 with 0.887 recall in multi-class detection. Mosaic augmentation boosted mAP@0.5:0.95 to 0.854, enhancing generalization. The model converged rapidly, reaching mAP@0.5 of 0.905 in just 10 epochs and stabilizing near 0.996, proving its robustness and suitability for industrial real-time applications.