Object Classifier Using CNN



Original Source Here

Dataset:

The dataset is available on Kaggle which was given by Prashant Chaturvedi

The data is divided into two types: test data and train data. The training set contains 1486 images, whereas the testing set contains 392. The images in the collection were largely clear and well-formatted.

There are in all 2 labels which we need to predict.

  1. Electric Bus
  2. Electric Car

Data Preparation:

The dataset already included the training and test sets. The validation set, however, was missing. As a result, we needed to divide the training data set into an 80:20 ratio, i.e. (1486 for training and 297 for validation).

Image Preprocessing:

By definition, Image Processing is a method to perform some operations on an image ,in order to get an enhanced image or to extract some useful information from it. It is a type of signal processing in which input is an image and output may be image or characteristics/features associated with that image.

Rescaling :

Because the image size has a maximum pixel of 255, i.e. it has a range of [0,255], the model will struggle to process such a large image, thus we must rescale it before feeding it to the model.

Data Preprocessing

Model Training :

We are using CNN for training the model,

epoch_size=10

optimizer=adam

Model Evaluation:

The model performed very well on the validation as well as on training set .The model was able to yield an overall accuracy of 98.4% and an accuracy of approximately 82% on validation set.

Graph Plot :

Train V/S Val (Loss)
Train V/S Val (Accuracy)

Model Prediction :

Link :

Click the below link to access the Notebook .

https://cainvas.ai-tech.systems/use-cases/vehicle-classification-app/

Credit: Tanmay

AI/ML

Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: