Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Generative Graph Transformer

License: MIT PyTorch implementation of Image-Conditioned Graph Generation for Road Network Extraction (


This library contains a PyTorch implementation of the Generative Graph Transformer (GGT): an autoregressive, attention-based model for image-to-graph generation as presented in [1](, in addition to other baselines discussed in the paper. Find out more about this project in our blog post.


See requirements.txt

  • scipy==1.2.1
  • scikit_image==0.15.0
  • numpy==1.14.2
  • seaborn==0.9.0
  • networkx==1.11
  • torch==1.1.0
  • matplotlib==2.2.2
  • Pillow==6.1.0
  • skimage==0.0
  • tensorboardX==1.8
  • torchvision==0.4.0


  • data/: Should contain the Toulouse Road Network dataset. If you run the script will download the dataset introduced in our paper (Toulouse Road Network dataset).
  • models/: Contains the implementation of encoder and decoder models and baselines discussed in the paper, including but not only: GGT, GraphRNN extended to node features, simple RNN, simple MLP.
  • metrics/: Class for StreetMover distance in : Also contains different methods to compute statistics for the evaluation the models.
  • utils/: Contains hyper-parameter configuration for the different models, the dataset class and other utils.
  • Main script for training and testing of all the models.
  • Configuration specifying which model, experiment and hyper-parameter setting to be used in
  • Script to pre-train the CNN encoder for image reconstruction as part of an auto-encoder.


  • First download Toulouse Road Network dataset using data/
  • Then, configure to choose which model to train/test and finally run
  • The output plots, logs, tensorboard and statistics will be automatically generated in output_graph/

Find out more about this project in our blog post. Please cite [1] in your work when using this library in your experiments.


For questions and comments, feel free to contact Davide Belli.


[1] Belli, Davide and Kipf, Thomas (2019). Image-Conditioned Graph Generation for Road Network Extraction. NeurIPS 2019 workshop on Graph Representation Learning.

BibTeX format:

  title={Image-Conditioned Graph Generation for Road Network Extraction},
  author={Belli, Davide and Kipf, Thomas},
  journal={NeurIPS 2019 workshop on Graph Representation Learning},


Copyright © 2019 Davide Belli.

This project is distributed under the MIT license. This was developed as part of a master thesis supervised by Thomas Kipf at the University of Amsterdam, and presented as a paper at the Graph Representation Learning workshop in NeurIPS 2019, Vancouver, Canada.


PyTorch implementation of "Image-Conditioned Graph Generation for Road Network Extraction"




No releases published


No packages published