Image Classification
Transformers
TensorBoard
Safetensors
swin
Generated from Trainer
Eval Results (legacy)
Instructions to use b07611031/leaftype-swin-tiny-patch4-window7-224-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use b07611031/leaftype-swin-tiny-patch4-window7-224-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="b07611031/leaftype-swin-tiny-patch4-window7-224-finetuned") 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("b07611031/leaftype-swin-tiny-patch4-window7-224-finetuned") model = AutoModelForImageClassification.from_pretrained("b07611031/leaftype-swin-tiny-patch4-window7-224-finetuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model save
Browse files- README.md +106 -0
- model.safetensors +1 -1
README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: microsoft/swin-tiny-patch4-window7-224
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
datasets:
|
| 7 |
+
- imagefolder
|
| 8 |
+
metrics:
|
| 9 |
+
- accuracy
|
| 10 |
+
model-index:
|
| 11 |
+
- name: leaftype-swin-tiny-patch4-window7-224-finetuned
|
| 12 |
+
results:
|
| 13 |
+
- task:
|
| 14 |
+
name: Image Classification
|
| 15 |
+
type: image-classification
|
| 16 |
+
dataset:
|
| 17 |
+
name: imagefolder
|
| 18 |
+
type: imagefolder
|
| 19 |
+
config: default
|
| 20 |
+
split: validation
|
| 21 |
+
args: default
|
| 22 |
+
metrics:
|
| 23 |
+
- name: Accuracy
|
| 24 |
+
type: accuracy
|
| 25 |
+
value: 0.9090909090909091
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 29 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 30 |
+
|
| 31 |
+
# leaftype-swin-tiny-patch4-window7-224-finetuned
|
| 32 |
+
|
| 33 |
+
This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the imagefolder dataset.
|
| 34 |
+
It achieves the following results on the evaluation set:
|
| 35 |
+
- Loss: 0.2021
|
| 36 |
+
- Accuracy: 0.9091
|
| 37 |
+
|
| 38 |
+
## Model description
|
| 39 |
+
|
| 40 |
+
More information needed
|
| 41 |
+
|
| 42 |
+
## Intended uses & limitations
|
| 43 |
+
|
| 44 |
+
More information needed
|
| 45 |
+
|
| 46 |
+
## Training and evaluation data
|
| 47 |
+
|
| 48 |
+
More information needed
|
| 49 |
+
|
| 50 |
+
## Training procedure
|
| 51 |
+
|
| 52 |
+
### Training hyperparameters
|
| 53 |
+
|
| 54 |
+
The following hyperparameters were used during training:
|
| 55 |
+
- learning_rate: 5e-05
|
| 56 |
+
- train_batch_size: 32
|
| 57 |
+
- eval_batch_size: 32
|
| 58 |
+
- seed: 42
|
| 59 |
+
- gradient_accumulation_steps: 4
|
| 60 |
+
- total_train_batch_size: 128
|
| 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: 30
|
| 65 |
+
|
| 66 |
+
### Training results
|
| 67 |
+
|
| 68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
| 70 |
+
| 0.7327 | 0.94 | 12 | 0.6155 | 0.6044 |
|
| 71 |
+
| 0.5479 | 1.96 | 25 | 0.4489 | 0.7936 |
|
| 72 |
+
| 0.3205 | 2.98 | 38 | 0.2164 | 0.9115 |
|
| 73 |
+
| 0.2386 | 4.0 | 51 | 0.2124 | 0.9115 |
|
| 74 |
+
| 0.1937 | 4.94 | 63 | 0.2349 | 0.9091 |
|
| 75 |
+
| 0.1884 | 5.96 | 76 | 0.1752 | 0.9214 |
|
| 76 |
+
| 0.2186 | 6.98 | 89 | 0.3518 | 0.8698 |
|
| 77 |
+
| 0.1833 | 8.0 | 102 | 0.2443 | 0.9017 |
|
| 78 |
+
| 0.1856 | 8.94 | 114 | 0.2492 | 0.9017 |
|
| 79 |
+
| 0.1605 | 9.96 | 127 | 0.2005 | 0.9189 |
|
| 80 |
+
| 0.1934 | 10.98 | 140 | 0.1713 | 0.9263 |
|
| 81 |
+
| 0.186 | 12.0 | 153 | 0.1573 | 0.9238 |
|
| 82 |
+
| 0.1407 | 12.94 | 165 | 0.1658 | 0.9214 |
|
| 83 |
+
| 0.1655 | 13.96 | 178 | 0.1570 | 0.9214 |
|
| 84 |
+
| 0.1448 | 14.98 | 191 | 0.1622 | 0.9238 |
|
| 85 |
+
| 0.1525 | 16.0 | 204 | 0.2110 | 0.9165 |
|
| 86 |
+
| 0.1226 | 16.94 | 216 | 0.2109 | 0.9165 |
|
| 87 |
+
| 0.1556 | 17.96 | 229 | 0.1914 | 0.9165 |
|
| 88 |
+
| 0.1264 | 18.98 | 242 | 0.2251 | 0.9115 |
|
| 89 |
+
| 0.1249 | 20.0 | 255 | 0.2863 | 0.8993 |
|
| 90 |
+
| 0.1099 | 20.94 | 267 | 0.2447 | 0.9066 |
|
| 91 |
+
| 0.1223 | 21.96 | 280 | 0.2358 | 0.9042 |
|
| 92 |
+
| 0.1084 | 22.98 | 293 | 0.1713 | 0.9238 |
|
| 93 |
+
| 0.1054 | 24.0 | 306 | 0.2085 | 0.9115 |
|
| 94 |
+
| 0.1055 | 24.94 | 318 | 0.2002 | 0.9115 |
|
| 95 |
+
| 0.1167 | 25.96 | 331 | 0.2289 | 0.9140 |
|
| 96 |
+
| 0.1156 | 26.98 | 344 | 0.1889 | 0.9115 |
|
| 97 |
+
| 0.0919 | 28.0 | 357 | 0.2015 | 0.9115 |
|
| 98 |
+
| 0.0827 | 28.24 | 360 | 0.2021 | 0.9091 |
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
### Framework versions
|
| 102 |
+
|
| 103 |
+
- Transformers 4.38.1
|
| 104 |
+
- Pytorch 1.10.0+cu111
|
| 105 |
+
- Datasets 2.17.1
|
| 106 |
+
- Tokenizers 0.15.2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 110342832
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea4fbe8cf769df60b6e371028ccd43b064b021468de40a3cff6875a14adbf113
|
| 3 |
size 110342832
|