Traffic Sign Neural Network
Price Classifier
This is an Deep learning model where it can predict traffic signs,basically there is a usage of convolutional neural networks,max pooling layers to reduce the size of the edge and flatten layer to convert the multi-dimensional data inputs to single dimension.
An empty list named images,labels are created to fetch up the features and labels respectively,now the data is collected and scanned by using for loop and assigned to images and labels.The collected data is converted to array for further proceedings.
Images and labels are assingned to features and target and here comes the data seperation(training and testing) using a function in sklearn called train_test_spilt,after seperation the feature data is fed into preprocessing step where convertion of images to black and white and normalisation takes place.
There are some alteration need to be done for better understanding and classified data such as width,height shift,shear,zoom and rotation.There is a function called ImageDataGenerator in keras module.After alteration the data is scanned for error,if there is no error the changes are applied using flow method.Lastly perform one-hot encoding using a function to_categorical in keras module.
As it is there in overview there are several layers used in model specification such as Conv2d,MaxPooling,Flatten,Dense and model of type of sequential.
Model compilation is done by two parameters,one is optimizer and loss function of adam with learning rate 0.001 and categorical_crossentropy.
Fitting is done by calling the method fit_generator with parameters,one is the variable where the data is assigned and the other one is epochs specification.
Before predicting,the model architecture and weights must be saved so that we can run it whenever we want and it must be in the form of jason
First thing needed to be done is input capturing through our web cam or default camera,the input is video nothing but continuos frame of images,we have to passs that image to make prediction.As we get multiple continuos images we use infinite while loop to make further process.The predicion process is shown in the code file.
This is an classification model where we play with structured data this time.we use sigmoid function to seperate the classes and at first it applies logistic regression and then comes sigmoid function,the intersection of slope and sigmoid function called as pivot and then it classifies the two classes.
Read the file using pandas and seperate the feature column and target column assigning each variable to it,and get the dummy values(convert categorical to numerical values) and using keras classify test and training data and and using logistic regression we feed the data for further prediction process.
There are some categorical data in the dataframe where we have to convert into numerical so that we can apply logistic regression into it.To convert to numerical values we can call get_dummies function and to_categorical method from utilis in keras library.
As it is structured data we dont use any specialized neural network into it,so there is a use of regular model method and the training sets is fit into the model and it is further proceed for predicting using testing test.
At first it performs linear regression where it performs a slope a degree(theta) and then there is a sigmoid graph which is yellow in color,the point where the sigmoid line and linear line intercepts is called as pivot,and the points or the entities which is present left to it as classified as a class and points or entities right to it is classified as another class.The main reason why we use sigmoid function is it between 0 and 1,the classification outcomes a value which is between 0 and 1.This is how regression works.