Weld defect detection based on improved YOLOv8n
- 24 March 2026
- journal article
- research article
- Published by SAGE Publications in Journal of X-Ray Science and Technology
- Vol. 34 (3) , 225-240
Abstract
Background: Industrial weld defect detection is challenged by the minimal grayscale contrast between defects and the background, as well as by blurred defect edges, which together hinder the performance of detection algorithms. Moreover, practical industrial environments require high detection accuracy, fast inference speed, and flexible deployment. Objective: To address these challenges, this study proposes an improved YOLOv8n defect detection method that enables more accurate, faster, and lightweight automated weld defect detection. Methods: The key improvements are as follows. First, in the backbone, the original C2f module is replaced by the C2f_OREPA feature extraction module, constructed with the Online Convolution Parameterization Approach (OREPA), which reduces computational complexity and enhances feature representation. Second, a downsampling module, DCDConv, is introduced to replace the conventional convolution after the first standard convolution layer, allowing better preservation of fine defect features and improving the detection of subtle defects. Additionally, in the neck, a cross-scale feature fusion module (CCFM) is incorporated to improve detection performance across defects of different scales. Results: Experiments on our self-constructed dataset comprising eight weld defect categories show that the improved model achieves a mean average precision (mAP) of 87.6%, a 4.5% increase over the original YOLOv8n. Meanwhile, the model reduces the number of parameters by 26.9%, decreases computational cost by 35.7%, and achieves an inference speed of 103 frames per second (FPS). On the public NEU-DET dataset, the improved model obtains an mAP of 82.8%, outperforming the original YOLOv8n by 6.7%. Overall, the proposed model surpasses mainstream object detection frameworks, including YOLOv8n, YOLOv12n, Faster R-CNN, and RetinaNet. Conclusion: In summary, the proposed method provides an accurate, efficient, and deployment-friendly solution for weld defect detection in industrial applications, demonstrating substantial practical value.Keywords
Funding Information
- Natural Science Foundation of Shanxi Province (202303021211148)
This publication has 22 references indexed in Scilit:
- CBI-YOLO: a lightweight weld detection and evaluation scheme for metal roofs in terminal buildingsEngineering Research Express, 2025
- GMVG-Net: lightweight mul tiscale feature fusion network for welding defect detectionSignal, Image and Video Processing, 2025
- Zoom in on the target network for the prediction of defective images and welding defects' locationNDT & E International, 2024
- Advanced Faster-RCNN Model for Automated Recognition and Detection of Weld Defects on Limited X-Ray Image DatasetJournal of Nondestructive Evaluation, 2023
- Context and scale-aware YOLO for welding defect detectionNDT & E International, 2023
- An efficient lightweight convolutional neural network for industrial surface defect detectionArtificial Intelligence Review, 2023
- Binary classification of welding defect based on deep learningScience and Technology of Welding and Joining, 2022
- Online Convolutional Reparameterization2022
- Intelligent Welding Defect Detection Model on Improved R-CNNIETE Journal of Research, 2022
- Deep Learning Based Steel Pipe Weld Defect DetectionApplied Artificial Intelligence, 2021