
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# ViT-Base-Document-Classifier

This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0415
- Accuracy: 0.9889
- F1: 0.9888
- Precision: 0.9888
- Recall: 0.9888

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 512
- eval_batch_size: 512
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 2048
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- training_steps: 100

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     | Precision | Recall |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
| 0.0696        | 1.25  | 50   | 0.0566          | 0.9852   | 0.9851 | 0.9852    | 0.9852 |
| 0.0673        | 2.0   | 51   | 0.0549          | 0.9870   | 0.9870 | 0.9870    | 0.9870 |
| 0.0599        | 2.02  | 52   | 0.0545          | 0.9864   | 0.9863 | 0.9863    | 0.9864 |
| 0.0639        | 2.02  | 53   | 0.0551          | 0.9876   | 0.9875 | 0.9875    | 0.9875 |
| 0.0694        | 2.04  | 54   | 0.0539          | 0.9864   | 0.9863 | 0.9863    | 0.9864 |
| 0.0655        | 2.04  | 55   | 0.0528          | 0.9879   | 0.9878 | 0.9878    | 0.9879 |
| 0.0629        | 2.06  | 56   | 0.0519          | 0.9877   | 0.9876 | 0.9876    | 0.9876 |
| 0.0761        | 2.06  | 57   | 0.0532          | 0.9872   | 0.9871 | 0.9871    | 0.9871 |
| 0.0741        | 2.08  | 58   | 0.0524          | 0.9865   | 0.9864 | 0.9864    | 0.9865 |
| 0.0585        | 2.08  | 59   | 0.0519          | 0.9879   | 0.9878 | 0.9878    | 0.9878 |
| 0.0534        | 2.1   | 60   | 0.0504          | 0.9881   | 0.9880 | 0.9880    | 0.9880 |
| 0.056         | 2.1   | 61   | 0.0497          | 0.9876   | 0.9875 | 0.9875    | 0.9875 |
| 0.0588        | 2.12  | 62   | 0.0485          | 0.9878   | 0.9877 | 0.9877    | 0.9877 |
| 0.0554        | 2.12  | 63   | 0.0482          | 0.9872   | 0.9871 | 0.9871    | 0.9872 |
| 0.0674        | 2.13  | 64   | 0.0491          | 0.9870   | 0.9870 | 0.9870    | 0.9869 |
| 0.0613        | 2.15  | 65   | 0.0480          | 0.9877   | 0.9876 | 0.9876    | 0.9876 |
| 0.0688        | 2.15  | 66   | 0.0468          | 0.9877   | 0.9876 | 0.9876    | 0.9876 |
| 0.0677        | 2.17  | 67   | 0.0476          | 0.9874   | 0.9874 | 0.9873    | 0.9874 |
| 0.0598        | 2.17  | 68   | 0.0471          | 0.9874   | 0.9873 | 0.9873    | 0.9873 |
| 0.0658        | 2.19  | 69   | 0.0462          | 0.9877   | 0.9876 | 0.9876    | 0.9876 |
| 0.051         | 2.19  | 70   | 0.0467          | 0.9880   | 0.9879 | 0.9879    | 0.9879 |
| 0.0601        | 2.21  | 71   | 0.0456          | 0.9881   | 0.9880 | 0.9880    | 0.9880 |
| 0.0619        | 2.21  | 72   | 0.0460          | 0.9879   | 0.9878 | 0.9878    | 0.9879 |
| 0.0459        | 2.23  | 73   | 0.0458          | 0.9883   | 0.9882 | 0.9882    | 0.9883 |
| 0.0705        | 2.23  | 74   | 0.0447          | 0.9884   | 0.9883 | 0.9883    | 0.9883 |
| 0.0606        | 2.25  | 75   | 0.0447          | 0.9878   | 0.9878 | 0.9878    | 0.9878 |
| 0.0599        | 3.0   | 76   | 0.0441          | 0.9887   | 0.9886 | 0.9887    | 0.9886 |
| 0.0489        | 3.01  | 77   | 0.0438          | 0.9886   | 0.9885 | 0.9885    | 0.9885 |
| 0.0533        | 3.02  | 78   | 0.0442          | 0.9883   | 0.9882 | 0.9882    | 0.9883 |
| 0.0573        | 3.03  | 79   | 0.0438          | 0.9880   | 0.9879 | 0.9879    | 0.9880 |
| 0.0622        | 3.04  | 80   | 0.0439          | 0.9886   | 0.9885 | 0.9885    | 0.9885 |
| 0.0625        | 3.05  | 81   | 0.0434          | 0.9881   | 0.9880 | 0.9880    | 0.9880 |
| 0.0577        | 3.06  | 82   | 0.0431          | 0.9886   | 0.9885 | 0.9885    | 0.9885 |
| 0.0688        | 3.07  | 83   | 0.0435          | 0.9887   | 0.9886 | 0.9886    | 0.9887 |
| 0.0478        | 3.08  | 84   | 0.0434          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0516        | 3.09  | 85   | 0.0436          | 0.9888   | 0.9887 | 0.9887    | 0.9887 |
| 0.0588        | 3.1   | 86   | 0.0426          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0563        | 3.11  | 87   | 0.0422          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0463        | 3.12  | 88   | 0.0422          | 0.9886   | 0.9886 | 0.9885    | 0.9886 |
| 0.0582        | 3.13  | 89   | 0.0421          | 0.9887   | 0.9886 | 0.9886    | 0.9887 |
| 0.0643        | 3.14  | 90   | 0.0419          | 0.9891   | 0.9890 | 0.9890    | 0.9891 |
| 0.0706        | 3.15  | 91   | 0.0417          | 0.9892   | 0.9891 | 0.9891    | 0.9891 |
| 0.0554        | 3.16  | 92   | 0.0417          | 0.9892   | 0.9891 | 0.9891    | 0.9891 |
| 0.0644        | 3.17  | 93   | 0.0416          | 0.9890   | 0.9890 | 0.9890    | 0.9890 |
| 0.0624        | 3.18  | 94   | 0.0415          | 0.9893   | 0.9892 | 0.9892    | 0.9892 |
| 0.0555        | 3.19  | 95   | 0.0416          | 0.9886   | 0.9886 | 0.9885    | 0.9886 |
| 0.0507        | 3.2   | 96   | 0.0415          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0443        | 3.21  | 97   | 0.0415          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0527        | 3.22  | 98   | 0.0415          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0589        | 3.23  | 99   | 0.0415          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |
| 0.0647        | 3.24  | 100  | 0.0415          | 0.9889   | 0.9888 | 0.9888    | 0.9888 |


### Framework versions

- Transformers 4.39.3
- Pytorch 2.2.2
- Datasets 2.18.0
- Tokenizers 0.15.2

barcode invoice object receipt non-object