The invention discloses a
diffusion model image completion method based on boundary preserving
perception, and belongs to the technical field of
artificial intelligence and
image generation. The method comprises the following steps: firstly, preprocessing an input image and a corresponding defect
mask, and extracting gradient attenuation boundary features and a structure edge graph; a boundary sensing
convolution module is introduced into the completion model and is used for boundary information modeling of a coding end; meanwhile, a gating mechanism is adopted in U-Net jump connection, the weight of a gradient attenuation
mask is combined, and the boundary
information transmission intensity is dynamically adjusted; furthermore, in the
diffusion generation process, a region self-adaptive scheduling strategy is adopted, only high-step
diffusion iteration is carried out on a
defect region and a boundary neighborhood, and low-step or freezing operation is carried out on a non-
defect region, so that balance between boundary consistency and calculation efficiency is realized. Experimental results show that the method is superior to an existing diffusion
model image completion method in the aspects of structure retentivity, edge continuity and visual quality, and has wide application prospects.