paolinox commited on
Commit
0f28946
1 Parent(s): 22cddc2

paolinox/segformer-FT-food101

Browse files
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: nvidia/mit-b0
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - food101
8
+ metrics:
9
+ - accuracy
10
+ model-index:
11
+ - name: segformer-finetuned-food101
12
+ results:
13
+ - task:
14
+ name: Image Classification
15
+ type: image-classification
16
+ dataset:
17
+ name: food101
18
+ type: food101
19
+ config: default
20
+ split: train[:5000]
21
+ args: default
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: 0.888
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
+ # segformer-finetuned-food101
32
+
33
+ This model is a fine-tuned version of [nvidia/mit-b0](https://huggingface.co/nvidia/mit-b0) on the food101 dataset.
34
+ It achieves the following results on the evaluation set:
35
+ - Loss: 0.3478
36
+ - Accuracy: 0.888
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
+ | 2.0272 | 0.98 | 23 | 1.8039 | 0.329 |
71
+ | 1.5806 | 2.0 | 47 | 1.2465 | 0.608 |
72
+ | 1.0564 | 2.98 | 70 | 0.7507 | 0.756 |
73
+ | 0.7358 | 4.0 | 94 | 0.6263 | 0.784 |
74
+ | 0.6482 | 4.98 | 117 | 0.5551 | 0.795 |
75
+ | 0.5692 | 6.0 | 141 | 0.5849 | 0.794 |
76
+ | 0.5552 | 6.98 | 164 | 0.4931 | 0.831 |
77
+ | 0.4956 | 8.0 | 188 | 0.5166 | 0.83 |
78
+ | 0.4748 | 8.98 | 211 | 0.4808 | 0.834 |
79
+ | 0.424 | 10.0 | 235 | 0.4238 | 0.852 |
80
+ | 0.4314 | 10.98 | 258 | 0.4858 | 0.838 |
81
+ | 0.4071 | 12.0 | 282 | 0.4304 | 0.858 |
82
+ | 0.3928 | 12.98 | 305 | 0.4621 | 0.851 |
83
+ | 0.3695 | 14.0 | 329 | 0.4398 | 0.859 |
84
+ | 0.3704 | 14.98 | 352 | 0.4172 | 0.855 |
85
+ | 0.3299 | 16.0 | 376 | 0.4225 | 0.856 |
86
+ | 0.3391 | 16.98 | 399 | 0.4165 | 0.855 |
87
+ | 0.3023 | 18.0 | 423 | 0.3828 | 0.869 |
88
+ | 0.3318 | 18.98 | 446 | 0.4190 | 0.861 |
89
+ | 0.2994 | 20.0 | 470 | 0.4190 | 0.861 |
90
+ | 0.323 | 20.98 | 493 | 0.4034 | 0.866 |
91
+ | 0.2883 | 22.0 | 517 | 0.4083 | 0.874 |
92
+ | 0.2959 | 22.98 | 540 | 0.4202 | 0.862 |
93
+ | 0.2665 | 24.0 | 564 | 0.3740 | 0.881 |
94
+ | 0.2765 | 24.98 | 587 | 0.4123 | 0.866 |
95
+ | 0.2728 | 26.0 | 611 | 0.3763 | 0.868 |
96
+ | 0.2817 | 26.98 | 634 | 0.3939 | 0.864 |
97
+ | 0.2467 | 28.0 | 658 | 0.3938 | 0.87 |
98
+ | 0.2772 | 28.98 | 681 | 0.4013 | 0.866 |
99
+ | 0.2243 | 29.36 | 690 | 0.3478 | 0.888 |
100
+
101
+
102
+ ### Framework versions
103
+
104
+ - Transformers 4.35.2
105
+ - Pytorch 2.1.0+cu118
106
+ - Datasets 2.15.0
107
+ - Tokenizers 0.15.0
config.json ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "nvidia/mit-b0",
3
+ "architectures": [
4
+ "SegformerForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "classifier_dropout_prob": 0.1,
8
+ "decoder_hidden_size": 256,
9
+ "depths": [
10
+ 2,
11
+ 2,
12
+ 2,
13
+ 2
14
+ ],
15
+ "downsampling_rates": [
16
+ 1,
17
+ 4,
18
+ 8,
19
+ 16
20
+ ],
21
+ "drop_path_rate": 0.1,
22
+ "hidden_act": "gelu",
23
+ "hidden_dropout_prob": 0.0,
24
+ "hidden_sizes": [
25
+ 32,
26
+ 64,
27
+ 160,
28
+ 256
29
+ ],
30
+ "id2label": {
31
+ "0": "beignets",
32
+ "1": "bruschetta",
33
+ "2": "chicken_wings",
34
+ "3": "hamburger",
35
+ "4": "pork_chop",
36
+ "5": "prime_rib",
37
+ "6": "ramen"
38
+ },
39
+ "image_size": 224,
40
+ "initializer_range": 0.02,
41
+ "label2id": {
42
+ "beignets": 0,
43
+ "bruschetta": 1,
44
+ "chicken_wings": 2,
45
+ "hamburger": 3,
46
+ "pork_chop": 4,
47
+ "prime_rib": 5,
48
+ "ramen": 6
49
+ },
50
+ "layer_norm_eps": 1e-06,
51
+ "mlp_ratios": [
52
+ 4,
53
+ 4,
54
+ 4,
55
+ 4
56
+ ],
57
+ "model_type": "segformer",
58
+ "num_attention_heads": [
59
+ 1,
60
+ 2,
61
+ 5,
62
+ 8
63
+ ],
64
+ "num_channels": 3,
65
+ "num_encoder_blocks": 4,
66
+ "patch_sizes": [
67
+ 7,
68
+ 3,
69
+ 3,
70
+ 3
71
+ ],
72
+ "problem_type": "single_label_classification",
73
+ "reshape_last_stage": true,
74
+ "semantic_loss_ignore_index": 255,
75
+ "sr_ratios": [
76
+ 8,
77
+ 4,
78
+ 2,
79
+ 1
80
+ ],
81
+ "strides": [
82
+ 4,
83
+ 2,
84
+ 2,
85
+ 2
86
+ ],
87
+ "torch_dtype": "float32",
88
+ "transformers_version": "4.35.2"
89
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c49bca9090160b8a429d9ba062c0dab48d0bf2d64095bcf85c9429e5a17d39a0
3
+ size 13307316
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_reduce_labels": false,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.485,
8
+ 0.456,
9
+ 0.406
10
+ ],
11
+ "image_processor_type": "SegformerImageProcessor",
12
+ "image_std": [
13
+ 0.229,
14
+ 0.224,
15
+ 0.225
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 512,
21
+ "width": 512
22
+ }
23
+ }
runs/Nov28_16-45-08_9cef718bb6ef/events.out.tfevents.1701189918.9cef718bb6ef.1194.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0095d78931a52ed4be3bdb583644b33cf99adca2a626f9b1cfdcb6ab78bd304
3
+ size 19660
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72c7c78b3b384ffc169efa2416b2824d90f6864cc2e712fcbec5385bd4a301ae
3
+ size 4600