Git Product home page Git Product logo

mile's Introduction

MILE

This is the PyTorch implementation for inference and training of the world model and driving policy as described in:

Model-Based Imitation Learning for Urban Driving

Anthony Hu, Gianluca Corrado, Nicolas Griffiths, Zak Murez, Corina Gurau, Hudson Yeo, Alex Kendall, Roberto Cipolla and Jamie Shotton.

NeurIPS 2022
Blog post

MILE driving in imagination
Our model can drive in the simulator with a driving plan predicted entirely from imagination.
From left to right we visualise: RGB input, ground truth bird's-eye view semantic segmentation, predicted bird's-eye view segmentation.
When the RGB input becomes sepia-coloured, the model is driving in imagination.

If you find our work useful, please consider citing:

@inproceedings{mile2022,
  title     = {Model-Based Imitation Learning for Urban Driving},
  author    = {Anthony Hu and Gianluca Corrado and Nicolas Griffiths and Zak Murez and Corina Gurau
   and Hudson Yeo and Alex Kendall and Roberto Cipolla and Jamie Shotton},
  booktitle = {Advances in Neural Information Processing Systems ({NeurIPS})},
  year = {2022}
}

โš™ Setup

  • Create the conda environment by running conda env create.
  • Download CARLA 0.9.11.
  • Install the carla package by running conda activate mile followed by easy_install ${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.11-py3.7-linux-x86_64.egg.
  • We also need to add ${CARLA_ROOT}/PythonAPI/carla/ to the PYTHONPATH. This can be done by creating a file in the conda environment ~/miniconda3/envs/mile/etc/conda/activate.d/env_vars.sh containing:
#!/bin/bash

export CARLA_ROOT="<path_to_carla_root>"
export PYTHONPATH="${CARLA_ROOT}/PythonAPI/carla/"

๐Ÿ„ Evaluation

  • Download the model pre-trained weights.
  • Run bash run/evaluate.sh ${CARLA_PATH} ${CHECKPOINT_PATH} ${PORT}, with ${CARLA_PATH} the path to the CARLA .sh executable, ${CHECKPOINT_PATH} the path to the pre-trained weights, and ${PORT} the port to run CARLA (usually 2000).

๐Ÿ“– Data Collection

  • Run bash run/data_collect.sh ${CARLA_PATH} ${DATASET_ROOT} ${PORT} ${TEST_SUITE}, with ${CARLA_PATH} the path to the CARLA .sh executable, ${DATASET_ROOT} the path where to save data, ${PORT} the port to run CARLA (usually 2000), and ${TEST_SUITE} the path to the config specifying from which town to collect data (e.g. config/test_suites/lb_data.yaml).

๐ŸŠ Training

To train the model from scratch:

  • Organise the dataset folder as described in DATASET.md.
  • Activate the environment with conda activate mile.
  • Run python train.py --config mile/configs/mile.yml DATASET.DATAROOT ${DATAROOT}, with ${DATAROOT} the path to the dataset.

๐Ÿ™Œ Credits

Thanks to the authors of End-to-End Urban Driving by Imitating a Reinforcement Learning Coach for providing a gym wrapper around CARLA making it easy to use, as well as an RL expert to collect data.

mile's People

Contributors

anthonyhu avatar ishida-wayve 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.