## 3 Experiments and Discussion
### The Experiments of Weld Seams Classification Models  
We selected convolutional or self-attention-based networks to classify the enhanced weld seams, including Mobilenetv3 [43], ResNext [44], Swin Transformer, and CNN Meet Transformer (CMT), to demonstrate that networks combining convolution and self-attention perform better for seams classification. We evaluated the models using three performance metrics: the accuracy (the proportion of correctly predicted samples), precision (the proportion of true positive predictions among all positive predictions), and F1 score (closer to 1 indicates better prediction performance of the model):  
\[Accuracy=\frac{TP+TN}{TP+FN+FP+TN} \tag{6}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Cold Solder** & **No Bus-Bar** & **Missed Solder** \\ \hline BAGAN & 189.498 & 352.071 & 333.201 \\ BAGAN-GP & 175.897 & 349.192 & 317.130 \\ RSSA & 203.441 & 225.177 & 166.738 \\ WaveGAN & 119.174 & 202.659 & 160.376 \\ FastGAN & 58.199 & 133.280 & 114.625 \\ Real samples (train set) & 33.131 & 114.001 & 104.728 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: FIDs calculation results for different GAN models. Figure 12: t-SNE visualization of datasets after geometric enhancement and FastGAN expansion. \[Precision=\frac{TP}{TP+FP} \tag{7}\]  
\[F1 score=\frac{2\times Precision\times Recall}{Precision+Recall} \tag{8}\]  
where TP denotes true positive, TN denotes true negative, FP denotes false positive, and FN denotes false negative. We trained our model on two sets of weld seam images: one set only augmented with geometric transformations and the other set augmented with both geometric transformations and FastGAN. In each experiment, we saved the model with the minimum loss value and the model with the highest validation accuracy and then tested it on the test set. The results of the classification network only trained on the weld seam images augmented with geometric transformations are shown in Table 2. The results of the classification network trained on the weld seam images augmented with both geometric transformations and FastGAN are shown in Table 3, and the recognition accuracy of the network for each type of weld seam images is shown in Table 4. The confusion matrices of different networks for different weld class classifications are shown in Figure 13. Table 5 shows the comparison results for different model parameter counts, FLOPs, and runtimes, where the runtimes are those from on a 1 NVIDIA V100 Tensor Core GPU. As shown in Tables 2 and 3, the accuracy of the network models trained on weld seam images enhanced by FastGAN improved to a certain extent, with MobileViT achieving a 0.79% improvement. It can also be seen that the CMT and MobileViT models, which combine convolutional and self-attention features, had a higher accuracy in identifying defective weld seams compared to network models that used only convolutional or self-attention features. It can also be seen from Figure 13 that MobileViT was able to learn more feature representations for different weld images. Moreover, the size of MobileViT is only one-third of that of CMT, which makes it more suitable for industrial-grade applications. The network structure of MobileViT used in our study is shown in Table 6.  
Our dataset contains images of weld seams taken under different illumination and angles, as shown in Figure 2. And, it can be seen from Table 4 that our proposed model achieved a recognition rate of more than 99% for all three defects. This indicates that the proposed model has strong generalization and resistance to environmental interference.