Traffic Sign Recognition

Traffic Sign Recognition

The project is a deep neural and convolutional neural network to classify traffic signs.

Build a Traffic Sign Recognition Project

The goals/steps of this project are the following:

  • Load the data set (see below for links to the project data set)
  • Explore, summarize and visualize the data set
  • Design, train and test a model architecture
  • Use the model to make predictions on new images
  • Analyze the softmax probabilities of the new images
  • Summarize the results with a written report

You're reading it! and here is a link to my project code

Data Set Summary & Exploration

1. Summary of the data set.

I used the pandas library to calculate summary statistics of the traffic 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. Visualization of the dataset.

Here is an exploratory visualization of the data set. It is a bar chart showing how the data ...

图片无替代文字

Design and Test a Model Architecture

1. Pre-processing the image data.

As a first step, I decided to normalize the images to 0~1, then I decided to generate additional data, So I augmented images with rotation, width shift, and heights shift, horizontal flip.

2. Describe what your final model architecture looks like including model type, layers, layer sizes, connectivity, etc.) Consider including a diagram and/or table describing the final model.

I build 2 networks as a final model:

LeNet with additional 2 layers to improve network ability.

图片无替代文字
图片无替代文字



Transfer Learning.

I used a pre-training MobileNet model. and fine-tuning train all parameters. The result is so exciting for this task.

图片无替代文字

3. Trained the model.

To train the model, I recorded the whole training process as following.

图片无替代文字

When the model is High biase, I tried to add more Conv2D layers and train longer. If the model is Overfitting on the train set. I tried to set "L2 regularization" and "EarlyStopping".

图片无替代文字

4. Approach solution

My final model results were:

  • Training set accuracy of 88%, using Data with augmentation
  • The validation set accuracy of 94%
  • The test set accuracy of 91%
图片无替代文字

If an iterative approach was chosen: I think the important design is to try a small network at first. then add more layers to improve network ability. I would choose some pre-train models to solve this task. So I choose the mobileNet model with light weights. if the mobileNet didn't meet the approach. I would choose ResNet and so on.

Test a Model on New Images

1. Choose five German traffic signs found on the web.

Here are five "German traffic signs" that I found on the web:

图片无替代文字

I used the first model to predict the images.

predictions = model.predict_classes(test_images)

m = tf.keras.metrics.Accuracy()
m.update_state(predictions, test_labels)
print("The accuracy {:2.0f} %".format(m.result().numpy()*100) )

The accuracy 100 %

It's so exciting result, and I had to take so long time to train and fine-tuning hyperparameters. such as Bach Size and learning rate. But I figure out that Model Architecture and Data with augmentation are key for this task.











要查看或添加评论,请登录

社区洞察