Edit model card

vit-base-patch16-224-in21k_car_or_motorcycle

This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the imagefolder dataset. It achieves the following results on the evaluation set:

  • Loss: 0.0301
  • Accuracy: 0.9938
  • F1: 0.9939
  • Recall: 0.9927
  • Precision: 0.9951

Model description

This is a binary classification model to distinguish between images of cars and images of motorcycles.

For more information on how it was created, check out the following link: https://github.com/DunnBC22/Vision_Audio_and_Multimodal_Projects/blob/main/Computer%20Vision/Image%20Classification/Binary%20Classification/Car%20or%20Motorcycle/Car_or_Motorcycle_ViT.ipynb

Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/utkarshsaxenadn/car-vs-bike-classification-dataset

Sample Images From Dataset:

Sample Images

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 0.0002
  • train_batch_size: 16
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 2

Training results

Training Loss Epoch Step Validation Loss Accuracy F1 Recall Precision
0.6908 1.0 200 0.0372 0.99 0.9902 0.9902 0.9902
0.6908 2.0 400 0.0301 0.9938 0.9939 0.9927 0.9951

Framework versions

  • Transformers 4.22.2
  • Pytorch 1.12.1
  • Datasets 2.5.2
  • Tokenizers 0.12.1
Downloads last month
42

Evaluation results