| Image inpainting refers to the process of inpainting damaged areas(also called missing areas or holes)of an image,resulting in a complete,visually plausible image.Image inpainting is widely used in the field of image processing,including object removal,photo restoration,and editing photo content.Generating accurate image structure and realistic texture details is one of the main challenges in image inpainting tasks.Based on the cutting-edge theories and models of deep learning,combined with latent feature reconstruction and extraction,mask perception and attention mechanism,this thesis conducts image inpainting research from the perspectives of image structure reconstruction and texture generation,and proposes a new depth of face image inpainting Model.The main research work and contributions of this thesis are as follows:1)Face image inpainting based on latent feature reconstruction and attention mechanismAiming at the problem that the network model may not be able to reconstruct reasonable structures or realistic textures in deep neural networks,we propose a new twostage image inpainting model.In the first stage,preliminary inpainting results are produced by reconstructing the style feature vector and feeding it into the Style GAN generator.We apply it to the image inpainting task by introducing the L2 loss for regions inside and outside the mask as our first-stage structure reconstructor network.In the second stage,we build a texture generation network and use the contextual attention mechanism to refine the preliminary face inpainting results in the previous stage,and obtain the final full image of the inpainted face.2)Face image inpainting based on structural reconstruction and mask perception Based on the problems of structure distortion and texture blur in face image inpainting networks,we propose a two-stage model based on structure reconstruction and mask perception.The first stage,called the structure reconstructor,directly generates a series of reconstructed style feature vectors,which are input into the pre-trained Style GAN generator to obtain preliminary restoration results.On this basis,we propose a cosine similarity loss that has good performance in structural reconstruction of input images.In the second stage,called the texture generator,we use an improved mask-aware inpainting scheme.At the same time,a hierarchical attention module is added between the encoder and decoder of the first three layers.The mask-aware dynamic filtering(MADF)module of the encoder and the hierarchical attention mechanisms effectively learn the multi-scale features of the missing regions. |