
<!-- 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-kidney-stone-2-Jonathan_El-Beze_-w256_1k_v1-_MIX

This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.5205
- Accuracy: 0.8642
- Precision: 0.8742
- Recall: 0.8642
- F1: 0.8636

## 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: 0.0002
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 15
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch   | Step | Validation Loss | Accuracy | Precision | Recall | F1     |
|:-------------:|:-------:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
| 0.3382        | 0.1667  | 100  | 0.7037          | 0.7592   | 0.8533    | 0.7592 | 0.7413 |
| 0.2441        | 0.3333  | 200  | 0.5509          | 0.8167   | 0.8354    | 0.8167 | 0.8179 |
| 0.1033        | 0.5     | 300  | 0.5433          | 0.8508   | 0.8663    | 0.8508 | 0.8492 |
| 0.0863        | 0.6667  | 400  | 0.5815          | 0.8104   | 0.8328    | 0.8104 | 0.7969 |
| 0.1032        | 0.8333  | 500  | 0.7683          | 0.7908   | 0.8394    | 0.7908 | 0.7771 |
| 0.0681        | 1.0     | 600  | 0.6216          | 0.8392   | 0.8451    | 0.8392 | 0.8393 |
| 0.0098        | 1.1667  | 700  | 0.8241          | 0.8087   | 0.8317    | 0.8087 | 0.8010 |
| 0.1486        | 1.3333  | 800  | 0.5205          | 0.8642   | 0.8742    | 0.8642 | 0.8636 |
| 0.0552        | 1.5     | 900  | 0.8228          | 0.8092   | 0.8290    | 0.8092 | 0.8074 |
| 0.1194        | 1.6667  | 1000 | 0.9466          | 0.7479   | 0.8266    | 0.7479 | 0.7067 |
| 0.1081        | 1.8333  | 1100 | 0.7999          | 0.8379   | 0.8586    | 0.8379 | 0.8334 |
| 0.0024        | 2.0     | 1200 | 0.8330          | 0.8438   | 0.8629    | 0.8438 | 0.8434 |
| 0.0799        | 2.1667  | 1300 | 0.7392          | 0.8588   | 0.8771    | 0.8588 | 0.8560 |
| 0.0018        | 2.3333  | 1400 | 0.9487          | 0.8158   | 0.8222    | 0.8158 | 0.8153 |
| 0.0052        | 2.5     | 1500 | 0.6795          | 0.8712   | 0.8739    | 0.8712 | 0.8678 |
| 0.0012        | 2.6667  | 1600 | 0.7281          | 0.8821   | 0.8859    | 0.8821 | 0.8812 |
| 0.0022        | 2.8333  | 1700 | 1.2392          | 0.795    | 0.7874    | 0.795  | 0.7857 |
| 0.0835        | 3.0     | 1800 | 1.0174          | 0.8163   | 0.8503    | 0.8163 | 0.8178 |
| 0.063         | 3.1667  | 1900 | 0.6986          | 0.8275   | 0.8288    | 0.8275 | 0.8258 |
| 0.0124        | 3.3333  | 2000 | 1.3449          | 0.7354   | 0.7889    | 0.7354 | 0.7215 |
| 0.0751        | 3.5     | 2100 | 0.9783          | 0.8292   | 0.8578    | 0.8292 | 0.8224 |
| 0.0089        | 3.6667  | 2200 | 0.6416          | 0.8871   | 0.8909    | 0.8871 | 0.8851 |
| 0.0833        | 3.8333  | 2300 | 0.9829          | 0.8025   | 0.8282    | 0.8025 | 0.8019 |
| 0.024         | 4.0     | 2400 | 0.7989          | 0.8508   | 0.8659    | 0.8508 | 0.8475 |
| 0.0221        | 4.1667  | 2500 | 0.6812          | 0.8842   | 0.8845    | 0.8842 | 0.8837 |
| 0.0005        | 4.3333  | 2600 | 0.9451          | 0.8429   | 0.8614    | 0.8429 | 0.8360 |
| 0.0005        | 4.5     | 2700 | 0.6669          | 0.8875   | 0.8882    | 0.8875 | 0.8865 |
| 0.0005        | 4.6667  | 2800 | 1.2303          | 0.8017   | 0.8330    | 0.8017 | 0.7984 |
| 0.0071        | 4.8333  | 2900 | 0.7767          | 0.8725   | 0.8790    | 0.8725 | 0.8725 |
| 0.1049        | 5.0     | 3000 | 0.7006          | 0.8646   | 0.8834    | 0.8646 | 0.8665 |
| 0.0761        | 5.1667  | 3100 | 0.7335          | 0.8892   | 0.8912    | 0.8892 | 0.8867 |
| 0.0007        | 5.3333  | 3200 | 0.6957          | 0.8867   | 0.8934    | 0.8867 | 0.8861 |
| 0.0006        | 5.5     | 3300 | 0.7774          | 0.8629   | 0.8739    | 0.8629 | 0.8637 |
| 0.0387        | 5.6667  | 3400 | 1.3677          | 0.7971   | 0.8275    | 0.7971 | 0.7944 |
| 0.0032        | 5.8333  | 3500 | 0.7322          | 0.8729   | 0.8836    | 0.8729 | 0.8710 |
| 0.0008        | 6.0     | 3600 | 0.9531          | 0.8517   | 0.8768    | 0.8517 | 0.8438 |
| 0.0014        | 6.1667  | 3700 | 0.8285          | 0.8654   | 0.8687    | 0.8654 | 0.8632 |
| 0.0004        | 6.3333  | 3800 | 0.7225          | 0.8875   | 0.8897    | 0.8875 | 0.8865 |
| 0.0009        | 6.5     | 3900 | 0.8248          | 0.87     | 0.8797    | 0.87   | 0.8705 |
| 0.0003        | 6.6667  | 4000 | 0.8972          | 0.8658   | 0.8805    | 0.8658 | 0.8665 |
| 0.0002        | 6.8333  | 4100 | 0.8997          | 0.8654   | 0.8800    | 0.8654 | 0.8662 |
| 0.0002        | 7.0     | 4200 | 0.8968          | 0.8667   | 0.8808    | 0.8667 | 0.8674 |
| 0.0002        | 7.1667  | 4300 | 0.8712          | 0.8725   | 0.8839    | 0.8725 | 0.8728 |
| 0.0002        | 7.3333  | 4400 | 0.8688          | 0.8838   | 0.8971    | 0.8838 | 0.8827 |
| 0.0002        | 7.5     | 4500 | 0.8917          | 0.8712   | 0.8818    | 0.8712 | 0.8686 |
| 0.0477        | 7.6667  | 4600 | 0.8017          | 0.8692   | 0.8832    | 0.8692 | 0.8703 |
| 0.0002        | 7.8333  | 4700 | 0.9936          | 0.85     | 0.8654    | 0.85   | 0.8445 |
| 0.0004        | 8.0     | 4800 | 0.9378          | 0.8396   | 0.8719    | 0.8396 | 0.8411 |
| 0.0007        | 8.1667  | 4900 | 1.2102          | 0.8013   | 0.8376    | 0.8013 | 0.7975 |
| 0.0004        | 8.3333  | 5000 | 0.7613          | 0.8883   | 0.9041    | 0.8883 | 0.8885 |
| 0.0005        | 8.5     | 5100 | 0.9156          | 0.8571   | 0.8821    | 0.8571 | 0.8573 |
| 0.0002        | 8.6667  | 5200 | 0.6973          | 0.8996   | 0.9065    | 0.8996 | 0.8969 |
| 0.0002        | 8.8333  | 5300 | 0.9252          | 0.8625   | 0.8938    | 0.8625 | 0.8636 |
| 0.0002        | 9.0     | 5400 | 0.7714          | 0.8854   | 0.9038    | 0.8854 | 0.8857 |
| 0.0001        | 9.1667  | 5500 | 0.7521          | 0.8892   | 0.9048    | 0.8892 | 0.8893 |
| 0.0002        | 9.3333  | 5600 | 0.7296          | 0.8971   | 0.9053    | 0.8971 | 0.8961 |
| 0.0002        | 9.5     | 5700 | 0.8592          | 0.8812   | 0.8882    | 0.8812 | 0.8807 |
| 0.027         | 9.6667  | 5800 | 1.0926          | 0.8346   | 0.8684    | 0.8346 | 0.8350 |
| 0.0002        | 9.8333  | 5900 | 0.8884          | 0.8654   | 0.8749    | 0.8654 | 0.8650 |
| 0.0255        | 10.0    | 6000 | 0.8784          | 0.8708   | 0.8809    | 0.8708 | 0.8704 |
| 0.0002        | 10.1667 | 6100 | 1.2491          | 0.7992   | 0.8409    | 0.7992 | 0.7816 |
| 0.0003        | 10.3333 | 6200 | 0.6981          | 0.8796   | 0.8850    | 0.8796 | 0.8776 |
| 0.0002        | 10.5    | 6300 | 0.8654          | 0.8725   | 0.8861    | 0.8725 | 0.8679 |
| 0.0002        | 10.6667 | 6400 | 0.5566          | 0.9012   | 0.9041    | 0.9012 | 0.8998 |
| 0.0002        | 10.8333 | 6500 | 0.6042          | 0.9025   | 0.9048    | 0.9025 | 0.9010 |
| 0.0002        | 11.0    | 6600 | 0.6078          | 0.9042   | 0.9062    | 0.9042 | 0.9027 |
| 0.0001        | 11.1667 | 6700 | 0.6105          | 0.9046   | 0.9066    | 0.9046 | 0.9030 |
| 0.0001        | 11.3333 | 6800 | 0.6138          | 0.9025   | 0.9047    | 0.9025 | 0.9010 |
| 0.0001        | 11.5    | 6900 | 0.6188          | 0.9025   | 0.9047    | 0.9025 | 0.9010 |
| 0.0001        | 11.6667 | 7000 | 0.6243          | 0.9017   | 0.9038    | 0.9017 | 0.9001 |
| 0.0001        | 11.8333 | 7100 | 0.6208          | 0.8992   | 0.9001    | 0.8992 | 0.8982 |
| 0.0067        | 12.0    | 7200 | 0.7476          | 0.8846   | 0.8948    | 0.8846 | 0.8835 |
| 0.0139        | 12.1667 | 7300 | 0.6116          | 0.9025   | 0.9042    | 0.9025 | 0.9013 |
| 0.0001        | 12.3333 | 7400 | 0.6976          | 0.8971   | 0.9053    | 0.8971 | 0.8962 |
| 0.0001        | 12.5    | 7500 | 0.7213          | 0.8946   | 0.9041    | 0.8946 | 0.8938 |
| 0.0001        | 12.6667 | 7600 | 0.7205          | 0.8954   | 0.9047    | 0.8954 | 0.8946 |
| 0.0001        | 12.8333 | 7700 | 0.6671          | 0.9029   | 0.9075    | 0.9029 | 0.9008 |
| 0.0001        | 13.0    | 7800 | 0.6448          | 0.9071   | 0.9130    | 0.9071 | 0.9059 |
| 0.0001        | 13.1667 | 7900 | 0.6449          | 0.9071   | 0.9130    | 0.9071 | 0.9059 |
| 0.0001        | 13.3333 | 8000 | 0.6453          | 0.9071   | 0.9130    | 0.9071 | 0.9059 |
| 0.0001        | 13.5    | 8100 | 0.6340          | 0.9087   | 0.9136    | 0.9087 | 0.9075 |
| 0.0001        | 13.6667 | 8200 | 0.6347          | 0.9087   | 0.9136    | 0.9087 | 0.9075 |
| 0.0001        | 13.8333 | 8300 | 0.6350          | 0.9092   | 0.9141    | 0.9092 | 0.9079 |
| 0.0001        | 14.0    | 8400 | 0.6355          | 0.9096   | 0.9144    | 0.9096 | 0.9084 |
| 0.0001        | 14.1667 | 8500 | 0.6358          | 0.9092   | 0.9139    | 0.9092 | 0.9080 |
| 0.0001        | 14.3333 | 8600 | 0.6360          | 0.9092   | 0.9139    | 0.9092 | 0.9080 |
| 0.0001        | 14.5    | 8700 | 0.6363          | 0.9092   | 0.9139    | 0.9092 | 0.9080 |
| 0.0001        | 14.6667 | 8800 | 0.6365          | 0.9096   | 0.9143    | 0.9096 | 0.9084 |
| 0.0001        | 14.8333 | 8900 | 0.6367          | 0.9096   | 0.9143    | 0.9096 | 0.9084 |
| 0.0001        | 15.0    | 9000 | 0.6369          | 0.9096   | 0.9143    | 0.9096 | 0.9084 |


### Framework versions

- Transformers 4.48.2
- Pytorch 2.6.0+cu126
- Datasets 3.1.0
- Tokenizers 0.21.0

mix-subtype_iiia mix-subtype_iia mix-subtype_ivc mix-subtype_ivd mix-subtype_ia mix-subtype_va