BMVC 2017: Virtual to Real Reinforcement Learning for Autonomous Driving
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
TORCS update readme Aug 11, 2017
data initial commit Aug 11, 2017
rtn remove reademe Aug 11, 2017
LICENSE Create LICENSE Aug 11, 2017 Update Mar 30, 2018

Virtual to Real Reinforcement Learning for Autonomous Driving

In BMVC 2017 (Spotlight Presentation)

By Xinlei Pan*, Yurong You*, Ziyan Wang, Cewu Lu


Virtual to real reinforcement learning proposed a realistic translation network that can preprocess virtual images from simulator and translate to their realistic counterparts. It has been proved by experiments that our method can train a driving policy entirely in virtual environments that can adapt to real world driving data.

Virtual to real reinforcement learning for autonomous driving was initially described in an arXiv technical report.

This repo contains a Torch implementation of our virtual to real reinforcement learning framework. The code contains two main parts: TORCS car racing simulator and image translation network. Stay tuned for more updates.

Citing Virtual to Real Reinforcement Learning for Autonomous Driving

If you find this work or our implementation useful in your research, please cite:

    title={Virtual to Real Reinforcement Learning for Autonomous Driving},
    author={You, Yurong and Pan, Xinlei and Wang, Ziyan and Lu, Cewu},
    journal={arXiv preprint arXiv:1704.03952},

Installation of TORCS simulation environments

The TORCS car racing simulator can be installed to collect images, their segmentations. It can also be installed as a reinforcement learning training environment.

For detailed instructions, see here for more.

Install TORCS to collect virtual images

Follow the directions in to install TORCS.

Install TORCS to collect virtual images' segmentation

Replace folder TORCS/torcs-1.3.6/data/tracks/e-track-1 with data/TORCS/e-track-1; replace folder TORCS/torcs-1.3.6/ data/tracks/road/g-track-2 with data/TORCS/g-track-2. Remove previous installed TORCS and reinstall TORCS following

Training virtual-to-seg and seg-to-real networks

Example pictures of virtual-to-seg and seg-to-real translation has been put in data/examples/seg-to-real.png.

To train segmentation to realistic image translation network, download the segmented data from here and here. Then follow pix2pix network to train the seg-to-real network.

We used the segnet from here to train and segment driving images. For image translation, we use the code from Pix2Pix, so we don't include again here.