This is the code of the paper Resolving Copycat Problems in Visual Imitation Learning via Residual Action Prediction. You can use this repo to reproduce the results of our method in CARLA.
- Hardware: A computer with a dedicated GPU capable of running Unreal Engine.
- OS: Ubuntu also compatible with CARLA
To run the code, we provide a conda environment requirements file. Start by cloning the requirement on the same folder and then, to install, just run:
conda env create -f requirements.yaml
The first thing you need to do is define the datasets folder. This is the folder that will contain your training and validation datasets
export COIL_DATASET_PATH=<Path to where your dataset folders are>
Download a sample dataset pack, with one training and two validations, by running
python3 tools/get_sample_datasets.py
The datasets (CoILTrain, CoILVal1 and CoILVal2) will be stored at the COIL_DATASET_PATH folder.
The dataset used in our paper is CARLA100, which can be downloaded from the original github repo of Felipe Codevilla. Download the .zip files and extract the dataset into $COIL_DATASET_PATH/CoilTrain100.
To collect other datasets please check the data collector repository. https://github.com/carla-simulator/data-collector
- Create a folder containing the configurations of model in .yaml (can refer to configs/action_residual_prediction)
- Use main.py to train and evaluate
python3 main.py --folder action_residual_prediction --gpus 0 1 2 -de NocrashTrainingDense_Town01 --docker carlasim/carla:0.8.4
-
The training checkpoints would be saved in _logs
-
The driving results would be saved in _benchmarks_results, and you can print detailed results by using tools/print_metrics.py
python3 tools/print_metrics.py --path=<Path to where your results folders are>
Please consider citing our paper in your publications if it helps. Here is the bibtex:
@inproceedings{chuang2022resolving,
title={Resolving Copycat Problems in Visual Imitation Learning via Residual Action Prediction},
author={Chuang, Chia-Chi and Yang, Donglin and Wen, Chuan and Gao, Yang},
booktitle={European Conference on Computer Vision},
pages={392--409},
year={2022},
organization={Springer}
}