Semantic Image Manipulation Using Scene Graphs

Helisa Dhamo, Azade Farshad, Iro Laina, Nassir Navab, Gregory D. Hager, Federico Tombari, Christian Rupprecht

Abstract

This paper introduces a novel framework for semantic image manipulation where users edit images by interacting with scene graphs—structured representations of objects and their relationships. By modifying nodes (objects) or edges (relationships) in a graph, users can perform complex semantic edits while preserving the original image's style and identity. Our approach utilizes a Spatio-semantic Scene Graph Network (SGN) and a self-supervised training strategy, enabling high-quality image editing without the need for paired "before-and-after" training data.

Introduction

Traditional image manipulation typically occurs at the pixel level or is restricted to specific object classes. While recent generative models have advanced text-to-image synthesis, they often struggle with image-to-image consistency; a single semantic change can result in a completely different scene. The authors address this gap by proposing a pipeline that treats image editing as a graph-to-image task, allowing for high-level semantic changes (e.g., "move that tree") while maintaining the lighting, style, and identity of the original scene.

Overview of the semantic image manipulation pipeline, from source image to graph modification and final generation.

Methodology

The proposed framework consists of four main components:

  1. Graph Prediction: Given a source image, the system predicts a scene graph where nodes represent objects (with bounding boxes and visual features) and edges represent relationships (e.g., "on," "behind," "riding").
  2. Spatio-semantic Scene Graph Network (SGN): This core component uses a Graph Convolutional Network (GCN) to process the graph. It incorporates visual features (CNN embeddings) from the original image, ensuring that an object's specific visual "DNA" is carried over to its new location or state.
  3. Scene Layout & Synthesis: The processed graph features are projected into a 2D spatial layout. A decoder (utilizing architectures like CRN or SPADE) then synthesizes the final image, conditioned on the original image's unedited regions to ensure background consistency.
  4. Self-Supervised Training: To overcome the lack of paired training data, the model is trained on a reconstruction task. By randomly masking parts of an image's scene graph and forcing the network to reconstruct the original image, the model learns the relationship between graph semantics and visual appearance.

Results and Evaluation

The model was evaluated on the synthetic CLEVR dataset and the real-world Visual Genome (VG) dataset. On CLEVR, the model outperformed fully supervised baselines in reconstruction metrics like SSIM and MAE. On Visual Genome, the inclusion of visual features significantly improved edit quality compared to models relying solely on object categories.

Qualitative results on the CLEVR dataset demonstrating relationship changes, object removal, attribute changes, and object additions.

Qualitatively, the framework demonstrates versatility across several edit types:

  • Relationship Changes: Moving objects based on new predicates (e.g., changing "front of" to "behind").
  • Object Removal: Seamlessly in-painting the background after an object is deleted.
  • Attribute and Object Changes: Swapping object types or changing properties like color and shape while maintaining context.

Conclusion

Scene graphs provide a powerful and intuitive interface for semantic image editing. By decoupling semantics from style and leveraging self-supervised reconstruction, this framework enables complex, identity-preserving manipulations. Future work may explore more granular attribute editing and applications in robotics, where agents can visualize goal states before taking action.

Summary updated

BibTeX
@inproceedings{dhamo2020semantic,
  author = {Helisa Dhamo and Azade Farshad and Iro Laina and Nassir Navab and Gregory D. Hager and Federico Tombari and Christian Rupprecht},
  title = {{Semantic Image Manipulation Using Scene Graphs}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.00526},
}
Figure