A Welding Defect Detection Algorithm Based on Deep Learning
A Welding Defect Detection Algorithm Based on Deep Learning
Science (IJAERS)
Peer-Reviewed Journal
ISSN: 2349-6495(P) | 2456-1908(O)
Vol-12, Issue-2; Feb, 2025
Journal Home Page Available: https://ijaers.com/
Article DOI: https://dx.doi.org/10.22161/ijaers.122.4
Received: 03 Jan 2025, Abstract— In order to meet the needs of process inspection technology
Received in revised form: 08 Feb 2025, for industrial equipment, image recognition technology based on deep
learning has shown great potential in the field of welding defects. In
Accepted: 13 Feb 2025
this paper, an improved YOLOv8 algorithm is proposed to improve the
Available online: 22 Feb 2025 welding defect identification ability of the workpiece. Through
©2025 The Author(s). Published by AI experimental verification on selected data sets in kaggle, this study
Publication. This is an open-access article evaluates the detection performance of YOLOv8 improved algorithm
under the CC BY license that integrates SCConv in C2f module at Backbone level. The
(https://creativecommons.org/licenses/by/4.0/). experimental results show that the improved YOLOv8 has improved the
accuracy of welding defect detection compared with the traditional
Keywords— Deep learning, SCConv, Weld
version, and has certain application potential.
defect, YOLOv8
www.ijaers.com Page | 31
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
algorithm is used to indicate the existence and location of II. INTRODUCTION TO EXPERIMENTAL
these defects. MODEL
With the continuous development of deep learning YOLOv8 is a new generation of object detection
technology, many researchers begin to use deep learning algorithm introduced by ultralytics for real-time object
technology for non-destructive testing of welding defects, detection. Based on the previous YOLO version, YOLOv8
especially in computer vision and algorithms. For introduced new features and optimizations, including a
example, (H [5], Bing Zhu [6], Yang [7], R [8]) and others more complex network architecture, a more optimized
use relevant neural network models to detect welding training flow, and a more powerful feature extraction
images after X-ray processing. Liu et al. proposed an capability [19].
improved and optimized fast multipath vision transformer Its general architecture is composed of Backbone
(FMPVIT) framework for welding defect detection and (backbone network), Neck (neck network) and Head (head
identification [9], Li [10] et al. designed a welding defect network), and its network structure is shown in Figure 1:
detection method based on cross-layer feature fusion, and
used an irregular long weld extraction algorithm based on
drift gauss to improve efficiency and accuracy. Oh et al,
[11] proposed a FAST R-CNN automatic detection method
for welding defects based on deep learning. In 2016,
Joseph Redmon et al. proposed a one-stage object
detection network [12], which has the advantage of fast
detection speed and can process about 45 frames of images
per second. The author named it You Only Look Once,
Therefore, the first generation of YOLO algorithm was
born [13]. The core idea of YOLO algorithm is to
transform the object detection task into a regression
problem, and use convolutional neural network to infer
images directly to achieve real-time object detection. Now
YOLO series algorithms have been updated for many
generations and are widely used in the field of target
detection. For object surface defect detection, Hatab [14]
et al proposed a steel surface defect detection system based
on YOLO algorithm, and Zhao [15] et al proposed a model
named LDD-YOLO based on YOLOv5 for steel surface
defect detection. M [16] et al. designed a YOLO-HMC
network, which realized more accurate and efficient
identification of micro-sized PCB board defects with fewer
model parameters. Gao [17] et al. improved the YOLOv5
algorithm. RepVGG module, NAM and lightweight Fig.1: YOLOv8 network structure diagram
uncoupled head RD-Head are introduced to improve the
detection performance of the algorithm and are applied to
Backbone is responsible for feature extraction. It
weld feature detection. While Light-YOLO-Welding, a
adopts a series of convolutional and deconvolution layers
new type of lightweight detector based on improved
to extract feature information of different levels from input
YOLOv4 developed by L [18] et al., is used to detect weld
images. Using ResNet' s idea for reference, Backbone uses
feature points. In this study, we proposed an improved
residual connections to reduce the size of the network,
YOLOv8 welding defect detection algorithm based on
reduce the computational complexity and the number of
YOLOv8 target detection algorithm. The experimental
parameters, and improve the running speed and efficiency
results show that the detection accuracy of the improved
of the model [20]. In this part, the C2f module is adopted
algorithm is improved, and the performance of various
as the basic constituent unit, and new structures and
indexes is good.
improved technologies are introduced, such as Depthwise
Separable Convolution and DilatedConvolution, etc., to
further optimize the capability of feature extraction and
make the extracted features more representative and
differentiated. So the target detection task can be carried
www.ijaers.com Page | 32
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
out better. Compared with C3 module of YOLOv5, C2f detection ability of the model for objects of different sizes
module has fewer parameters and better feature extraction and shapes [23]. At the same time of feature fusion, the
capability. It is the foundation and key component of the Neck network can further process and fuse the splicing
whole model, which provides strong support for the features through modules and structures such as
subsequent Neck and Head network parts, and jointly convolutional layer and residual connection, and extract
realizes the efficient and accurate target detection task. more representative feature information, so that the model
Through multi-scale feature fusion, SPPF module in can identify and locate the target more accurately and
YOLOv8 pooled, splicing and fused feature maps of improve the accuracy of target detection [24]. Hierarchical
different scales, effectively expanded the sensitivity field feature selection and fusion mechanisms are also
and extracted rich information. By optimizing the introduced, such as the application of the latest lightweight
algorithm, the computational load was reduced, the neck network structures such as HS-FPN, which further
accuracy was improved by using large kernel convolution, reduces the number of model parameters and
and the detection ability of targets of different sizes was computational complexity, while improving the model
enhanced, thus improving the performance and robustness performance.
of the model. Compared with YOLOv5 and YOLOv6, YOLOv8
removes the convolutional layer structure in the up-
sampling stage of PAN-FPN and directly feeds the features
output in different stages of Backbone into the up-
sampling operation. The C3 module and RepBlock were
also replaced with the C2f module [25]. The number of
parameters and computational complexity of the model are
reduced, and the computational efficiency is improved.
Fig.2: Comparison between SPP module and SPPF
module
www.ijaers.com Page | 33
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
www.ijaers.com Page | 34
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
www.ijaers.com Page | 35
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
4.2 Experiment and result analysis Table 1: Comparison of relevant experimental data
To verify the improved performance of YOLOV8
Arithmetic Precision ratio Recall rate Map
model, Precision, Recall, Average Precision (AP, Average
Precision) and average precision (mAP, average precision)
YOLOv8 0.398 0.392 0.212
were selected in this experiment. mean Average Precision)
as a key evaluation indicator. Among them, the accuracy YOLOv8(
rate directly reflects the correct proportion of the model 0.627 0.5 0.471
SCConv)
prediction, which is a direct reflection of the overall
accuracy. The recall rate focuses on the sensitivity of the
model to positive instances and reveals the ability of the V. CONCLUSION
model to capture the target. By synthesizing the accuracy
In this experiment, we carried out the operation in strict
of different recall rates, the performance of the model
accordance with the standard process. A suitable model
under various thresholds was evaluated. The mean average
environment is built to ensure the accuracy and stability of
accuracy provides a uniform standard for measuring the
each parameter and configuration. All the required data
average performance of the model across all categories,
sets are obtained legally from the Internet, and the data
thus more fully reflecting the overall effect of the model.
sets are from reliable and authoritative sources. When
Although these four indicators have different focuses, they
constructing relevant data sets, in order to reflect the
are interrelated and provide strong support for the
diversity and representativeness of data, we selected
optimization of the model and the improvement of the
experimental data sets with a large number of references,
prediction accuracy.
which could almost fully reflect various situations in
practical application scenarios, and then trained the
YOLOv8 detection algorithm after the introduction of
SCConv based on these data sets. After data training, we
evaluate the performance of the model. The results show
that the precision of YOLOv8 detection algorithm after the
introduction of SCConv reaches 0.627, which is indeed
improved to a certain extent compared with the accuracy
of 0.398 before the improvement, indicating that the
introduction of SCConv can optimize the detection ability
of the algorithm to a certain extent. However, although we
used a large number of experimental data sets in data
selection, the actual experimental results show that the
improved algorithm does not perform well in welding trace
Fig.9: Feedback curve of the improved Precision-
detection. This may mean that there are still some
confidence curve
problems in data processing and data selection that have
not been discovered or solved. In view of this situation, in
the following research, we will focus on the two
perspectives of data processing and data selection, in-depth
analysis of possible problems, and explore corresponding
optimization strategies to further improve the performance
of the algorithm in welding trace detection, so that it can
better meet the needs of practical applications.
ACKNOWLEDGEMENTS
This work described in this paper was supported by
The Research Funding Of GDUPT, Lagrangian Coherent
Structure Analysis of Heat Sink for Heat Transfer
Fig.10: Precision-confidence curve Feedback curve before
Performance with Piezoelectric Fan, Guangdong Science
improvement
and Technology Program, (Project No.
2024A0505050022), and the Research Funding of
www.ijaers.com Page | 36
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
GDUPT, Horizon Patrol - Machine Inspection Expert 2020 Intelligent Systems Conference (IntelliSys) Volume
Driven by YOLOV8 Engine (No. 71013513124014). 1 (pp. 505-515). Springer International Publishing.
[15] Zhao, C., Shu, X., Yan, X., Zuo, X., & Zhu, F. (2023).
RDD-YOLO: A modified YOLO for detection of steel
REFERENCES surface defects. Measurement, 214, 112776.
[16] Yuan, M., Zhou, Y., Ren, X., Zhi, H., Zhang, J., & Chen,
[1] Pan, K., Hu, H., & Gu, P. (2023). Wd-yolo: A more
H. (2024). YOLO-HMC: An improved method for PCB
accurate yolo for defect detection in weld x-ray
surface defect detection. IEEE Transactions on
images. Sensors, 23(21), 8677.
Instrumentation and Measurement.
[2] Yang, L., Fan, J., Huo, B., & Liu, Y. (2021). Inspection of
[17] Gao, A., Fan, Z., Li, A., Le, Q., Wu, D., & Du, F. (2023).
welding defect based on multi-feature fusion and a
YOLO-Weld: A Modified YOLOv5-Based Weld Feature
convolutional network. Journal of Nondestructive
Detection Network for Extreme Weld
Evaluation, 40, 1-11.
Noise. Sensors, 23(12), 5640.
[3] Zhang, R., Liu, D., Bai, Q., Fu, L., Hu, J., & Song, J.
[18] Song, L., Kang, J., Zhang, Q., & Wang, S. (2023). A weld
(2024). Research on X-ray weld seam defect detection and
feature points detection method based on improved YOLO
size measurement method based on neural network self-
for welding robots in strong noise environment. Signal,
optimization. Engineering Applications of Artificial
Image and Video Processing, 17(5), 1801-1809.
Intelligence, 133, 108045.
[19] Shang, L., Chang, Y., Chen, Y., Yu, L., Zeng, Z., & Chen,
[4] Li, L., Ren, J., Wang, P., Lü, Z., Di, R., Li, X., ... & Zhao,
J. (2024, October). Research on YOLOv8 Detection
X. (2023). Defect detection method for high-resolution
Algorithm Based on SKAttention Fusion. In 2024 5th
weld based on wandering Gaussian and multi-feature
International Conference on Machine Learning and
enhancement fusion. Mechanical Systems and Signal
Computer Application (ICMLCA) (pp. 571-574). IEEE.
Processing, 199, 110484.
[20] Liu, L. J., Zhang, Y., & Karimi, H. R. (2024). Resilient
[5] Droubi, M. G., Faisal, N. H., Orr, F., Steel, J. A., & El-
machine learning for steel surface defect detection based on
Shaib, M. (2017). Acoustic emission method for defect
lightweight convolution. The International Journal of
detection and identification in carbon steel welded
Advanced Manufacturing Technology, 134(9), 4639-4650.
joints. Journal of constructional steel research, 134, 28-37.
[21] Trinh, D. C., Mac, A. T., Dang, K. G., Nguyen, H. T.,
[6] Cheng, Y., Bai, L., Yang, F., Chen, Y., Jiang, S., & Yin, C.
Nguyen, H. T., & Bui, T. D. (2024). Alpha-EIOU-
(2016). Stainless steel weld defect detection using pulsed
YOLOv8: an improved algorithm for rice leaf disease
inductive thermography. IEEE Transactions on Applied
detection. AgriEngineering, 6(1), 302-317.
Superconductivity, 26(7), 1-4.
[22] Ren, J., Zhang, H., & Yue, M. (2025). YOLOv8-WD: Deep
[7] Bebiano, D., & Alfaro, S. C. (2009). A weld defects
Learning-Based Detection of Defects in Automotive Brake
detection system based on a spectrometer. Sensors, 9(4),
Joint Laser Welds. Applied Sciences, 15(3), 1184.
2851-2861.
[23] Hua, G., Zhang, H., Huang, C., Pan, M., Yan, J., & Zhao,
[8] Zhang, H., Chen, Z., Zhang, C., Xi, J., & Le, X. (2019,
H. (2024). An enhanced YOLOv8‐based bolt detection
August). Weld defect detection based on deep learning
algorithm for transmission line. IET Generation,
method. In 2019 IEEE 15th international conference on
Transmission & Distribution, 18(24), 4065-4077.
automation science and engineering (CASE) (pp. 1574-
[24] Lu, J., Lee, S. H., Kim, I. W., Kim, W. J., & Lee, M. S.
1579). IEEE.
(2023). Small foreign object detection in automated sugar
[9] Zhu, B., Wang, Z., Ma, Y., Gao, W., & Wang, S. (2024).
dispensing processes based on lightweight deep learning
Welding defects extraction method by fusing saliency
networks. Electronics, 12(22), 4621.
information of mid-level and underlying level
[25] Li, Z., Luo, S., Xiang, J., Chen, Y., & Luo, Q. (2024).
images. Heliyon, 10(20).
Improved Chinese Giant Salamander Parental Care
[10] Liu, Y., Yuan, K., Li, T., & Li, S. (2023). NDT Method for
Behavior Detection Based on YOLOv8. Animals, 14(14),
Weld Defects Based on FMPVit Transformer Model. IEEE
2089.
Access, 11, 61390-61400.
[26] Jiang, T., Du, X., Zhang, N., Sun, X., Li, X., Tian, S., &
[11] Oh, S. J., Jung, M. J., Lim, C., & Shin, S. C. (2020).
Liang, Q. (2024). YOLOv8-GO: A Lightweight Model for
Automatic detection of welding defects using faster R-
Prompt Detection of Foliar Maize Diseases. Applied
CNN. Applied Sciences, 10(23), 8629.
Sciences, 14(21), 10004.
[12] Redmon, J. (2016). You only look once: Unified, real-time
[27] Yao, L., Zhao, B., Wang, X., Mei, S., & Chi, Y. (2024). A
object detection. In Proceedings of the IEEE conference on
Detection Algorithm for Surface Defects of Printed Circuit
computer vision and pattern recognition.
Board Based on Improved YOLOv8. IEEE Access.
[13] Shang, L. P., Chang, Y. Z., Chen, Y., & Ou, Y. S. (2024).
[28] Wang, Z., Chen, J., Yu, P., Feng, B., & Feng, D. (2024).
Fire detection algorithm based on the fusion of YOLOv8
SC-YOLOv8 Network with Soft-Pooling and Attention for
and Deformable Conv DCN. International Journal of
Elevator Passenger Detection. Applied Sciences, 14(8),
Advanced Engineering Research and Science, 11(8), 8-15.
3321.
[14] Hatab, M., Malekmohamadi, H., & Amira, A. (2021).
Surface defect detection using YOLO network.
In Intelligent Systems and Applications: Proceedings of the
www.ijaers.com Page | 37
Chen et al. International Journal of Advanced Engineering Research and Science, 12(2)-2025
[29] Ma, J., Tong, J., Xue, M., & Yao, J. (2024). A lightweight
model for echo trace detection in echograms based on
improved YOLOv8. Scientific Reports, 14(1), 1-17.
[30] Xiao, L., & Zhang, H. (2025, January). Improved drainage
pipe defect detection algorithm based on YOLOv8. In The
International Conference Optoelectronic Information and
Optical Engineering (OIOE2024) (Vol. 13513, pp. 1025-
1030). SPIE.
[31] Shi, Y., Qing, S., Zhao, L., Wang, F., Yuwen, X., & Qu, M.
(2024). Yolo-peach: a high-performance lightweight
yolov8s-based model for accurate recognition and
enumeration of peach seedling fruits. Agronomy, 14(8),
1628.
[32] Lei, L., Duan, R., Yang, F., & Xu, L. (2024). Low
Complexity Forest Fire Detection Based on Improved
YOLOv8 Network. Forests, 15(9), 1652.
www.ijaers.com Page | 38