Git Product home page Git Product logo

vehicle-classification's Introduction

Vehicle Classification

Transfer Learning is a technique in which we can train a model using a pre-trained model in case of small dataset because deep learning model needs huge amount of data for training from scratch.

In case of Computer Vision, There are various pretrained models available like VGGNet, ResNet, MobileNet etc.

To choose best model for your usecase, check whether the pretrained model you want to select is already trained on the class on which you want to work or not.

If it is already trained on similar usecase then choose that model only because it will converge faster and give better accuracy in lesser time.

In provided notebook, dataset chosen is a vehicle dataset consisting of 9 classes of vehicles namely: bike, boat, bus, car, cycle, helicopter, plane, scooty, truck

Dataset Credits: https://www.kaggle.com/rishabkoul1/vechicle-dataset

Train Images containes 468 images and Test Images contains 72 images which makes this a perfect case for transfer learning

I used MobileNet V2 pretrained model for transfer learning here because it is lightweight and still accurate.

Applied GlobalAveragePooling2D for extracting the average of best features from images.

Since, dataset is too small, Image Augmentation is done for the dataset to generate more images on the fly while training to get better accuracy while testing with unseen images.

Three types of Augmentation is done

  • Rescale: normalize the image
  • Shear: Distorts the image like a parallelogram
  • zoom: enlarge the image

Each image is augmented three times for each iteration, therfore generating more data for training.

Model is trained and got Training accuracy of 97.22% while Validation accuracy is 83.33%.

THIS SHOWS HOW TRANSFER LEARNING CAN BE USED IN DEEP LEARNING FOR SMALL DATASETS AND STILL GETTING GOOD ACCURACY.

vehicle-classification's People

Contributors

aaryanverma avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.