Official code release for CVPR 2021 paper "Multi-Modal Fusion Transformer for End-to-End Autonomous Driving"

This repository contains the code for the CVPR 2021 paper [Multi-Modal Fusion Transformer for End-to-End Autonomous Driving](http://www.cvlibs.net/publications/Prakash2021CVPR.pdf). If you find out code or paper useful, please cite
```bibtex
@inproceedings{Prakash2021CVPR,
author={Prakash, Aditya and Chitta, Kashyap and Geiger, Andreas},
title={Multi-Modal Fusion Transformer for End-to-End Autonomous Driving},
booktitle={Conference on Computer Vision and Pattern Recognition (CVPR)},
The training data is generated using ```leaderboard/team_code/auto_pilot.py``` in 8 CARLA towns and 14 weather conditions. The routes and scenarios files to be used for data generation are provided at ```leaderboard/data```.
Instructions for setting up docker are available [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker). Pull the docker image of CARLA 0.9.10.1 ```docker pull carlasim/carla:0.9.10.1```.
If the docker container doesn't start properly then add another environment variable ```-e SDL_AUDIODRIVER=dsp```.
### Run the Autopilot
Once the CARLA server is running, rollout the autopilot to start data generation.
```Shell
./leaderboard/scripts/run_evaluation.sh
```
The expert agent used for data generation is defined in ```leaderboard/team_code/auto_pilot.py```. Different variables which need to be set are specified in ```leaderboard/scripts/run_evaluation.sh```. The expert agent is based on the autopilot from [this codebase](https://github.com/bradyz/2020_CARLA_challenge).
## Training
The training code and pretrained models for different models used in our paper are provided below.
Spin up a CARLA server (described above) and run the required agent. The adequate routes and scenarios files are provided in ```leaderboard/data``` and the required variables need to be set in ```leaderboard/scripts/run_evaluation.sh```.
```Shell
./leaderboard/scripts/run_evaluation.sh
```
## Acknowledgements
This implementation uses code from several amazing repositories.