Painting Outside as Inside: Edge Guided Image Outpainting via Bidirectional Rearrangement with Progressive Step Learning

Kyunghun Kim, Yeohun Yun, Keon-Woo Kang, Kyeongbo Kong, Siyeong Lee, Suk-Ju Kang

TL;DR

By cleverly rearranging an image's boundaries, this paper transforms the notoriously difficult task of image outpainting into a more manageable image inpainting problem. Combining this spatial rearrangement with an edge-guided generator and a progressive horizontal training strategy, the proposed method generates high-quality, spatially consistent panoramic extensions that significantly outperform existing state-of-the-art techniques.

What Problem Does This Paper Address?

Image outpainting—the process of naturally extending the borders of a given image—is a fascinating but challenging problem in computer vision. Unlike image inpainting, which fills in missing internal pixels using surrounding context from all sides, outpainting must extrapolate new content using only unidirectional information (looking inward from the edge).

Because the network has very little adjacent information to go on, conventional outpainting methods frequently suffer from blurry textures, repetitive pixel artifacts, and severe structural or color inconsistencies. The authors set out to bridge this performance gap by giving outpainting the same contextual advantages enjoyed by inpainting algorithms.

Methods

The authors introduce three core components to tackle the outpainting problem:

  1. Bidirectional Boundary Region Rearrangement (BR): This is the paper's key novelty. Assuming a panoramic or wrap-around continuity, the algorithm cuts and swaps the outer areas of the image into the interior. This places the "unknown" outpainting region directly in the middle of the frame, surrounded by known context on both sides. This effectively maps an outpainting problem directly into the image inpainting domain.
Figure 1. Main concept of the proposed method. We rearrange the outer area of the image into its inner area. This enables us to con- sider bidirectional information, and it can generate a high-quality natural image that is superior to images produced by conventional methods.
  1. Two-Stage Edge-Guided Network: The architecture splits the generation process into two distinct steps:
  2. Structural Edge Map Generator ($G_e$): Predicts the structural outlines and edges of the missing regions. It utilizes a specialized hinge loss variant to stabilize GAN training on binary edge maps.
  3. Image Completion Network ($G_c$): Takes the predicted edge map and the masked image to fill in color and fine details. It relies heavily on style and perceptual losses to prevent color tone drift.
Figure 2. Overall architecture of our image outpainting network. Our model comprises two parts: an edge map generation network and an image completion network. Each part is composed of a generator-discriminator pair.
  1. Horizontally Progressive Step Learning: To prevent GAN training failure (like mode collapse or non-convergence) when dealing with large blank spaces, the authors implement a progressive mask expansion strategy. The training starts with a very narrow horizontal mask (3.125% of the input image) and gradually widens it over 32 discrete steps until it reaches the final target size of 50%.

Datasets

The model was trained and evaluated using two primary datasets:

  • SUN dataset: A large-scale scene recognition dataset. The authors trained their network on images resized to $256 \times 128$ pixels.
  • Beach dataset: Used strictly during the testing phase to evaluate the model's zero-shot generalization capabilities without any additional fine-tuning.

Key Insights and Ideas

  • Framing is Everything: The most elegant insight is that the fundamental limitation of outpainting (unidirectional context) can be bypassed entirely by mathematically rearranging the coordinate space. Treating the image as a continuous loop allows the model to leverage bidirectional context.
  • Hinge Loss for Sharp Edges: Standard Non-Saturating GAN loss often struggles with binary data like edge maps. Switching to a specialized hinge loss minimized loss fluctuations during training, resulting in a significantly higher F1 score (0.39 vs 0.28) and cleaner structural boundaries.
  • Aggressive Style Weighting: To fix the common outpainting issue where extended regions gradually drift into incorrect color palettes, the authors heavily weighted the style loss ($\lambda_{style} = 250$). This forces the network to prioritize global color harmony.

Key Results

The proposed method was compared against several state-of-the-art inpainting and outpainting models (including Pix2Pix, StructureFlow, and NS-OUT) using both standard reference metrics and no-reference quality assessments:

  • Quantitative Performance: On the SUN dataset, the proposed method achieved the highest Inception Score (3.20) and the best BRISQUE score (21.61, where lower indicates a more natural appearance). It also demonstrated superior structural fidelity on the Beach dataset, reaching an SSIM of 0.810.
  • User Study: In a blind evaluation, 27 image processing experts ranked the naturalness of outputs from 30 randomly selected images. The proposed method secured the top rank (Rank-1) in 75.31% of the votes, vastly outperforming competing models.
Figure 5. User study results between our proposed method and conventional methods (CA [42], StructureFlow [26], NS-OUT [41]). Our method obtained the most superior results.

Limitations and Future Work

The primary limitation of this approach stems from its core assumption: the image must behave somewhat like a panorama, where the left and right edges share contextual similarities. If this assumption is broken—for instance, if an image features completely distinct, un-connectable scenes on its far left and far right borders—the model will still generate a visually smooth transition, but the output will deviate significantly from the actual ground truth.

In future work, the authors plan to expand the network to handle simultaneous horizontal and vertical outpainting, and design a mechanism that can selectively decide when (and how much) to rely on cross-boundary information.

Summary updated

BibTeX
@inproceedings{kim2021painting,
  author = {Kyunghun Kim and Yeohun Yun and Keon-Woo Kang and Kyeongbo Kong and Siyeong Lee and Suk-Ju Kang},
  title = {{Painting Outside as Inside: Edge Guided Image Outpainting via Bidirectional Rearrangement with Progressive Step Learning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2021},
  doi = {10.1109/wacv48630.2021.00217},
}
Figure