tanganke commited on
Commit
73e6fc9
·
verified ·
1 Parent(s): 75bcdab

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +76 -0
  2. config.json +129 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +22 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/resnet-18
3
+ library_name: transformers
4
+ tags:
5
+ - fusion-bench
6
+ - merge
7
+ ---
8
+ # Deep Model Fusion
9
+
10
+ Fine-tuned ResNet model on dataset gtsrb.
11
+
12
+ ## Models Merged
13
+
14
+ This is a merged model created using [fusion-bench](https://github.com/tanganke/fusion_bench).
15
+
16
+ The following models were included in the merge:
17
+
18
+
19
+
20
+
21
+ ## Configuration
22
+
23
+ The following YAML configuration was used to produce this model:
24
+
25
+ ### Algorithm Configuration
26
+
27
+ ```yaml
28
+ _recursive_: false
29
+ _target_: fusion_bench.method.classification.image_classification_finetune.ImageClassificationFineTuning
30
+ _usage_: null
31
+ _version_: 0.2.25.dev0
32
+ dataloader_kwargs:
33
+ batch_size: 128
34
+ num_workers: 8
35
+ pin_memory: true
36
+ label_smoothing: 0
37
+ lr_scheduler: null
38
+ max_epochs: -1
39
+ max_steps: 4000
40
+ optimizer:
41
+ _target_: torch.optim.SGD
42
+ lr: 0.001
43
+ momentum: 0.9
44
+ weight_decay: 0.0001
45
+ save_interval: 1000
46
+ save_on_train_epoch_end: false
47
+ save_top_k: -1
48
+ training_data_ratio: 0.5
49
+ ```
50
+
51
+ ### Model Pool Configuration
52
+
53
+ ```yaml
54
+ _recursive_: false
55
+ _target_: fusion_bench.modelpool.resnet_for_image_classification.ResNetForImageClassificationPool
56
+ _usage_: null
57
+ _version_: 0.2.25.dev0
58
+ models:
59
+ _pretrained_:
60
+ config_path: microsoft/resnet-18
61
+ dataset_name: gtsrb
62
+ pretrained: true
63
+ test_datasets: null
64
+ train_datasets:
65
+ gtsrb:
66
+ _target_: datasets.load_dataset
67
+ path: tanganke/gtsrb
68
+ split: train
69
+ type: transformers
70
+ val_datasets:
71
+ gtsrb:
72
+ _target_: datasets.load_dataset
73
+ path: tanganke/gtsrb
74
+ split: test
75
+ ```
76
+
config.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ResNetForImageClassification"
4
+ ],
5
+ "depths": [
6
+ 2,
7
+ 2,
8
+ 2,
9
+ 2
10
+ ],
11
+ "downsample_in_bottleneck": false,
12
+ "downsample_in_first_stage": false,
13
+ "dtype": "float32",
14
+ "embedding_size": 64,
15
+ "hidden_act": "relu",
16
+ "hidden_sizes": [
17
+ 64,
18
+ 128,
19
+ 256,
20
+ 512
21
+ ],
22
+ "id2label": {
23
+ "0": "red and white circle 20 kph speed limit",
24
+ "1": "red and white circle 30 kph speed limit",
25
+ "2": "red and white circle 50 kph speed limit",
26
+ "3": "red and white circle 60 kph speed limit",
27
+ "4": "red and white circle 70 kph speed limit",
28
+ "5": "red and white circle 80 kph speed limit",
29
+ "6": "end / de-restriction of 80 kph speed limit",
30
+ "7": "red and white circle 100 kph speed limit",
31
+ "8": "red and white circle 120 kph speed limit",
32
+ "9": "red and white circle red car and black car no passing",
33
+ "10": "red and white circle red truck and black car no passing",
34
+ "11": "red and white triangle road intersection warning",
35
+ "12": "white and yellow diamond priority road",
36
+ "13": "red and white upside down triangle yield right-of-way",
37
+ "14": "stop",
38
+ "15": "empty red and white circle",
39
+ "16": "red and white circle no truck entry",
40
+ "17": "red circle with white horizonal stripe no entry",
41
+ "18": "red and white triangle with exclamation mark warning",
42
+ "19": "red and white triangle with black left curve approaching warning",
43
+ "20": "red and white triangle with black right curve approaching warning",
44
+ "21": "red and white triangle with black double curve approaching warning",
45
+ "22": "red and white triangle rough / bumpy road warning",
46
+ "23": "red and white triangle car skidding / slipping warning",
47
+ "24": "red and white triangle with merging / narrow lanes warning",
48
+ "25": "red and white triangle with person digging / construction / road work warning",
49
+ "26": "red and white triangle with traffic light approaching warning",
50
+ "27": "red and white triangle with person walking warning",
51
+ "28": "red and white triangle with child and person walking warning",
52
+ "29": "red and white triangle with bicyle warning",
53
+ "30": "red and white triangle with snowflake / ice warning",
54
+ "31": "red and white triangle with deer warning",
55
+ "32": "white circle with gray strike bar no speed limit",
56
+ "33": "blue circle with white right turn arrow mandatory",
57
+ "34": "blue circle with white left turn arrow mandatory",
58
+ "35": "blue circle with white forward arrow mandatory",
59
+ "36": "blue circle with white forward or right turn arrow mandatory",
60
+ "37": "blue circle with white forward or left turn arrow mandatory",
61
+ "38": "blue circle with white keep right arrow mandatory",
62
+ "39": "blue circle with white keep left arrow mandatory",
63
+ "40": "blue circle with white arrows indicating a traffic circle",
64
+ "41": "white circle with gray strike bar indicating no passing for cars has ended",
65
+ "42": "white circle with gray strike bar indicating no passing for trucks has ended"
66
+ },
67
+ "label2id": {
68
+ "blue circle with white arrows indicating a traffic circle": 40,
69
+ "blue circle with white forward arrow mandatory": 35,
70
+ "blue circle with white forward or left turn arrow mandatory": 37,
71
+ "blue circle with white forward or right turn arrow mandatory": 36,
72
+ "blue circle with white keep left arrow mandatory": 39,
73
+ "blue circle with white keep right arrow mandatory": 38,
74
+ "blue circle with white left turn arrow mandatory": 34,
75
+ "blue circle with white right turn arrow mandatory": 33,
76
+ "empty red and white circle": 15,
77
+ "end / de-restriction of 80 kph speed limit": 6,
78
+ "red and white circle 100 kph speed limit": 7,
79
+ "red and white circle 120 kph speed limit": 8,
80
+ "red and white circle 20 kph speed limit": 0,
81
+ "red and white circle 30 kph speed limit": 1,
82
+ "red and white circle 50 kph speed limit": 2,
83
+ "red and white circle 60 kph speed limit": 3,
84
+ "red and white circle 70 kph speed limit": 4,
85
+ "red and white circle 80 kph speed limit": 5,
86
+ "red and white circle no truck entry": 16,
87
+ "red and white circle red car and black car no passing": 9,
88
+ "red and white circle red truck and black car no passing": 10,
89
+ "red and white triangle car skidding / slipping warning": 23,
90
+ "red and white triangle road intersection warning": 11,
91
+ "red and white triangle rough / bumpy road warning": 22,
92
+ "red and white triangle with bicyle warning": 29,
93
+ "red and white triangle with black double curve approaching warning": 21,
94
+ "red and white triangle with black left curve approaching warning": 19,
95
+ "red and white triangle with black right curve approaching warning": 20,
96
+ "red and white triangle with child and person walking warning": 28,
97
+ "red and white triangle with deer warning": 31,
98
+ "red and white triangle with exclamation mark warning": 18,
99
+ "red and white triangle with merging / narrow lanes warning": 24,
100
+ "red and white triangle with person digging / construction / road work warning": 25,
101
+ "red and white triangle with person walking warning": 27,
102
+ "red and white triangle with snowflake / ice warning": 30,
103
+ "red and white triangle with traffic light approaching warning": 26,
104
+ "red and white upside down triangle yield right-of-way": 13,
105
+ "red circle with white horizonal stripe no entry": 17,
106
+ "stop": 14,
107
+ "white and yellow diamond priority road": 12,
108
+ "white circle with gray strike bar indicating no passing for cars has ended": 41,
109
+ "white circle with gray strike bar indicating no passing for trucks has ended": 42,
110
+ "white circle with gray strike bar no speed limit": 32
111
+ },
112
+ "layer_type": "basic",
113
+ "model_type": "resnet",
114
+ "num_channels": 3,
115
+ "out_features": [
116
+ "stage4"
117
+ ],
118
+ "out_indices": [
119
+ 4
120
+ ],
121
+ "stage_names": [
122
+ "stem",
123
+ "stage1",
124
+ "stage2",
125
+ "stage3",
126
+ "stage4"
127
+ ],
128
+ "transformers_version": "4.56.1"
129
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2904eeaa45f247b4e5cd7506a3f44c828988bf9a295b37a3506a9daa8ffb31c
3
+ size 44848492
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_pct": 0.875,
3
+ "do_normalize": true,
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": "ConvNextImageProcessor",
12
+ "image_std": [
13
+ 0.229,
14
+ 0.224,
15
+ 0.225
16
+ ],
17
+ "resample": 3,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "shortest_edge": 224
21
+ }
22
+ }