Commit
•
b3872cd
1
Parent(s):
deb8d2f
End of training
Browse files- README.md +97 -0
- config.json +34 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- runs/Apr03_09-31-05_de6a7256840a/events.out.tfevents.1712136665.de6a7256840a.437.0 +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: computer_parts_classifier-model
|
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[:722]
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 0.8137931034482758
|
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 |
+
# computer_parts_classifier-model
|
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: 0.5117
|
36 |
+
- Accuracy: 0.8138
|
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 |
+
- gradient_accumulation_steps: 4
|
60 |
+
- total_train_batch_size: 64
|
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: 20
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
70 |
+
| No log | 0.97 | 9 | 1.0525 | 0.5517 |
|
71 |
+
| 1.0645 | 1.95 | 18 | 0.9405 | 0.6 |
|
72 |
+
| 0.9405 | 2.92 | 27 | 0.7902 | 0.7034 |
|
73 |
+
| 0.7669 | 4.0 | 37 | 0.6923 | 0.7379 |
|
74 |
+
| 0.6008 | 4.97 | 46 | 0.6152 | 0.7862 |
|
75 |
+
| 0.5142 | 5.95 | 55 | 0.5639 | 0.7931 |
|
76 |
+
| 0.394 | 6.92 | 64 | 0.5640 | 0.8 |
|
77 |
+
| 0.3649 | 8.0 | 74 | 0.5181 | 0.7862 |
|
78 |
+
| 0.279 | 8.97 | 83 | 0.5094 | 0.8345 |
|
79 |
+
| 0.2549 | 9.95 | 92 | 0.4882 | 0.8276 |
|
80 |
+
| 0.1925 | 10.92 | 101 | 0.5041 | 0.8 |
|
81 |
+
| 0.2185 | 12.0 | 111 | 0.5195 | 0.8138 |
|
82 |
+
| 0.1921 | 12.97 | 120 | 0.5170 | 0.8 |
|
83 |
+
| 0.1921 | 13.95 | 129 | 0.5846 | 0.7793 |
|
84 |
+
| 0.15 | 14.92 | 138 | 0.5217 | 0.8207 |
|
85 |
+
| 0.1798 | 16.0 | 148 | 0.5421 | 0.7862 |
|
86 |
+
| 0.1729 | 16.97 | 157 | 0.5516 | 0.8207 |
|
87 |
+
| 0.1459 | 17.95 | 166 | 0.5438 | 0.7931 |
|
88 |
+
| 0.1701 | 18.92 | 175 | 0.5043 | 0.8345 |
|
89 |
+
| 0.1487 | 19.46 | 180 | 0.5117 | 0.8138 |
|
90 |
+
|
91 |
+
|
92 |
+
### Framework versions
|
93 |
+
|
94 |
+
- Transformers 4.38.2
|
95 |
+
- Pytorch 2.2.1+cu121
|
96 |
+
- Datasets 2.18.0
|
97 |
+
- Tokenizers 0.15.2
|
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": "cable",
|
13 |
+
"1": "case",
|
14 |
+
"2": "cpu"
|
15 |
+
},
|
16 |
+
"image_size": 224,
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 3072,
|
19 |
+
"label2id": {
|
20 |
+
"cable": 0,
|
21 |
+
"case": 1,
|
22 |
+
"cpu": 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 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55ba95a0fa315a1607b7a74fe3029878c034ba4833aa09bbcaaf418db6a52c15
|
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": "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/Apr03_09-31-05_de6a7256840a/events.out.tfevents.1712136665.de6a7256840a.437.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4093805e9221e9523b1aae2b6a82fcf9bb7215162ce5564ebb70785663a8ab60
|
3 |
+
size 15113
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d1415595ef5f6f0e23b8dbd1d82484f458c1f58bf68dfd9be6c50c9d0f463bdc
|
3 |
+
size 4920
|