Welding technology has been applied in many fields. In recent years, automatic detection technology of weld defects has become an important research direction. In this paper, based on the good classification performance of vgg-16 convolutional neural network, a SC-VGG network structure is proposed, in which a single convolution layer is replaced by a composite convolution layer, and the loss function in the training process is improved, so that the network structure pays more attention to the results of prediction of weld defect type. Through the experimental test, SC-VGG network structure in the training process of loss function curve can be very good convergence. Compared with other network structure, SC-VGG network has a better weld defect feature extraction performance, the average accuracy and recall rate reached 95.86% and 98.33%, which provides algorithm support for automatic recognition of weld defects.