Hybrid quantum-classical machine learning offers a promising direction for advancing automated quality control in industrial settings. In this study, we investigate two hybrid quantum-classical approaches for classifying defects in aluminium TIG welding images and benchmarking their performance against a conventional deep learning model. A convolutional neural network is used to extract compact and informative feature vectors from weld images, effectively reducing the higher-dimensional pixel space to a lower-dimensional feature space. Our first quantum approach encodes these features into quantum states using a parameterized quantum feature map composed of rotation and entangling gates. We compute a quantum kernel matrix from the inner products of these states, defining a linear system in a higher-dimensional Hilbert space corresponding to the support vector machine (SVM) optimization problem and solving it using a Variational Quantum Linear Solver (VQLS). We also examine the effect of the quantum kernel condition number on classification performance. In our second method, we apply angle encoding to the extracted features in a variational quantum circuit and use a classical optimizer for model training. Both quantum models are tested on binary and multiclass classification tasks and the performance is compared with the classical CNN model. Our results show that while the CNN model demonstrates robust performance, hybrid quantum-classical models perform competitively. This highlights the potential of hybrid quantum-classical approaches for near-term real-world applications in industrial defect detection and quality assurance.
Figures & tables
Figure 1: Full architecture of the study, showing CNN-based feature extraction followed by three classification approaches: classical CNN, VQLS-enhanced QSVM, and VQC-based classifier.
Figure 2: CNN architecture for Feature Extraction. The last fully connected layer outputs a feature vector X∈{7,15,31,63,127} .
Figure 3: Classical CNN architecture for classification.
Figure 4: Pipeline for VQLS-enhanced QSVM algorithm.
Figure 5: Quantum circuit for hardware-efficient ansatz.
Figure 6: Pipeline for VQC-based classifier algorithm for binary classification.
Figure 7: Six class categorization of welding defects: a) Good Weld, b) Burn through, c) Contamination, d) Lack of fusion, e) Misalignment, and f) Lack of penetration. These images are taken from Kaggle [ 20 ] .
Figure 8: Three class categorization of welding defects: a) Good Weld, b) Contamination, and c) Lack of fusion.
Figure 9: Hyperparameter tuning for the VQC-based classifier over feature sizes (7, 15, 31, 63, 127) and qubit configurations (4, 7, 12, 15), with a fixed batch size of 16.
Feature size
7
15
31
63
127
Accuracy
1.000
1.000
1.000
1.000
1.000
Loss
0.0204
0.0066
0.0145
0.0020
0.0003
Table 1: Binary classification results using the classical CNN model on the test set (400 images).
Feature size
7
15
31
63
127
Accuracy
0.753
0.856
0.871
0.968
0.948
Loss
0.454
0.395
0.341
0.201
0.238
Table 2: Binary classification results using the VQLS-enhanced QSVM model on the test set (400 images).
Feature size
7
15
31
63
127
Accuracy
0.915
0.876
0.925
0.997
0.951
Loss
0.126
0.235
0.164
0.042
0.113
Table 3: Binary classification results using the VQC-based classifier model on the test set (400 images).
Figure 10: Confusion matrices for binary classification at feature size 63: ( a ) VQLS-enhanced QSVM, ( b ) VQC-based classifier.
Feature size
7
15
31
63
127
Accuracy
1.000
0.9925
0.9975
1.000
0.9975
Loss
0.0326
0.0288
0.0056
0.0011
0.0309
Table 4: Multiclass classification results using the classical CNN model on the test set (400 images).
Feature size
7
15
31
63
127
Accuracy
0.625
0.700
0.772
0.924
0.884
Loss
0.684
0.482
0.437
0.359
0.384
Table 5: Multiclass classification results using the VQLS-enhanced QSVM model on the test set (400 images).
Feature size
7
15
31
63
127
Accuracy
0.890
0.892
0.942
0.989
0.946
Loss
0.203
0.209
0.126
0.107
0.115
Table 6: Multiclass classification results using the VQC-based classifier model on the test set (400 images).
Figure 11: Confusion matrices for multiclass (3-class) classification at feature size 63: ( a ) VQLS-enhanced QSVM, ( b ) VQC-based classifier.
Figure 12: Visual cues influencing classification results. a) Good weld with reflection head resembling contamination, and b) Lack of Fusion defect with dark line in the center aiding detection.
Odisha University of Technology and Research, Bhubaneswar, India · National Taiwan University of Science and Technology, Taipei, Taiwan · East China Normal University, Shanghai, China +1
Department of Computing, São Paulo State University, Ave. Engenheiro Luiz Edmundo Carrijo Coube, 14-01 - Vargem Limpa, Bauru, 17033-360, São Paulo, Brazil
Faculty of Computing Universiti Teknologi Malaysia Johor Bahru, Malaysia · Informatics Department Faculty of Science and Technology Universitas Muhammadiyah Sidoarjo Sidoarjo, Indonesia · Department of Information System Universitas Siber Jakarta Jakarta, Indonesia