Automotive condenser surface defect detection is an important part of automobile manufacturing process. At present the deep learning method is widely used in the field of industrial defect image detection because of its good robustness and accuracy. However, in the actual production, the yield of good products is high, the high rate of good products makes it difficult to collect defective images, which makes the deep learning method based on large-scale training samples encounter bottlenecks. To solve the above problems, a deep convolutional generative adversarial network (DCGAN) model based on semi-supervised and self-attention mechanism is proposed to generate the surface defect images of automobile condenser. Firstly, self-attention mechanism is introduced in DCGAN to overcome the problem of long-range feature extraction in convolutional network. Secondly, a supervised classifier is added to the discriminator and the loss function is modified to the Wasserstein distance with the classifier's cross entropy loss, which improves the convergence speed and stability of the model. Finally, condition normalization and category label fusion are used to enable the model to generate condenser images with specific defects. Experimental results show that the proposed model can generate high-quality condenser defect images, the FID value reaches 44.35, which is better than the existing DCGAN and SAGAN. Compared with ACGAN, the diversity of generated images is also significantly improved.