Skip to content

TriptanjanaS07/CNN_VehicleClassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CNN_Vehicle Classification

This project uses CNN to classify if the image is either of a bike or a car. The model is trained on a custom dataset and can accurately detect bikes and cars in various settings.

Dataset

The dataset consists of 132 images which are divided into test and train folders.The test folder contains 15 images each of bike and car.The train folder contains 51 images each of bike and car.Training data is the set of the data on which the actual training takes place. Validation split helps to improve the model performance by fine-tuning the model after each epoch.

Steps to run the code

  1. Load the 'Bike_and_Car_CNN.ipynb' in the google collab.

  2. Connect the collab to a runtime and change the runtime type to GPU. (runtime -> runtime type ->hardware acclerator -> GPU)

  3. Upload the Bike and cars.zip to the collab either using drag and drop or by uploading it to your drive and connecting the drive to the notebook.

  4. Unzip the file using the command

!unzip '/path to/Bike and cars.zip'
  1. Copy the path of train and test folder and paste it in the respective section of directory.

  1. Go to Runtime -> Run all or press ctrl+F9

  2. The graph shows the training accuracy and the validation accuracy of CNN. Here the red line determines the performance of the training accuracy and the blue line represents the validation accuracy; while X-axis displays each epoch while Y-axis displays the increasing accuracy.

8.To test the output with a random image,upload an image to google colab and specify the path in the predict cell.

predict('/path to/image.jpeg')

Output

  1. On uploading an image of a car

We get the result as

  1. On uploading an image of a bike

We get the result as

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published