Welding technology is widely used in the connection of metal workpieces, and then due to improper operation and other reasons, small defects may occur in the welding, which will lead to welding failure and hazardous accidents. Therefore, it is very important to accurately identify welding defects. The automatic defect identification method based on deep learning learns features directly from the full-focus mapping of weld defects and automatically classifies them; the ResNeXt network is selected for improvement, and the SK convolution unit is introduced into the original ResNeXt-50 network model to enhance the adaptive adjustment of sensory field; in order to alleviate the problem of the point-by-point convolution in the ResNeXt-50 which consumes a large amount of In order to alleviate the problem that point-by-point convolution in ResNeXt-50 consumes a large amount of computation, 1×1 group convolution is used instead of the original point-by-point convolution, and channel rearrangement is introduced to alleviate the problem of weakened information exchange of groups caused by group convolution. After improvement, the ResNeXt-50 network model can achieve a classification accuracy of 98.2%, which is 5.5% more than that of the original ResNeXt-50 on this paper's dataset, and the classification accuracy after T-sne visualization also has obvious separation boundary and clustering effects.