Transformer-based Image Generation from Scene Graphs

Renato Sortino, Simone Palazzo, Concetto Spampinato
3/8/2023
cs.CV

Official code: perceivelab/trf-sg2im (19 stars, GPL-3.0, PyTorch, last commit 2024-01-30).

Abstract

Graph-structured scene descriptions can be efficiently used in generative models to control the composition of the generated image. Previous approaches are based on the combination of graph convolutional networks and adversarial methods for layout prediction and image generation, respectively. In this work, we show how employing multi-head attention to encode the graph information, as well as using a transformer-based model in the latent space for image generation can improve the quality of the sampled data, without the need to employ adversarial models with the subsequent advantage in terms of training stability. The proposed approach, specifically, is entirely based on transformer architectures both for encoding scene graphs into intermediate object layouts and for decoding these layouts into images, passing through a lower dimensional space learned by a vector-quantized variational autoencoder. Our approach shows an improved image quality with respect to state-of-the-art methods as well as a higher degree of diversity among multiple generations from the same scene graph. We evaluate our approach on three public datasets: Visual Genome, COCO, and CLEVR. We achieve an Inception Score of 13.7 and 12.8, and an FID of 52.3 and 60.3, on COCO and Visual Genome, respectively. We perform ablation studies on our contributions to assess the impact of each component. Code is available at https://github.com/perceivelab/trf-sg2im

View on arXivView PDF

Code Implementations(1)

PyTorchGPL-3.0

Official PyTorch implementation of the paper Transformer-Based Image Generation from Scene Graphs https://arxiv.org/abs/2303.04634

193PythonFeb 21, 20232 years agoGPL-3.0
generative-modelpytorchscene-graphtransformers

Similar Papers

Cite this paper

@article{sortino2023transformerbased,
  title  = {Transformer-based Image Generation from Scene Graphs},
  author = {Renato Sortino and Simone Palazzo and Concetto Spampinato},
  year   = {2023},
  eprint = {2303.04634},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.04634v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.04634.svg)](https://codeofpaper.com/paper/2303.04634)

Discussion