Computer and Modernization ›› 2021, Vol. 0 ›› Issue (04): 42-47.

Previous Articles     Next Articles

Damaged Old Photos Inpainting Based on Generative Adversarial Networks

  

  1. (College of Computer and Information, Hohai University, Nanjing 211100, China)
  • Online:2021-04-22 Published:2021-04-25

Abstract: This paper proposes a method to inpaint damaged old photos based on generative adversarial networks. The generator is based on the U-Net network and uses partial convolution instead of all convolutional layers. It only operates on effective pixels, which not only avoids the color discrepancy and blurriness caused by standard convolution, but also can repair irregular damaged area. Considering the dependence on long-distance feature information, the contextual attention model is added in the decoding stage of generation network to maintain semantic coherence. In addition to the basic GAN loss, the loss function of the generator also adds perceptual loss, style loss and reconstruction loss to enhance network stability. Experiments are conducted on the CelebA-HQ dataset and real damaged old photos. The experimental results show that the method is not limited by the damage and can achieve a good restoration effect on the damaged old photos.

Key words: generative adversarial networks, partial convolution, contextual attention, old photos inpainting