Instructions to use natsu39/swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use natsu39/swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="natsu39/swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001") 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("natsu39/swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001") model = AutoModelForImageClassification.from_pretrained("natsu39/swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001") - Notebooks
- Google Colab
- Kaggle
swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001
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.2197
- Accuracy: 0.9649
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: 4
- eval_batch_size: 4
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- optimizer: Use adamw_torch_fused 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: 15
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| No log | 1.0 | 9 | 4.7094 | 0.2632 |
| 4.7949 | 2.0 | 18 | 2.1423 | 0.6140 |
| 3.2309 | 3.0 | 27 | 0.9929 | 0.5965 |
| 1.1137 | 4.0 | 36 | 0.6466 | 0.7719 |
| 0.5855 | 5.0 | 45 | 0.8129 | 0.6140 |
| 0.5426 | 6.0 | 54 | 0.5018 | 0.7895 |
| 0.3827 | 7.0 | 63 | 0.4077 | 0.8947 |
| 0.2048 | 8.0 | 72 | 0.3891 | 0.8947 |
| 0.1531 | 9.0 | 81 | 0.2761 | 0.9123 |
| 0.1039 | 10.0 | 90 | 0.2707 | 0.9474 |
| 0.1039 | 11.0 | 99 | 0.3423 | 0.8947 |
| 0.0919 | 12.0 | 108 | 0.2209 | 0.9474 |
| 0.0913 | 13.0 | 117 | 0.2353 | 0.9474 |
| 0.0528 | 14.0 | 126 | 0.2197 | 0.9649 |
| 0.1249 | 15.0 | 135 | 0.2174 | 0.9649 |
Framework versions
- Transformers 4.54.1
- Pytorch 2.8.0+cu128
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 4
Model tree for natsu39/swin-tiny-patch4-window7-224-finetuned-car-models-classification-middle-layer-v001
Base model
microsoft/swin-tiny-patch4-window7-224Evaluation results
- Accuracy on imagefolderself-reported0.965