DunnBC22's picture
Update README.md
455e219
metadata
license: apache-2.0
tags:
  - generated_from_trainer
datasets:
  - imagefolder
metrics:
  - accuracy
  - f1
  - recall
  - precision
model-index:
  - name: vit-base-patch16-224-in21k_Bart_or_Homer
    results:
      - task:
          name: Image Classification
          type: image-classification
        dataset:
          name: imagefolder
          type: imagefolder
          config: default
          split: train
          args: default
        metrics:
          - name: Accuracy
            type: accuracy
            value: 0.9863013698630136
          - name: F1
            type: f1
            value: 0.9841269841269841
          - name: Recall
            type: recall
            value: 1
          - name: Precision
            type: precision
            value: 0.96875
language:
  - en
pipeline_tag: image-classification

vit-base-patch16-224-in21k_Bart_or_Homer

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

  • Loss: 0.0636
  • Accuracy: 0.9863
  • F1: 0.9841
  • Recall: 1.0
  • Precision: 0.9688

Model description

This is a binary classification model to distinguish between Bart and Homer Simpson.

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/Bart%20vs%20Homer/Bart_vs_Homer_Image_clf_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/williamu32/dataset-bart-or-homer

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: 3

Training results

Training Loss Epoch Step Validation Loss Accuracy F1 Recall Precision
0.6996 1.0 13 0.1327 0.9726 0.9688 1.0 0.9394
0.6996 2.0 26 0.0636 0.9863 0.9841 1.0 0.9688
0.6996 3.0 39 0.1420 0.9452 0.9394 1.0 0.8857

Framework versions

  • Transformers 4.25.1
  • Pytorch 1.12.1
  • Datasets 2.4.0
  • Tokenizers 0.12.1