Deep CNN-Based Multi-Class TIG Welding Defect Classification Using HDR Images with Explainable AI
Abstract
1. Introduction
1.1. Literature Review
1.2. Aim and Objectives
- To organise and balance the TIG weld image dataset into five classes: good weld, contamination, lack of fusion, lack of penetration, and misalignment.
- To train, validate, and test five transfer-learning-based D-CNN architectures under the same experimental conditions.
- To compare the models using multiple performance measures, including accuracy, precision, recall, and F1-score, along with stratified five-fold cross-validation and training/inference-time analysis, to identify the most suitable architecture for multi-class defect classification.
- To interpret the predictions of the best-performing model using Grad-CAM and examine whether the highlighted regions correspond to visually meaningful defect locations.
2. Materials and Methods
2.1. Dataset Pre-Processing, Training Configuration, and Computational Environment
2.2. Deep-Convolutional Neural Network (D-CNN) Models
2.3. Experimental Testing
- Recording and preprocessing of welding image data.
- Configuring the CNN models within the TensorFlow framework.
- Training each model architecture using the prepared training and validation datasets.
- Fine-tuning the upper layers of the networks to enhance their performance.
- Inputting test data into the trained models to obtain classification outcomes.
- Assessing and contrasting the classification performance of each network.
- Employing Grad-CAM to generate heatmaps, highlighting potential defect locations within the test images.
2.4. Performance Measure
3. Results
3.1. Model Performance, Cross-Validation Stability, and Computational Efficiency
3.2. Training and Validation Accuracy/Loss
3.3. Classifications of Defects
3.4. Detection of Weld Joints
4. Discussion
5. Conclusions
- DenseNet achieved the highest classification accuracy of 98% in the 70/20/10 train–test–validation split, compared with MobileNet at 95%, Inception V3 at 94%, VGG19 at 92%, and VGG16 at 91%.
- The stratified five-fold cross-validation results confirmed the stability of the classification outcomes, with DenseNet achieving the highest mean accuracy of 0.95 ± 0.03 across the five folds.
- The computational-time analysis showed that DenseNet provided the strongest balance between classification accuracy, cross-validation stability, and inference latency within the computational environment used in this study.
- DenseNet exhibited robust performance across most defect classes with the highest accuracy and least confusion, making it highly reliable and suitable for defect classification in the TIG welding process. The improved performance compared with the other evaluated models in the literature [30,31,32] is associated with more effective feature reuse and stronger class-wise consistency, as reflected in both the performance metrics and the confusion matrices.
- Compared with the conventional CNN model proposed by Bacioiu et al. [30] on a similar dataset, the advanced architectures evaluated in the present study achieved substantially higher classification accuracy.
- The “Grad-CAM with DenseNet” model has the potential to automate the process of identifying critical features within complex defects in welding joints more accurately.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Shravan, C.; Radhika, N.; Deepak Kumar, N.H.; Sivasailam, B. A Review on Welding Techniques: Properties, Characterisations and Engineering Applications. Adv. Mater. Process. Technol. 2024, 10, 1126–1181. [Google Scholar] [CrossRef]
- Ogbonna, O.S.; Akinlabi, S.A.; Madushele, N.; Mashinini, P.M.; Abioye, A.A. Application of MIG and TIG Welding in Automobile Industry. J. Phys. Conf. Ser. 2019, 1378, 042065. [Google Scholar] [CrossRef]
- Sen, R.; Choudhury, S.P.; Kumar, R.; Panda, A. A Comprehensive Review on the Feasibility Study of Metal Inert Gas Welding. Mater. Today Proc. 2018, 5, 17792–17801. [Google Scholar] [CrossRef]
- Singh, S.R.; Khanna, P. A-TIG (Activated Flux Tungsten Inert Gas) Welding:—A Review. Mater. Today Proc. 2021, 44, 808–820. [Google Scholar] [CrossRef]
- Ezer, M.A.; Çam, G. A Study on Microstructure and Mechanical Performance of Gas Metal Arc Welded AISI 304 L Joints. Materwiss. Werksttech. 2022, 53, 1043–1052. [Google Scholar] [CrossRef]
- Şenol, M.; Çam, G. Investigation into Microstructures and Properties of AISI 430 Ferritic Steel Butt Joints Fabricated by GMAW. Int. J. Press. Vessel. Pip. 2023, 202, 104926. [Google Scholar] [CrossRef]
- Serindağ, H.T.; Çam, G. Characterizations of Microstructure and Properties of Dissimilar AISI 316L/9Ni Low-Alloy Cryogenic Steel Joints Fabricated by Gas Tungsten Arc Welding. J. Mater. Eng. Perform. 2023, 32, 7039–7049. [Google Scholar] [CrossRef]
- Serindağ, H.T.; Çam, G. Multi-Pass Butt Welding of Thick AISI 316L Plates by Gas Tungsten Arc Welding: Microstructural and Mechanical Characterization. Int. J. Press. Vessel. Pip. 2022, 200, 13–16. [Google Scholar] [CrossRef]
- Serindağ, H.T.; Tardu, C.; Kirçiçek, İ.Ö.; Çam, G. A Study on Microstructural and Mechanical Properties of Gas Tungsten Arc Welded Thick Cryogenic 9% Ni Alloy Steel Butt Joint. CIRP J. Manuf. Sci. Technol. 2022, 37, 1–10. [Google Scholar] [CrossRef]
- Sumesh, A.; Nair, B.B.; Rameshkumar, K.; Santhakumari, A.; Raja, A.; Mohandas, K. Decision Tree Based Weld Defect Classification Using Current and Voltage Signatures in GMAW Process. Mater. Today Proc. 2018, 5, 8354–8363. [Google Scholar] [CrossRef]
- Stavridis, J.; Papacharalampopoulos, A.; Stavropoulos, P. A Cognitive Approach for Quality Assessment in Laser Welding. Procedia CIRP 2018, 72, 1542–1547. [Google Scholar] [CrossRef]
- Gupta, M.; Khan, M.A.; Butola, R.; Singari, R.M. Advances in Applications of Non-Destructive Testing (NDT): A Review. Adv. Mater. Process. Technol. 2022, 8, 2286–2307. [Google Scholar] [CrossRef]
- Lukács, H.I.; Beregi, B.Z.; Porteleki, B.; Fischl, T.; Botzheim, J. Attention U-Net-Based Semantic Segmentation for Welding Line Detection. Sci. Rep. 2025, 15, 15276. [Google Scholar] [CrossRef]
- Pugliese, R.; Regondi, S.; Marini, R. Machine Learning-Based Approach: Global Trends, Research Directions, and Regulatory Standpoints. Data Sci. Manag. 2021, 4, 19–29. [Google Scholar] [CrossRef]
- Sarker, I.H. Machine Learning: Algorithms, Real-World Applications and Research Directions. SN Comput. Sci. 2021, 2, 160. [Google Scholar] [CrossRef]
- Patil, D.B.; Nigam, A.; Mohapatra, S.; Nikam, S. A Deep Learning Approach to Classify and Detect Defects in the Components Manufactured by Laser Directed Energy Deposition Process. Machines 2023, 11, 854. [Google Scholar] [CrossRef]
- Ma, G.; Yuan, H.; Yu, L.; He, Y. Monitoring of Weld Defects of Visual Sensing Assisted GMAW Process with Galvanized Steel. Mater. Manuf. Process. 2021, 36, 1178–1188. [Google Scholar] [CrossRef]
- Albawi, S.; Mohammed, T.A.; Al-Zawi, S. Understanding of a Convolutional Neural Network. In Proceedings of the 2017 International Conference on Engineering and Technology, ICET, Antalya, Turkey, 21–23 August 2017; pp. 1–6. [Google Scholar] [CrossRef]
- Paturi, U.M.R.; Cheruku, S. Application and Performance of Machine Learning Techniques in Manufacturing Sector from the Past Two Decades: A Review. Mater. Today Proc. 2020, 38, 2392–2401. [Google Scholar] [CrossRef]
- Gu, J.; Wang, Z.; Kuen, J.; Ma, L.; Shahroudy, A.; Shuai, B.; Liu, T.; Wang, X.; Wang, G.; Cai, J.; et al. Recent Advances in Convolutional Neural Networks. Pattern Recognit. 2018, 77, 354–377. [Google Scholar] [CrossRef]
- Cui, J.; Zhang, B.; Wang, X.; Wu, J.; Liu, J.; Li, Y.; Zhi, X.; Zhang, W.; Yu, X. Impact of Annotation Quality on Model Performance of Welding Defect Detection Using Deep Learning. Weld. World 2024, 68, 855–865. [Google Scholar] [CrossRef]
- Lv, H.; Li, C.; Dai, J.; Zhang, Y.; Fan, Z.; Tan, Y.; Wang, D.; Xie, B. Lightweight Framework for Underground Pipeline Recognition and Spatial Localization Based on Multiview 2-D GPR Images. IEEE Trans. Geosci. Remote Sens. 2025, 63, 5110115. [Google Scholar] [CrossRef]
- Wang, D.; Lv, H.; Zhang, Y.; Fan, Z.; Ni, Y.; Lv, S.; Shen, P.; Tang, F.; Wu, H. Monitoring and Detection Technologies and AI-Powered Development Toward Transparent Roads. Engineering 2025. [Google Scholar] [CrossRef]
- Zhang, B.; Wang, X.; Cui, J.; Wu, J.; Wang, X.; Li, Y.; Li, J.; Tan, Y.; Chen, X.; Wu, W.; et al. Welding Defects Classification by Weakly Supervised Semantic Segmentation. NDT E Int. 2023, 138, 102899. [Google Scholar] [CrossRef]
- Say, D.; Zidi, S.; Qaisar, S.M.; Krichen, M. Automated Categorization of Multiclass Welding Defects Using the X-Ray Image Augmentation and Convolutional Neural Network. Sensors 2023, 23, 6422. [Google Scholar] [CrossRef] [PubMed]
- Cherkasov, N.; Ivanov, M.; Ulanov, A. Classification of Weld Defects Based on Computer Vision System Data and Deep Learning. In Proceedings of the 2023 International Conference on Industrial Engineering, Applications and Manufacturing, ICIEAM, Sochi, Russia, 15–19 May 2023; pp. 856–860. [Google Scholar] [CrossRef]
- Boutin, T.; Bendaoud, I.; Delmas, J.; Borel, D.; Bordreuil, C. Machine Learning Approach for Weld Configuration Classification within the GTAW Process. CIRP J. Manuf. Sci. Technol. 2023, 47, 116–131. [Google Scholar] [CrossRef]
- Ghimire, R.; Selvam, R. Machine Learning-Based Weld Classification for Quality Monitoring. Eng. Proc. 2023, 59, 9241. [Google Scholar] [CrossRef]
- Bacioiu, D.; Melton, G.; Papaelias, M.; Shaw, R. Automated Defect Classification of SS304 TIG Welding Process Using Visible Spectrum Camera and Machine Learning. NDT E Int. 2019, 107, 102139. [Google Scholar] [CrossRef]
- Bacioiu, D.; Melton, G.; Papaelias, M.; Shaw, R. Automated Defect Classification of Aluminium 5083 TIG Welding Using HDR Camera and Neural Networks. J. Manuf. Process. 2019, 45, 603–613. [Google Scholar] [CrossRef]
- Sekhar, R.; Sharma, D.; Shah, P. Intelligent Classification of Tungsten Inert Gas Welding Defects: A Transfer Learning Approach. Front. Mech. Eng. 2022, 8, 824038. [Google Scholar] [CrossRef]
- Wang, R.; Wang, H.; He, Z.; Zhu, J.; Zuo, H. WeldNet: A Lightweight Deep Learning Model for Welding Defect Recognition. Weld. World 2024, 68, 2963–2974. [Google Scholar] [CrossRef]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. Int. J. Comput. Vis. 2020, 128, 336–359. [Google Scholar] [CrossRef]
- Wu, M.; Yao, Z.; Verbeke, M.; Karsmakers, P.; Gorissen, B.; Reynaerts, D. Data-driven models with physical interpretability for real-time cavity profile prediction in electrochemical machining processes. Eng. Appl. Artif. Intell. 2025, 160, 111807. [Google Scholar] [CrossRef]
- Wu, M.; Shukla, S.; Vrancken, B.; Verbeke, M.; Karsmakers, P. Data-Driven Approach to Identify Acoustic Emission Source Motion and Positioning Effects in Laser Powder Bed Fusion with Frequency Analysis. Procedia CIRP 2025, 133, 531–536. [Google Scholar] [CrossRef]
- Lee, C.; Seo, G.; Kim, D.B.; Kim, M.; Shin, J.-H. Development of Defect Detection AI Model for Wire + Arc Additive Manufacturing Using High Dynamic Range Images. Appl. Sci. 2021, 11, 7541. [Google Scholar] [CrossRef]
- Aminudin, M.A.I.; Abdullah, M.N.; Mustapha, F.; Eng, K.K.; Mustapha, M.; Mustapha, A. Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM. Sensors 2025, 25, 7070. [Google Scholar] [CrossRef] [PubMed]
- Elhendawy, G.A.; El-Taybany, Y. Machine Vision-Assisted Welding Defect Detection System with Convolutional Neural Networks. Int. J. Precis. Eng. Manuf. 2025, 26, 3185–3194. [Google Scholar] [CrossRef]
- Daniel, B. TIG Aluminium 5083. Available online: https://www.kaggle.com/danielbacioiu/tig-aluminium-5083 (accessed on 2 April 2024).
- Wang, Z.; Li, L.; Chen, H.; Lin, S.; Wu, J.; Ding, T.; Tian, J.; Xu, M. Recognition of GTAW Weld Penetration Based on the Lightweight Model and Transfer Learning. Weld. World 2023, 67, 251–264. [Google Scholar] [CrossRef]
- Tsiakmaki, M.; Kostopoulos, G.; Kotsiantis, S.; Ragos, O. Transfer Learning from Deep Neural Networks for Predicting Student Performance. Appl. Sci. 2020, 10, 2145. [Google Scholar] [CrossRef]
- Glorot, X.; Bordes, A.; Bengio, Y. Deep Sparse Rectifier Neural Networks. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics (AISTATS) 2011, Fort Lauderdale, FL, USA, 11–13 April 2011; Volume 15, pp. 315–323. [Google Scholar]
- Johnson, J.M.; Khoshgoftaar, T.M. Survey on Deep Learning with Class Imbalance. J. Big Data 2019, 6, 27. [Google Scholar] [CrossRef]
- Branco, P.; Torgo, L.; Ribeiro, R.P. A Survey of Predictive Modeling on Imbalanced Domains. ACM Comput. Surv. 2016, 49, 1–50. [Google Scholar] [CrossRef]








| Class | Original Dataset | Balanced Dataset | Stratified 70/20/10 Train–Test–Validation Split | ||
|---|---|---|---|---|---|
| Training Images | Testing Images | Validation Images | |||
| Good weld | 10,947 | 3000 | 2100 | 600 | 300 |
| Contamination | 8403 | 3000 | 2100 | 600 | 300 |
| Lack of fusion | 5035 | 3000 | 2100 | 600 | 300 |
| Lack of penetration | 3053 | 3000 | 2100 | 600 | 300 |
| Misalignment | 3187 | 3000 | 2100 | 600 | 300 |
| Model | Evaluation Method | Accuracy | Precision | Recall | F1-Score | AUC |
|---|---|---|---|---|---|---|
| VGG16 | 70/20/10 split | 0.91 | 0.91 | 0.91 | 0.91 | 0.98 |
| 5-fold Cross-Validation (mean ± standard deviation) | 0.87 ± 0.03 | 0.87 ± 0.03 | 0.89 ± 0.02 | 0.90 ± 0.01 | 0.94 ± 0.03 | |
| VGG19 | 70/20/10 split | 0.92 | 0.92 | 0.92 | 0.92 | 0.97 |
| 5-fold Cross-Validation (mean ± standard deviation) | 0.88 ± 0.03 | 0.89 ± 0.03 | 0.88 ± 0.04 | 0.89 ± 0.02 | 0.95 ± 0.02 | |
| Inception V3 | 70/20/10 split | 0.94 | 0.94 | 0.94 | 0.94 | 0.97 |
| 5-fold Cross-Validation (mean ± standard deviation) | 0.94 ± 0.02 | 0.92 ± 0.02 | 0.92 ± 0.02 | 0.92 ± 0.03 | 0.95 ± 0.02 | |
| MobileNet | 70/20/10 split | 0.95 | 0.95 | 0.95 | 0.95 | 0.96 |
| 5-fold Cross-Validation (mean ± standard deviation) | 0.91 ± 0.03 | 0.89 ± 0.02 | 0.91 ± 0.03 | 0.91 ± 0.03 | 0.93 ± 0.02 | |
| DenseNet | 70/20/10 split | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 |
| 5-fold Cross-Validation (mean ± standard deviation) | 0.95 ± 0.03 | 0.96 ± 0.02 | 0.95 ± 0.02 | 0.94 ± 0.02 | 0.96 ± 0.02 |
| Model | Training Time for 50 Epochs (min) | Test Images | Total Inference Time (s) | Inference Time per Image (ms/Image) |
|---|---|---|---|---|
| VGG16 | 98.6 | 3000 | 45.6 | 15.2 |
| VGG19 | 88.3 | 3000 | 48.0 | 16.0 |
| Inception V3 | 80.0 | 3000 | 42.0 | 14.0 |
| MobileNet | 70.2 | 3000 | 20.9 | 7.0 |
| DenseNet | 76.4 | 3000 | 29.9 | 10.0 |
| Model | Average Training Time per Fold for 50 Epochs (min) | Test Images per Fold | Average Total Inference Time per Fold (s) | Average Inference Time per Image (ms/Image) |
|---|---|---|---|---|
| VGG16 | 128.8 | 3000 | 78.6 | 26.2 |
| VGG19 | 118.0 | 3000 | 66.8 | 22.3 |
| Inception V3 | 116.2 | 3000 | 63.4 | 21.1 |
| MobileNet | 105.0 | 3000 | 56.6 | 18.9 |
| DenseNet | 110.0 | 3000 | 45.0 | 15.0 |
| Good Weld | Contamination | Lack of Fusion | Lack of Penetration | Misalignment | ||
|---|---|---|---|---|---|---|
| VGG16 | Good weld | 574 | 2 | 8 | 7 | 9 |
| Contamination | 10 | 555 | 12 | 8 | 15 | |
| Lack of fusion | 5 | 8 | 550 | 12 | 25 | |
| Lack of penetration | 18 | 16 | 30 | 512 | 24 | |
| Misalignment | 14 | 9 | 13 | 34 | 530 | |
| VGG19 | Good weld | 553 | 4 | 18 | 10 | 15 |
| Contamination | 11 | 559 | 9 | 8 | 13 | |
| Lack of fusion | 25 | 10 | 535 | 12 | 18 | |
| Lack of penetration | 15 | 7 | 13 | 555 | 10 | |
| Misalignment | 12 | 6 | 7 | 5 | 570 | |
| Inception V3 | Good weld | 576 | 5 | 7 | 3 | 9 |
| Contamination | 8 | 559 | 14 | 9 | 10 | |
| Lack of fusion | 12 | 16 | 547 | 11 | 14 | |
| Lack of penetration | 5 | 3 | 4 | 582 | 6 | |
| Misalignment | 15 | 4 | 8 | 13 | 560 | |
| MobileNet | Good weld | 575 | 7 | 4 | 8 | 6 |
| Contamination | 5 | 565 | 11 | 9 | 10 | |
| Lack of fusion | 18 | 15 | 550 | 10 | 7 | |
| Lack of penetration | 8 | 4 | 12 | 570 | 6 | |
| Misalignment | 6 | 6 | 3 | 5 | 580 | |
| DenseNet | Good weld | 583 | 3 | 5 | 4 | 5 |
| Contamination | 2 | 589 | 3 | 2 | 4 | |
| Lack of fusion | 4 | 4 | 587 | 2 | 3 | |
| Lack of penetration | 5 | 2 | 6 | 585 | 2 | |
| Misalignment | 2 | 6 | 3 | 2 | 587 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Nikam, D.; Nikam, S.; Bhosale, T.; Harkin, D.; Sawant, M.; McGarrigle, C. Deep CNN-Based Multi-Class TIG Welding Defect Classification Using HDR Images with Explainable AI. J. Manuf. Mater. Process. 2026, 10, 193. https://doi.org/10.3390/jmmp10060193
Nikam D, Nikam S, Bhosale T, Harkin D, Sawant M, McGarrigle C. Deep CNN-Based Multi-Class TIG Welding Defect Classification Using HDR Images with Explainable AI. Journal of Manufacturing and Materials Processing. 2026; 10(6):193. https://doi.org/10.3390/jmmp10060193
Chicago/Turabian StyleNikam, Deepika, Sagar Nikam, Tejaswini Bhosale, Declan Harkin, Mayur Sawant, and Cormac McGarrigle. 2026. "Deep CNN-Based Multi-Class TIG Welding Defect Classification Using HDR Images with Explainable AI" Journal of Manufacturing and Materials Processing 10, no. 6: 193. https://doi.org/10.3390/jmmp10060193
APA StyleNikam, D., Nikam, S., Bhosale, T., Harkin, D., Sawant, M., & McGarrigle, C. (2026). Deep CNN-Based Multi-Class TIG Welding Defect Classification Using HDR Images with Explainable AI. Journal of Manufacturing and Materials Processing, 10(6), 193. https://doi.org/10.3390/jmmp10060193

