Abstract To address the challenges of difficult detection of minute magnetic flux leakage (MFL) defects, insufficient inspection data, and low detection accuracy, the denoising diffusion probabilistic model (DDPM) gate dilated parallel convolution swin transformer (DGPST) is proposed. First, we introduce a DDPM-based data generation model, successfully generating a large quantity of diverse and rich MFL defect samples. Second, a gated parallel convolution layer is introduced into the backbone network. This strategy uses the characteristics of dilated convolution to broaden the receptive field of the model, thus enhancing the integration ability of global information. The addition of gating mechanism enables the model to adjust the calculation of attention weight based on broader context information in advance, which not only complicates the shortcomings of window self-attention in global dependence understanding, but also effectively suppress irrelevant calculation. Finally, the loss function of H Intersection over Union is introduced to improve the mean average precision. Following these enhancements, DGPST attains a satisfactory outcome in detecting tiny defects within the MFL problem. Experimental data indicates the accuracy of the algorithm reaches 95.6% and the delay is reduced to 7.6 ms.