So let's move forward and visualize the data we have, so here I'm visualizing some of the traffic signs
from the data.
And let's see how it looks.
So here are some of the images from the dataset.
And as you can see here, the dimension of the images are not seen for all the images.
So as the size of the images are different, we have to make them equal.
So we will take the mean of these images here and finding out the mean of these images so we can we
already know that there are forty three classes in this graphic, same dataset.
So I'm running a for loop from zero to 43.
That is what it is.
And I'll take each image and find out the meaning of that image.
I mentioned one and I mentioned to and will store it.
Let's run this and store the dimension of these images to find out the meaning of these images.
It's running right now, so we have stored this.
Next, we will find out the meaning of these dimensions and print them out.
So here we can see that 50 by 50 is the average for all the images here, we can see that the damage
and one win is fifty point three two and damage in two minutes, fifty point three.
So we can conclude that 50 50 is the average.
Now, we will convert all these images into the ship, 50 by 50.
For that, I'm using images, an empty list also unlabelled is an empty list.
And we ship all these images and also store their label ideas for this, we have we are running a loop
here for forty three classes and storing all the images, resizing them.
And also there is also.
Mr. Anderson, and convert these images or resize these images into the desired dimensions.
That is 50 by 50 and also storing the.
It's done so the next step would be to convert these images into no error and also to normalize them.
So in order to normalize an image, we will divide it by two fifty five because the value of each image
ranges from zero to 255.
So we will divide each image by two fifty five to normalize them and to convert them into array will
simply use the function.
And so let's Grandison and convert their images into numbers and normalize them.
So it's done.
Similarly will store the label I listened to today and will see the shape of it.
So here we can observe that there are three nine two zero nine ladies, similarly will print the shape
of the images.
So here we can see that there are three nine two zero nine images with the shape of fifty to fifty three.
So her three is the channel, which means that they are colored images in AGP format.
Let's move forward now.
We'll visualize the number of the class to find out if the data is balanced or not.
So here we can see that data is around twenty two hundred in each class.
So we can say that the data is not imbalanced, data is balanced.
We do not need to balance the data.
Data is already balanced.
Now we'll split that data using the test transmit.
Into a ratio of 80 percent to ending data and 20 percent validation later.
Similarly will convert the training data that will convert the label, that is which class it belongs
to and do not including using too categorical function.
So why not?
Encoding is important because if we don't apply, we're not including the machine will prioritize it.
So to avoid prioritization, we apply, but not encoding, so will apply.
We're not encoding on the training and the validation data, the target variable that is in categorical
and well, categorical.