Face Image Completion Based on GAN Prior
Abstract
:1. Introduction
- (1)
- A coarse-to-fine face completion network based on pre-trained GAN prior to improve the texture and fidelity of the completion results.
- (2)
- Integration of a priori information from a pre-trained GAN into an encoder-decoder architecture with multi-resolution skip connections.
2. Related Work
2.1. Traditional Image Inpainting Methods
2.2. Deep-Learning-Based Image Inpainting Methods
3. Our Method
3.1. Coarse Network
3.2. Fine Network
3.2.1. Multi-Resolution Encoder
3.2.2. Pre-Trained Generator
- The dimensionality of the latent vector output from the fully connected layer is the same as the input dimensionality of the pre-trained GAN
- In order to adjust the feature of the encoder, we use an additional gated convolution in each module for feature fusion:initializes Z into a 4 × 4 feature map using a pre-trained generator, and then fuses it with the features to . The module first upsamples the features, then convolves the features with a priori information using the pre-trained generator, and finally fuses the features from the encoder to generate .
- Instead of generating the output directly from the generator, we output the features and pass them to the decoder to better fuse the features from the generator and the encoder.
3.2.3. Decoder
3.3. SN-PatchGAN Discriminator
3.4. Loss Function
4. Experimental Results
4.1. Qualitative Analysis
4.2. Quantitative Analysis
5. Ablation Studies
5.1. Dilation Convolution
5.2. Multi-Resolution Encoder
5.3. Pre-Trained GAN
5.4. Decoder
5.5. SN-PatchGAN
6. Conclusions
Author Contributions
Funding
Conflicts of Interest
Abbreviations
GT | Ground True. |
GAN | Generative Adversarial Network. |
DCGAN | Deep Convolutional GAN. |
PGGAN | Progressive Growing GAN. |
VGG | Visual Geometry Group. |
SN | Spectral normalization. |
GC | Gated Convolution. |
EC | Edge Connect. |
RFR | Recurrent Feature Reasoning. |
SSIM | Structural SIMilarity. |
PSNR | Peak Signal-to-noise Ratio. |
W/ | With. |
W/O | Without. |
References
- Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial nets. Adv. Neural Inf. Process. Syst. 2014, 3, 2672–2680. [Google Scholar]
- Karras, T.; Aila, T.; Laine, S.; Lehtinen, J. Progressive growing of gans for improved quality, stability, and variation. arXiv 2017, arXiv:1710.10196. [Google Scholar]
- Karras, T.; Laine, S.; Aila, T. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 16–17 June 2019. [Google Scholar]
- Pathak, D.; Krahenbuhl, P.; Donahue, J.; Darrell, T.; Efros, A.A. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Yacine, K.; Benzaoui, A. A new framework for grayscale ear images recognition using generative adversarial networks under unconstrained conditions. Evol. Syst. 2021, 12, 923–934. [Google Scholar]
- Khan, A.; Jin, W.; Haider, A.; Rahman, M.; Wang, D. Adversarial gaussian denoiser for multiple-level image denoising. Sensors 2021, 21, 2998. [Google Scholar] [CrossRef] [PubMed]
- Chan, K.C.; Wang, X.; Xu, X.; Gu, J.; Loy, C.C. Glean: Generative latent bank for large-factor image super-resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Venice, Italy, 22–29 October 2021. [Google Scholar]
- Li, H.; Luo, W.; Huang, J. Localization of diffusion-based inpainting in digital images. IEEE Trans. Inf. Forensics Secur. 2017, 12, 3050–3064. [Google Scholar] [CrossRef]
- Chan, T.F.; Shen, J. Nontexture inpainting by curvature-driven diffusions. J. Vis. Commun. Image Represent. 2001, 12, 436–449. [Google Scholar] [CrossRef]
- Barnes, C.; Shechtman, E.; Finkelstein, A.; Goldman, D.B. PatchMatch: A randomized correspondence algorithm for structural image editing. ACM Trans. Graph. 2009, 28, 24. [Google Scholar] [CrossRef]
- Yeh, R.A.; Chen, C.; Yian Lim, T.; Schwing, A.G.; Hasegawa-Johnson, M.; Do, M.N. Semantic image inpainting with deep generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
- Radford, A.; Metz, L.; Chintala, S. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv 2015, arXiv:1511.06434. [Google Scholar]
- He, L.; Qiang, Z.; Shao, X.; Lin, H.; Wang, M.; Dai, F. Research on High-Resolution Face Image Inpainting Method Based on StyleGAN. Electronics 2022, 11, 1620. [Google Scholar] [CrossRef]
- Iizuka, S.; Simo-Serra, E.; Ishikawa, H. Globally and locally consistent image completion. ACM Trans. Graph. (ToG) 2017, 36, 1–14. [Google Scholar] [CrossRef]
- Li, Y.; Liu, S.; Yang, J.; Yang, M.H. Generative face completion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
- Yu, J.; Lin, Z.; Yang, J.; Shen, X.; Lu, X.; Huang, T.S. Generative image inpainting with contextual attention. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
- Liu, G.; Reda, F.A.; Shih, K.J.; Wang, T.C.; Tao, A.; Catanzaro, B. Image inpainting for irregular holes using partial convolutions. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018. [Google Scholar]
- Yu, J.; Lin, Z.; Yang, J.; Shen, X.; Lu, X.; Huang, T.S. Free-form image inpainting with gated convolution. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Korea, 27 October–2 November 2019. [Google Scholar]
- Nazeri, K.; Ng, E.; Joseph, T.; Qureshi, F.Z.; Ebrahimi, M. Edgeconnect: Generative image inpainting with adversarial edge learning. arXiv 2019, arXiv:1901.00212. [Google Scholar]
- Yang, Y.; Guo, X.; Ma, J.; Ma, L.; Ling, H. Lafin: Generative landmark guided face inpainting. arXiv 2019, arXiv:1911.11394. [Google Scholar]
- Shi, W.; Caballero, J.; Huszár, F.; Totz, J.; Aitken, A.P.; Bishop, R.; Rueckert, D.; Wang, Z. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Isola, P.; Zhu, J.Y.; Zhou, T.; Efros, A.A. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
- Miyato, T.; Kataoka, T.; Koyama, M.; Yoshida, Y. Spectral normalization for generative adversarial networks. arXiv 2018, arXiv:1802.05957. [Google Scholar]
- Johnson, J.; Alahi, A.; Li, F.F. Perceptual Losses for Real-Time Style Transfer and Super-Resolution. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 11–14 October 2016. [Google Scholar]
- Gatys, L.A.; Ecker, S.A.; Bethge, M. Image style transfer using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
- Russakovsky, O.; Deng, J.; Su, H.; Krause, J.; Satheesh, S.; Ma, S.; Huang, Z.; Karpathy, A.; Khosla, A.; Bernstein, M.; et al. Imagenet large scale visual recognition challenge. Int. J. Comput. Vis. 2015, 115, 211–252. [Google Scholar] [CrossRef] [Green Version]
- Mao, X.; Li, Q.; Xie, H.; Lau, R.Y.; Wang, Z.; Paul Smolley, S. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, Nashville, TN, USA, 20–25 June 2017. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Li, J.; Wang, N.; Zhang, L.; Du, B.; Tao, D. Recurrent feature reasoning for image inpainting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020. [Google Scholar]
- Liu, H.; Wan, Z.; Huang, W.; Song, Y.; Han, X.; Liao, J. Pd-gan: Probabilistic diverse gan for image inpainting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Venice, Italy, 22–29 October 2021. [Google Scholar]
- Wang, J.; Deng, W.; Hu, J.; Tao, X.; Huang, Y. High-fidelity pluralistic image completion with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021. [Google Scholar]
Mask | GC | EC | RFR | Ours | |
---|---|---|---|---|---|
SSIM | 10–20% | 0.973 | 0.975 | 0.981 | 0.966 |
20–30% | 0.938 | 0.932 | 0.952 | 0.943 | |
30–40% | 0.914 | 0.915 | 0.934 | 0.923 | |
40–50% | 0.859 | 0.731 | 0.886 | 0.900 | |
PSNR | 10-20% | 32.56 | 32.48 | 33.56 | 35.14 |
20–30% | 29.25 | 28.92 | 30.89 | 32.38 | |
30–40% | 26.72 | 26.62 | 27.76 | 30.86 | |
40–50% | 24.31 | 24.18 | 25.46 | 29.42 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shao, X.; Qiang, Z.; Dai, F.; He, L.; Lin, H. Face Image Completion Based on GAN Prior. Electronics 2022, 11, 1997. https://doi.org/10.3390/electronics11131997
Shao X, Qiang Z, Dai F, He L, Lin H. Face Image Completion Based on GAN Prior. Electronics. 2022; 11(13):1997. https://doi.org/10.3390/electronics11131997
Chicago/Turabian StyleShao, Xiaofeng, Zhenping Qiang, Fei Dai, Libo He, and Hong Lin. 2022. "Face Image Completion Based on GAN Prior" Electronics 11, no. 13: 1997. https://doi.org/10.3390/electronics11131997
APA StyleShao, X., Qiang, Z., Dai, F., He, L., & Lin, H. (2022). Face Image Completion Based on GAN Prior. Electronics, 11(13), 1997. https://doi.org/10.3390/electronics11131997