
<!-- 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-3-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.4696
- Accuracy: 0.895
- Precision: 0.9027
- Recall: 0.895
- F1: 0.8932

## 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.4341        | 0.1667  | 100  | 0.6618          | 0.7542   | 0.8323    | 0.7542 | 0.7028 |
| 0.1842        | 0.3333  | 200  | 0.5375          | 0.8292   | 0.8571    | 0.8292 | 0.8250 |
| 0.1017        | 0.5     | 300  | 0.5146          | 0.8446   | 0.8707    | 0.8446 | 0.8440 |
| 0.1571        | 0.6667  | 400  | 0.6456          | 0.8213   | 0.8446    | 0.8213 | 0.8214 |
| 0.2427        | 0.8333  | 500  | 1.0066          | 0.7275   | 0.7704    | 0.7275 | 0.7065 |
| 0.0171        | 1.0     | 600  | 0.8354          | 0.7738   | 0.8158    | 0.7738 | 0.7607 |
| 0.0093        | 1.1667  | 700  | 0.5837          | 0.8558   | 0.8664    | 0.8558 | 0.8568 |
| 0.0892        | 1.3333  | 800  | 0.9045          | 0.7779   | 0.8225    | 0.7779 | 0.7605 |
| 0.0053        | 1.5     | 900  | 0.5252          | 0.8771   | 0.8890    | 0.8771 | 0.8744 |
| 0.0345        | 1.6667  | 1000 | 0.4696          | 0.895    | 0.9027    | 0.895  | 0.8932 |
| 0.1789        | 1.8333  | 1100 | 1.3185          | 0.7338   | 0.7993    | 0.7338 | 0.7002 |
| 0.0037        | 2.0     | 1200 | 0.9742          | 0.7746   | 0.8050    | 0.7746 | 0.7705 |
| 0.0034        | 2.1667  | 1300 | 0.5805          | 0.8704   | 0.8765    | 0.8704 | 0.8711 |
| 0.0026        | 2.3333  | 1400 | 0.8349          | 0.8346   | 0.8663    | 0.8346 | 0.8260 |
| 0.1052        | 2.5     | 1500 | 0.5899          | 0.8571   | 0.8584    | 0.8571 | 0.8566 |
| 0.1003        | 2.6667  | 1600 | 1.1080          | 0.7846   | 0.7992    | 0.7846 | 0.7588 |
| 0.0012        | 2.8333  | 1700 | 0.5852          | 0.885    | 0.8915    | 0.885  | 0.8845 |
| 0.0013        | 3.0     | 1800 | 1.4393          | 0.7429   | 0.8031    | 0.7429 | 0.7125 |
| 0.0499        | 3.1667  | 1900 | 0.9394          | 0.8067   | 0.8500    | 0.8067 | 0.7941 |
| 0.013         | 3.3333  | 2000 | 0.7218          | 0.8558   | 0.8681    | 0.8558 | 0.8488 |
| 0.0034        | 3.5     | 2100 | 0.8017          | 0.8467   | 0.8627    | 0.8467 | 0.8401 |
| 0.0084        | 3.6667  | 2200 | 0.6204          | 0.85     | 0.8566    | 0.85   | 0.8502 |
| 0.0009        | 3.8333  | 2300 | 0.6290          | 0.8788   | 0.8819    | 0.8788 | 0.8786 |
| 0.0076        | 4.0     | 2400 | 1.3498          | 0.7921   | 0.8431    | 0.7921 | 0.7847 |
| 0.0011        | 4.1667  | 2500 | 0.6609          | 0.8812   | 0.8936    | 0.8812 | 0.8813 |
| 0.0573        | 4.3333  | 2600 | 0.5998          | 0.8983   | 0.9000    | 0.8983 | 0.8974 |
| 0.0007        | 4.5     | 2700 | 0.9958          | 0.8158   | 0.8427    | 0.8158 | 0.8092 |
| 0.0011        | 4.6667  | 2800 | 0.7610          | 0.8775   | 0.8800    | 0.8775 | 0.8759 |
| 0.0014        | 4.8333  | 2900 | 0.9071          | 0.8538   | 0.8722    | 0.8538 | 0.8548 |
| 0.001         | 5.0     | 3000 | 0.9948          | 0.8258   | 0.8567    | 0.8258 | 0.8229 |
| 0.0377        | 5.1667  | 3100 | 0.8527          | 0.8525   | 0.8921    | 0.8525 | 0.8519 |
| 0.0008        | 5.3333  | 3200 | 1.0262          | 0.8225   | 0.8494    | 0.8225 | 0.8189 |
| 0.0006        | 5.5     | 3300 | 0.8837          | 0.8433   | 0.8668    | 0.8433 | 0.8389 |
| 0.0007        | 5.6667  | 3400 | 1.1268          | 0.8113   | 0.8290    | 0.8113 | 0.8061 |
| 0.0005        | 5.8333  | 3500 | 0.6874          | 0.89     | 0.8925    | 0.89   | 0.8898 |
| 0.0009        | 6.0     | 3600 | 0.6892          | 0.8742   | 0.8738    | 0.8742 | 0.8733 |
| 0.0006        | 6.1667  | 3700 | 0.5795          | 0.8812   | 0.8820    | 0.8812 | 0.8810 |
| 0.0009        | 6.3333  | 3800 | 1.6193          | 0.7342   | 0.7824    | 0.7342 | 0.7179 |
| 0.0007        | 6.5     | 3900 | 1.0575          | 0.835    | 0.8548    | 0.835  | 0.8268 |
| 0.0594        | 6.6667  | 4000 | 1.1842          | 0.7858   | 0.8102    | 0.7858 | 0.7794 |
| 0.0003        | 6.8333  | 4100 | 0.9934          | 0.8517   | 0.8720    | 0.8517 | 0.8469 |
| 0.1235        | 7.0     | 4200 | 0.9902          | 0.8183   | 0.8452    | 0.8183 | 0.8132 |
| 0.0007        | 7.1667  | 4300 | 0.8515          | 0.8604   | 0.8711    | 0.8604 | 0.8574 |
| 0.0005        | 7.3333  | 4400 | 0.6680          | 0.8929   | 0.9026    | 0.8929 | 0.8911 |
| 0.0003        | 7.5     | 4500 | 1.5196          | 0.7696   | 0.8260    | 0.7696 | 0.7366 |
| 0.0003        | 7.6667  | 4600 | 1.3149          | 0.7883   | 0.8369    | 0.7883 | 0.7865 |
| 0.0003        | 7.8333  | 4700 | 0.7309          | 0.8717   | 0.8818    | 0.8717 | 0.8710 |
| 0.0002        | 8.0     | 4800 | 0.8831          | 0.8638   | 0.8734    | 0.8638 | 0.8648 |
| 0.0002        | 8.1667  | 4900 | 1.1670          | 0.8133   | 0.8512    | 0.8133 | 0.8105 |
| 0.0003        | 8.3333  | 5000 | 0.6684          | 0.8979   | 0.9055    | 0.8979 | 0.8985 |
| 0.0002        | 8.5     | 5100 | 0.6811          | 0.8971   | 0.9046    | 0.8971 | 0.8977 |
| 0.0002        | 8.6667  | 5200 | 0.6814          | 0.8971   | 0.9044    | 0.8971 | 0.8977 |
| 0.0002        | 8.8333  | 5300 | 0.6898          | 0.8979   | 0.9059    | 0.8979 | 0.8986 |
| 0.0002        | 9.0     | 5400 | 0.6942          | 0.8992   | 0.9073    | 0.8992 | 0.8999 |
| 0.0002        | 9.1667  | 5500 | 0.6987          | 0.8992   | 0.9073    | 0.8992 | 0.8999 |
| 0.0002        | 9.3333  | 5600 | 0.7072          | 0.8992   | 0.9076    | 0.8992 | 0.8999 |
| 0.0001        | 9.5     | 5700 | 0.7091          | 0.8983   | 0.9066    | 0.8983 | 0.8990 |
| 0.0001        | 9.6667  | 5800 | 0.7138          | 0.8983   | 0.9067    | 0.8983 | 0.8990 |
| 0.0001        | 9.8333  | 5900 | 0.7185          | 0.8992   | 0.9074    | 0.8992 | 0.8998 |
| 0.0001        | 10.0    | 6000 | 0.7225          | 0.8992   | 0.9074    | 0.8992 | 0.8998 |
| 0.0001        | 10.1667 | 6100 | 0.7255          | 0.9      | 0.9082    | 0.9    | 0.9006 |
| 0.0001        | 10.3333 | 6200 | 0.7305          | 0.8992   | 0.9076    | 0.8992 | 0.8998 |
| 0.0001        | 10.5    | 6300 | 0.7354          | 0.8992   | 0.9076    | 0.8992 | 0.8998 |
| 0.0001        | 10.6667 | 6400 | 0.7386          | 0.8988   | 0.9072    | 0.8988 | 0.8995 |
| 0.0001        | 10.8333 | 6500 | 0.7436          | 0.8988   | 0.9072    | 0.8988 | 0.8995 |
| 0.0001        | 11.0    | 6600 | 0.7478          | 0.8983   | 0.9069    | 0.8983 | 0.8991 |
| 0.0001        | 11.1667 | 6700 | 0.7506          | 0.8983   | 0.9069    | 0.8983 | 0.8991 |
| 0.0001        | 11.3333 | 6800 | 0.7561          | 0.8979   | 0.9067    | 0.8979 | 0.8987 |
| 0.0001        | 11.5    | 6900 | 0.7599          | 0.8975   | 0.9062    | 0.8975 | 0.8983 |
| 0.0001        | 11.6667 | 7000 | 0.7634          | 0.8979   | 0.9067    | 0.8979 | 0.8987 |
| 0.0001        | 11.8333 | 7100 | 0.7652          | 0.8988   | 0.9074    | 0.8988 | 0.8995 |
| 0.0001        | 12.0    | 7200 | 0.7675          | 0.8988   | 0.9074    | 0.8988 | 0.8995 |
| 0.0001        | 12.1667 | 7300 | 0.7700          | 0.8988   | 0.9074    | 0.8988 | 0.8995 |
| 0.0001        | 12.3333 | 7400 | 0.7727          | 0.8988   | 0.9074    | 0.8988 | 0.8995 |
| 0.0001        | 12.5    | 7500 | 0.7764          | 0.8979   | 0.9069    | 0.8979 | 0.8987 |
| 0.0001        | 12.6667 | 7600 | 0.7793          | 0.8979   | 0.9069    | 0.8979 | 0.8987 |
| 0.0001        | 12.8333 | 7700 | 0.7809          | 0.8979   | 0.9069    | 0.8979 | 0.8987 |
| 0.0001        | 13.0    | 7800 | 0.7831          | 0.8979   | 0.9069    | 0.8979 | 0.8987 |
| 0.0001        | 13.1667 | 7900 | 0.7857          | 0.8979   | 0.9069    | 0.8979 | 0.8987 |
| 0.0001        | 13.3333 | 8000 | 0.7878          | 0.8979   | 0.9069    | 0.8979 | 0.8987 |
| 0.0001        | 13.5    | 8100 | 0.7895          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 13.6667 | 8200 | 0.7910          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 13.8333 | 8300 | 0.7926          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 14.0    | 8400 | 0.7939          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 14.1667 | 8500 | 0.7955          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 14.3333 | 8600 | 0.7961          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 14.5    | 8700 | 0.7970          | 0.8979   | 0.9070    | 0.8979 | 0.8986 |
| 0.0001        | 14.6667 | 8800 | 0.7977          | 0.8983   | 0.9076    | 0.8983 | 0.8991 |
| 0.0001        | 14.8333 | 8900 | 0.7982          | 0.8983   | 0.9076    | 0.8983 | 0.8991 |
| 0.0001        | 15.0    | 9000 | 0.7983          | 0.8983   | 0.9076    | 0.8983 | 0.8991 |


### 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