Globally and Locally Consistent Image Completion

1. Motivation

  • 以前的方法只能生成可以在缺失图像中可以找到的图像碎片,不能理解高级的语义信息;
  • Context Encoders局部的细节修复不是很好,而且分辨率低。

2. Approach

2.1 Architecture of network

Globally and Locally Consistent Image Completion
Overview of our architecture for learning image completion.
  • 判别器:网络中有两个判别器,Global Discriminator 提取全局特征,Local Discriminator 提取局部特征,将两类特征concat再做判别;

  • 生成器:采用了Encoder-decoder 结构,网络的中间部分为了获得更大的感受野,使用了Dilated Convolution:

Globally and Locally Consistent Image Completion

2.2 Loss function

  • MSE loss:

    Globally and Locally Consistent Image Completion

    这里MSE loss其实对应着Context Encoders 里的重构损失。

  • GAN loss:

    Globally and Locally Consistent Image Completion

    GAN的损失函数,即对抗损失。

  • 最终的损失函数:

Globally and Locally Consistent Image Completion

2.3 Training

训练过程如下

Globally and Locally Consistent Image Completion

2.4 Post-processing

通过对网络生成的图像做后处理(使用了【1】中的方法),修正生成图像的颜色,结果如下:

Globally and Locally Consistent Image Completion

3. Discussion

我认为这篇文章的创新点主要是使用了两个判别器,同时保证了局部和整体的一致性,可以生成新的没有在确实图像中出现的objects。

Globally and Locally Consistent Image Completion

但是,当图片中存在大面积的结构性很强的区域缺失时,这篇文章中的模型修复效果较差,如上图所示。

源代码:https://github.com/satoshiiizuka/siggraph2017_inpainting. (torch版本)

https://github.com/shinseung428/GlobalLocalImageCompletion_TF. (Tensorflow版本)

https://github.com/otenim/GLCIC-PyTorch. (Pytorch版本)

 

4. References

【1】Telea, Alexandru. "An image inpainting technique based on the fast marching method." Journal of graphics tools 9.1 (2004): 23-34.

【2】Iizuka, Satoshi, Edgar Simo-Serra, and Hiroshi Ishikawa. "Globally and locally consistent image completion." ACM Transactions on Graphics (ToG) 36.4 (2017): 1-14.