In terms of the problems of five categories of nonweld seam stripes, including inclusion, oil-spot, silk-spot, and water-spot, which interfere with weld seam recognition during robotic welding, a convolutional neural network (CNN) algorithm, combined with a multistage training strategy, is used to construct a digital model for weld seam recognition, on the basis of which the classification accuracy is compared with the standard model of seven categories of representative CNN. The results show that the ResNet model with a multistage training strategy classifies weld seams with an accuracy of 83.8%, which is superior to other standard models. In this study, the physical scenario of weld seam recognition is migrated to a neural network digital model, fulfilling the intelligent recognition of weld seams in complex scenarios based on the CNN digital model.