Skip to content

shubham-sri/Behaviour-Cloning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Behavioral Cloning

Goals

The goals / steps of this project are the following:

  • Use the simulator to collect data of good driving behavior
  • Build, a convolution neural network in Keras that predicts steering angles from images
  • Train and validate the model with a training and validation set
  • Test that the model successfully drives around track one without leaving the road
  • Summarize the results with a written report

1. Submission includes all required files and can be used to run the simulator in autonomous mode

My project includes the following files:

  • model.py containing the script to create and train the model
  • drive.py for driving the car in autonomous mode
  • model.h5 containing a trained convolution neural network
  • writeup_report.md or writeup_report.pdf summarizing the results

2. Submission includes functional code

Using the Udacity provided simulator and my drive.py file, the car can be driven autonomously around the track by executing

python drive.py model.h5

3. Submission code is usable and readable

The model.py file contains the code for training and saving the convolution neural network. The file shows the pipeline I used for training and validating the model, and it contains comments to explain how the code works.

Model Architecture and Training Strategy

1. An appropriate model architecture has been employed

Layer (type) Output Shape Param
conv2d_1 (Conv2D) (None, 40, 80, 24) 1824
activation_1 (Activation) (None, 40, 80, 24) 0
max_pooling2d_1 (MaxPooling2) (None, 39, 79, 24) 0
conv2d_2 (Conv2D) (None, 20, 40, 36) 21636
activation_2 (Activation) (None, 20, 40, 36) 0
max_pooling2d_2 (MaxPooling2) (None, 19, 39, 36) 0
conv2d_3 (Conv2D) (None, 10, 20, 48) 43248
activation_3 (Activation) (None, 10, 20, 48) 0
max_pooling2d_3 (MaxPooling2) (None, 9, 19, 48) 0
conv2d_4 (Conv2D) (None, 9, 19, 64) 27712
activation_4 (Activation) (None, 9, 19, 64) 0
max_pooling2d_4 (MaxPooling2) (None, 8, 18, 64) 0
conv2d_5 (Conv2D) (None, 8, 18, 64) 36928
activation_5 (Activation) (None, 8, 18, 64) 0
max_pooling2d_5 (MaxPooling2) (None, 7, 17, 64) 0
flatten_1 (Flatten) (None, 7616) 0
dense_1 (Dense) (None, 100) 761700
activation_6 (Activation) (None, 100) 0
dropout_1 (Dropout) (None, 100) 0
dense_2 (Dense) (None, 50) 5050
activation_7 (Activation) (None, 50) 0
dropout_2 (Dropout) (None, 50) 0
dense_3 (Dense) (None, 10) 510
activation_8 (Activation) (None, 10) 0
dense_4 (Dense) (None, 1) 11
Total params: 898,619 Trainable params: 898,619 Non-trainable params: 0

2. Attempts to reduce overfitting in the model

The model contains dropout layers in order to reduce overfitting (model.py lines 21).

I try tune batch size for remove overfitting

3. Model parameter tuning

  • Tuned dropout layer
  • learning rate
  • batch size
  • kernel size of filters in conv layer

4. Appropriate training data

Firstly I created data from the simulator and then process the csv generated by the simulator to create new csv in which I put center, left and right image. For this I adjusted steering angle for left and right image. After that I created mirror image of each image and reverse the steering angle.

Model Architecture and Training Strategy

1. Solution Design Approach

Convolution neural network is best suited for image analysis, so I used CNN in first few layers of model with different kernel size and number of filters.

To avoid overftting I have add dropout layer when I'm adding dense layer in model.

2. Final Model Architecture

Final Architecture is not changed, I kept it as older one but try tune few param like learning rate and dropout to get better result

alt text

3. Creation of the Training Set & Training Process

To capture good driving data, In first drive iteration I drive normally and collected data. After first iteration I try to collect data on reverse track.

For fine-tuning data I try to collect few edge cases on a turn and try to move vehicle to center from left and right

To capture good driving behavior, I first recorded two laps on track one using center lane driving. Here is an example image of center lane driving:

Here few image from dataset where first 3 are normal and last 3 are flipped image.

alt text alt text alt text alt text alt text alt text

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages