## 5 Conclusions  
In conclusion, focusing on the requirement of laser welding quality inspection, we proposed an optimized CNN model to achieve the defect classification of the surface welding area of a safety vent based on a VGG-16 conv_base, which was trained on a large database. As a comparison, we classified the welding area images using five CNNs (AlexNet, VGG-16, Resnet-50, Densenet-121, and MobileNetV3-Large) to carry out three-classifications and two-classifications, respectively. Amongst these models, Resnet-50 and MobileNetV3-Large are the state-of-the-art deep learning algorithms, which are faster than other networks and exhibit very less training time. In the three-classifications task, comparatively, Resnet-50 behaved best and achieved the test dataset accuracy of 89.1%. Our optimized model (Pre-VGG-16) followed, whereas AlexNet, VGG-16, and MobileNetV3-Large behaved normal. In the Q-D two-classifications task, all of the CNNs models worked well. However, compared to our optimized model, these contrasting CNNs had the same problem of a long training and testing time, and thus led to lower efficiency. This increases industrial costs when the efficiency of the training dataset and testing dataset are not sufficiently high. Then, we modified the VGG model based on the theory of transfer learning and adopted a pre-training method to train the model. Using this optimized model, we achieved state-of-the-art performance for an application of the welding area defect classification, that is, the test accuracy was as high as 99.87% using over 8000 training images on an industrial computer. Additionally, the model had a lower fault positive rate of 0.16%, and it trained and predicted images quickly on an industrial computer. Moreover, the optimized model was not susceptible to the illumination environment and image size. It essentially meets the high accuracy requirement of industrial inspection. Furthermore, the convolution layer and classification results were visualized well, which can help operators to easily observe and adjust the model flexibly. To summarize, the experimental results prove that the improved VGG-16 model is superior to several contrasting CNNs and could provide a reference for designing relevant defect classification tasks using deep learning.  
Conceptualization, Y.Y. ([PERSON]) and L.Z.; methodology, L.P.; software, L.P.; validation, R.Y., Y.Z. and Y.Y. ([PERSON]); formal analysis, J.M.; investigation, L.P.; resources, Y.Y. ([PERSON]); data curation, R.Y; writing--original draft preparation, L.P.; writing--review and editing, L.Z.; visualization, Y.Z.;  
Figure 6: Visualization of the intermediate activations: (**a**) the first convolutional layer in the CNNs, (**b**) the ninth convolutional layer in the CNNs.  
supervision, L.Z.; project administration, Y.Y. ([PERSON]); funding acquisition, Y.Y ([PERSON]). All authors have read and agreed the published version of the manuscript.  
This work was supported by the Shenzhen Science Technology and Innovation Commission (JCYJ20160427174443407).  
We thank [PERSON], from Liwen Bianji, Edanz Group China (www.liwenbianji.cn/ac) for editing the English text of a draft of this manuscript.  
The authors declare no conflict of interest.