Instructions to use SY750/swin-tiny-patch4-window7-224-finetuned-ViT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SY750/swin-tiny-patch4-window7-224-finetuned-ViT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="SY750/swin-tiny-patch4-window7-224-finetuned-ViT") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("SY750/swin-tiny-patch4-window7-224-finetuned-ViT") model = AutoModelForImageClassification.from_pretrained("SY750/swin-tiny-patch4-window7-224-finetuned-ViT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
swin-tiny-patch4-window7-224-finetuned-ViT
This model is a fine-tuned version of microsoft/swin-tiny-patch4-window7-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.2048
- Accuracy: 0.9371
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: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 50
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 1.1549 | 1.0 | 41 | 0.8420 | 0.7654 |
| 0.5664 | 2.0 | 82 | 0.4272 | 0.8525 |
| 0.4053 | 3.0 | 123 | 0.3613 | 0.8767 |
| 0.3093 | 4.0 | 164 | 0.3808 | 0.8658 |
| 0.3 | 5.0 | 205 | 0.2971 | 0.8863 |
| 0.2445 | 6.0 | 246 | 0.3009 | 0.8851 |
| 0.2508 | 7.0 | 287 | 0.2582 | 0.9105 |
| 0.1998 | 8.0 | 328 | 0.2356 | 0.9202 |
| 0.1722 | 9.0 | 369 | 0.2187 | 0.9287 |
| 0.1176 | 10.0 | 410 | 0.2048 | 0.9371 |
| 0.1073 | 11.0 | 451 | 0.2066 | 0.9274 |
| 0.1075 | 12.0 | 492 | 0.2239 | 0.9262 |
| 0.1109 | 13.0 | 533 | 0.2336 | 0.9202 |
| 0.095 | 14.0 | 574 | 0.2187 | 0.9347 |
| 0.0824 | 15.0 | 615 | 0.2178 | 0.9287 |
| 0.0757 | 16.0 | 656 | 0.1958 | 0.9359 |
| 0.0643 | 17.0 | 697 | 0.2183 | 0.9335 |
Framework versions
- Transformers 4.51.1
- Pytorch 2.5.1+cu124
- Datasets 3.5.0
- Tokenizers 0.21.0
- Downloads last month
- 6
Model tree for SY750/swin-tiny-patch4-window7-224-finetuned-ViT
Base model
microsoft/swin-tiny-patch4-window7-224Evaluation results
- Accuracy on imagefolderself-reported0.937