
<!-- 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-finetune-kidney-stone-Michel_Daudon_-w256_1k_v1-_MIX-pretrain

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.4746
- Accuracy: 0.8496
- Precision: 0.8598
- Recall: 0.8496
- F1: 0.8525

## 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: 32
- 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.2473        | 0.3333  | 100  | 0.4746          | 0.8496   | 0.8598    | 0.8496 | 0.8525 |
| 0.2861        | 0.6667  | 200  | 0.8501          | 0.7712   | 0.8390    | 0.7712 | 0.7669 |
| 0.1879        | 1.0     | 300  | 0.5770          | 0.8087   | 0.8161    | 0.8087 | 0.8050 |
| 0.0231        | 1.3333  | 400  | 0.6048          | 0.8413   | 0.8497    | 0.8413 | 0.8397 |
| 0.095         | 1.6667  | 500  | 0.6374          | 0.8454   | 0.8771    | 0.8454 | 0.8458 |
| 0.0454        | 2.0     | 600  | 0.6772          | 0.8204   | 0.8424    | 0.8204 | 0.8275 |
| 0.0668        | 2.3333  | 700  | 0.7371          | 0.8321   | 0.8458    | 0.8321 | 0.8313 |
| 0.0145        | 2.6667  | 800  | 0.8734          | 0.8363   | 0.8700    | 0.8363 | 0.8369 |
| 0.0288        | 3.0     | 900  | 0.9109          | 0.8279   | 0.8649    | 0.8279 | 0.8276 |
| 0.0216        | 3.3333  | 1000 | 1.0871          | 0.7983   | 0.8372    | 0.7983 | 0.7925 |
| 0.0874        | 3.6667  | 1100 | 1.1486          | 0.7975   | 0.8589    | 0.7975 | 0.7993 |
| 0.0036        | 4.0     | 1200 | 0.8451          | 0.8308   | 0.8581    | 0.8308 | 0.8326 |
| 0.0059        | 4.3333  | 1300 | 0.6169          | 0.8667   | 0.8932    | 0.8667 | 0.8679 |
| 0.0476        | 4.6667  | 1400 | 0.7147          | 0.8579   | 0.8615    | 0.8579 | 0.8532 |
| 0.1213        | 5.0     | 1500 | 1.0007          | 0.8233   | 0.8589    | 0.8233 | 0.8199 |
| 0.0267        | 5.3333  | 1600 | 0.7032          | 0.8508   | 0.8587    | 0.8508 | 0.8510 |
| 0.0024        | 5.6667  | 1700 | 0.5666          | 0.8908   | 0.9006    | 0.8908 | 0.8931 |
| 0.0149        | 6.0     | 1800 | 0.5346          | 0.9062   | 0.9122    | 0.9062 | 0.9063 |
| 0.0011        | 6.3333  | 1900 | 0.9493          | 0.8304   | 0.8595    | 0.8304 | 0.8162 |
| 0.1168        | 6.6667  | 2000 | 0.7843          | 0.8642   | 0.8732    | 0.8642 | 0.8673 |
| 0.0015        | 7.0     | 2100 | 0.7234          | 0.8638   | 0.8777    | 0.8638 | 0.8563 |
| 0.0007        | 7.3333  | 2200 | 0.7182          | 0.8721   | 0.8875    | 0.8721 | 0.8680 |
| 0.052         | 7.6667  | 2300 | 0.7523          | 0.8692   | 0.8869    | 0.8692 | 0.8628 |
| 0.0013        | 8.0     | 2400 | 0.9651          | 0.8104   | 0.8386    | 0.8104 | 0.8117 |
| 0.0006        | 8.3333  | 2500 | 0.8654          | 0.8496   | 0.8497    | 0.8496 | 0.8452 |
| 0.0006        | 8.6667  | 2600 | 0.9136          | 0.8438   | 0.8532    | 0.8438 | 0.8414 |
| 0.0005        | 9.0     | 2700 | 0.8312          | 0.8525   | 0.8640    | 0.8525 | 0.8477 |
| 0.0005        | 9.3333  | 2800 | 0.7532          | 0.8675   | 0.8719    | 0.8675 | 0.8640 |
| 0.0005        | 9.6667  | 2900 | 0.9026          | 0.8421   | 0.8648    | 0.8421 | 0.8409 |
| 0.0004        | 10.0    | 3000 | 0.8117          | 0.8538   | 0.8702    | 0.8538 | 0.8539 |
| 0.0003        | 10.3333 | 3100 | 0.8112          | 0.8546   | 0.8697    | 0.8546 | 0.8544 |
| 0.0003        | 10.6667 | 3200 | 0.8165          | 0.8546   | 0.8697    | 0.8546 | 0.8544 |
| 0.0003        | 11.0    | 3300 | 0.8219          | 0.855    | 0.8698    | 0.855  | 0.8549 |
| 0.0003        | 11.3333 | 3400 | 0.8266          | 0.8546   | 0.8694    | 0.8546 | 0.8545 |
| 0.0003        | 11.6667 | 3500 | 0.8307          | 0.8546   | 0.8694    | 0.8546 | 0.8545 |
| 0.0003        | 12.0    | 3600 | 0.8349          | 0.8546   | 0.8694    | 0.8546 | 0.8544 |
| 0.0003        | 12.3333 | 3700 | 0.8381          | 0.855    | 0.8699    | 0.855  | 0.8548 |
| 0.0003        | 12.6667 | 3800 | 0.8411          | 0.8558   | 0.8707    | 0.8558 | 0.8557 |
| 0.0002        | 13.0    | 3900 | 0.8439          | 0.8554   | 0.8704    | 0.8554 | 0.8553 |
| 0.0002        | 13.3333 | 4000 | 0.8459          | 0.8562   | 0.8712    | 0.8562 | 0.8561 |
| 0.0002        | 13.6667 | 4100 | 0.8479          | 0.8562   | 0.8713    | 0.8562 | 0.8561 |
| 0.0002        | 14.0    | 4200 | 0.8496          | 0.8558   | 0.8710    | 0.8558 | 0.8556 |
| 0.0002        | 14.3333 | 4300 | 0.8508          | 0.8558   | 0.8710    | 0.8558 | 0.8556 |
| 0.0002        | 14.6667 | 4400 | 0.8515          | 0.855    | 0.8702    | 0.855  | 0.8548 |
| 0.0002        | 15.0    | 4500 | 0.8517          | 0.8554   | 0.8707    | 0.8554 | 0.8552 |


### Framework versions

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

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