Introduction
Image outpainting—the task of extending an image beyond its original boundaries—presents a unique challenge in computer vision. Unlike inpainting, where missing regions are constrained by surrounding context, outpainting requires a model to "hallucinate" content based on only one or two reference edges. Traditional approaches often treat this as an image-to-image translation problem, which frequently results in deterministic, repetitive, or blurry textures that fail to capture the structural complexity of natural scenes.
InOut is a novel framework that reframes image outpainting as a GAN inversion problem. By searching the latent space of a pre-trained, coordinate-conditioned generator, the system can produce multiple, diverse, and semantically consistent extensions of a single input. This approach allows for creative diversity and even user-guided categorical manipulation, such as specifying the appearance of mountains or towers in the newly generated regions.
Methodology
The InOut framework shifts away from standard translation models, focusing instead on the expressive power of Generative Adversarial Networks (GANs). The approach consists of two primary stages:
- Coordinate-Conditioned Generation: The authors utilize a generator (based on StyleGAN2) trained to produce "micro-patches." Each patch is generated based on a global latent code and its specific spatial coordinates, allowing the model to understand the global structure and local positioning within a larger scene.
- Inversion with Diversity Loss: To outpaint an image, the system searches for latent codes that reconstruct the available input pixels. To prevent the model from converging on a single "safe" guess, a Diversity Loss is introduced. This loss penalizes latent codes that are too similar, forcing the optimization process to discover multiple distinct and plausible extensions.
To stabilize the inversion process, the researchers introduced a Gaussianized Latent Space ($V$-space). By mapping the complex StyleGAN latent space into a simple Gaussian distribution, the optimization becomes more robust, preventing the generation of unrealistic artifacts.
Experimental Setup
The model was rigorously evaluated on several scenery-heavy datasets to test its ability to handle complex natural and man-made structures:
- Places365: A subset of 25 scenery classes (approximately 62,500 images) was used as a standard benchmark.
- Flickr-Scenery: A new dataset of 54,710 high-quality scenery images collected by the authors to test generalization.
- LSUN Church: Used to demonstrate the method's efficacy on structured, man-made architectural objects.
Results and Discussion
InOut demonstrates significant improvements over state-of-the-art baselines such as Boundless and NS-outpaint. Quantitatively, on the Places365 dataset, InOut achieved a Fréchet Inception Distance (FID) of 23.57, a substantial improvement over Boundless's 35.02. Qualitatively, the model avoids common artifacts like "raindrop" shapes or blurry edges, instead generating sharp, complex structures like cliffs and buildings that blend seamlessly with the original content.
Key Insights
- Inversion vs. Translation: A central insight of this work is that a pre-trained GAN already possesses a deep "understanding" of world structures. Inversion asks which of the infinite images the GAN can create contains the input as a sub-part, rather than trying to learn an extension mapping from scratch.
- Categorical Manipulation: Because the generator is conditioned on coordinates and labels, users can provide categorical "hints" during inversion. This allows for the intentional placement of specific objects, like a lighthouse or a tree, in the outpainted area.
- Recursive Panoramas: By repeatedly using the outpainted result as a new input, the model can generate seamless, infinitely long panoramas with rich, non-repeating details.
In a user study with 80 volunteers, participants overwhelmingly preferred InOut’s results for both realism and diversity compared to existing methods.
Conclusion
While InOut represents a significant step forward, certain limitations remain. The inversion process can struggle with out-of-distribution inputs (e.g., a yacht in a desert) or rare categorical combinations that the GAN did not encounter during training. Additionally, large foreground objects can sometimes exhibit "ghosting" artifacts during categorical manipulation. Future work will focus on expanding the latent space's expressiveness and improving blending algorithms for complex foreground elements.
Summary updated