Instructions to use nqvii/deit_fold_4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nqvii/deit_fold_4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/deit_fold_4") 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/deit_fold_4") model = AutoModelForImageClassification.from_pretrained("nqvii/deit_fold_4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("nqvii/deit_fold_4")
model = AutoModelForImageClassification.from_pretrained("nqvii/deit_fold_4", device_map="auto")Quick Links
deit_fold_4
This model is a fine-tuned version of facebook/deit-small-patch16-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 1.1613
- Accuracy: 0.9516
- F1 Score: 0.9557
- Recall: 0.9525
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 |
|---|---|---|---|---|---|---|
| 3.0112 | 1.0 | 19 | 2.9175 | 0.1349 | 0.1173 | 0.1476 |
| 2.8882 | 2.0 | 38 | 2.7478 | 0.2837 | 0.2479 | 0.2602 |
| 2.6765 | 3.0 | 57 | 2.5537 | 0.4360 | 0.3402 | 0.3670 |
| 2.3897 | 4.0 | 76 | 2.2672 | 0.5882 | 0.5441 | 0.5359 |
| 1.9781 | 5.0 | 95 | 1.8705 | 0.7924 | 0.7997 | 0.7861 |
| 1.6123 | 6.0 | 114 | 1.5627 | 0.8512 | 0.8659 | 0.8675 |
| 1.4216 | 7.0 | 133 | 1.3723 | 0.8962 | 0.9067 | 0.9017 |
| 1.2460 | 8.0 | 152 | 1.2605 | 0.9308 | 0.9380 | 0.9351 |
| 1.1724 | 9.0 | 171 | 1.2218 | 0.9308 | 0.9370 | 0.9337 |
| 1.1521 | 10.0 | 190 | 1.1915 | 0.9446 | 0.9492 | 0.9488 |
| 1.1116 | 11.0 | 209 | 1.1921 | 0.9377 | 0.9440 | 0.9451 |
| 1.0878 | 12.0 | 228 | 1.1973 | 0.9343 | 0.9406 | 0.9428 |
| 1.0601 | 13.0 | 247 | 1.1842 | 0.9377 | 0.9435 | 0.9451 |
| 1.0711 | 14.0 | 266 | 1.1563 | 0.9446 | 0.9497 | 0.9475 |
| 1.0461 | 15.0 | 285 | 1.1533 | 0.9446 | 0.9497 | 0.9475 |
| 1.0390 | 16.0 | 304 | 1.1613 | 0.9516 | 0.9557 | 0.9525 |
| 1.0080 | 17.0 | 323 | 1.1645 | 0.9412 | 0.9463 | 0.9465 |
| 1.0109 | 18.0 | 342 | 1.1656 | 0.9377 | 0.9434 | 0.9438 |
| 1.0092 | 19.0 | 361 | 1.1701 | 0.9446 | 0.9494 | 0.9501 |
| 0.9972 | 20.0 | 380 | 1.1859 | 0.9377 | 0.9432 | 0.9429 |
| 1.0005 | 21.0 | 399 | 1.1708 | 0.9446 | 0.9501 | 0.9522 |
| 0.9900 | 22.0 | 418 | 1.1849 | 0.9412 | 0.9470 | 0.9476 |
| 0.9758 | 23.0 | 437 | 1.1893 | 0.9446 | 0.9496 | 0.9511 |
| 0.9886 | 24.0 | 456 | 1.1739 | 0.9446 | 0.9496 | 0.9511 |
| 0.9757 | 25.0 | 475 | 1.1648 | 0.9412 | 0.9460 | 0.9440 |
Framework versions
- Transformers 5.0.0
- Pytorch 2.10.0+cu128
- Datasets 5.0.0
- Tokenizers 0.22.2
- Downloads last month
- 83
Model tree for nqvii/deit_fold_4
Base model
facebook/deit-small-patch16-224Evaluation results
- Accuracy on imagefolderself-reported0.952
- Recall on imagefolderself-reported0.952
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/deit_fold_4") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")