Traffic Sign Classification using CNN

Author: Shubham Shrivastava


Traffic signs are an integral part of our road infrastructure. They provide critical information, sometimes compelling recommendations, for road users, which in turn requires them to adjust their driving behaviour to make sure they adhere with whatever road regulation currently enforced. For Autonomous Driving, the vehicle must know about the surrounding infrastructure like maximum allowed speed, stop signs, yield signs. These require them to be able to perceive traffic signs and understand the surroundings. Traffic Sign Classification plays a major role in deciding the behavior of self-driving cars and helps them prepare for events like pedestrian crossings in advance.

Here, deep neural networks and convolutional neural networks are used to classify traffic signs. I used train and validate a model so it can classify traffic sign images using the German Traffic Sign Dataset. After the model is trained, I tried the model on images of German traffic signs that I found on the web.

Detailed code with explanation is given here

The complete process of traffic sign detection can be broken down into:

Dataset Exploration

Design and Test of the Model Architecture

Convolutional Neural Network Architecture

Convolutional Neural Network Architecture

Model Certainty

Top 5 Softmax Probabilities For Each Image

TopKV2(values=array([[9.9999571e-01, 3.4213137e-06, 6.6664717e-07, 1.6374592e-07,
       [1.0000000e+00, 2.3870503e-18, 3.9513720e-20, 8.8137774e-21,
       [9.9990809e-01, 9.1885435e-05, 4.5486659e-17, 9.5398699e-18,
       [1.0000000e+00, 1.0980637e-29, 0.0000000e+00, 0.0000000e+00,
       [1.0000000e+00, 1.4886212e-22, 4.2423085e-28, 4.1486727e-34,
        5.7359064e-38]], dtype=float32), indices=array([[25, 29, 26, 20, 24],
       [ 1,  0,  2, 32,  6],
       [36, 38, 12, 41, 32],
       [38, 40,  0,  1,  2],
       [39, 31, 33, 21,  4]], dtype=int32))

Feature Maps visualization