Context-Aware Layout to Image Generation With Enhanced Object Appearance

Sen He, Wentong Liao, Michael Ying Yang, Yongxin Yang, Yi-Zhe Song, Bodo Rosenhahn, Tao Xiang

Abstract

Layout-to-image (L2I) generation often suffers from "hallucinations" where objects fail to interact realistically or exhibit distorted anatomical structures. This paper introduces two novel components to address these issues: a context-aware feature transformation module in the generator and a location-sensitive appearance representation in the discriminator. By leveraging self-attention for global context and Gram matrices for spatial texture sensitivity, the proposed framework significantly improves the harmony and realism of multi-object scenes. Evaluations on COCO and Visual Genome demonstrate state-of-the-art performance in both quantitative metrics and human preference studies.

Introduction

Generating photorealistic images from bounding box layouts (L2I) is a complex task requiring both global scene understanding and local object fidelity. While Generative Adversarial Networks (GANs) have advanced this field, two persistent issues remain: "Broken Relationships," where overlapping objects are processed independently leading to unrealistic occlusions, and "Distorted Appearance," where objects lack coherent spatial anatomy. This work addresses these by breaking the independence of object generation and enhancing the discriminator's sensitivity to spatial textures.

Methodology

The proposed architecture integrates two primary innovations into a standard GAN framework to resolve the aforementioned issues.

Context-Aware Feature Transformation

To ensure global harmony, a self-attention mechanism is introduced within the generator. Instead of treating each bounding box as an isolated entity, this module allows every object and background ("stuff") feature to interact. This "negotiation" helps the model determine spatial relationships, such as which object should occlude another, resulting in more coherent multi-object scenes.

Location-Sensitive Appearance Representation

Standard discriminators often use global pooling, which identifies features but loses their spatial context. To fix distorted object parts, the authors utilize Gram matrices calculated over object feature maps. This captures correlations between feature channels across spatial dimensions, forcing the generator to produce consistent textures and correctly placed anatomical parts (e.g., limbs on a person).

The proposed architecture featuring context-aware transformation in the generator and Gram-matrix-based appearance discrimination.

Experimental Results

The model was evaluated on the COCO-Thing-Stuff and Visual Genome datasets. The decoder-only variant, Ours-D, achieved state-of-the-art results, reaching an Inception Score (IS) of 15.62 and a Frechet Inception Distance (FID) of 22.32 on COCO (128x128), significantly outperforming previous baselines like LostGAN-v2.

Qualitative Improvements and Ablation

Visual analysis confirms that the combination of context-awareness and appearance discrimination leads to cleaner occlusions and more recognizable poses. Ablation studies demonstrate that while appearance representation improves local textures, context transformation is vital for resolving spatial conflicts between overlapping objects.

Qualitative comparison and ablation study showing the incremental improvements from adding appearance and context modules.

Conclusion

By moving away from independent object processing and incorporating spatially-sensitive discriminators, this work sets a new benchmark for layout-to-image generation. Future work will focus on scaling these context-aware modules to higher resolutions and integrating more granular semantic attributes.

Summary updated

BibTeX
@inproceedings{he2021context,
  author = {Sen He and Wentong Liao and Michael Ying Yang and Yongxin Yang and Yi-Zhe Song and Bodo Rosenhahn and Tao Xiang},
  title = {{Context-Aware Layout to Image Generation With Enhanced Object Appearance}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01480},
}
Figure