## 4 Verification and Visualization  
### Verification  
At the experiment stage, 8941 images for the three classes are used in this study. Among them, 7217 components are used for the training dataset, 910 components for the validation dataset, and the remaining 814 components for the final testing dataset. Figure 5 shows the Q-D two-classifications result after 20 epochs, and it implies that the performance of the optimized model is excellent. The training  
Figure 4: Prediction score result for a test image. Figure 3: Modification of the Visual Geometry Group (VGG)-16 model. and validation accuracy are more than 99.9% and 99.89%, respectively. Additionally, the testing accuracy is as high as 99.87%. Simultaneously, the CNN model has a very low loss both for its training data and validation data, and the optimized VGG-16 model is essentially fitted. To further evaluate the classification task, different experiment schemes are designed. As shown in Table 2, we use five contrasting CNNs (AlexNet, VGG-16, Resnet-50 [29], Densenet-121 [30], and MobileNetV3-Large [31]) to classify the welding area defect, and present the results of three classifications (Normal, Level Misalignment, and Porosity) and two classifications (Q-D), respectively. Additionally, we use measurement indices of precision and recall to evaluate the qualified type (the Normal type) comprehensively. For the three-classifications results, Resnet-50 model performs best with the test dataset accuracy of 89.1%, AlexNet, VGG-16, and MobileNetV3-Large behave similarly in terms of the accuracy of the testing dataset, whereas the performance of our optimized model (Pre-VGG-16) is significantly higher than VGG-16, MobileNetV3-Large, and close to Densenet-121. Moreover, the problem of overfitting in AlexNet and VGG-16 is alleviated. However, in an industrial environment, the most important task is to distinguish between qualified and defective products (Q-D) in a real application. In terms of the results of Q-D two-classifications, our optimized model works as well as other deep CNNs, including the classification accuracy, precision, and recall of qualified products. Resnet-50 behaves normal in Q-D classifications, and the prediction \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**AlexNet**} & \multirow{2}{*}{**VGG-16**} & \multirow{2}{*}{**Resnet-50**} & \multirow{2}{*}{\begin{tabular}{c} **Densenet-121** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Moible** \\ **NetV3-Large** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Pre-** \\ **AlexNet** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Pre-** \\ **AlexNet** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Pre-** \\ **VGG-16** \\ \end{tabular} } & \multirow{2}{*}{\
\begin{tabular}{c} **Pre-** \\ **Resnet-50** \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} **Pre-** \\ ****121** \\ \end{tabular} } \\ \hline
3 Classes (val, test) & 70.25 & 76.46 & 71.69 & 74.84 & 71.69 & 62.0 & 74.54 & 74.50 & 71.75 \\ Accuracy (\%) & 72.1 & 74.64 & 89.1 & 81.80 & 71.86 & 60.1 & 77.02 & 81.58 & 81.80 \\ \hline Q-D (val, test) & 90.04 & 99.75 & 99.89 & 99.89 & 99.34 & 99.0 & 99.89 & 99.89 & 99.89 \\ Accuracy (\%) & 86.72 & 99.3 & 99.87 & 98.52 & 99.14 & 98.40 & 99.87 & 99.87 & 99.87 \\ \hline Qualified & 0.99 & 0.98 & 0.98 & 0.99 & 0.98 & 0.98 & 0.99 & 0.99 & 0.99 \\ (precision, recall) & 0.50 & 0.96 & 0.96 & 0.93 & 0.96 & 0.97 & 0.99 & 0.99 & 0.99 \\ \hline Fault Positive & 0.67 & 0.83 & 0.16 & 0.16 & 0.16 & 0.67 & 0.16 & 0.16 & 0.16 \\ Rate (\%) & 460M & 1.6G & 2G & 5G & 70M & – & 16M & 30M & 33M \\ \hline \begin{tabular}{c} (Q-D) \\ Training Time \\ \end{tabular} & 30h & 3h (GPU) & 4h (GPU) & 7h (GPU) & 1.6h & – & 1h & 17 min & 30 min \\ \
\begin{tabular}{c} (GPU); \\ \end{tabular} & (GPU) \\ \hline
\begin{tabular}{c} (Q-D) Predict \\ Time (ms) \\ \end{tabular} & 148 & 172 & 1230 & 2860 & 134 & – & 40 & 240 & 684 \\ \hline \hline \end{tabular}
\end{table}