Instructions to use HorcruxNo13/vit-base-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HorcruxNo13/vit-base-patch16-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="HorcruxNo13/vit-base-patch16-224") 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("HorcruxNo13/vit-base-patch16-224") model = AutoModelForImageClassification.from_pretrained("HorcruxNo13/vit-base-patch16-224", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
86c5540
1
Parent(s): ac178d6
Model save
Browse files- README.md +29 -11
- pytorch_model.bin +1 -1
README.md
CHANGED
|
@@ -7,6 +7,8 @@ datasets:
|
|
| 7 |
- imagefolder
|
| 8 |
metrics:
|
| 9 |
- accuracy
|
|
|
|
|
|
|
| 10 |
model-index:
|
| 11 |
- name: vit-base-patch16-224
|
| 12 |
results:
|
|
@@ -22,7 +24,13 @@ model-index:
|
|
| 22 |
metrics:
|
| 23 |
- name: Accuracy
|
| 24 |
type: accuracy
|
| 25 |
-
value: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
---
|
| 27 |
|
| 28 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -32,8 +40,11 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 32 |
|
| 33 |
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
|
| 34 |
It achieves the following results on the evaluation set:
|
| 35 |
-
- Loss: 0.
|
| 36 |
-
- Accuracy: 0.
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## Model description
|
| 39 |
|
|
@@ -61,20 +72,27 @@ The following hyperparameters were used during training:
|
|
| 61 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 62 |
- lr_scheduler_type: linear
|
| 63 |
- lr_scheduler_warmup_ratio: 0.1
|
| 64 |
-
- num_epochs:
|
| 65 |
|
| 66 |
### Training results
|
| 67 |
|
| 68 |
-
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 69 |
-
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
| 70 |
-
| No log | 1.0 | 8 |
|
| 71 |
-
|
|
| 72 |
-
| 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
### Framework versions
|
| 76 |
|
| 77 |
-
- Transformers 4.
|
| 78 |
- Pytorch 2.0.1+cu118
|
| 79 |
-
- Datasets 2.14.
|
| 80 |
- Tokenizers 0.13.3
|
|
|
|
| 7 |
- imagefolder
|
| 8 |
metrics:
|
| 9 |
- accuracy
|
| 10 |
+
- precision
|
| 11 |
+
- recall
|
| 12 |
model-index:
|
| 13 |
- name: vit-base-patch16-224
|
| 14 |
results:
|
|
|
|
| 24 |
metrics:
|
| 25 |
- name: Accuracy
|
| 26 |
type: accuracy
|
| 27 |
+
value: 0.8033333333333333
|
| 28 |
+
- name: Precision
|
| 29 |
+
type: precision
|
| 30 |
+
value: 0.7988653846153846
|
| 31 |
+
- name: Recall
|
| 32 |
+
type: recall
|
| 33 |
+
value: 0.8033333333333333
|
| 34 |
---
|
| 35 |
|
| 36 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 40 |
|
| 41 |
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
|
| 42 |
It achieves the following results on the evaluation set:
|
| 43 |
+
- Loss: 0.4775
|
| 44 |
+
- Accuracy: 0.8033
|
| 45 |
+
- Precision: 0.7989
|
| 46 |
+
- Recall: 0.8033
|
| 47 |
+
- F1 Score: 0.7784
|
| 48 |
|
| 49 |
## Model description
|
| 50 |
|
|
|
|
| 72 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 73 |
- lr_scheduler_type: linear
|
| 74 |
- lr_scheduler_warmup_ratio: 0.1
|
| 75 |
+
- num_epochs: 10
|
| 76 |
|
| 77 |
### Training results
|
| 78 |
|
| 79 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 Score |
|
| 80 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:--------:|
|
| 81 |
+
| No log | 1.0 | 8 | 0.5941 | 0.7333 | 0.5378 | 0.7333 | 0.6205 |
|
| 82 |
+
| 0.6385 | 2.0 | 16 | 0.5391 | 0.775 | 0.7830 | 0.775 | 0.7210 |
|
| 83 |
+
| 0.546 | 3.0 | 24 | 0.5417 | 0.775 | 0.7658 | 0.775 | 0.7321 |
|
| 84 |
+
| 0.481 | 4.0 | 32 | 0.5486 | 0.7833 | 0.8030 | 0.7833 | 0.7313 |
|
| 85 |
+
| 0.3841 | 5.0 | 40 | 0.5420 | 0.7875 | 0.7825 | 0.7875 | 0.7515 |
|
| 86 |
+
| 0.3841 | 6.0 | 48 | 0.5246 | 0.8292 | 0.8358 | 0.8292 | 0.8068 |
|
| 87 |
+
| 0.2565 | 7.0 | 56 | 0.5763 | 0.8083 | 0.8070 | 0.8083 | 0.7821 |
|
| 88 |
+
| 0.1605 | 8.0 | 64 | 0.5433 | 0.825 | 0.8180 | 0.825 | 0.8120 |
|
| 89 |
+
| 0.0824 | 9.0 | 72 | 0.6010 | 0.8125 | 0.8027 | 0.8125 | 0.7994 |
|
| 90 |
+
| 0.0489 | 10.0 | 80 | 0.6063 | 0.8125 | 0.8032 | 0.8125 | 0.7977 |
|
| 91 |
|
| 92 |
|
| 93 |
### Framework versions
|
| 94 |
|
| 95 |
+
- Transformers 4.33.2
|
| 96 |
- Pytorch 2.0.1+cu118
|
| 97 |
+
- Datasets 2.14.5
|
| 98 |
- Tokenizers 0.13.3
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 343268717
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a10521d07dc61f533d0d5a9bec8d2c44bba11613456d4bab737402f7e4b9eda4
|
| 3 |
size 343268717
|