Abstract:Denoising diffusion probabilistic models(DDPM)have demonstrated powerful image generation capabilities and have been successfully applied to image inpainting. While many recent approaches introduce structural priors to assist the inpainting process and have achieved promising results, they still suffer from limitations in structural integrity and the naturalness of texture details, often resulting in fractured or discontinuous regions. To address these issues, this paper proposes a gradient-guided feature reconstruction algorithm based on diffusion models. Specifically, the gradient map of the corrupted image is first restored to preliminarily reconstruct its structure and texture. The restored gradient map is then used as generation guidance to assist the inpainting of the original image. Furthermore, an efficient channel attention (ECA) module is integrated into the noise prediction network to enhance feature interaction and improve the consistency of the reconstructed images. Experimental results show that compared with state-of-the-art methods, the proposed approach achieves improvements of 3.19% in PSNR and 2.74% in SSIM, and a reduction of 8.82% in LPIPS on the CelebA-HQ dataset. On the Places2 dataset, it achieves gains of 0.42% in PSNR and 2.81% in SSIM, with an 2.75% decrease in LPIPS, demonstrating superior capability in structural restoration and detail preservation for image inpainting tasks.