Abstract The accurate detection of weld defects is critical for ensuring structural integrity in industrial applications. However, traditional methods often face limitations in data scarcity, and manual annotation costs. This paper integrates a DDPM for data augmentation with a semi-supervised teacher-student architecture for efficient model training. To address data scarcity, DDPM is employed to synthesize high-quality weld defect images. A semi-supervised learning strategy, enhanced by Exponential Moving Average (EMA) and a Crop-Paste data augmentation technique, is utilized to leverage both labeled and unlabeled data effectively. And our method is evaluated against mainstream generative and segmentation models. Results demonstrate that our approach achieves superior performance, with the DDPM generating high-fidelity images (PSNR: 27.95 dB, SSIM: 77.38) and the final segmentation model attaining a mIoU of 88.47, significantly outperforming comparative benchmarks. This work provides a robust and efficient solution for automated weld defect inspection.