Giter Club home page Giter Club logo

clode's Introduction

Conditional Latent ODEs for Motion Prediction in Autonomous Driving

This is term project for AI618 course: Generative models and unsupervised learning.

Alt text

Installation

Simple installation with docker

Please follow these instructions to install the environments needed with docker. After that, you can directly train and test our implementation provided in the docker environment.

Manual installation

This code is implemented in Unix system with CUDA 9.0.

In your conda virtual environment, install pytorch 1.1.0 following this

conda install pytorch==1.1.0 torchvision cudatoolkit=9.0 -c pytorch

After that, using pip to install all dependent packages

pip install -r requirements.txt

This is all you need for training. However, to evaluate our model by simulation, it is required to install ngsim environment. If you have some trouble with this installation, please contact us!

Training

All setups for the parameters of training, model, dataset are in file config.py. To train our model with default parameters, simply run:

python train.py

Evaluation

Multi-agent simulation

We provide a simulation to evaluate our model compared to the baseline AGen. The simulation environment is similar to ngsim_env.

python test.py --test_mode simulation --test_datapath datasets/ngsim_22agents.h5 --ckpt_path pretrained/checkpoint-epoch100.ckpt --use_multi_agents --n_procs 5 --sim_max_obs 20

Our simulation takes around 6-7 hours to finish when only using 1 process. To speed up time, we recommend to use processes as much as possible depending on your hardware. In our cases, we used 5 processes and took around 1.5 hours to finish.

Examples of generated trajectories

To visualize some samples of generated trajectories, follow this command

python test.py --test_mode visualization --test_datapath datasets/ngsim_22agents.h5 --use_multi_agents --ckpt_path pretrained/checkpoint-epoch100.ckpt --max_obs_length 150 --save_viz_figures

Notes about GPU memory consumption

Simply run nvidia-smi while the program is running. The results might vary depending on which kind of NVIDIA card.

The CUDA support for the baseline AGen is not installed in docker environment because of package conflict.

Acknowlegement

The models part of this code is mainly based on latent-ODE. We specially thank the authors for useful code!

clode's People

Contributors

truongkhang avatar kim4375731 avatar andreafinazzi avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

kim4375731

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.