A Deep Learning Project consisting of image classification and gradio interface for recognising and classifying traffic signs. Here we will be using Convolutional Neural Networks beacuse of their superior performance with image inputs.
A Convolutional Neural Network (CNN) is a type of artificial neural network specifically designed for processing structured grid data, such as images and videos.
They have three main types of layers, which are:
1 . Convolutional layer
2 . Pooling layer
3 . Fully-connected (FC) layer
In this particular project we will be working upon Image Classification using Convolutional Neural Network(CNN). We are using CNN because of its superior performance with image classification models.
Here we are classifying three categories of traffic signs namely:
[a] No Parking
[b] One Way
[c] Zebra Crossing
Most of our images is collected by us through mobile photography. We went to multiple roads and clicked the photos of our desired traffic signs and aggregated them together in the form of a dataset.
Some of our images is also collected through online sources and then we combined every photos to form a perfect dataset of images with the same image type.
We also went through the street view of google maps and captured the images of traffic signs in the form of screenshot.
The necessary libraries are imported for preprocessing and model creation.
Dataset is uploaded for the further use.
Data is rescaled and normalised in order to maintain uniformity. Here uniformity means converting all the images to a fixed size for better performance of model.
A little bit of data augmentation has also been performed.
A Sequential model using Convolutional Neural Network(CNN) is created.
We are using three input layers and three dense layers along with dropout layers.
This model exists within a function with varying range of paramters.
Model compilation is an activity performed after writing the statements in a model and before training starts. It checks for format errors, and defines the loss function, the optimizer or learning rate, and the metrics. A compiled model is needed for training but not necessary for predicting.
Optimizer used is "adam" and loss function as "categorical crossentropy". Metrics used is "accuracy".
Model fitting is the process where we train our model with training data.
Number of epochs is 30 and batch size as 16. Epochs is defined as the total number of iterations of all the training data in one cycle for training the machine learning model.
The model is created as a function which tries various parameters, weights and biases to find the optimal paramaters for the model. We limit the tuning if it takes too long too achieve convergence. The best parameters are then selected based on their performance on validation data.
Model is saved for further use.
The predictions are visualised and classified as correct and incorrect predictions.
Gradio Interface is created for seamless user experience. Drag and Drop feature is introduced for submitting the image and predicting the image category.
https://github.com/keyachak25
https://github.com/Parth-Ach2002