Skip to yearly menu bar Skip to main content


Structure Matters: Tackling the Semantic Discrepancy in Diffusion Models for Image Inpainting

Haipeng Liu · Yang Wang · Biao Qian · Meng Wang · Yong Rui

Arch 4A-E Poster #314
[ ] [ Project Page ]
Wed 19 Jun 5 p.m. PDT — 6:30 p.m. PDT


Denoising diffusion probabilistic models (DDPMs) for image inpainting aim to add the noise to the texture of the image during the diffusion process and recover the masked regions with the unmasked ones of the texture via the reverse denoising process. Despite the meaningful semantics generation, the existing arts suffer from the semantic discrepancy between the masked and unmasked regions, since the semantically dense unmasked texture fails to be completely degraded while the masked regions turn to the pure noise in diffusion process, leading to the large discrepancy between them. In this paper, we aim to answer how the unmasked semantics guide the texture denoising process; together with how to tackle the semantic discrepancy, to enable the consistent and meaningful semantics generation. To this end, we propose a novel structure-guided diffusion model for image inpainting (namely StrDiffusion), which reformulates the conventional texture denoising process under the guidance of the structure to derive a simplified denoising objective for inpainting, while revealing: 1) unlike the texture, the semantically sparse structure is beneficial to tackle the semantic discrepancy; 2) the semantics from the unmasked regions essentially offer the time-dependent guidance for the texture denoising process, benefiting from the time-dependent sparsity of the structure semantics. For the denoising process, a structure-guided neural network is trained to estimate the simplified denoising objective by exploiting the consistency of the denoised structure between masked and unmasked regions. Besides, we devise an adaptive resampling strategy as a formal criterion on whether the structure is competent to guide the texture denoising process, while regulate their semantic correlations. Extensive experiments validate the merits of StrDiffusion over the state-of-the-arts. Our code is available in the supplementary material.

Live content is unavailable. Log in and register to view live content