Mercurial > repos > goeckslab > image_learner
comparison constants.py @ 11:c5150cceab47 draft default tip
planemo upload for repository https://github.com/goeckslab/gleam.git commit 0fe927b618cd4dfc87af7baaa827034cc6813225
author | goeckslab |
---|---|
date | Sat, 18 Oct 2025 03:17:09 +0000 |
parents | 85e6f4b2ad18 |
children |
comparison
equal
deleted
inserted
replaced
10:b0d893d04d4c | 11:c5150cceab47 |
---|---|
5 LABEL_COLUMN_NAME = "label" | 5 LABEL_COLUMN_NAME = "label" |
6 IMAGE_PATH_COLUMN_NAME = "image_path" | 6 IMAGE_PATH_COLUMN_NAME = "image_path" |
7 DEFAULT_SPLIT_PROBABILITIES = [0.7, 0.1, 0.2] | 7 DEFAULT_SPLIT_PROBABILITIES = [0.7, 0.1, 0.2] |
8 TEMP_CSV_FILENAME = "processed_data_for_ludwig.csv" | 8 TEMP_CSV_FILENAME = "processed_data_for_ludwig.csv" |
9 TEMP_CONFIG_FILENAME = "ludwig_config.yaml" | 9 TEMP_CONFIG_FILENAME = "ludwig_config.yaml" |
10 TEMP_DIR_PREFIX = "ludwig_api_work_" | 10 TEMP_DIR_PREFIX = "gleam_image_work_" |
11 PREDICTIONS_PARQUET_FILE_NAME = "predictions.parquet" | |
12 TEST_STATISTICS_FILE_NAME = "test_statistics.json" | |
13 TRAIN_SET_METADATA_FILE_NAME = "train_set_metadata.json" | |
14 DESCRIPTION_FILE_NAME = "description.json" | |
15 TRAINING_STATISTICS_FILE_NAME = "training_statistics.json" | |
16 PREDICTIONS_SHAPES_FILE_NAME = "predictions.shapes" | |
11 MODEL_ENCODER_TEMPLATES: Dict[str, Any] = { | 17 MODEL_ENCODER_TEMPLATES: Dict[str, Any] = { |
12 "stacked_cnn": "stacked_cnn", | 18 "stacked_cnn": "stacked_cnn", |
13 "resnet18": {"type": "resnet", "model_variant": 18}, | 19 "resnet18": {"type": "resnet", "model_variant": 18}, |
14 "resnet34": {"type": "resnet", "model_variant": 34}, | 20 "resnet34": {"type": "resnet", "model_variant": 34}, |
15 "resnet50": {"type": "resnet", "model_variant": 50}, | 21 "resnet50": {"type": "resnet", "model_variant": 50}, |
71 "vit_b_16": {"type": "vit", "model_variant": "b_16"}, | 77 "vit_b_16": {"type": "vit", "model_variant": "b_16"}, |
72 "vit_b_32": {"type": "vit", "model_variant": "b_32"}, | 78 "vit_b_32": {"type": "vit", "model_variant": "b_32"}, |
73 "vit_l_16": {"type": "vit", "model_variant": "l_16"}, | 79 "vit_l_16": {"type": "vit", "model_variant": "l_16"}, |
74 "vit_l_32": {"type": "vit", "model_variant": "l_32"}, | 80 "vit_l_32": {"type": "vit", "model_variant": "l_32"}, |
75 "vit_h_14": {"type": "vit", "model_variant": "h_14"}, | 81 "vit_h_14": {"type": "vit", "model_variant": "h_14"}, |
82 "vit_huge_timm": {"type": "vit", "model_variant": "huge_timm", "custom_encoder": True}, | |
83 # MetaFormer family (support all variants via custom_model) | |
84 "identityformer_s12": {"type": "stacked_cnn", "custom_model": "identityformer_s12", "use_pretrained": True, "trainable": True}, | |
85 "identityformer_s24": {"type": "stacked_cnn", "custom_model": "identityformer_s24", "use_pretrained": True, "trainable": True}, | |
86 "identityformer_s36": {"type": "stacked_cnn", "custom_model": "identityformer_s36", "use_pretrained": True, "trainable": True}, | |
87 "identityformer_m36": {"type": "stacked_cnn", "custom_model": "identityformer_m36", "use_pretrained": True, "trainable": True}, | |
88 "identityformer_m48": {"type": "stacked_cnn", "custom_model": "identityformer_m48", "use_pretrained": True, "trainable": True}, | |
89 | |
90 "randformer_s12": {"type": "stacked_cnn", "custom_model": "randformer_s12", "use_pretrained": True, "trainable": True}, | |
91 "randformer_s24": {"type": "stacked_cnn", "custom_model": "randformer_s24", "use_pretrained": True, "trainable": True}, | |
92 "randformer_s36": {"type": "stacked_cnn", "custom_model": "randformer_s36", "use_pretrained": True, "trainable": True}, | |
93 "randformer_m36": {"type": "stacked_cnn", "custom_model": "randformer_m36", "use_pretrained": True, "trainable": True}, | |
94 "randformer_m48": {"type": "stacked_cnn", "custom_model": "randformer_m48", "use_pretrained": True, "trainable": True}, | |
95 | |
96 "poolformerv2_s12": {"type": "stacked_cnn", "custom_model": "poolformerv2_s12", "use_pretrained": True, "trainable": True}, | |
97 "poolformerv2_s24": {"type": "stacked_cnn", "custom_model": "poolformerv2_s24", "use_pretrained": True, "trainable": True}, | |
98 "poolformerv2_s36": {"type": "stacked_cnn", "custom_model": "poolformerv2_s36", "use_pretrained": True, "trainable": True}, | |
99 "poolformerv2_m36": {"type": "stacked_cnn", "custom_model": "poolformerv2_m36", "use_pretrained": True, "trainable": True}, | |
100 "poolformerv2_m48": {"type": "stacked_cnn", "custom_model": "poolformerv2_m48", "use_pretrained": True, "trainable": True}, | |
101 | |
102 "convformer_s18": {"type": "stacked_cnn", "custom_model": "convformer_s18", "use_pretrained": True, "trainable": True}, | |
103 "convformer_s18_384": {"type": "stacked_cnn", "custom_model": "convformer_s18_384", "use_pretrained": True, "trainable": True}, | |
104 "convformer_s18_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_s18_in21ft1k", "use_pretrained": True, "trainable": True}, | |
105 "convformer_s18_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_s18_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
106 "convformer_s18_in21k": {"type": "stacked_cnn", "custom_model": "convformer_s18_in21k", "use_pretrained": True, "trainable": True}, | |
107 "convformer_s36": {"type": "stacked_cnn", "custom_model": "convformer_s36", "use_pretrained": True, "trainable": True}, | |
108 "convformer_s36_384": {"type": "stacked_cnn", "custom_model": "convformer_s36_384", "use_pretrained": True, "trainable": True}, | |
109 "convformer_s36_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_s36_in21ft1k", "use_pretrained": True, "trainable": True}, | |
110 "convformer_s36_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_s36_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
111 "convformer_s36_in21k": {"type": "stacked_cnn", "custom_model": "convformer_s36_in21k", "use_pretrained": True, "trainable": True}, | |
112 "convformer_m36": {"type": "stacked_cnn", "custom_model": "convformer_m36", "use_pretrained": True, "trainable": True}, | |
113 "convformer_m36_384": {"type": "stacked_cnn", "custom_model": "convformer_m36_384", "use_pretrained": True, "trainable": True}, | |
114 "convformer_m36_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_m36_in21ft1k", "use_pretrained": True, "trainable": True}, | |
115 "convformer_m36_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_m36_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
116 "convformer_m36_in21k": {"type": "stacked_cnn", "custom_model": "convformer_m36_in21k", "use_pretrained": True, "trainable": True}, | |
117 "convformer_b36": {"type": "stacked_cnn", "custom_model": "convformer_b36", "use_pretrained": True, "trainable": True}, | |
118 "convformer_b36_384": {"type": "stacked_cnn", "custom_model": "convformer_b36_384", "use_pretrained": True, "trainable": True}, | |
119 "convformer_b36_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_b36_in21ft1k", "use_pretrained": True, "trainable": True}, | |
120 "convformer_b36_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "convformer_b36_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
121 "convformer_b36_in21k": {"type": "stacked_cnn", "custom_model": "convformer_b36_in21k", "use_pretrained": True, "trainable": True}, | |
122 | |
123 "caformer_s18": { | |
124 "type": "stacked_cnn", | |
125 "custom_model": "caformer_s18", | |
126 "use_pretrained": True, | |
127 "trainable": True, | |
128 }, | |
129 "caformer_s36": { | |
130 "type": "stacked_cnn", | |
131 "custom_model": "caformer_s36", | |
132 "use_pretrained": True, | |
133 "trainable": True, | |
134 }, | |
135 "caformer_m36": { | |
136 "type": "stacked_cnn", | |
137 "custom_model": "caformer_m36", | |
138 "use_pretrained": True, | |
139 "trainable": True, | |
140 }, | |
141 "caformer_b36": { | |
142 "type": "stacked_cnn", | |
143 "custom_model": "caformer_b36", | |
144 "use_pretrained": True, | |
145 "trainable": True, | |
146 }, | |
147 "caformer_s18_384": {"type": "stacked_cnn", "custom_model": "caformer_s18_384", "use_pretrained": True, "trainable": True}, | |
148 "caformer_s18_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_s18_in21ft1k", "use_pretrained": True, "trainable": True}, | |
149 "caformer_s18_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_s18_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
150 "caformer_s18_in21k": {"type": "stacked_cnn", "custom_model": "caformer_s18_in21k", "use_pretrained": True, "trainable": True}, | |
151 "caformer_s36_384": {"type": "stacked_cnn", "custom_model": "caformer_s36_384", "use_pretrained": True, "trainable": True}, | |
152 "caformer_s36_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_s36_in21ft1k", "use_pretrained": True, "trainable": True}, | |
153 "caformer_s36_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_s36_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
154 "caformer_s36_in21k": {"type": "stacked_cnn", "custom_model": "caformer_s36_in21k", "use_pretrained": True, "trainable": True}, | |
155 "caformer_m36_384": {"type": "stacked_cnn", "custom_model": "caformer_m36_384", "use_pretrained": True, "trainable": True}, | |
156 "caformer_m36_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_m36_in21ft1k", "use_pretrained": True, "trainable": True}, | |
157 "caformer_m36_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_m36_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
158 "caformer_m36_in21k": {"type": "stacked_cnn", "custom_model": "caformer_m36_in21k", "use_pretrained": True, "trainable": True}, | |
159 "caformer_b36_384": {"type": "stacked_cnn", "custom_model": "caformer_b36_384", "use_pretrained": True, "trainable": True}, | |
160 "caformer_b36_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_b36_in21ft1k", "use_pretrained": True, "trainable": True}, | |
161 "caformer_b36_384_in21ft1k": {"type": "stacked_cnn", "custom_model": "caformer_b36_384_in21ft1k", "use_pretrained": True, "trainable": True}, | |
162 "caformer_b36_in21k": {"type": "stacked_cnn", "custom_model": "caformer_b36_in21k", "use_pretrained": True, "trainable": True}, | |
76 "convnext_tiny": {"type": "convnext", "model_variant": "tiny"}, | 163 "convnext_tiny": {"type": "convnext", "model_variant": "tiny"}, |
77 "convnext_small": {"type": "convnext", "model_variant": "small"}, | 164 "convnext_small": {"type": "convnext", "model_variant": "small"}, |
78 "convnext_base": {"type": "convnext", "model_variant": "base"}, | 165 "convnext_base": {"type": "convnext", "model_variant": "base"}, |
79 "convnext_large": {"type": "convnext", "model_variant": "large"}, | 166 "convnext_large": {"type": "convnext", "model_variant": "large"}, |
80 "maxvit_t": {"type": "maxvit", "model_variant": "t"}, | 167 "maxvit_t": {"type": "maxvit", "model_variant": "t"}, |