Interactive Image Generation Using Scene Graphs

Gaurav Mittal, Shubham Agrawal, Anuva Agarwal, Sushant Mehta, Tanya Marwah

Introduction

Most state-of-the-art image generation models, such as Generative Adversarial Networks (GANs), operate in a "single-pass" fashion: they take a complete description and output a finished image. However, this contradicts how humans naturally communicate and design. We typically describe scenes iteratively—for example, "There is a living room. Now add a blue sofa. Put a coffee table in front of it."

Existing models struggle with this interactivity. Modifying a prompt slightly often causes a standard GAN to generate a completely different image, losing the context of the original scene. Furthermore, generating complex scenes with multiple objects from a single sentence is notoriously difficult. To address this, researchers from Carnegie Mellon University have developed a recurrent framework that generates and modifies images incrementally based on "scene graphs." This approach allows users to add objects step-by-step while maintaining visual consistency and context from previous iterations.

Iterative generation process

Methodology

The authors build upon the sg2im architecture (Johnson et al., 2018), transforming it into a recurrent system. The pipeline consists of three main modules:

  1. Graph Convolutional Network (GCN): Processes the scene graph—where nodes represent objects and edges represent spatial relationships (e.g., "left of" or "above")—into embedding vectors.
  2. Layout Prediction Network (SLN): Uses these embeddings to predict bounding boxes and segmentation masks. Crucially, the SLN is modified to focus only on newly added objects, avoiding redundant computation for existing elements.
  3. Cascade Refinement Network (CRN): Acts as the renderer, taking the predicted layout and generating the actual image pixels.

Preserving Context and Consistency

To ensure the image remains stable across iterative steps, the authors introduced two key modifications:

  • RGB Conditioning: Instead of feeding the CRN pure random noise at each step, three noise channels are replaced with the RGB channels of the image generated in the previous step. This conditions the network to retain the existing background and objects.
  • Perceptual Similarity Loss: Real-world datasets lack "ground truth" images for every intermediate step of a scene's construction. To overcome this, the authors employ a perceptual loss function. This forces intermediate images to be feature-wise similar to the final ground-truth image, allowing the model to "hallucinate" plausible intermediate states without explicit step-by-step supervision.

Datasets and Training

The model was trained and evaluated on COCO-Stuff, an extension of the MS-COCO dataset containing 40,000 training images with bounding boxes and masks for 80 "thing" categories (e.g., people, cars) and 91 "stuff" categories (e.g., sky, grass).

Because COCO-Stuff does not natively include scene graphs, the authors programmatically generated them based on the 2D spatial coordinates of objects. For evaluation, they simulated a growing scene by splitting the objects in each image into three incremental steps: 50% of the objects first, followed by 25%, and finally the remaining 25%.

Key Insights and Results

  • Scene Graphs as an Intermediate Language: Raw text is often too ambiguous for defining complex scenes. Scene graphs provide a structured blueprint that clearly defines spatial relationships, making it easier for the model to place objects accurately.
  • Breaking the "Single-Pass" Bottleneck: By generating images incrementally, the model only processes a few objects at a time. This reduces visual clutter and yields higher-quality object rendering compared to generating numerous objects simultaneously.
  • Improved Performance: The authors compared their model against the scene graph baseline (sg2im) and a popular text-to-image baseline (AttnGAN).
  • Quantitative: The proposed model achieved an Inception Score of 5.02 at Step 2, significantly outperforming sg2im's score of 3.05.
  • Consistency: The model demonstrated a much lower Mean Perceptual Similarity Loss between steps (0.477 vs. 0.658 for the baseline), proving its superior ability to keep backgrounds and existing objects stable as the scene expands.
  • Qualitative: While AttnGAN produces high-resolution textures, it frequently ignores spatial constraints. The proposed model successfully places objects exactly where the graph dictates while maintaining the scene's identity across iterations.

Limitations and Future Work

Despite its successes, the framework has notable limitations. The model occasionally "hallucinates" objects not present in the graph due to dataset biases (e.g., adding water when it sees a boat, even if "water" is absent from the graph). Additionally, the current output resolution remains relatively low, suggesting that exploring architectures for high-resolution refinement is a logical next step. Finally, this paper assumes the scene graph is provided; a truly end-to-end interactive system would require a robust module to convert natural language instructions into scene graph modifications in real-time.

Summary updated

BibTeX
@inproceedings{mittal2019interactive,
  author = {Gaurav Mittal and Shubham Agrawal and Anuva Agarwal and Sushant Mehta and Tanya Marwah},
  title = {{Interactive Image Generation Using Scene Graphs}},
  booktitle = {DGS @ ICLR},
  year = {2019},
  url = {https://openreview.net/forum?id=fum_aAsJ1Hl},
}
Figure