Unsupervised masked face inpainting based on contrastive learning and attention mechanism

Weiguo Wan,Shunming Chen,Li Yao,Yingmei Zhang
DOI: https://doi.org/10.1007/s00530-024-01411-y
IF: 3.9
2024-07-20
Multimedia Systems
Abstract:Masked face inpainting, aiming to restore realistic facial details and complete textures, remains a challenging task. In this paper, an unsupervised masked face inpainting method based on contrastive learning and attention mechanism is proposed. First, to overcome the constraint of a paired training dataset, a contrastive learning network framework is constructed by comparing features extracted from inpainted face image patches with those from input masked face image patches. Subsequently, to extract more effective facial features, a feature attention module is designed, which can focus on the significant feature information and establish long-range dependency relationships. In addition, a PatchGAN-based discriminator is refined with spectral normalization to enhance the stability of training the proposed network and guide the generator in producing more realistic face images. Numerous experiment results indicate that our approach can obtain better masked face inpainting results than the comparison approaches overall in terms of both subjective and objective evaluations, as well as face recognition accuracy.
computer science, information systems, theory & methods
What problem does this paper attempt to address?