/Self-Driving-CarND-Traffic-Sign-Classifier

Classification of German traffic signs using deep neural network. Lenet is used as model to train on data set provided by Udacity. The result comprises prediction on downloaded traffic sign images.

Primary LanguageHTML

Self-Driving-CarND-Traffic-Sign-Classifier

Please refer to: Self-Driving Car Engineer Nanodegree - Udacity, Term 1 - Project 2

Udacity - Self-Driving Car NanoDegree

Overview

This project uses a deep convolutional neural network to classify traffic signs. Lenet is used as model. The CNN model takes as input the German Traffic Sign Dataset and understands road signs from images. Find another German Traffic Sign Dataset that can be used.

Goto notebook which shows the code as well full results. The notebook also consist result on on images in folder new_images

Prerequisites

To run this project, you need Miniconda installed(Follow instructions to quickly install)

Installation

To create an environment for this project use the following command:

conda env create -f environment.yml

After the environment is created, it needs to be activated with the command:

source activate carnd-term1

and open the project's notebook P1.ipynb inside jupyter notebook:

jupyter notebook P1.ipynb

Data Set Summary & Exploration

1. Basic summary of the data set

I used numpy and matplotlib libraries to get summary of the data set provided. signs data set:

  • The size of training set is 34799
  • The size of the validation set is 4410
  • The size of test set is 12630
  • The shape of a traffic sign image is (32, 32, 3)
  • The number of unique classes/labels in the data set is 43

2. Final model architecture

My final model consisted of the following layers:

Layer Description
Input 32x32x1 Grayscale image
Convolution 5x5 1x1 stride, Valid padding, outputs 28x28x6
RELU Activation function
Max pooling 2x2 stride, outputs 14x14x6
Convolution 3x3 etc.
RELU Activation function
Flatten Input output 1x400
Fully connected input 1x400 output 120
RELU Avtivation function
Drop Out keep_prob=0.8
Fully connected input 1x120 output 84
Max pooling 2x2 stride, outputs 5x5x16
RELU Avtivation function
Drop Out keep_prob=0.6
Softmax Probabilistic Distribution

My final model results were:

  • training set accuracy of 99.5%
  • validation set accuracy of 96%
  • test set accuracy of 94.3%

For prediction result analysis on images downloaded from net visit writeup.md.