Generating complex, realistic images from simple layouts—defined by bounding boxes and semantic labels—remains a significant challenge in computer vision. While generating single objects is largely considered a solved problem, synthesizing scenes with multiple interacting entities often results in "blobby" artifacts or merged objects. Presented at AAAI 2021, OC-GAN (Object-Centric Generative Adversarial Network) addresses these issues by shifting the focus from global semantic maps to an object-centric perspective.
The Challenge: Object Merging and Spurious Textures
Existing layout-to-image models frequently suffer from two primary failure modes. First, they often generate "ghost" objects or textures in areas not specified by the layout. Second, when bounding boxes overlap—such as one donut partially covering another—models struggle to distinguish individual instances, resulting in a single distorted shape rather than distinct items. This occurs because standard models treat layouts as flat semantic maps, losing the structural information necessary to understand that a scene is a collection of individual, interacting entities.
The OC-GAN Framework
To overcome these limitations, OC-GAN introduces two primary technical innovations designed to enforce object boundaries and relational coherence.
1. Scene-Graph Similarity Module (SGSM)
Coherent scene generation requires an understanding of spatial relationships (e.g., "object A is to the left of object B"). OC-GAN converts input layouts into a scene graph, where nodes represent objects and edges represent spatial relationships. A Graph Convolutional Network (GCN) encodes this graph, while an Image Encoder extracts features from the generated image. A similarity loss, inspired by text-to-image models, encourages generated image patches to match their corresponding nodes in the scene graph, providing high-level relational supervision.
2. Instance-Aware Conditioning
Standard models rely on semantic masks where pixels are labeled by class (e.g., "donut"). However, overlapping objects of the same class become a single continuous shape in these masks. OC-GAN augments this with bounding-box instance boundaries as an additional input channel. This explicitly signals to the generator where one object ends and another begins, acting as a powerful structural prior that prevents object merging.
SceneFID: A New Evaluation Metric
Traditional metrics like the Frechet Inception Distance (FID) evaluate the distribution of whole images, which can mask poor quality in individual objects. The authors propose SceneFID, which calculates the FID on crops of individual objects resized to $224 \times 224$ based on the layout. This ensures that the evaluation metric accurately reflects the realism of the constituent objects within a scene.
Experimental Results
OC-GAN was evaluated on the COCO-Stuff and Visual Genome (VG) datasets, consistently outperforming state-of-the-art models like SPADE, LostGAN, and SOARISG.
- Object Quality: On COCO-Stuff ($128 \times 128$), OC-GAN achieved a Classification Accuracy (CA) of 60.32%, significantly higher than SPADE (41.74%).
- Layout Fidelity: In user studies, humans preferred OC-GAN’s results for layout fidelity 46.4% of the time on COCO and 68.6% on Visual Genome when compared to other top models.
- SceneFID: OC-GAN achieved a SceneFID of 16.76 on COCO, outperforming LostGAN (20.03) and SPADE (23.44), confirming that its individual objects are of higher quality.
Conclusion
By incorporating relational reasoning through scene graphs and enforcing instance boundaries, OC-GAN significantly improves the fidelity of layout-based image generation. While challenges remain in scaling to extremely dense scenes, the shift toward object-centric modeling provides a robust path forward for creating complex, multi-object synthetic imagery.
Summary updated