LocoGAN - Locally convolutional GAN

Lukasz Struski, Szymon Knop, Przemyslaw Spurek, Wiktor Daniec, Jacek TaborCVIU 2020 · DOI

TL;DR

LocoGAN introduces a novel Generative Adversarial Network (GAN) architecture that enables the generation of images with arbitrary resolutions by processing input noise images locally. This approach allows for efficient training on smaller image patches while still producing high-quality, full-resolution outputs, and opens up new possibilities for tasks like generating periodic patterns and transferring image attributes.

What Problem Does This Paper Address?

Traditional Generative Adversarial Networks (GANs) typically generate images of a fixed resolution, determined by the fixed dimensionality of their input noise vector and the architecture of the generator network. While GANs have achieved remarkable success in image generation, this fixed-resolution limitation restricts their applicability in scenarios requiring variable output sizes or the generation of seamless, infinitely repeating patterns (like wallpapers or textures). Furthermore, training GANs on high-resolution images can be computationally expensive and prone to instability. This paper addresses these limitations by proposing a GAN architecture that can handle arbitrary input noise resolutions and, consequently, generate images of varying output dimensions without requiring the entire high-resolution image during training.

Methods

LocoGAN's core innovation lies in its locally convolutional architecture and its approach to local learning. Instead of processing the entire input noise image, LocoGAN's generator and discriminator operate on fixed-size sub-images (patches). This is enabled by:

  • Fully Convolutional Generator: The generator is designed as a fully convolutional network, meaning it can process inputs of any spatial dimension and produce outputs of corresponding dimensions.
  • Local Learning: During training, only small, fixed-size patches of the latent noise image are fed into the network. This significantly reduces computational load and memory requirements.
  • Position Channels: To compensate for the loss of global context inherent in local processing, LocoGAN incorporates additional channels that encode spatial information (e.g., x and y coordinates). These channels are resized at each layer to match the layer's spatial dimensions.
  • Global and Local Latent: The input noise is divided into "global latent" (representing overall image features) and "local latent" (representing fine-grained details). This separation helps maintain coherence and allows for more nuanced control over the generated image.
  • Padding: To handle the boundaries of the local patches during training, a form of padding is used, ensuring that the network can still infer information at the edges of the processed sub-images.

Datasets

  • LSUN (bedrooms): Used for training and demonstrating the generation of images with different resolutions and periodic patterns.
  • FFHQ (faces): Used for training and demonstrating attribute transfer and generation of high-quality face images with varying resolutions.
  • Pattern Images (brick, bamboo, grass): Used to demonstrate the model's ability to learn and generate periodic patterns from a single source image.

Key Insights and Ideas

  • Local Processing for Global Output: The most striking insight is that by processing only small patches of the input noise and incorporating spatial information, LocoGAN can effectively learn to generate coherent, high-resolution images. This decouples the training resolution from the generation resolution.
  • Position Channels are Crucial: The inclusion of position channels is vital for enabling the model to understand spatial relationships and generate structured outputs, especially for tasks like periodic pattern generation.
  • Arbitrary Resolution Generation: The fully convolutional nature combined with local learning and position channels naturally leads to the ability to generate images of any desired resolution, simply by manipulating the input noise size.
  • Single-Image Pattern Generation: LocoGAN can learn to generate complex periodic patterns from a single example image, a capability not easily achieved with standard GANs.
  • Attribute Transfer and "Transplantation": The model's awareness of spatial coordinates and its local processing allow for intuitive "transplantation" of features (like smiles or glasses) between different generated images.

Key Results

  • LocoGAN can generate high-quality images with resolutions different from those used during training, as demonstrated on LSUN and FFHQ datasets (e.g., generating 128x128, 128x192, 192x128, and 192x192 images).
  • The model successfully learns to generate periodic patterns from single source images (e.g., brick, bamboo, grass textures).
  • Qualitative results show successful attribute transfer (smiles, glasses) and smooth interpolations between images.
  • The paper demonstrates the ability to generate "infinitely long" or periodic images, such as wallpapers.

Limitations and Future Work

  • Computational Cost for Very High Resolutions: While LocoGAN is more efficient than training full high-resolution GANs, generating extremely high-resolution images might still be computationally intensive.
  • Global Coherence with Local Processing: Although addressed by global latent channels and position encoding, maintaining perfect global coherence across very large generated images could still be a challenge.
  • Future Work: The authors suggest exploring more sophisticated position encoding schemes, investigating the use of LocoGAN for tasks beyond image generation (e.g., video generation), and further exploring its capabilities in disentangled representation learning and style transfer.

Summary updated

BibTeX
@article{struski2020locogan,
  author = {Lukasz Struski and Szymon Knop and Przemyslaw Spurek and Wiktor Daniec and Jacek Tabor},
  title = {{LocoGAN - Locally convolutional GAN}},
  journal = {Comput. Vis. Image Underst.},
  year = {2020},
  doi = {10.1016/j.cviu.2022.103462},
}
Figure