karimkohel / FCC

Fine Car Classifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FCC

Fine Car Classifier is a classification project that's trained on 70+ models of cars and would identify each one's make and model

Usage

Download the model weights file.pt and use it with this package as follows

from FCC.CarClassifier import CarClassifier

# start classifier with trained model
fcc = CarClassifier("path/to/model.pt")

# get predicted class with image path
predictedCar = fcc.predict("path/to/image.jpg")

# or get prediction with image object
ret, frame = cap.read()
predictedCar = fcc.predict(frame)

Model

The model architecture is extremely straightforward and simple, for the low low price of 15862006 parameters you get the following:

model architecure

The architecture is explained in this paper AKA YOLOV8-CLS, normally it's pretrained on 1000 classes from the ImageNet dataset

Data

Data was broken into train, val and test.

Val and Test

Val set had 90 samples per car while test set had 10

Training:

Now for the training data:

Initial dataset

  • total training images: 53453
  • average image count per car: 763

all data

The lowest of which

Lowest count cars

Testing for initial data

each car model was testing against 10 never seen images and these are the scores for all of them testing scores for all cars

as you can see, there are a bunch that didn't perform well, let's expand on those. lowest test scores

What does it look like when the model fails?

Expand more on failing cases while showing more data

bad example

Notes:

About

Fine Car Classifier


Languages

Language:Jupyter Notebook 97.6%Language:Python 2.4%