Abstract
Defective images generated by generative adversarial networks (GANs) often exhibit insufficiently constructed defects. The discriminator’s dominance leads the generator to prioritize generating color blocks favored by the discriminator, disregarding the original information. In this paper, we propose a combined GAN that retains feature information, which comprises a defect generating GAN and a mask generating GAN. The two trained GANs are synergistically combined to generate defective images. Additionally, the structuration loss introduced in this paper guides and constrains the GAN model, aiming to preserve texture trends, grayscale distribution, and narrow defect regions. Experimental results show that our model produces high-quality images, with texture information closer to the original sample, and without the additional discriminators. This approach is evaluated against the latest detection model, demonstrating 4% improvement in effectiveness over the standard enhancement method.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Abdal, R., Qin, Y., Wonka, P.: Image2stylegan: How to embed images into the stylegan latent space? In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4432–4441 (2019)
Akçay, S., Atapour-Abarghouei, A., Breckon, T.P.: Skip-Ganomaly: Skip connected and adversarially trained encoder-decoder anomaly detection. In: 2019 International Joint Conference on Neural Networks (IJCNN), pp. 1–8 (2019)
Bergmann, P., Fauser, M., Sattlegger, D., Steger, C.: Mvtec ad–a comprehensive real-world dataset for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9592–9600 (2019)
Carrara, F., Amato, G., Brombin, L., Falchi, F., Gennaro, C.: Combining gans and autoencoders for efficient anomaly detection. In: 2020 25th International Conference on Pattern Recognition (ICPR), pp. 3939–3946. IEEE (2021)
Chen, X., Duan, Y., Houthooft, R., Schulman, J., Sutskever, I., Abbeel, P.: Infogan: Interpretable representation learning by information maximizing generative adversarial nets. Adv. Neural Inform. Process. Syst. (2016)
Choi, Y., Uh, Y., Yoo, J., Ha, J.W.: Stargan v2: Diverse image synthesis for multiple domains. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8188–8197 (2020)
DeVries, T., Taylor, G.W.: Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552 (2017)
Fayyaz, R.A., Maqbool, M., Hanif, M.: Textile design generation using Gans. In: 2020 IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), pp. 1–5 (2020)
Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial nets. Adv. Neural Inform. Process. Syst. (2014)
Haralick, R.M., Shanmugam, K., Dinstein, I.H.: Textural features for image classification. IEEE Trans. Syst. Man Cybern. 6, 610–621 (1973)
He, H., Yuan, M., Liu, X.: Research on surface defect detection method of metal workpiece based on machine learning. In: 2021 6th International Conference on Intelligent Computing and Signal Processing (ICSP), pp. 881–884 (2021)
He, X., Wandt, B., Rhodin, H.: Ganseg: Learning to segment by unsupervised hierarchical image generation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1225–1235 (2022)
Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., Hochreiter, S.: Gans trained by a two time-scale update rule converge to a local Nash equilibrium. Adv. Neural Inform. Process. Syst. (2017)
Huang, Q., Ma, D., Zhang, Y., Xu, G.: Research on image synthesis of fabric replacement in suit customization. In: 2022 IEEE International Conference on Imaging Systems and Techniques (IST), pp. 1–6 (2022)
Huang, Y., Qiu, C., Yuan, K.: Surface defect saliency of magnetic tile. Visual Comput. 85–96 (2020)
Isola, P., Zhu, J.Y., Zhou, T., Efros, A.A.: Image-to-image translation with conditional adversarial networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1125–1134 (2017)
Karras, T., Aittala, M., Hellsten, J., Laine, S., Lehtinen, J., Aila, T.: Training generative adversarial networks with limited data. Adv. Neural Inform. Process. Syst. 12104–12114 (2020)
Karras, T., Aittala, M., Laine, S., Härkönen, E., Hellsten, J., Lehtinen, J., Aila, T.: Alias-free generative adversarial networks. Adv. Neural Inform. Process. Syst. 852–863 (2021)
Li, C.L., Sohn, K., Yoon, J., Pfister, T.: Cutpaste: self-supervised learning for anomaly detection and localization. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9664–9674 (2021)
Liang, Y., Zhang, J., Zhao, S., Wu, R., Liu, Y., Pan, S.: Omni-frequency channel-selection representations for unsupervised anomaly detection. IEEE Trans. Image Process. 4327–4340 (2023)
Liu, J., Wang, C., Su, H., Du, B., Tao, D.: Multistage Gan for fabric defect detection. IEEE Trans. Image Process. 3388–3400 (2019)
Ma, Y., Lei, W., Pang, Z., Zheng, Z., Tan, X.: Rebar clutter suppression and road defects localization in GPR b-scan images based on Supprebar-Gan and EC-yolov7 networks. IEEE Trans. Geosci. Remote Sens. (2024)
Mirza, M., Osindero, S.: Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784 (2014)
Mushiake, D., Otomo, K., Nakatani, C., Ukita, N.: Shape preservation in image style transfer for gaze estimation. In: 2023 18th International Conference on Machine Vision and Applications (MVA), pp. 1–5 (2023)
Niu, S., Li, B., Wang, X., Lin, H.: Defect image sample generation with Gan for improving defect recognition. IEEE Trans. Autom. Sci. Eng. 1611–1622 (2020)
Niu, S., Li, B., Wang, X., Peng, Y.: Region-and strength-controllable Gan for defect generation and segmentation in industrial images. IEEE Trans. Indus. Informatics 4531–4541 (2021)
Qu, Y., Chen, Y., Huang, J., Xie, Y.: Enhanced pix2pix dehazing network. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8160–8168 (2019)
Shaw, P., Uszkoreit, J., Vaswani, A.: Self-attention with relative position representations. arXiv preprint arXiv:1803.02155 (2018)
Shi, Y., Cui, L., Qi, Z., Meng, F., Chen, Z.: Automatic road crack detection using random structured forests. IEEE Trans. Intell. Transp. Syst. 3434–3445 (2016)
Sun, L., Xia, C., Yin, W., Liang, T., Philip, S.Y., He, L.: Mixup-transformer: Dynamic data augmentation for nlp tasks. In: 28th International Conference on Computational Linguistics, COLING 2020, pp. 3436–3440 (2020)
Tabernik, D., Šela, S., Skvarč, J., Skočaj, D.: Segmentation-based deep-learning approach for surface-defect detection. J. Intell. Manuf. 759–776 (2020)
Tran, N.T., Tran, V.H., Nguyen, N.B., Nguyen, T.K., Cheung, N.M.: On data augmentation for Gan training. IEEE Trans. Image Process. 1882–1897 (2021)
Voita, E., Talbot, D., Moiseev, F., Sennrich, R., Titov, I.: Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. arXiv preprint arXiv:1905.09418 (2019)
Wang, R., Hoppe, S., Monari, E., Huber, M.F.: Defect transfer gan: Diverse defect synthesis for data augmentation. arXiv preprint arXiv:2302.08366 (2023)
Wang, Z., Bovik, A.C., Sheikh, H.R., Simoncelli, E.P.: Image quality assessment: from error visibility to structural similarity. IEEE Trans. Image Process. 600–612 (2004)
Woo, S., Park, J., Lee, J.Y., Kweon, I.S.: Cbam: convolutional block attention module. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 3–19 (2018)
Xie, J., Ouyang, H., Piao, J., Lei, C., Chen, Q.: High-fidelity 3d gan inversion by pseudo-multi-view optimization. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 321–331 (2023)
Zhang, B., Gu, S., Zhang, B., Bao, J., Chen, D., Wen, F., Wang, Y., Guo, B.: Styleswin: Transformer-based Gan for high-resolution image generation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11304–11314 (2022)
Zhang, G., Cui, K., Hung, T.Y., Lu, S.: Defect-gan: High-fidelity defect synthesis for automated defect inspection. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 2524–2534 (2021)
Zhang, Y., Zou, H., Wang, J., Lei, Z., Zhou, M.: Lightweight neural network-based real-time pcb defect detection system. In: 2023 CAA Symposium on Fault Detection, Supervision and Safety for Technical Processes (SAFEPROCESS), pp. 1–6 (2023)
Zhao, S., Liu, Z., Lin, J., Zhu, J.Y., Han, S.: Differentiable augmentation for data-efficient Gan training. Adv. Neural Inform. Process. Syst. 7559–7570 (2020)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Bai, Z., Li, B., Ma, X., Cheng, L. (2025). A Novel Combined GAN for Defects Generation Using Masking Mechanisms. In: Lin, Z., et al. Pattern Recognition and Computer Vision. PRCV 2024. Lecture Notes in Computer Science, vol 15034. Springer, Singapore. https://doi.org/10.1007/978-981-97-8505-6_7
Download citation
DOI: https://doi.org/10.1007/978-981-97-8505-6_7
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-97-8504-9
Online ISBN: 978-981-97-8505-6
eBook Packages: Computer ScienceComputer Science (R0)