Welding parts completeness detection for automotive body-in-white mainly relies on artificial detection and sensor detection. Due to the lack of intelligent methods, it is difficult to achieve accurate detection. This paper presents a new intelligent detection method based on improved YOLOX in the digital twin environment. Firstly, to address the problem of insufficient real samples, virtual datasets are made to increase data volume by using digital twin technology and realize the fusion of virtuality and reality. Secondly, an improved MobileNetv1 network is designed as the feature extraction network of YOLOX. Additionally, the original convolution is replaced by depthwise separable convolution blocks for reducing computation burden and improving detection speed. Experiment results show that the number of parameters is 59.1% less than that of the original model and the detection speed is increased from 36 FPS to 50 FPS. Meanwhile, mAP increases by 2.93% and 5.83% respectively under two different overlaps.