Performance of deep learning-based PCB (Printed Circuit Board) surface defect detection networks is often limited by the depth of feature extraction networks and the quality of training data. While significantly increasing network parameters can only slightly enhance system performance, optimizing training data can improve network performance without adding computational overhead. Therefore, this paper proposes a data augmentation network to enhance detection accuracy. First, an autoencoder generator is designed to enhance the feature fitting capability of the latent space. Second, a generative adversarial structural loss function is introduced, and an adversarial training method with different learning rates for the generator and discriminator is employed. Finally, experimental results demonstrate that this method enhances the diversity of PCB defect data and effectively improves the detection network’s recognition accuracy.