Image Classification
Transformers
PyTorch
TensorBoard
vit
Generated from Trainer
Eval Results (legacy)
Instructions to use pthpth/ViTFineTuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pthpth/ViTFineTuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="pthpth/ViTFineTuned") 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("pthpth/ViTFineTuned") model = AutoModelForImageClassification.from_pretrained("pthpth/ViTFineTuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from pthpth/ViTFineTuned: direct link, hf CLI and curl.
- Browser
- Download file 2.51 kB
-
https://huggingface.co/pthpth/ViTFineTuned/resolve/main/README.md
- Command line
-
hf download hf://pthpth/ViTFineTuned/README.md
-
curl -L -o README.md https://huggingface.co/pthpth/ViTFineTuned/resolve/main/README.md
2.51 kB
| license: apache-2.0 | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - imagefolder | |
| metrics: | |
| - accuracy | |
| model-index: | |
| - name: ViTFineTuned | |
| results: | |
| - task: | |
| name: Image Classification | |
| type: image-classification | |
| dataset: | |
| name: KTH-TIPS2-b | |
| type: images | |
| args: default | |
| metrics: | |
| - name: Accuracy | |
| type: accuracy | |
| value: 1.0 | |
| <!-- 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. --> | |
| # ViTFineTuned | |
| This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the KTH-TIPS2-b dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.0075 | |
| - Accuracy: 1.0 | |
| ## Model description | |
| Transfer learning by fine tuning the Vision Transformer by Google on KTP-TIP2-b dataset. | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 0.0005 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - gradient_accumulation_steps: 4 | |
| - total_train_batch_size: 64 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - lr_scheduler_warmup_ratio: 0.1 | |
| - num_epochs: 15 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:| | |
| | 0.2859 | 0.99 | 67 | 0.2180 | 0.9784 | | |
| | 0.293 | 1.99 | 134 | 0.3308 | 0.9185 | | |
| | 0.1444 | 2.99 | 201 | 0.1532 | 0.9568 | | |
| | 0.0833 | 3.99 | 268 | 0.0515 | 0.9856 | | |
| | 0.1007 | 4.99 | 335 | 0.0295 | 0.9904 | | |
| | 0.0372 | 5.99 | 402 | 0.0574 | 0.9808 | | |
| | 0.0919 | 6.99 | 469 | 0.0537 | 0.9880 | | |
| | 0.0135 | 7.99 | 536 | 0.0117 | 0.9952 | | |
| | 0.0472 | 8.99 | 603 | 0.0075 | 1.0 | | |
| | 0.0151 | 9.99 | 670 | 0.0048 | 1.0 | | |
| | 0.0052 | 10.99 | 737 | 0.0073 | 0.9976 | | |
| | 0.0109 | 11.99 | 804 | 0.0198 | 0.9952 | | |
| | 0.0033 | 12.99 | 871 | 0.0066 | 0.9976 | | |
| | 0.011 | 13.99 | 938 | 0.0067 | 0.9976 | | |
| | 0.0032 | 14.99 | 1005 | 0.0060 | 0.9976 | | |
| ### Framework versions | |
| - Transformers 4.20.1 | |
| - Pytorch 1.12.0+cu113 | |
| - Datasets 2.3.2 | |
| - Tokenizers 0.12.1 | |