The self-pierce riveting process for alloy materials has a wide range of applications in the automotive manufacturing industry. This will not only affect the operation performance, but also cause accidents in severe cases when there are defects in the riveted parts. A deep learning detection model is proposed that integrates atrous convolution and dynamic convolution to identify defects of self-piercing riveting parts efficiently to overcome the problem in quality inspection after the body self-piercing riveting process. Firstly, a backbone network for extracting riveting defect features is constructed based on the ResNet network. Secondly, the center area of each riveting defect is located preferentially by the center point detection algorithm. Finally, the bounding box of riveting defects is regressed to achieve defect detection based on this central region. Among them, atrous convolution is used in the external network to increase the receptive field of the model, which combined with an active convolution so that a dynamic atrous convolution module is designed. This module is used to enhance the correlation between feature points of individual pixel in the image, which helps to identify defects with incomplete image edges and suppress background interference. Ablation experiments show that the proposed method achieves the highest accuracy of 95.7%, which is 3.6% higher than the original method. It is found that the proposed method is less affected by the background interference from the qualitative comparison. Moreover, it can also effectively identify the riveting defects on the surface of each area.