The initial approach I took was to start with a small set of images and a simpler network architecture in order to get the car to drive autonomously which quickly allowed me to understand how the pipeline from the model to the simulator worked. Once I had a rudimentary understanding of the pipeline I moved on to a tried and tested architecture (NVIDIA) and then proceeded to successively test with different hyper parameters. Because I was using Udacity's provided data I didn't have to worry about recording any new data I was able to focus on developing the augmentation operations.
I based my convolutional neural network model on the NVIDIA Autopilot paper.
My model has 10 layers (1 more than the NVIDIA model) including a normalization layer, a color space transformation layer, 5 convolutional layers and 3 fully connected layers. I used ELU (Exponential Linear Unit) for activation functions to keep the steering output smooth.
After a few time consuming and not very effective attempts at creating my own dataset by driving around the track and recording normal driving and "recovery" driving I decided to use the dataset provided by Udacity here.
The Udacity dataset is comprised of a total of 24,108 images (8,036 images for each of the 3 cameras: center, left and right) at about 307 MB of data uncompressed. Each image is 320 pixels wide and 160 pixels tall and stored in RGB format.
In order to reduce overfitting, which manifests as a high left turn bias on this project, I utilized data augmentation which is the process of creating new data from an existing dataset by performing some of the following operations:
The model was trained using an Adam optimizer minimizing the Mean Squared Error (MSE.) A Python generator was used to process the images in batches and to augment the images as necessary. The images were split into a training and validation set (25% validation) before passing them to the generator. A total of 5 epochs, 19,803 samples per epoch and a batch size of 287 were used as parameters to the generator:
In [ ]: