Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
October 16, 2020 17:58
September 19, 2020 19:19
November 2, 2020 15:04
October 16, 2020 17:58
October 16, 2020 17:58
October 13, 2020 04:55
October 13, 2020 04:55
October 16, 2020 17:58
September 19, 2020 19:19
October 13, 2020 04:55

LaneGCN: Learning Lane Graph Representations for Motion Forecasting

Paper | Slides | Project Page | ECCV 2020 Oral Video

Ming Liang, Bin Yang, Rui Hu, Yun Chen, Renjie Liao, Song Feng, Raquel Urtasun

Rank 1st in Argoverse Motion Forecasting Competition


Table of Contents

Install Dependancy

You need to install following packages in order to run the code:

  1. Following is an example of create environment from scratch with anaconda, you can use pip as well:
conda create --name lanegcn python=3.7
conda activate lanegcn
conda install pytorch==1.5.1 torchvision cudatoolkit=10.2 -c pytorch # pytorch=1.5.1 when the code is release

# install argoverse api
pip install  git+

# install others dependancy
pip install scikit-image IPython tqdm ipdb
  1. [Optional but Recommended] Install Horovod and mpi4py for distributed training. Horovod is more efficient than nn.DataParallel for mulit-gpu training and easier to use than nn.DistributedDataParallel. Before install horovod, make sure you have openmpi installed (sudo apt-get install -y openmpi-bin).
pip install mpi4py

# install horovod with GPU support, this may take a while
HOROVOD_GPU_OPERATIONS=NCCL pip install horovod==0.19.4

# if you have only SINGLE GPU, install for code-compatibility
pip install horovod

if you have any issues regarding horovod, please refer to horovod github

Prepare Data: Argoverse Motion Forecasting

You could check the scripts, and download the processed data instead of running it for hours.



[Recommended] Training with Horovod-multigpus

# single node with 4 gpus
horovodrun -np 4 -H localhost:4 python /path/to/ -m lanegcn

# 2 nodes, each with 4 gpus
horovodrun -np 8 -H serverA:4,serverB:4 python /path/to/ -m lanegcn

It takes 8 hours to train the model in 4 GPUS (RTX 5000) with horovod.

We also supply training log for you to debug.

[Recommended] Training/Debug with Horovod in single gpu

python -m lanegcn


You can download pretrained model from here

Inference test set for submission

python -m lanegcn --weight=/absolute/path/to/36.000.ckpt --split=test

Inference validation set for metrics

python -m lanegcn --weight=36.000.ckpt --split=val

Qualitative results

Labels(Red) Prediction (Green) Other agents(Blue)

Quantitative results img




If you use our source code, please consider citing the following:

  title={Learning lane graph representations for motion forecasting},
  author={Liang, Ming and Yang, Bin and Hu, Rui and Chen, Yun and Liao, Renjie and Feng, Song and Urtasun, Raquel},
  booktitle = {ECCV},

If you have any questions regarding the code, please open an issue and @chenyuntc.