Have you ever taken a photo and wished you had captured just a little bit more of the landscape to the left or right? While "inpainting"—filling in small holes within an image—has become a staple of photo editing, "outpainting" or image extension remains a significantly harder challenge. A new paper from Google Research, titled Boundless: Generative Adversarial Networks for Image Extension, introduces a novel approach to push the boundaries of what AI can imagine beyond the frame.
TL;DR
The authors present "Boundless," a GAN-based framework specifically optimized for image extension rather than just inpainting. By introducing semantic conditioning to the discriminator, the model maintains global coherence and avoids the blurry or repetitive artifacts common in previous methods, enabling high-quality extensions of up to three times the original image width.
What Problem Does This Paper Address?
Image extension is fundamentally more difficult than inpainting. In standard inpainting, the missing region is surrounded by known pixels, providing strong constraints from all sides. In extension, context is only available on one side.
Existing state-of-the-art inpainting models often fail when applied to extension tasks. They tend to produce "semantic drift"—where the content gradually becomes nonsensical as it moves away from the source—or they create repetitive, "copy-pasted" textures. The challenge is to generate new content that is not only visually seamless at the boundary but also semantically consistent with the rest of the scene.
Methods
The researchers built their solution on a Wasserstein GAN (WGAN) framework. Their approach involves several key architectural shifts:
- Generator Architecture: They used a fully convolutional encoder-decoder with gated convolutions and dilated convolutions to increase the receptive field. Crucially, they removed the contextual attention layers often found in inpainting models. While attention helps find matching patches within an image to fill a hole, the authors found it actually causes artifacts in extension by forcing the model to repeat patterns (see Figure 3).
- Semantic Conditioning: This is the "secret sauce." The discriminator is conditioned in two ways. First, it receives the mask and the known pixels. Second, it is fed high-level semantic features extracted from a pre-trained InceptionV3 network. This forces the discriminator to check if the meaning of the generated extension matches the original image.
- Skip Connections & Instance Norm: The model incorporates skip connections to preserve high-frequency details and instance normalization to reduce visual artifacts.
Datasets
The model was trained on a massive scale using the Places365-Challenge dataset. The authors selected the top 50 most populous classes (such as "beach," "forest," and "skyscraper"), resulting in a training set of nearly 2 million images. Evaluation was performed on a held-out set of 500 images across these categories.
Key Insights and Ideas
- Attention can be a Distraction: In the context of outpainting, "borrowing" patches from the known region (via contextual attention) often leads to unnatural repetition. Removing this layer was a key step in achieving more "creative" and geometrically plausible extensions.
- The Discriminator as a Semantic Judge: By feeding the discriminator features from a pre-trained classifier, the authors essentially gave the model a "sense of what a scene should look like." This prevents the model from drifting into abstract textures and keeps it focused on maintaining the logic of the scene (e.g., continuing a horizon line or a building's architecture).
- Recursive Generation: Because the model is robust, it can be applied recursively. By taking the output of one extension and using it as the input for the next, the model can generate wide panoramas from a single narrow "seed" image.
Key Results
The Boundless model significantly outperformed existing state-of-the-art methods like DeepFill and Partial Convolutions (PConv), especially as the extension size increased.
- Quantitative: On 75% image extensions (where only 25% of the original image is provided), Boundless achieved a Frechet Inception Distance (FID) of 8.79, compared to 31.21 for DeepFill and 31.83 for PConv. A lower FID indicates the generated images are much closer to the distribution of real natural images.
- Qualitative: As shown in Figure 4, while other methods become blurry or produce repetitive artifacts at 50% and 75% extension, Boundless maintains sharp edges and coherent structures.
Limitations and Future Work
While the model excels at extending textures and landscapes (what researchers call "stuff"), it still struggles with complex, discrete objects ("things"). If a mask cuts off half of a car or a person, the model often fails to complete the object realistically, sometimes producing distorted or "ghostly" shapes.
The authors suggest that future work could involve incorporating more explicit object-level priors or using even larger-scale training to help the model learn the complex geometry of man-made objects and human figures. For now, if you need to extend a beautiful forest or a city skyline, Boundless is leading the way.
Summary updated