Image Classification
Transformers
Safetensors
vit
vision-transformer
flowers
Generated from Trainer
Eval Results (legacy)
Instructions to use lst0004/flower-vit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lst0004/flower-vit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="lst0004/flower-vit") 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("lst0004/flower-vit") model = AutoModelForImageClassification.from_pretrained("lst0004/flower-vit") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: google/vit-base-patch16-224 | |
| tags: | |
| - image-classification | |
| - vision-transformer | |
| - flowers | |
| - generated_from_trainer | |
| datasets: | |
| - imagefolder | |
| metrics: | |
| - accuracy | |
| - precision | |
| - recall | |
| - f1 | |
| model-index: | |
| - name: flower-vit | |
| results: | |
| - task: | |
| name: Image Classification | |
| type: image-classification | |
| dataset: | |
| name: custom flower dataset | |
| type: imagefolder | |
| config: default | |
| split: train | |
| args: default | |
| metrics: | |
| - name: Accuracy | |
| type: accuracy | |
| value: 0.9636363636363636 | |
| - name: Precision | |
| type: precision | |
| value: 0.9632702640149449 | |
| - name: Recall | |
| type: recall | |
| value: 0.9636363636363636 | |
| - name: F1 | |
| type: f1 | |
| value: 0.9632142875960066 | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # flower-vit | |
| This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the custom flower dataset dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.1623 | |
| - Accuracy: 0.9636 | |
| - Precision: 0.9633 | |
| - Recall: 0.9636 | |
| - F1: 0.9632 | |
| ## 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.0003 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - 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: linear | |
| - num_epochs: 5 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:| | |
| | 0.1765 | 1.0 | 138 | 0.1646 | 0.9673 | 0.9679 | 0.9673 | 0.9673 | | |
| | 0.1386 | 2.0 | 276 | 0.1291 | 0.9673 | 0.9681 | 0.9673 | 0.9673 | | |
| | 0.0889 | 3.0 | 414 | 0.1214 | 0.9673 | 0.9681 | 0.9673 | 0.9673 | | |
| | 0.0857 | 4.0 | 552 | 0.1183 | 0.9673 | 0.9681 | 0.9673 | 0.9673 | | |
| | 0.0942 | 5.0 | 690 | 0.1177 | 0.9673 | 0.9681 | 0.9673 | 0.9673 | | |
| ### Framework versions | |
| - Transformers 5.5.4 | |
| - Pytorch 2.11.0+cpu | |
| - Datasets 4.8.4 | |
| - Tokenizers 0.22.2 | |