| Face image is one of the most important biometric features of human,which contains rich texture,structure and semantic information.However,there are often problems such as occlusion by obstacles that affect the recognition accuracy while collecting face images.Face completion technology can fill in damaged areas and remove occlusions in face images,thereby improving the accuracy of tasks such as face recognition.At the same time,face completion technology can also be used to repair photos and remove watermarks,and has a wide range of application scenarios in the digital society.The early face completion technology usually adopts the method based on diffusion or patch.The former realizes information transmission according to the image area around the damaged area,and the latter searches for the most similar patch in the specified image to fill the damaged area.These methods are either only suitable for the inpainting of tiny regions or have a high reliance on similar images containing patches.In order to further improve the effect of face completion,existing methods generally use generative adversarial networks to generate missing content.The discriminator in this network is used to discriminate the authenticity of the completed image,and the adversarial loss is calculated as a gradient to feed back to the generator,so as to train the generator to achieve realistic and reasonable image completion.However,this process lacks the constraints of identity information,so that the completed face is quite different from the original face,resulting in changes in the identity characteristics of the face.In order to solve this problem,this thesis designs a face verification discriminator based on face identity feature extraction,and proposes a face completion method based on face verification.The face verification discriminator calculates the distance between the facial features of the original image and the completed image,provides the individual discrimination loss for the completion generator,and guides the network to achieve the retention and recovery of individual identity.The face verification discriminator and the traditional discriminator of the generative adversarial network form a dual-discriminator structure,which respectively guides the true naturalness and identity retention of the completed image.Experiments show that the face verification discriminator reduces the identity loss before and after completion,and achieves the best results among various methods,which verifies the feasibility of identity constraints in the process of face completion.In order to further improve the image quality of the completion result and improve the generation effect of key face regions,this thesis adds an Attentive Generation Module(AGM)to the generator network,and proposes a face completion method based on multi-scale attention.The AGM under different feature dimensions realizes the weighting of the key areas of the face at different scales through the two-dimensional spatial attention map,and increases the eye loss in the loss function stage to further improve the attention to the key areas.The experimental results show that this method can improve the generation quality of facial features,and is ahead of other methods in the peak signal-to-noise ratio and structural similarity of image quality.At the same time,it further reduces the identity loss before and after completion,and improves the network’s ability of preserving identity information. |