Giter Site home page Giter Site logo

krishnakanthnakka / social-nce-trajectron-plus-plus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuejiangliu/social-nce-trajectron-plus-plus

0.0 0.0 0.0 3.17 MB

[ICCV'21] PyTorch implementation of the Social-NCE applied to Trajectron++.

License: Other

Shell 0.83% Python 99.17%

social-nce-trajectron-plus-plus's Introduction

Trajectron++ with Social-NCE

This is an official implementation of the Social-NCE applied to the Trajectron++ forecasting model.

Social NCE: Contrastive Learning of Socially-aware Motion Representations
by Yuejiang Liu, Qi Yan, Alexandre Alahi at EPFL
to appear at ICCV 2021

TL;DR: Contrastive Representation Learning + Negative Data Augmentations ๐Ÿกฒ Robust Neural Motion Models

Please check out our code for experiments on different models as follows:
Social NCE + Trajectron | Social NCE + STGCNN | Social NCE + CrowdNav

Preparation

Setup environments follwoing the SETUP.md

Training & Evaluation

To train a model on the ETH / UCY Pedestrian datasets, the dataset needs to be specified, e.g.,

DATASET=univ

Baseline

The vanilla Trajectron++ model can be trained and evaluated as follows:

bash scripts/run_train.sh ${DATASET} 0.0 && bash scripts/run_eval.sh ${DATASET} 0.0

Contrastive

To train the Trajectron++ with Social-NCE, run the following command:

bash scripts/run_train.sh ${DATASET} && bash bash scripts/run_eval.sh ${DATASET}

Comparison

To search for hyper-parameters on different datasets, run the following bash scripts:

bash scripts/run_<dataset>.sh

Our pre-trained models can be downloaded as follows:

gdown https://drive.google.com/uc?id=1APAIlgJS9BDZHFCvwMrfzj9z_9DSS6LB
unzip pretrained_trajectron++.zip -d experiments/pedestrians/models

To compare different models, run the following command:

python benchmark.py --dataset ${DATASET}

Basic Results

The scripts above yield the following results (on GeForce RTX 3090). The result may subject to mild variance on different GPU devices.

On average, our method reduces the collision rate of the Trajectron++ by over 45%, without degrading its performance in terms of prediction accuracy and diversity.

Epoch Trajectron++ w/o Ours Trajectron++ w/ Ours
ADE FDE COL ADE FDE COL
ETH 0.388 0.810 1.156 0.386 0.791 0.000
HOTEL 0.110 0.184 0.837 0.107 0.177 0.381
UNIV 0.199 0.450 3.378 0.195 0.435 3.079
ZARA1 0.148 0.320 0.462 0.150 0.330 0.178
ZARA2 0.114 0.250 1.027 0.114 0.255 0.993
Average 0.192 0.403 1.372 0.191 0.398 0.926

Citation

If you find this code useful for your research, please cite our paper:

@article{liu2020snce,
  title   = {Social NCE: Contrastive Learning of Socially-aware Motion Representations},
  author  = {Yuejiang Liu and Qi Yan and Alexandre Alahi},
  journal = {arXiv preprint arXiv:2012.11717},
  year    = {2020}
}

Acknowledgement

Our code is developed upon the official implementation of Trajectron++.

social-nce-trajectron-plus-plus's People

Contributors

yuejiangliu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.