Instructions to use nqvii/vit_fold_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nqvii/vit_fold_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/vit_fold_5") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("nqvii/vit_fold_5") model = AutoModelForImageClassification.from_pretrained("nqvii/vit_fold_5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("nqvii/vit_fold_5")
model = AutoModelForImageClassification.from_pretrained("nqvii/vit_fold_5", device_map="auto")Quick Links
vit_fold_5
This model is a fine-tuned version of google/vit-base-patch16-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 1.1458
- Accuracy: 0.9550
- F1 Score: 0.9567
- Recall: 0.9557
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: 1e-05
- train_batch_size: 64
- eval_batch_size: 64
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 150
- num_epochs: 100
- label_smoothing_factor: 0.15
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Score | Recall |
|---|---|---|---|---|---|---|
| 2.8317 | 1.0 | 19 | 2.9424 | 0.1869 | 0.1888 | 0.1952 |
| 2.6800 | 2.0 | 38 | 2.7703 | 0.2907 | 0.2883 | 0.2921 |
| 2.3917 | 3.0 | 57 | 2.5114 | 0.4844 | 0.4838 | 0.4968 |
| 2.0233 | 4.0 | 76 | 2.1502 | 0.6817 | 0.6816 | 0.6898 |
| 1.6263 | 5.0 | 95 | 1.8205 | 0.7855 | 0.7889 | 0.7957 |
| 1.3543 | 6.0 | 114 | 1.5849 | 0.8304 | 0.8379 | 0.8417 |
| 1.2245 | 7.0 | 133 | 1.4177 | 0.8824 | 0.8883 | 0.8835 |
| 1.1327 | 8.0 | 152 | 1.3330 | 0.9135 | 0.9194 | 0.9130 |
| 1.0708 | 9.0 | 171 | 1.2656 | 0.9308 | 0.9354 | 0.9339 |
| 1.0489 | 10.0 | 190 | 1.2391 | 0.9343 | 0.9378 | 0.9363 |
| 1.0324 | 11.0 | 209 | 1.2209 | 0.9343 | 0.9376 | 0.9376 |
| 1.0292 | 12.0 | 228 | 1.2015 | 0.9308 | 0.9347 | 0.9351 |
| 1.0188 | 13.0 | 247 | 1.1989 | 0.9308 | 0.9347 | 0.9351 |
| 1.0151 | 14.0 | 266 | 1.1872 | 0.9412 | 0.9447 | 0.9436 |
| 1.0016 | 15.0 | 285 | 1.1827 | 0.9308 | 0.9354 | 0.9327 |
| 1.0162 | 16.0 | 304 | 1.1782 | 0.9343 | 0.9386 | 0.9365 |
| 0.9979 | 17.0 | 323 | 1.1789 | 0.9308 | 0.9351 | 0.9315 |
| 0.9800 | 18.0 | 342 | 1.1789 | 0.9446 | 0.9477 | 0.9472 |
| 0.9783 | 19.0 | 361 | 1.1749 | 0.9412 | 0.9444 | 0.9423 |
| 0.9747 | 20.0 | 380 | 1.1614 | 0.9412 | 0.9447 | 0.9447 |
| 0.9754 | 21.0 | 399 | 1.1630 | 0.9412 | 0.9444 | 0.9434 |
| 0.9707 | 22.0 | 418 | 1.1598 | 0.9412 | 0.9447 | 0.9447 |
| 0.9679 | 23.0 | 437 | 1.1559 | 0.9481 | 0.9507 | 0.9496 |
| 0.9729 | 24.0 | 456 | 1.1515 | 0.9481 | 0.9507 | 0.9508 |
| 0.9643 | 25.0 | 475 | 1.1538 | 0.9481 | 0.9507 | 0.9508 |
| 0.9687 | 26.0 | 494 | 1.1609 | 0.9481 | 0.9507 | 0.9508 |
| 0.9671 | 27.0 | 513 | 1.1557 | 0.9446 | 0.9474 | 0.9459 |
| 0.9706 | 28.0 | 532 | 1.1522 | 0.9446 | 0.9477 | 0.9483 |
| 0.9671 | 29.0 | 551 | 1.1504 | 0.9516 | 0.9537 | 0.9532 |
| 0.9693 | 30.0 | 570 | 1.1503 | 0.9481 | 0.9507 | 0.9508 |
| 0.9629 | 31.0 | 589 | 1.1485 | 0.9446 | 0.9477 | 0.9483 |
| 0.9611 | 32.0 | 608 | 1.1480 | 0.9516 | 0.9536 | 0.9521 |
| 0.9631 | 33.0 | 627 | 1.1458 | 0.9550 | 0.9567 | 0.9557 |
| 0.9606 | 34.0 | 646 | 1.1436 | 0.9481 | 0.9507 | 0.9508 |
| 0.9643 | 35.0 | 665 | 1.1477 | 0.9516 | 0.9537 | 0.9532 |
| 0.9655 | 36.0 | 684 | 1.1432 | 0.9516 | 0.9537 | 0.9532 |
| 0.9656 | 37.0 | 703 | 1.1460 | 0.9481 | 0.9507 | 0.9508 |
| 0.9595 | 38.0 | 722 | 1.1457 | 0.9481 | 0.9506 | 0.9485 |
| 0.9595 | 39.0 | 741 | 1.1481 | 0.9481 | 0.9506 | 0.9485 |
| 0.9623 | 40.0 | 760 | 1.1455 | 0.9481 | 0.9507 | 0.9508 |
| 0.9562 | 41.0 | 779 | 1.1487 | 0.9516 | 0.9536 | 0.9521 |
| 0.9585 | 42.0 | 798 | 1.1591 | 0.9481 | 0.9506 | 0.9485 |
| 0.9638 | 43.0 | 817 | 1.1490 | 0.9481 | 0.9507 | 0.9508 |
| 0.9611 | 44.0 | 836 | 1.1544 | 0.9516 | 0.9537 | 0.9532 |
| 0.9663 | 45.0 | 855 | 1.1483 | 0.9516 | 0.9536 | 0.9521 |
| 0.9619 | 46.0 | 874 | 1.1527 | 0.9516 | 0.9534 | 0.9519 |
Framework versions
- Transformers 5.0.0
- Pytorch 2.10.0+cu128
- Datasets 5.0.0
- Tokenizers 0.22.2
- Downloads last month
- 158
Model tree for nqvii/vit_fold_5
Base model
google/vit-base-patch16-224Evaluation results
- Accuracy on imagefolderself-reported0.955
- Recall on imagefolderself-reported0.956
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/vit_fold_5") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")