Imitation Learning Training for CARLA
CARLA is an open-source simulator for autonomous driving research.
In this article, we will introduce imitation learning training for CARLA.
Imitation Learning for Autonomous Driving in CARLA
The following repository has codes and a trained model for executing the driving benchmark (CoRL-2017 benchmark) in CARLA.
https://github.com/carla-simulator/imitation-learning
There is a link from this repository to the data set (24GB), but training code is not included.
Here, we combine the following repositories with the above data set to build a training environment for imitation learning.
https://github.com/mvpcom/carlaILTrainer
Setup Training Environment for Imitation Learning
Prerequisites
- Ubuntu 16.04 or later
- Docker
- NVIDIA Docker 2
- NVIDIA Driver >= 390
Clone carlaILTrainer
Repository
With the following command, clone the carlaILTrainer
repository.
$ cd $ git clone https://github.com/mvpcom/carlaILTrainer
Setup Dataset
Download the linked data set (24GB) from here (https://github.com/carla-simulator/imitation-learning#dataset), and expand it with the following command.
$ cd ~/carlaILTrainer $ tar xf ~/Downloads/CORL2017ImitationLearningData.tar.gz
Exclude data_06790.h5
where an error occurs.
Creating Docker Image
Use the carlaILTrainer
repository perfectEnv.yml
to create a Docker image.
Although details of Dockerfile are omitted, it is based on nvidia/cuda:8.0-cudnn6-runtime-ubuntu16.04
in order to operate tensorflow-gpu 1.4.1
.
Also, after installing miniconda
, execute the following command.
# Dockerfile /path/to/conda env create -f perfectEnv.yml
Use the following command to create a Docker image.
$ docker build -t carla_ilt .
Imitation Learning Training for CARLA
Run Docker
docker run --runtime=nvidia --rm -it -v /home/$USER/carlaILTrainer:/workspace carla_ilt
Imitation Learning Training
# source activate carlaSimPy2 # python train.py
The trained model is saved in the test
directory.
After moving the trained model to the imitation-learning
directory, we tried python run_CIL.py
, but an error occurs as written here (https://github.com/mvpcom/carlaILTrainer/issues/6).
Summary
In this article, we introduced imitation learning training for CARLA.