Code Monkey home page Code Monkey logo

car-classifier's Introduction

Car classifier

Machine Learning project to classify car models by photos. Inspired by fastai course & code. So far this is just the first version and a proof of concept. Current version classifies cars by 8 categories, which represents 8 generations of Volkswagen Golf model.

Try it! (on mobile or desktop)

All parts of this application are written in python in form of Jupyter Notebooks. Further I will describe the main steps of this project and point out which notebooks are responsible for them.

Table of Contents

Data

Gathering

Data for this project was collected from Internet. Partially using scripts and search engines (Bing & DuckDuckGo). But mostly by searching & downloading by hand.
1500 images there collected in total. Approximately 190 images per category (so far there are 8 VW Golf generations). In addition, 67 photos were collected on the street with the iPhone camera.

The training data is not a part of this repo.

Splitting

The data was then split in 3 sets: training (67%), validation (19%) & test (14%).

Training

Model

A pre-trained ResNet50 model was selected for the training. Then it was fine tuned using training data for 100 epochs using MacBook Pro (2018, i7, 16 GB) and only CPU (the training took about 6 hours). A standard set of augmentations from fastai library were applied to the training data.

You can download the model here.

Accuracy

Validation set - 96%
Test set - 95%
Own iPhone photos taken on street - 88%

Example of predictions

predictions example

Application

A web application is build using Gradio library.

older alternative

A web application (Inference.ipynb) is rendered from Jupyter Notebook using Voilà library.

Deployment

Hugging Face

The Gradio web application is deployed for free on Hugging Face platform.

Heroku (not active)

The Voila web application is deployed for free(not anymore) on Heroku platform. The model is hosted on Google Drive and downloaded at runtime to bypass storage limits for free hosting.

Main dependencies

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.