methane6923 commited on
Commit
bd85d01
1 Parent(s): e75e270

Model save

Browse files
README.md ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - precision
11
+ - recall
12
+ - f1
13
+ model-index:
14
+ - name: weather_classification_ViT
15
+ results:
16
+ - task:
17
+ name: Image Classification
18
+ type: image-classification
19
+ dataset:
20
+ name: imagefolder
21
+ type: imagefolder
22
+ config: default
23
+ split: train
24
+ args: default
25
+ metrics:
26
+ - name: Accuracy
27
+ type: accuracy
28
+ value: 0.9679266895761741
29
+ - name: Precision
30
+ type: precision
31
+ value: 0.9679235596755258
32
+ - name: Recall
33
+ type: recall
34
+ value: 0.9679266895761741
35
+ - name: F1
36
+ type: f1
37
+ value: 0.9678827379290899
38
+ ---
39
+
40
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
41
+ should probably proofread and complete it, then remove this comment. -->
42
+
43
+ # weather_classification_ViT
44
+
45
+ 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.
46
+ It achieves the following results on the evaluation set:
47
+ - Loss: 0.1268
48
+ - Accuracy: 0.9679
49
+ - Precision: 0.9679
50
+ - Recall: 0.9679
51
+ - F1: 0.9679
52
+ - Auc: 0.9974
53
+
54
+ ## Model description
55
+
56
+ More information needed
57
+
58
+ ## Intended uses & limitations
59
+
60
+ More information needed
61
+
62
+ ## Training and evaluation data
63
+
64
+ More information needed
65
+
66
+ ## Training procedure
67
+
68
+ ### Training hyperparameters
69
+
70
+ The following hyperparameters were used during training:
71
+ - learning_rate: 0.0002
72
+ - train_batch_size: 16
73
+ - eval_batch_size: 8
74
+ - seed: 42
75
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
76
+ - lr_scheduler_type: linear
77
+ - num_epochs: 4
78
+ - mixed_precision_training: Native AMP
79
+
80
+ ### Training results
81
+
82
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | Auc |
83
+ |:-------------:|:------:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|:------:|
84
+ | 0.2811 | 0.2288 | 100 | 0.3139 | 0.8958 | 0.9147 | 0.8958 | 0.8970 | 0.9903 |
85
+ | 0.1396 | 0.4577 | 200 | 0.2454 | 0.9278 | 0.9307 | 0.9278 | 0.9282 | 0.9919 |
86
+ | 0.3761 | 0.6865 | 300 | 0.2952 | 0.9072 | 0.9117 | 0.9072 | 0.9071 | 0.9889 |
87
+ | 0.2365 | 0.9153 | 400 | 0.1797 | 0.9444 | 0.9447 | 0.9444 | 0.9445 | 0.9940 |
88
+ | 0.2528 | 1.1442 | 500 | 0.2470 | 0.9278 | 0.9307 | 0.9278 | 0.9278 | 0.9924 |
89
+ | 0.2364 | 1.3730 | 600 | 0.2448 | 0.9261 | 0.9306 | 0.9261 | 0.9264 | 0.9934 |
90
+ | 0.34 | 1.6018 | 700 | 0.1986 | 0.9404 | 0.9409 | 0.9404 | 0.9405 | 0.9929 |
91
+ | 0.2001 | 1.8307 | 800 | 0.1525 | 0.9542 | 0.9548 | 0.9542 | 0.9539 | 0.9960 |
92
+ | 0.0958 | 2.0595 | 900 | 0.1783 | 0.9507 | 0.9515 | 0.9507 | 0.9505 | 0.9952 |
93
+ | 0.1862 | 2.2883 | 1000 | 0.1654 | 0.9553 | 0.9558 | 0.9553 | 0.9551 | 0.9952 |
94
+ | 0.1021 | 2.5172 | 1100 | 0.1654 | 0.9462 | 0.9472 | 0.9462 | 0.9459 | 0.9958 |
95
+ | 0.1178 | 2.7460 | 1200 | 0.1591 | 0.9525 | 0.9536 | 0.9525 | 0.9523 | 0.9960 |
96
+ | 0.0474 | 2.9748 | 1300 | 0.1299 | 0.9633 | 0.9635 | 0.9633 | 0.9633 | 0.9975 |
97
+ | 0.046 | 3.2037 | 1400 | 0.1384 | 0.9628 | 0.9628 | 0.9628 | 0.9627 | 0.9972 |
98
+ | 0.0294 | 3.4325 | 1500 | 0.1388 | 0.9645 | 0.9644 | 0.9645 | 0.9644 | 0.9969 |
99
+ | 0.1833 | 3.6613 | 1600 | 0.1346 | 0.9633 | 0.9634 | 0.9633 | 0.9633 | 0.9971 |
100
+ | 0.0548 | 3.8902 | 1700 | 0.1268 | 0.9679 | 0.9679 | 0.9679 | 0.9679 | 0.9974 |
101
+
102
+
103
+ ### Framework versions
104
+
105
+ - Transformers 4.41.2
106
+ - Pytorch 2.3.0+cu121
107
+ - Datasets 2.20.0
108
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "Clear",
13
+ "1": "Fog",
14
+ "2": "Rain",
15
+ "3": "Sand storm",
16
+ "4": "Snow"
17
+ },
18
+ "image_size": 224,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "Clear": "0",
23
+ "Fog": "1",
24
+ "Rain": "2",
25
+ "Sand storm": "3",
26
+ "Snow": "4"
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "model_type": "vit",
30
+ "num_attention_heads": 12,
31
+ "num_channels": 3,
32
+ "num_hidden_layers": 12,
33
+ "patch_size": 16,
34
+ "problem_type": "single_label_classification",
35
+ "qkv_bias": true,
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.41.2"
38
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62940802636080b2ebe1a854a83d94e4b8afb2d6aeb296d2f054e2fa657d53a6
3
+ size 343233204
preprocessor_config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_valid_processor_keys": [
3
+ "images",
4
+ "do_resize",
5
+ "size",
6
+ "resample",
7
+ "do_rescale",
8
+ "rescale_factor",
9
+ "do_normalize",
10
+ "image_mean",
11
+ "image_std",
12
+ "return_tensors",
13
+ "data_format",
14
+ "input_data_format"
15
+ ],
16
+ "do_normalize": true,
17
+ "do_rescale": true,
18
+ "do_resize": true,
19
+ "image_mean": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "image_processor_type": "ViTFeatureExtractor",
25
+ "image_std": [
26
+ 0.5,
27
+ 0.5,
28
+ 0.5
29
+ ],
30
+ "resample": 2,
31
+ "rescale_factor": 0.00392156862745098,
32
+ "size": {
33
+ "height": 224,
34
+ "width": 224
35
+ }
36
+ }
runs/Jul11_06-59-42_c678d70e5ef6/events.out.tfevents.1720681198.c678d70e5ef6.578.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a6d40be2ea71ee51193d2ba25f8be1efa120c615e3753d0763887e6df10b303
3
+ size 50760
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d540a90add4206a76bf8a3fe4dba66de4ed3d9969197a8840ec9a52c10686648
3
+ size 5112