ABSTRACT The scarcity of training samples and label information poses a major challenge for deep learning defect detection technology. Using generative models to expand sample data is considered an effective approach to address this issue. However, existing GAN models struggle to generate high-fidelity and type-controllable magnetic tile defect samples. Therefore, this paper proposes a type-controllable magnetic tile generation method (MTGGAN) that generates data with inherent label information. The model enhances fidelity and diversity in conditional generation through dual discriminator, auxiliary classifier, and auxiliary generator mechanisms. Additionally, focal loss is introduced to address the model’s class tendency issue during training. Extensive experiments demonstrate that, compared to advanced GAN methods, samples generated by MTGGAN exhibit superior quality and diversity. Furthermore, the generated data can train superior detection models. Effectively alleviating the problem of data scarcity in defect detection.