We propose a synthetic image method named local-foreground generative adversarial networks for surface defect detection in the industry. The method comprises three contributions: First, in order to provide more training data, an algorithm that generates full synthetic images of defects is proposed. The method may blend the defect samples stored in the different mobile terminal into existing background images of the production environment in a natural way, accounting for both geometry and appearance. Second, the diversity of defects appearance is increased due to the use of deep convolutional generative adversarial networks only for local-foreground and the defect edge details that are preserved by introducing a guided filter in the process of image synthesis. Third, the image fusion method can adapt to the various production environment of different brightness and camera angles, which has strong adaptability and expansion ability. We also discuss the experimental results of synthetic data on an end-to-end detection system based on deep learning. As we know, YOLO detector trained on synthetic data achieving average precision of 95.2% on test dataset, which is 12.5% higher than heuristic data augmentation individually. Furthermore, it can process 23 images / s on 1080Ti GPU, which meets the requirements for real-time industrial inspection.