Skip to content

muddassir235/German-Traffic-Sign-Classifier

Repository files navigation

German Traffic Sign Recognition Program

Udacity - Self-Driving Car NanoDegree

Overview

In this project, I used deep neural networks and convolutional neural networks to classify traffic signs. I trained my model using the German Traffic Sign Dataset. After training I was able to get a validation set accuracy of approximately 99.8% and test set Accuracy of 95.8%.

Model Specs

  • A model of about 13 million neurons
  • It has 7 layers, two of which are convolutional, four are fully connected and an output layer.
  • Relu is used as an activation function throughout.
  • It has a dropout regularization of 0.5 throughout the fully connected layers.
  • L2 regularization of 1e-6 is also applied.
  • Batch Normalization is also employed throughout the network, in order to get better regularization and normalization. It also helps the network converge more quickly and makes it more independent of it's initial parameters.
  • To get numerical stability each channel of each pixel is divided by the maximum value i.e. 255.
  • The mean image of the training dataset is subtracted from all the image to achieve normalization.
  • Xavier Initializer is used to initialize all the weights in the network.

Details of Layers

  • Layer 1: Convolutional (30 5x5 filers)
  • Layer 2: Convolutional (200 5x5 filters)
  • Layer 3: Fully connected (2200 depth)
  • Layer 4: Fully connected (1000 depth)
  • Layer 5: Fully connected (500 depth)
  • Layer 6: Fully connected (120 depth)
  • Layer 7: Output Layer (43 as we have 43 different classes of traffic signs.)

Dependencies

This project requires Python 3.5 and the following Python libraries installed:

Run this command at the terminal prompt to install OpenCV. Useful for image processing:

  • conda install -c https://conda.anaconda.org/menpo opencv3

Get it working

  1. Download the dataset. This is a pickled dataset in which we've already resized the images to 32x32.
  2. Clone the project and start the notebook.
git clone https://github.com/muddassir235/German-Traffic-Sign-Classifier
cd German-Traffic-Sign-Classifier
jupyter notebook Traffic_Signs_Recognition_Solution.ipynb
  1. You can now run and modify the code in python jupyter notebook :-).
  2. Please feel free to make a pull request for sharing improvements to the code. That will make me realy happy :-).

License

This project is distributed under the Apache 2.0 license.

Muddassir Ahmed Links: