Free-Form Image Inpainting with Gated Convolution

Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu +1 more
6/10/2018
cs.CVcs.GRcs.LG

Official code: JiahuiYu/generative_inpainting (3,461 stars, TensorFlow, last commit 2024-06-27).

Abstract

We present a generative image inpainting system to complete images with free-form mask and guidance. The system is based on gated convolutions learned from millions of images without additional labelling efforts. The proposed gated convolution solves the issue of vanilla convolution that treats all input pixels as valid ones, generalizes partial convolution by providing a learnable dynamic feature selection mechanism for each channel at each spatial location across all layers. Moreover, as free-form masks may appear anywhere in images with any shape, global and local GANs designed for a single rectangular mask are not applicable. Thus, we also present a patch-based GAN loss, named SN-PatchGAN, by applying spectral-normalized discriminator on dense image patches. SN-PatchGAN is simple in formulation, fast and stable in training. Results on automatic image inpainting and user-guided extension demonstrate that our system generates higher-quality and more flexible results than previous methods. Our system helps user quickly remove distracting objects, modify image layouts, clear watermarks and edit faces. Code, demo and models are available at: https://github.com/JiahuiYu/generative_inpainting

View on arXivView PDF

Code Implementations(1)

TensorFlow

DeepFill v1/v2 with Contextual Attention and Gated Convolution, CVPR 2018, and ICCV 2019 Oral

3,461798PythonJan 24, 20182 years agoNOASSERTION
attention-modeldeep-neural-networksdeepfillgenerative-adversarial-networkimage-inpainting+1 more

Similar Papers

Cite this paper

@article{yu2018freeform,
  title  = {Free-Form Image Inpainting with Gated Convolution},
  author = {Jiahui Yu and Zhe Lin and Jimei Yang and Xiaohui Shen and Xin Lu and Thomas Huang},
  year   = {2018},
  eprint = {1806.03589},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1806.03589}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1806.03589.svg)](https://codeofpaper.com/paper/1806.03589)

Discussion