Image Classification
Transformers
TensorBoard
Safetensors
vit
Generated from Trainer
Eval Results (legacy)
Instructions to use goodcasper/vit_itri_2class_focalloss with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use goodcasper/vit_itri_2class_focalloss with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="goodcasper/vit_itri_2class_focalloss") 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("goodcasper/vit_itri_2class_focalloss") model = AutoModelForImageClassification.from_pretrained("goodcasper/vit_itri_2class_focalloss") - Notebooks
- Google Colab
- Kaggle
vit_itri_2class_focalloss
This model is a fine-tuned version of google/vit-large-patch16-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.6180
- Accuracy: 0.9155
- Precision: 0.9063
- Recall: 0.9155
- F1: 0.9098
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.0001
- train_batch_size: 24
- eval_batch_size: 4
- 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: 10
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|---|---|---|
| 0.1198 | 1.0 | 759 | 0.2930 | 0.9360 | 0.9383 | 0.9360 | 0.9204 |
| 0.0457 | 2.0 | 1518 | 0.2589 | 0.9342 | 0.9266 | 0.9342 | 0.9275 |
| 0.027 | 3.0 | 2277 | 0.3913 | 0.9164 | 0.9137 | 0.9164 | 0.9150 |
| 0.0187 | 4.0 | 3036 | 0.4602 | 0.9162 | 0.9012 | 0.9162 | 0.9049 |
| 0.0129 | 5.0 | 3795 | 0.4067 | 0.9202 | 0.9236 | 0.9202 | 0.9218 |
| 0.0079 | 6.0 | 4554 | 0.5165 | 0.9327 | 0.9246 | 0.9327 | 0.9256 |
| 0.0057 | 7.0 | 5313 | 0.8537 | 0.8791 | 0.8902 | 0.8791 | 0.8842 |
| 0.0039 | 8.0 | 6072 | 0.7689 | 0.9148 | 0.8972 | 0.9148 | 0.9005 |
| 0.0023 | 9.0 | 6831 | 0.6286 | 0.9140 | 0.9040 | 0.9140 | 0.9078 |
| 0.0008 | 10.0 | 7590 | 0.6180 | 0.9155 | 0.9063 | 0.9155 | 0.9098 |
Framework versions
- Transformers 4.53.0.dev0
- Pytorch 2.7.1+cu126
- Datasets 3.6.0
- Tokenizers 0.21.1
- Downloads last month
- 9
Model tree for goodcasper/vit_itri_2class_focalloss
Base model
google/vit-large-patch16-224Evaluation results
- Accuracy on imagefoldertest set self-reported0.915
- Precision on imagefoldertest set self-reported0.906
- Recall on imagefoldertest set self-reported0.915
- F1 on imagefoldertest set self-reported0.910