
<!-- 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-_SEC

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.3420
- Accuracy: 0.9192
- Precision: 0.9216
- Recall: 0.9192
- F1: 0.9190

## 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.2755        | 0.3333  | 100  | 0.7287          | 0.7708   | 0.7925    | 0.7708 | 0.7574 |
| 0.1543        | 0.6667  | 200  | 0.4145          | 0.8708   | 0.8855    | 0.8708 | 0.8705 |
| 0.0739        | 1.0     | 300  | 0.5222          | 0.8467   | 0.8812    | 0.8467 | 0.8463 |
| 0.0491        | 1.3333  | 400  | 0.5282          | 0.8408   | 0.8582    | 0.8408 | 0.8427 |
| 0.0666        | 1.6667  | 500  | 0.6483          | 0.8592   | 0.8691    | 0.8592 | 0.8596 |
| 0.078         | 2.0     | 600  | 0.6382          | 0.8592   | 0.8602    | 0.8592 | 0.8580 |
| 0.011         | 2.3333  | 700  | 0.8982          | 0.8217   | 0.8582    | 0.8217 | 0.8191 |
| 0.0499        | 2.6667  | 800  | 0.8965          | 0.8475   | 0.8902    | 0.8475 | 0.8470 |
| 0.0035        | 3.0     | 900  | 0.8278          | 0.8392   | 0.8674    | 0.8392 | 0.8398 |
| 0.0707        | 3.3333  | 1000 | 0.3420          | 0.9192   | 0.9216    | 0.9192 | 0.9190 |
| 0.003         | 3.6667  | 1100 | 0.5066          | 0.88     | 0.8971    | 0.88   | 0.8810 |
| 0.0587        | 4.0     | 1200 | 0.6408          | 0.8817   | 0.8882    | 0.8817 | 0.8825 |
| 0.0018        | 4.3333  | 1300 | 0.6582          | 0.8692   | 0.8759    | 0.8692 | 0.8693 |
| 0.1528        | 4.6667  | 1400 | 0.6080          | 0.8758   | 0.9034    | 0.8758 | 0.8728 |
| 0.0266        | 5.0     | 1500 | 0.5895          | 0.8708   | 0.8943    | 0.8708 | 0.8688 |
| 0.0019        | 5.3333  | 1600 | 0.4804          | 0.8967   | 0.9022    | 0.8967 | 0.8966 |
| 0.0011        | 5.6667  | 1700 | 0.6821          | 0.885    | 0.8926    | 0.885  | 0.8813 |
| 0.0009        | 6.0     | 1800 | 0.6932          | 0.8683   | 0.8733    | 0.8683 | 0.8645 |
| 0.0299        | 6.3333  | 1900 | 0.7787          | 0.8667   | 0.8843    | 0.8667 | 0.8663 |
| 0.0007        | 6.6667  | 2000 | 0.5522          | 0.9042   | 0.9057    | 0.9042 | 0.9027 |
| 0.0007        | 7.0     | 2100 | 0.5208          | 0.9067   | 0.9096    | 0.9067 | 0.9072 |
| 0.0006        | 7.3333  | 2200 | 0.5342          | 0.905    | 0.9076    | 0.905  | 0.9053 |
| 0.0006        | 7.6667  | 2300 | 0.7917          | 0.8517   | 0.8734    | 0.8517 | 0.8516 |
| 0.0008        | 8.0     | 2400 | 0.9942          | 0.85     | 0.8666    | 0.85   | 0.8483 |
| 0.0005        | 8.3333  | 2500 | 0.7367          | 0.8842   | 0.8853    | 0.8842 | 0.8815 |
| 0.0075        | 8.6667  | 2600 | 0.6106          | 0.8833   | 0.8934    | 0.8833 | 0.8842 |
| 0.0007        | 9.0     | 2700 | 0.6440          | 0.8817   | 0.8837    | 0.8817 | 0.8781 |
| 0.0005        | 9.3333  | 2800 | 0.5905          | 0.905    | 0.9065    | 0.905  | 0.9047 |
| 0.0004        | 9.6667  | 2900 | 0.5889          | 0.9033   | 0.9046    | 0.9033 | 0.9030 |
| 0.0004        | 10.0    | 3000 | 0.7286          | 0.89     | 0.8981    | 0.89   | 0.8889 |
| 0.0003        | 10.3333 | 3100 | 0.8314          | 0.875    | 0.8883    | 0.875  | 0.8754 |
| 0.0003        | 10.6667 | 3200 | 0.7812          | 0.8808   | 0.8902    | 0.8808 | 0.8802 |
| 0.0003        | 11.0    | 3300 | 0.7806          | 0.8817   | 0.8908    | 0.8817 | 0.8811 |
| 0.0003        | 11.3333 | 3400 | 0.7808          | 0.8825   | 0.8910    | 0.8825 | 0.8821 |
| 0.0003        | 11.6667 | 3500 | 0.5853          | 0.9025   | 0.9026    | 0.9025 | 0.9023 |
| 0.0003        | 12.0    | 3600 | 0.8102          | 0.88     | 0.8876    | 0.88   | 0.8804 |
| 0.0003        | 12.3333 | 3700 | 0.8667          | 0.8742   | 0.8802    | 0.8742 | 0.8744 |
| 0.0003        | 12.6667 | 3800 | 0.8161          | 0.8783   | 0.8838    | 0.8783 | 0.8786 |
| 0.0003        | 13.0    | 3900 | 0.8035          | 0.88     | 0.8854    | 0.88   | 0.8803 |
| 0.0003        | 13.3333 | 4000 | 0.7989          | 0.88     | 0.8854    | 0.88   | 0.8803 |
| 0.0002        | 13.6667 | 4100 | 0.8006          | 0.88     | 0.8850    | 0.88   | 0.8803 |
| 0.0002        | 14.0    | 4200 | 0.8021          | 0.88     | 0.8850    | 0.88   | 0.8803 |
| 0.0002        | 14.3333 | 4300 | 0.8028          | 0.8808   | 0.8858    | 0.8808 | 0.8811 |
| 0.0002        | 14.6667 | 4400 | 0.8035          | 0.8808   | 0.8858    | 0.8808 | 0.8811 |
| 0.0002        | 15.0    | 4500 | 0.8036          | 0.8808   | 0.8858    | 0.8808 | 0.8811 |


### Framework versions

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

sec-subtype_iva sec-subtype_iva2 sec-subtype_ivc sec-subtype_ivd sec-subtype_ia sec-subtype_va