Image Inpainting using Multi-Scale Feature Image Translation

Yuhang Song, Chao Yang, Zhe Lin, Hao Li, Qin Huang, C.-c. Jay Kuo

Abstract

High-resolution image inpainting remains a significant challenge due to the difficulty of modeling high-dimensional pixel distributions. This paper presents a two-stage deep learning framework that decouples the inpainting task into structure inference and texture translation. By utilizing a novel patch-swap layer in the feature space, the proposed method "borrows" sharp textures from surrounding regions to fill missing areas. Experimental results on MS-COCO and ImageNet demonstrate that this approach produces visually coherent, high-resolution results (up to 512x512) significantly faster than traditional optimization-based methods.

Introduction

Image inpainting involves filling missing or corrupted regions of an image with plausible content. While generative models like GANs have made strides in this area, they often struggle at high resolutions, frequently producing blurry "hallucinations" or unrealistic artifacts. Existing methods typically fall into two categories: learning-based methods, which are fast but limited in resolution and sharpness, and optimization-based methods, which produce sharp textures but are computationally prohibitive.

Overview of the inpainting process showing input masks and progressive refinement stages.

This research aims to bridge the gap between speed and quality by introducing a "Divide and Conquer" strategy that separates the prediction of global structure from the generation of local texture.

Methodology

The proposed framework consists of three primary stages:

1. Structure Inference (Image2Feature)

An encoder-decoder network ($G_1$) is first employed to predict the missing content. Although the output of this stage is often blurry, it successfully captures the necessary global structure and semantic context. This initial prediction is then processed through a pre-trained VGG19 network to extract high-level feature maps.

2. Texture Matching (Patch-swap Layer)

The core innovation of this work is the "patch-swap" layer. This layer operates in the feature space, replacing every blurry feature patch within the missing region with the most similar high-frequency feature patch from the known boundary. This mechanism effectively propagates authentic textures from the rest of the image into the hole, ensuring local consistency and sharpness.

3. Texture Translation (Feature2Image)

Finally, a U-Net style generator ($G_2$) takes the "swapped" feature map and translates it back into a sharp, complete image. A key finding in training $G_2$ was that using features derived from ground-truth images—rather than the noisy predictions from the first stage—significantly improves output quality by constraining the mapping space.

Results and Discussion

The model was evaluated on the MS-COCO and ImageNet (CLS-LOC) benchmarks. Quantitatively, the approach outperformed previous state-of-the-art methods, achieving a higher Structural Similarity Index (SSIM) of 0.56 and an Inception Score of 11.36 on ImageNet.

Final high-resolution inpainting result demonstrating sharp texture and seamless blending.

Qualitatively, the results are notably sharper and blend more seamlessly with the background compared to previous learning-based models. In terms of efficiency, the system can inpaint a 512x512 image in approximately 400ms on a standard GPU, making it orders of magnitude faster than optimization-based style transfer methods. A user study further validated these findings, with the proposed method being preferred 75.9% of the time.

Conclusion

By decoupling structure and texture and operating in the feature space, this multi-scale framework provides a robust solution for high-resolution image inpainting. While the model may face challenges with extremely complex or unique structures (e.g., specific human faces), its speed and quality make it a versatile tool for generative tasks. Future work may explore the application of this "meta-algorithm" to other domains beyond inpainting.

Summary updated

BibTeX
@inproceedings{song2018image,
  author = {Yuhang Song and Chao Yang and Zhe Lin and Hao Li and Qin Huang and C.-C. Jay Kuo},
  title = {{Image Inpainting using Multi-Scale Feature Image Translation}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01216-8\_1},
}
Figure