Learning Layout and Style Reconfigurable GANs for Controllable Image Synthesis

Wei Sun, Tianfu Wu

TL;DR

This paper introduces LostGANs, a novel Generative Adversarial Network (GAN) architecture for controllable image synthesis from spatial layouts and style codes. It tackles the "layout-to-image" problem by proposing a "layout-to-mask-to-image" pipeline and a new normalization technique (ISLA-Norm) that allows for fine-grained control over both image-level and object-level styles, even in a weakly-supervised setting.

What Problem Does This Paper Address?

The paper addresses the challenge of controllable image synthesis, specifically the "layout-to-image" task. This task aims to generate realistic images based on a given spatial layout of objects (defined by bounding boxes) and desired styles (encoded by latent vectors). While significant progress has been made in unconditional and conditional image generation, achieving fine-grained control over both the arrangement of objects and their appearance simultaneously, especially from coarse inputs like bounding boxes, remains difficult. Existing methods often struggle with complex spatial relationships, object interactions, and disentangling style at both the global and individual object levels. The authors highlight the need for models that can not only generate realistic images but also allow users to precisely control the scene's composition and the visual characteristics of its elements.

Methods

The core of the proposed method, LostGANs, is a "layout-to-mask-to-image" pipeline integrated within a GAN framework. This pipeline first learns to generate object masks from the input layout and style codes, effectively bridging the gap between abstract bounding boxes and concrete object shapes. This intermediate mask generation is crucial for enabling finer control.

A key innovation is the Instance-Sensitive and Layout-Aware Normalization (ISLA-Norm) scheme. This normalization technique is applied within the generator's residual blocks and is designed to learn object instance-specific affine transformation parameters. These parameters are influenced by both the object's label embedding and its style latent code, allowing for spatially distributed feature recalibration that is sensitive to both layout and style. ISLA-Norm also incorporates learned semantic label maps, which are derived from both joint label/style embeddings and features from earlier generator layers, enabling a more robust and context-aware recalibration.

The generator takes the spatial layout, a global image style latent code ($z_{img}$), and a set of object-specific style latent codes ($Z_{obj}$) as input. The discriminator, on the other hand, receives both the synthesized image and the corresponding layout, employing both image-level and object-level classifiers to assess realism. The paper also introduces a layout semi-supervised version of LostGANs, which can be trained with a significant portion of bounding box annotations missing, demonstrating robustness and comparable performance.

Datasets

The proposed methods were trained and evaluated on two widely used datasets:

  • COCO-Stuff dataset [22]: This dataset augments the COCO dataset with "stuff" (e.g., sky, road) annotations, providing a rich environment for evaluating scene synthesis.
  • Visual Genome (VG) dataset [23]: This dataset offers detailed scene graphs and object annotations, making it suitable for testing layout-based generation.

Key Insights and Ideas

  • Layout-to-Mask-to-Image is a powerful paradigm: By explicitly learning object masks as an intermediate step, the model can better bridge the gap between abstract bounding boxes and the complex visual details of synthesized images. This also helps decouple the learning of object geometry from object appearance.
  • ISLA-Norm enables fine-grained, layout-aware style control: The novel normalization scheme is crucial for disentangling styles at both the image and object levels. Its ability to learn instance-specific transformations based on layout and style codes allows for precise control over individual object appearances while maintaining global scene consistency.
  • Weakly-supervised learning is feasible and effective: The development of a layout semi-supervised version demonstrates that high-quality image synthesis can be achieved even with incomplete bounding box annotations, making the approach more practical for real-world applications.
  • Object-level discrimination is critical for layout-to-image GANs: The ablation studies highlight that the object head classifier in the discriminator plays a significant role in guiding the generator to produce realistic and contextually appropriate object instances within the synthesized scene.

Key Results

The proposed LostGANs achieved state-of-the-art performance on the COCO-Stuff and Visual Genome datasets across various metrics, including Inception Score (IS), Frèchet Inception Distance (FID), and Diversity Score (DS).

  • High-resolution synthesis: The model demonstrated the ability to synthesize images at resolutions up to 512x512.
  • Improved metrics: LostGAN-V2 consistently outperformed prior methods like Grid2Im and Layout2Im in terms of FID and DS, indicating better image realism and diversity. For instance, at 256x256 resolution, LostGAN-V2 showed a significant reduction in FID and a substantial increase in DS compared to Grid2Im.
  • Controllability: Qualitative results showcased impressive control over both layout (adding/moving objects) and style (varying appearance of individual objects and the entire scene) while maintaining consistency.
  • Object detection performance: The synthesized images also achieved competitive Object Detection Average Precision (DAP) scores, suggesting that the generated scenes are semantically coherent and realistic enough for downstream tasks.
  • Semi-supervised performance: The semi-supervised LostGAN-V2 achieved performance comparable to its fully-supervised counterpart, highlighting the effectiveness of the proposed approach with reduced annotation requirements.

Limitations and Future Work

  • High-resolution synthesis challenges: While the model can generate images at 512x512, the quality is slightly worse than at 256x256, suggesting that further research is needed to improve high-resolution image synthesis, potentially by adapting evaluation metrics or model architectures.
  • Fine-grained object interactions: The paper acknowledges that the model struggles with capturing complex interactions between objects, especially for articulated objects like people and small objects like tennis rackets (as shown in failure cases).
  • Mask generation sophistication: The authors suggest developing more sophisticated mask generator networks and exploring consistency constraints between "ToMask" modules across different layers to improve the layout-to-mask pipeline.
  • Discriminator improvements: Designing better discriminator networks that provide more effective fine-grained supervision signals for the generator is identified as an important future direction.
  • Joint training: The authors propose exploring joint training of the Faster-RCNN detector and LostGANs for improved performance in semi-supervised settings.

Summary updated

BibTeX
@article{sun2022learning,
  author = {Wei Sun and Tianfu Wu},
  title = {{Learning Layout and Style Reconfigurable GANs for Controllable Image Synthesis}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  url = {https://openreview.net/forum?id=QlKlmKRGQp},
}
Figure