GithubHelp home page GithubHelp logo

carnd-traffic-sign-classifier-project's Introduction

Traffic Sign Recognition Traffic Sign Recognition Project

Here is a link to my project code

Data Set Summary & Exploration I used numpy, matplotlib and pandas to explore the dataset.

  • 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. Here is an exploratory visualization of the data set. The training images in the dataset can be seen as below alt text

The label distribution in training images can be visualized by the bargraph below alt text

Preprocessing As a first step, I decided to convert the images to grayscale to reuduc the amount of data, the grayscale image will train the netwrok faster than color images. Grayscale images will not affect the performance as most of the traffic signs have red color. Here is an example of a traffic sign image before and after grayscaling.

![alt text][image2]

As a last step, I normalized the image data to reduce skewness of images.

![alt text][image2]

2.Model Description

My final model consisted of the following layers:

Layer Description Input Output
Input preprocessing 32x32x3 RGB image 32x32x3 32x32x1
Convolution 5x5 1x1 stride, valid padding, RELU 32x32x1 28x28x48
Max pooling 2x2 stride, 2x2 kernel 28x28x48 14x14x48
Convolution 5x5 1x1 stride, valid padding, RELU 14x14x48 10x10x96
Max pooling 2x2 stride, 2x2 kernel 10x10x96 5x5x96
Convolution 3x3 1x1 stride, valid padding, RELU 5x5x96 3x3x172
Max pooling 1x1 stride, 2x2 kernel 3x3x172 2x2x172
Flatten flatten the matrix to 1D 2x2x172 688
FC Fully connected layer 688 84
FC output = traffic sign labels in data 84 43

Parameters To train the model, I used an my local machine CPU. Training Parameters: Batch size : 128 Epoch : 15 Optimizer : Adamoptimizer Learning_rate: 0.001 Sigma_layers: 0.1

Results My final model results were:

  • training set accuracy of 95.5
  • validation set accuracy of 93.1
  • test set accuracy of 92.8

Testing Model on New Images Here are five German traffic signs that I found on the web: alt text

Here are the results of the prediction:

Image Prediction
Keep Rigth Keep Right
Stop Stop
30 km/h 30 km/h
Priority road Priority road
cycle road General caution

The model was able to correctly guess 4 of the 5 traffic signs, which gives an accuracy of 80%. This compares favorably to the accuracy on the test set of 92.6.

For the first image, the model is relatively sure that this is a keep rigth (probability of 1.0), and the image does contain a stop sign. The top five soft max probabilities were

Probability Prediction
1.00 Keep Right
1.00 Stop
0.58 30Km/h
0.98 Priority Road
0.83 General Caution

carnd-traffic-sign-classifier-project's People

Contributors

andrewpaster avatar antorsae avatar awbrown90 avatar baumanab avatar brok-bucholtz avatar davidawad avatar domluna avatar dsilver829 avatar josemacenteno avatar mvirgo avatar ryan-keenan avatar sanketgujar avatar swwelch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.