
<!-- 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-Michel_Daudon_-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.5737
- Accuracy: 0.8158
- Precision: 0.8397
- Recall: 0.8158
- F1: 0.8059

## 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.3412        | 0.1667  | 100  | 0.5737          | 0.8158   | 0.8397    | 0.8158 | 0.8059 |
| 0.2476        | 0.3333  | 200  | 0.7298          | 0.7883   | 0.7944    | 0.7883 | 0.7866 |
| 0.3971        | 0.5     | 300  | 0.9254          | 0.7475   | 0.8222    | 0.7475 | 0.7476 |
| 0.2939        | 0.6667  | 400  | 0.7719          | 0.7854   | 0.8224    | 0.7854 | 0.7833 |
| 0.0961        | 0.8333  | 500  | 1.1358          | 0.7429   | 0.7665    | 0.7429 | 0.7448 |
| 0.238         | 1.0     | 600  | 0.8758          | 0.7904   | 0.8178    | 0.7904 | 0.7896 |
| 0.1902        | 1.1667  | 700  | 0.7430          | 0.8271   | 0.8554    | 0.8271 | 0.8101 |
| 0.0787        | 1.3333  | 800  | 0.5883          | 0.8525   | 0.8816    | 0.8525 | 0.8557 |
| 0.0381        | 1.5     | 900  | 0.7656          | 0.8204   | 0.8333    | 0.8204 | 0.8244 |
| 0.1304        | 1.6667  | 1000 | 0.7800          | 0.8275   | 0.8513    | 0.8275 | 0.8225 |
| 0.217         | 1.8333  | 1100 | 0.7208          | 0.83     | 0.8507    | 0.83   | 0.8323 |
| 0.0806        | 2.0     | 1200 | 0.9077          | 0.805    | 0.8299    | 0.805  | 0.8000 |
| 0.0387        | 2.1667  | 1300 | 0.8138          | 0.845    | 0.8725    | 0.845  | 0.8453 |
| 0.1055        | 2.3333  | 1400 | 0.7708          | 0.8283   | 0.8588    | 0.8283 | 0.8280 |
| 0.0429        | 2.5     | 1500 | 0.8968          | 0.8154   | 0.8358    | 0.8154 | 0.8175 |
| 0.198         | 2.6667  | 1600 | 0.9388          | 0.8237   | 0.8290    | 0.8237 | 0.8199 |
| 0.099         | 2.8333  | 1700 | 1.0072          | 0.8217   | 0.8562    | 0.8217 | 0.8151 |
| 0.0665        | 3.0     | 1800 | 0.8864          | 0.8054   | 0.8032    | 0.8054 | 0.7963 |
| 0.0573        | 3.1667  | 1900 | 0.9131          | 0.8196   | 0.8291    | 0.8196 | 0.8162 |
| 0.0028        | 3.3333  | 2000 | 0.7288          | 0.8588   | 0.8648    | 0.8588 | 0.8564 |
| 0.0016        | 3.5     | 2100 | 1.1735          | 0.785    | 0.8147    | 0.785  | 0.7910 |
| 0.004         | 3.6667  | 2200 | 0.9195          | 0.84     | 0.8724    | 0.84   | 0.8414 |
| 0.0013        | 3.8333  | 2300 | 0.8082          | 0.8483   | 0.8759    | 0.8483 | 0.8497 |
| 0.0141        | 4.0     | 2400 | 0.9805          | 0.8342   | 0.8719    | 0.8342 | 0.8321 |
| 0.0015        | 4.1667  | 2500 | 0.7858          | 0.8538   | 0.8766    | 0.8538 | 0.8557 |
| 0.0011        | 4.3333  | 2600 | 1.1658          | 0.8037   | 0.8268    | 0.8037 | 0.7992 |
| 0.0008        | 4.5     | 2700 | 0.9506          | 0.8562   | 0.8762    | 0.8562 | 0.8578 |
| 0.0429        | 4.6667  | 2800 | 0.9533          | 0.8458   | 0.8712    | 0.8458 | 0.8437 |
| 0.0014        | 4.8333  | 2900 | 1.0837          | 0.81     | 0.8275    | 0.81   | 0.8072 |
| 0.1233        | 5.0     | 3000 | 1.0915          | 0.8104   | 0.8363    | 0.8104 | 0.8123 |
| 0.004         | 5.1667  | 3100 | 0.8199          | 0.8421   | 0.8415    | 0.8421 | 0.8401 |
| 0.0012        | 5.3333  | 3200 | 0.9103          | 0.8496   | 0.8690    | 0.8496 | 0.8538 |
| 0.0009        | 5.5     | 3300 | 1.0330          | 0.84     | 0.8761    | 0.84   | 0.8448 |
| 0.001         | 5.6667  | 3400 | 1.0544          | 0.8379   | 0.8699    | 0.8379 | 0.8385 |
| 0.0006        | 5.8333  | 3500 | 0.9087          | 0.8542   | 0.8699    | 0.8542 | 0.8560 |
| 0.0465        | 6.0     | 3600 | 0.9690          | 0.8504   | 0.8530    | 0.8504 | 0.8471 |
| 0.0015        | 6.1667  | 3700 | 0.9574          | 0.8425   | 0.8561    | 0.8425 | 0.8385 |
| 0.0022        | 6.3333  | 3800 | 1.0041          | 0.8325   | 0.8584    | 0.8325 | 0.8324 |
| 0.0774        | 6.5     | 3900 | 1.1730          | 0.8079   | 0.8185    | 0.8079 | 0.8044 |
| 0.0024        | 6.6667  | 4000 | 1.1644          | 0.8179   | 0.8302    | 0.8179 | 0.8154 |
| 0.0005        | 6.8333  | 4100 | 1.0119          | 0.84     | 0.8419    | 0.84   | 0.8347 |
| 0.0004        | 7.0     | 4200 | 1.0782          | 0.8217   | 0.8278    | 0.8217 | 0.8222 |
| 0.0752        | 7.1667  | 4300 | 1.3249          | 0.8      | 0.8340    | 0.8    | 0.7931 |
| 0.0315        | 7.3333  | 4400 | 0.8367          | 0.8446   | 0.8556    | 0.8446 | 0.8455 |
| 0.002         | 7.5     | 4500 | 1.0440          | 0.8417   | 0.8638    | 0.8417 | 0.8408 |
| 0.0006        | 7.6667  | 4600 | 0.9891          | 0.8554   | 0.8557    | 0.8554 | 0.8518 |
| 0.0006        | 7.8333  | 4700 | 1.0665          | 0.8275   | 0.8457    | 0.8275 | 0.8255 |
| 0.0005        | 8.0     | 4800 | 1.0764          | 0.8308   | 0.8458    | 0.8308 | 0.8308 |
| 0.0004        | 8.1667  | 4900 | 1.0959          | 0.8292   | 0.8517    | 0.8292 | 0.8298 |
| 0.0003        | 8.3333  | 5000 | 1.0436          | 0.8442   | 0.8650    | 0.8442 | 0.8445 |
| 0.0355        | 8.5     | 5100 | 1.2265          | 0.8183   | 0.8401    | 0.8183 | 0.8074 |
| 0.0026        | 8.6667  | 5200 | 0.9908          | 0.8492   | 0.8567    | 0.8492 | 0.8431 |
| 0.0006        | 8.8333  | 5300 | 1.0108          | 0.8492   | 0.8758    | 0.8492 | 0.8510 |
| 0.0009        | 9.0     | 5400 | 1.0780          | 0.8258   | 0.8473    | 0.8258 | 0.8275 |
| 0.0003        | 9.1667  | 5500 | 0.8827          | 0.8538   | 0.8674    | 0.8538 | 0.8553 |
| 0.0009        | 9.3333  | 5600 | 0.8098          | 0.8792   | 0.8974    | 0.8792 | 0.8813 |
| 0.0003        | 9.5     | 5700 | 0.7615          | 0.8871   | 0.8989    | 0.8871 | 0.8870 |
| 0.0003        | 9.6667  | 5800 | 0.7723          | 0.8867   | 0.8978    | 0.8867 | 0.8865 |
| 0.0002        | 9.8333  | 5900 | 0.7841          | 0.8838   | 0.8949    | 0.8838 | 0.8837 |
| 0.0002        | 10.0    | 6000 | 0.7924          | 0.8833   | 0.8944    | 0.8833 | 0.8833 |
| 0.0002        | 10.1667 | 6100 | 0.7995          | 0.8838   | 0.8949    | 0.8838 | 0.8837 |
| 0.0002        | 10.3333 | 6200 | 0.8072          | 0.8829   | 0.8944    | 0.8829 | 0.8830 |
| 0.0002        | 10.5    | 6300 | 0.8127          | 0.8825   | 0.8942    | 0.8825 | 0.8826 |
| 0.0002        | 10.6667 | 6400 | 0.8188          | 0.8825   | 0.8940    | 0.8825 | 0.8826 |
| 0.0002        | 10.8333 | 6500 | 0.8247          | 0.8825   | 0.8940    | 0.8825 | 0.8826 |
| 0.0002        | 11.0    | 6600 | 0.8301          | 0.8821   | 0.8934    | 0.8821 | 0.8820 |
| 0.0002        | 11.1667 | 6700 | 0.8340          | 0.8821   | 0.8933    | 0.8821 | 0.8819 |
| 0.0001        | 11.3333 | 6800 | 0.8387          | 0.8821   | 0.8931    | 0.8821 | 0.8819 |
| 0.0001        | 11.5    | 6900 | 0.8439          | 0.8821   | 0.8931    | 0.8821 | 0.8819 |
| 0.0001        | 11.6667 | 7000 | 0.8475          | 0.8821   | 0.8934    | 0.8821 | 0.8820 |
| 0.0001        | 11.8333 | 7100 | 0.8511          | 0.8821   | 0.8935    | 0.8821 | 0.8821 |
| 0.0001        | 12.0    | 7200 | 0.8555          | 0.8817   | 0.8932    | 0.8817 | 0.8817 |
| 0.0001        | 12.1667 | 7300 | 0.8588          | 0.8817   | 0.8932    | 0.8817 | 0.8817 |
| 0.0001        | 12.3333 | 7400 | 0.8621          | 0.8817   | 0.8932    | 0.8817 | 0.8817 |
| 0.0001        | 12.5    | 7500 | 0.8649          | 0.8817   | 0.8935    | 0.8817 | 0.8817 |
| 0.0001        | 12.6667 | 7600 | 0.8681          | 0.8812   | 0.8933    | 0.8812 | 0.8814 |
| 0.0001        | 12.8333 | 7700 | 0.8708          | 0.8812   | 0.8933    | 0.8812 | 0.8814 |
| 0.0001        | 13.0    | 7800 | 0.8738          | 0.8812   | 0.8933    | 0.8812 | 0.8814 |
| 0.0001        | 13.1667 | 7900 | 0.8767          | 0.8812   | 0.8932    | 0.8812 | 0.8813 |
| 0.0001        | 13.3333 | 8000 | 0.8787          | 0.8808   | 0.8929    | 0.8808 | 0.8810 |
| 0.0001        | 13.5    | 8100 | 0.8809          | 0.8808   | 0.8929    | 0.8808 | 0.8810 |
| 0.0001        | 13.6667 | 8200 | 0.8830          | 0.8812   | 0.8934    | 0.8812 | 0.8814 |
| 0.0001        | 13.8333 | 8300 | 0.8847          | 0.8812   | 0.8934    | 0.8812 | 0.8814 |
| 0.0001        | 14.0    | 8400 | 0.8861          | 0.8812   | 0.8934    | 0.8812 | 0.8814 |
| 0.0001        | 14.1667 | 8500 | 0.8877          | 0.8812   | 0.8934    | 0.8812 | 0.8814 |
| 0.0001        | 14.3333 | 8600 | 0.8887          | 0.8812   | 0.8936    | 0.8812 | 0.8814 |
| 0.0001        | 14.5    | 8700 | 0.8896          | 0.8808   | 0.8933    | 0.8808 | 0.8811 |
| 0.0001        | 14.6667 | 8800 | 0.8903          | 0.8812   | 0.8937    | 0.8812 | 0.8816 |
| 0.0001        | 14.8333 | 8900 | 0.8907          | 0.8812   | 0.8937    | 0.8812 | 0.8816 |
| 0.0001        | 15.0    | 9000 | 0.8909          | 0.8812   | 0.8937    | 0.8812 | 0.8816 |


### Framework versions

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

mix-subtype_iva mix-subtype_iva2 mix-subtype_ivc mix-subtype_ivd mix-subtype_ia mix-subtype_va