Imitation Learning
Introduction
In imitation learning a simulation engine is used to create training datasets. A screenshot of the simulator for the first track is shown below:
A convolution neural network was developed using the high level deep learning API Keras based on a Tensorflow backend. This network predicts steering angles from images.
Model Architecture and Training Strategy
The model was based on NVIDIA’s work with two preprocessing stages. The original NVIDIA model is shown in the figure below:
and except from the normalization layer it consists of five convolutional and five flat layers.
The model was modified as follows:
-
The preprocessing involved cropping the input images by 30 lines and 20 lines in the top and bottom of all collected images respectively. This was done to eliminate unnecessary for the problem image content.
-
Batch normalization for the resulting cropped images was then performed.
|
|
The complete model is shown in Keras API below
|
|
The model was trained and validated on different data sets to ensure that the model was not over-fitting.
Datasets
The training datasets represent in our use case, the correct driving behavior. The dataset collection strategy adopted was as follows:
- Initially three complete rounds of track-1 where the vehicle stayed as much as possible in the center of the road were recorded.
- Subsequently the car was positioned such that it faced track-1 in the reverse direction and another three complete rounds of track-1 where recorded.
- In selected turns, the car was positioned in orientations that recovery actions would be taken and the recoveries recorded. Note that only the recoveries where recorded - we have not recorded the deviations from the center of the road as we wanted to teach the network how to recover not how to enter in challenging situations.
For images were collected in BGR color space and were augmented via flipping each image as shown below.
|
|
The original (top) and flipped (bottom) images are shown below.
Cropping was applied to both images as described above. In total 5882 original images resulted in 11764 images after augmentation. With 20% validation set size, this meant 9411 images that were used for training and 2353 images used for validation. The model used an adam optimizer, so the learning rate was not tuned manually.
The car was then test driven by the Convolutional Neural Network (CNN) autonomously - without any human intervention. The car successfully drives around track one without leaving the road as shown in the video below.
Imitation Learning