🍻 cheers
Browse files- README.md +74 -0
- all_results.json +13 -0
- config.json +34 -0
- eval_results.json +8 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- runs/Mar21_06-15-23_67fe17cc1743/events.out.tfevents.1711001733.67fe17cc1743.1153.0 +3 -0
- runs/Mar21_06-15-23_67fe17cc1743/events.out.tfevents.1711001845.67fe17cc1743.1153.1 +3 -0
- runs/Mar21_06-33-51_67fe17cc1743/events.out.tfevents.1711002832.67fe17cc1743.1153.2 +3 -0
- runs/Mar21_06-33-51_67fe17cc1743/events.out.tfevents.1711002876.67fe17cc1743.1153.3 +3 -0
- train_results.json +8 -0
- trainer_state.json +51 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
+
tags:
|
5 |
+
- image-classification
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- imagefolder
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
model-index:
|
12 |
+
- name: vit-base-id-card
|
13 |
+
results:
|
14 |
+
- task:
|
15 |
+
name: Image Classification
|
16 |
+
type: image-classification
|
17 |
+
dataset:
|
18 |
+
name: beans
|
19 |
+
type: imagefolder
|
20 |
+
config: default
|
21 |
+
split: validation
|
22 |
+
args: default
|
23 |
+
metrics:
|
24 |
+
- name: Accuracy
|
25 |
+
type: accuracy
|
26 |
+
value: 1.0
|
27 |
+
---
|
28 |
+
|
29 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
30 |
+
should probably proofread and complete it, then remove this comment. -->
|
31 |
+
|
32 |
+
# vit-base-id-card
|
33 |
+
|
34 |
+
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 beans dataset.
|
35 |
+
It achieves the following results on the evaluation set:
|
36 |
+
- Loss: 0.0611
|
37 |
+
- Accuracy: 1.0
|
38 |
+
|
39 |
+
## Model description
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Intended uses & limitations
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training and evaluation data
|
48 |
+
|
49 |
+
More information needed
|
50 |
+
|
51 |
+
## Training procedure
|
52 |
+
|
53 |
+
### Training hyperparameters
|
54 |
+
|
55 |
+
The following hyperparameters were used during training:
|
56 |
+
- learning_rate: 0.0002
|
57 |
+
- train_batch_size: 16
|
58 |
+
- eval_batch_size: 8
|
59 |
+
- seed: 42
|
60 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
61 |
+
- lr_scheduler_type: linear
|
62 |
+
- num_epochs: 4
|
63 |
+
- mixed_precision_training: Native AMP
|
64 |
+
|
65 |
+
### Training results
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
### Framework versions
|
70 |
+
|
71 |
+
- Transformers 4.38.2
|
72 |
+
- Pytorch 2.2.1+cu121
|
73 |
+
- Datasets 2.18.0
|
74 |
+
- Tokenizers 0.15.2
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"eval_accuracy": 1.0,
|
4 |
+
"eval_loss": 0.0610995814204216,
|
5 |
+
"eval_runtime": 1.8578,
|
6 |
+
"eval_samples_per_second": 14.533,
|
7 |
+
"eval_steps_per_second": 2.153,
|
8 |
+
"total_flos": 3.502669323615437e+16,
|
9 |
+
"train_loss": 0.25591564178466797,
|
10 |
+
"train_runtime": 40.8688,
|
11 |
+
"train_samples_per_second": 11.06,
|
12 |
+
"train_steps_per_second": 0.783
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "form",
|
13 |
+
"1": "id_card_back",
|
14 |
+
"2": "id_card_front"
|
15 |
+
},
|
16 |
+
"image_size": 224,
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 3072,
|
19 |
+
"label2id": {
|
20 |
+
"form": "0",
|
21 |
+
"id_card_back": "1",
|
22 |
+
"id_card_front": "2"
|
23 |
+
},
|
24 |
+
"layer_norm_eps": 1e-12,
|
25 |
+
"model_type": "vit",
|
26 |
+
"num_attention_heads": 12,
|
27 |
+
"num_channels": 3,
|
28 |
+
"num_hidden_layers": 12,
|
29 |
+
"patch_size": 16,
|
30 |
+
"problem_type": "single_label_classification",
|
31 |
+
"qkv_bias": true,
|
32 |
+
"torch_dtype": "float32",
|
33 |
+
"transformers_version": "4.38.2"
|
34 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"eval_accuracy": 1.0,
|
4 |
+
"eval_loss": 0.0610995814204216,
|
5 |
+
"eval_runtime": 1.8578,
|
6 |
+
"eval_samples_per_second": 14.533,
|
7 |
+
"eval_steps_per_second": 2.153
|
8 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:17fddba4b9b119ad3ef2426885782d2b79033eb714640f3d62da164f57c27206
|
3 |
+
size 343227052
|
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": "ViTFeatureExtractor",
|
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/Mar21_06-15-23_67fe17cc1743/events.out.tfevents.1711001733.67fe17cc1743.1153.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:856414c6635da0875727bb8260519dca3bf213402ca0c0ab03cc9336bb8f1e1a
|
3 |
+
size 5274
|
runs/Mar21_06-15-23_67fe17cc1743/events.out.tfevents.1711001845.67fe17cc1743.1153.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c28cb057839b237cb573a070efbc6fd81318f3333911f3b044e297db9247802d
|
3 |
+
size 405
|
runs/Mar21_06-33-51_67fe17cc1743/events.out.tfevents.1711002832.67fe17cc1743.1153.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9ad2c6d34701c5f30d308a4fe2cd646fa2f13f5945c05839a76ef16bbfe7e5d4
|
3 |
+
size 5588
|
runs/Mar21_06-33-51_67fe17cc1743/events.out.tfevents.1711002876.67fe17cc1743.1153.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9f70f5bc8c65b9e398c551fc0c2b744ef4ed993592a9a9de0b02e344ead997ed
|
3 |
+
size 405
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.0,
|
3 |
+
"total_flos": 3.502669323615437e+16,
|
4 |
+
"train_loss": 0.25591564178466797,
|
5 |
+
"train_runtime": 40.8688,
|
6 |
+
"train_samples_per_second": 11.06,
|
7 |
+
"train_steps_per_second": 0.783
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 4.0,
|
5 |
+
"eval_steps": 100,
|
6 |
+
"global_step": 32,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 1.25,
|
13 |
+
"grad_norm": 1.040573000907898,
|
14 |
+
"learning_rate": 0.00014375,
|
15 |
+
"loss": 0.6083,
|
16 |
+
"step": 10
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"epoch": 2.5,
|
20 |
+
"grad_norm": 0.4061480462551117,
|
21 |
+
"learning_rate": 8.125000000000001e-05,
|
22 |
+
"loss": 0.1341,
|
23 |
+
"step": 20
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 3.75,
|
27 |
+
"grad_norm": 0.30543988943099976,
|
28 |
+
"learning_rate": 1.8750000000000002e-05,
|
29 |
+
"loss": 0.0648,
|
30 |
+
"step": 30
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"epoch": 4.0,
|
34 |
+
"step": 32,
|
35 |
+
"total_flos": 3.502669323615437e+16,
|
36 |
+
"train_loss": 0.25591564178466797,
|
37 |
+
"train_runtime": 40.8688,
|
38 |
+
"train_samples_per_second": 11.06,
|
39 |
+
"train_steps_per_second": 0.783
|
40 |
+
}
|
41 |
+
],
|
42 |
+
"logging_steps": 10,
|
43 |
+
"max_steps": 32,
|
44 |
+
"num_input_tokens_seen": 0,
|
45 |
+
"num_train_epochs": 4,
|
46 |
+
"save_steps": 100,
|
47 |
+
"total_flos": 3.502669323615437e+16,
|
48 |
+
"train_batch_size": 16,
|
49 |
+
"trial_name": null,
|
50 |
+
"trial_params": null
|
51 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ef34432b313669942c77076b60d487bda6024f60f7696c7295a2118b4ca0d8b5
|
3 |
+
size 4856
|