Commit
•
f0d487c
1
Parent(s):
f6e73c2
End of training
Browse files- README.md +79 -0
- config.json +88 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- runs/Mar28_15-41-41_1d08d0d5db4b/events.out.tfevents.1711640506.1d08d0d5db4b.548.18 +3 -0
- runs/Mar28_15-43-55_1d08d0d5db4b/events.out.tfevents.1711640637.1d08d0d5db4b.548.19 +3 -0
- runs/Mar28_15-43-55_1d08d0d5db4b/events.out.tfevents.1711640985.1d08d0d5db4b.548.20 +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: vit-fruit-classifier
|
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: train
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 0.9698795180722891
|
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 |
+
# vit-fruit-classifier
|
32 |
+
|
33 |
+
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 imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 1.0194
|
36 |
+
- Accuracy: 0.9699
|
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: 16
|
57 |
+
- eval_batch_size: 16
|
58 |
+
- seed: 42
|
59 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
60 |
+
- lr_scheduler_type: linear
|
61 |
+
- num_epochs: 10
|
62 |
+
- mixed_precision_training: Native AMP
|
63 |
+
|
64 |
+
### Training results
|
65 |
+
|
66 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
67 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
68 |
+
| 2.668 | 2.38 | 100 | 2.0731 | 0.9217 |
|
69 |
+
| 1.6565 | 4.76 | 200 | 1.4216 | 0.9518 |
|
70 |
+
| 1.1627 | 7.14 | 300 | 1.1256 | 0.9578 |
|
71 |
+
| 0.9571 | 9.52 | 400 | 1.0224 | 0.9639 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.38.2
|
77 |
+
- Pytorch 2.2.1+cu121
|
78 |
+
- Datasets 2.18.0
|
79 |
+
- Tokenizers 0.15.2
|
config.json
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
3 |
+
"architectures": [
|
4 |
+
"ViTForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"encoder_stride": 16,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.0,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": "acerolas",
|
13 |
+
"1": "apples",
|
14 |
+
"10": "figs",
|
15 |
+
"11": "grapefruits",
|
16 |
+
"12": "grapes",
|
17 |
+
"13": "guava",
|
18 |
+
"14": "kiwifruit",
|
19 |
+
"15": "lemons",
|
20 |
+
"16": "limes",
|
21 |
+
"17": "mangos",
|
22 |
+
"18": "olives",
|
23 |
+
"19": "oranges",
|
24 |
+
"2": "apricots",
|
25 |
+
"20": "passionfruit",
|
26 |
+
"21": "peaches",
|
27 |
+
"22": "pears",
|
28 |
+
"23": "pineapples",
|
29 |
+
"24": "plums",
|
30 |
+
"25": "pomegranates",
|
31 |
+
"26": "raspberries",
|
32 |
+
"27": "strawberries",
|
33 |
+
"28": "tomatoes",
|
34 |
+
"29": "watermelons",
|
35 |
+
"3": "avocados",
|
36 |
+
"4": "bananas",
|
37 |
+
"5": "blackberries",
|
38 |
+
"6": "blueberries",
|
39 |
+
"7": "cantaloupes",
|
40 |
+
"8": "cherries",
|
41 |
+
"9": "coconuts"
|
42 |
+
},
|
43 |
+
"image_size": 224,
|
44 |
+
"initializer_range": 0.02,
|
45 |
+
"intermediate_size": 3072,
|
46 |
+
"label2id": {
|
47 |
+
"acerolas": "0",
|
48 |
+
"apples": "1",
|
49 |
+
"apricots": "2",
|
50 |
+
"avocados": "3",
|
51 |
+
"bananas": "4",
|
52 |
+
"blackberries": "5",
|
53 |
+
"blueberries": "6",
|
54 |
+
"cantaloupes": "7",
|
55 |
+
"cherries": "8",
|
56 |
+
"coconuts": "9",
|
57 |
+
"figs": "10",
|
58 |
+
"grapefruits": "11",
|
59 |
+
"grapes": "12",
|
60 |
+
"guava": "13",
|
61 |
+
"kiwifruit": "14",
|
62 |
+
"lemons": "15",
|
63 |
+
"limes": "16",
|
64 |
+
"mangos": "17",
|
65 |
+
"olives": "18",
|
66 |
+
"oranges": "19",
|
67 |
+
"passionfruit": "20",
|
68 |
+
"peaches": "21",
|
69 |
+
"pears": "22",
|
70 |
+
"pineapples": "23",
|
71 |
+
"plums": "24",
|
72 |
+
"pomegranates": "25",
|
73 |
+
"raspberries": "26",
|
74 |
+
"strawberries": "27",
|
75 |
+
"tomatoes": "28",
|
76 |
+
"watermelons": "29"
|
77 |
+
},
|
78 |
+
"layer_norm_eps": 1e-12,
|
79 |
+
"model_type": "vit",
|
80 |
+
"num_attention_heads": 12,
|
81 |
+
"num_channels": 3,
|
82 |
+
"num_hidden_layers": 12,
|
83 |
+
"patch_size": 16,
|
84 |
+
"problem_type": "single_label_classification",
|
85 |
+
"qkv_bias": true,
|
86 |
+
"torch_dtype": "float32",
|
87 |
+
"transformers_version": "4.38.2"
|
88 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6beba50d3b617b2378ebf0887b68bc8e7853a6f4e0319ed65b7b8009ff8bb4bd
|
3 |
+
size 343310104
|
preprocessor_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_rescale": true,
|
4 |
+
"do_resize": true,
|
5 |
+
"image_mean": [
|
6 |
+
0.5,
|
7 |
+
0.5,
|
8 |
+
0.5
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTImageProcessor",
|
11 |
+
"image_std": [
|
12 |
+
0.5,
|
13 |
+
0.5,
|
14 |
+
0.5
|
15 |
+
],
|
16 |
+
"resample": 2,
|
17 |
+
"rescale_factor": 0.00392156862745098,
|
18 |
+
"size": {
|
19 |
+
"height": 224,
|
20 |
+
"width": 224
|
21 |
+
}
|
22 |
+
}
|
runs/Mar28_15-41-41_1d08d0d5db4b/events.out.tfevents.1711640506.1d08d0d5db4b.548.18
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:21474cf044cc24d096931b3e8f949539b2c3e87255aa283e3ca1db8e254731b9
|
3 |
+
size 6107
|
runs/Mar28_15-43-55_1d08d0d5db4b/events.out.tfevents.1711640637.1d08d0d5db4b.548.19
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:990608f94cbfe254e0212732bd4e3cf416d4a726b4f75af1de29e5776d6b70b2
|
3 |
+
size 8286
|
runs/Mar28_15-43-55_1d08d0d5db4b/events.out.tfevents.1711640985.1d08d0d5db4b.548.20
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:beee4a55704c1c25a0c85e84a9e4688b3c70f0940f487bca323ae6c7ac5fdf63
|
3 |
+
size 411
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b5d07f48eb5bab85aaa10a46e93e53f22d47746f2c06a6bce831cee0b965509e
|
3 |
+
size 4920
|