CVRPDataset commited on
Commit
8413c5a
·
verified ·
1 Parent(s): bdbfcee

Delete model_configs/CVRP_knet.py

Browse files
Files changed (1) hide show
  1. model_configs/CVRP_knet.py +0 -404
model_configs/CVRP_knet.py DELETED
@@ -1,404 +0,0 @@
1
- checkpoint_file = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/swin/swin_large_patch4_window7_224_22k_20220308-d5bdebaf.pth'
2
- conv_kernel_size = 1
3
- crop_size = (
4
- 512,
5
- 512,
6
- )
7
- data_preprocessor = dict(
8
- bgr_to_rgb=True,
9
- mean=[
10
- 123.675,
11
- 116.28,
12
- 103.53,
13
- ],
14
- pad_val=0,
15
- seg_pad_val=255,
16
- size=(
17
- 512,
18
- 512,
19
- ),
20
- std=[
21
- 58.395,
22
- 57.12,
23
- 57.375,
24
- ],
25
- type='SegDataPreProcessor')
26
- data_root = 'PanicleDataset/'
27
- dataset_type = 'TzyDataset'
28
- default_hooks = dict(
29
- checkpoint=dict(
30
- by_epoch=False,
31
- interval=2500,
32
- max_keep_ckpts=1,
33
- save_best='mIoU',
34
- type='CheckpointHook'),
35
- logger=dict(interval=100, log_metric_by_epoch=False, type='LoggerHook'),
36
- param_scheduler=dict(type='ParamSchedulerHook'),
37
- sampler_seed=dict(type='DistSamplerSeedHook'),
38
- timer=dict(type='IterTimerHook'),
39
- visualization=dict(type='SegVisualizationHook'))
40
- default_scope = 'mmseg'
41
- env_cfg = dict(
42
- cudnn_benchmark=True,
43
- dist_cfg=dict(backend='nccl'),
44
- mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
45
- img_ratios = [
46
- 0.5,
47
- 0.75,
48
- 1.0,
49
- 1.25,
50
- 1.5,
51
- 1.75,
52
- ]
53
- load_from = None
54
- log_level = 'INFO'
55
- log_processor = dict(by_epoch=False)
56
- model = dict(
57
- auxiliary_head=dict(
58
- align_corners=False,
59
- channels=256,
60
- concat_input=False,
61
- dropout_ratio=0.1,
62
- in_channels=768,
63
- in_index=2,
64
- loss_decode=dict(
65
- loss_weight=0.4, type='CrossEntropyLoss', use_sigmoid=False),
66
- norm_cfg=dict(requires_grad=True, type='SyncBN'),
67
- num_classes=2,
68
- num_convs=1,
69
- type='FCNHead'),
70
- backbone=dict(
71
- attn_drop_rate=0.0,
72
- depths=[
73
- 2,
74
- 2,
75
- 18,
76
- 2,
77
- ],
78
- drop_path_rate=0.3,
79
- drop_rate=0.0,
80
- embed_dims=192,
81
- mlp_ratio=4,
82
- num_heads=[
83
- 6,
84
- 12,
85
- 24,
86
- 48,
87
- ],
88
- out_indices=(
89
- 0,
90
- 1,
91
- 2,
92
- 3,
93
- ),
94
- patch_norm=True,
95
- qk_scale=None,
96
- qkv_bias=True,
97
- type='SwinTransformer',
98
- use_abs_pos_embed=False,
99
- window_size=7),
100
- data_preprocessor=dict(
101
- bgr_to_rgb=True,
102
- mean=[
103
- 123.675,
104
- 116.28,
105
- 103.53,
106
- ],
107
- pad_val=0,
108
- seg_pad_val=255,
109
- size=(
110
- 512,
111
- 512,
112
- ),
113
- std=[
114
- 58.395,
115
- 57.12,
116
- 57.375,
117
- ],
118
- type='SegDataPreProcessor'),
119
- decode_head=dict(
120
- kernel_generate_head=dict(
121
- align_corners=False,
122
- channels=512,
123
- dropout_ratio=0.1,
124
- in_channels=[
125
- 192,
126
- 384,
127
- 768,
128
- 1536,
129
- ],
130
- in_index=[
131
- 0,
132
- 1,
133
- 2,
134
- 3,
135
- ],
136
- loss_decode=dict(
137
- loss_weight=1.0, type='CrossEntropyLoss', use_sigmoid=False),
138
- norm_cfg=dict(requires_grad=True, type='SyncBN'),
139
- num_classes=2,
140
- pool_scales=(
141
- 1,
142
- 2,
143
- 3,
144
- 6,
145
- ),
146
- type='UPerHead'),
147
- kernel_update_head=[
148
- dict(
149
- conv_kernel_size=1,
150
- dropout=0.0,
151
- feat_transform_cfg=dict(
152
- act_cfg=None, conv_cfg=dict(type='Conv2d')),
153
- feedforward_channels=2048,
154
- ffn_act_cfg=dict(inplace=True, type='ReLU'),
155
- in_channels=512,
156
- kernel_updator_cfg=dict(
157
- act_cfg=dict(inplace=True, type='ReLU'),
158
- feat_channels=256,
159
- in_channels=256,
160
- norm_cfg=dict(type='LN'),
161
- out_channels=256,
162
- type='KernelUpdator'),
163
- num_classes=150,
164
- num_ffn_fcs=2,
165
- num_heads=8,
166
- num_mask_fcs=1,
167
- out_channels=512,
168
- type='KernelUpdateHead',
169
- with_ffn=True),
170
- dict(
171
- conv_kernel_size=1,
172
- dropout=0.0,
173
- feat_transform_cfg=dict(
174
- act_cfg=None, conv_cfg=dict(type='Conv2d')),
175
- feedforward_channels=2048,
176
- ffn_act_cfg=dict(inplace=True, type='ReLU'),
177
- in_channels=512,
178
- kernel_updator_cfg=dict(
179
- act_cfg=dict(inplace=True, type='ReLU'),
180
- feat_channels=256,
181
- in_channels=256,
182
- norm_cfg=dict(type='LN'),
183
- out_channels=256,
184
- type='KernelUpdator'),
185
- num_classes=150,
186
- num_ffn_fcs=2,
187
- num_heads=8,
188
- num_mask_fcs=1,
189
- out_channels=512,
190
- type='KernelUpdateHead',
191
- with_ffn=True),
192
- dict(
193
- conv_kernel_size=1,
194
- dropout=0.0,
195
- feat_transform_cfg=dict(
196
- act_cfg=None, conv_cfg=dict(type='Conv2d')),
197
- feedforward_channels=2048,
198
- ffn_act_cfg=dict(inplace=True, type='ReLU'),
199
- in_channels=512,
200
- kernel_updator_cfg=dict(
201
- act_cfg=dict(inplace=True, type='ReLU'),
202
- feat_channels=256,
203
- in_channels=256,
204
- norm_cfg=dict(type='LN'),
205
- out_channels=256,
206
- type='KernelUpdator'),
207
- num_classes=150,
208
- num_ffn_fcs=2,
209
- num_heads=8,
210
- num_mask_fcs=1,
211
- out_channels=512,
212
- type='KernelUpdateHead',
213
- with_ffn=True),
214
- ],
215
- num_stages=3,
216
- type='IterativeDecodeHead'),
217
- pretrained=
218
- 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/swin/swin_large_patch4_window7_224_22k_20220308-d5bdebaf.pth',
219
- test_cfg=dict(mode='whole'),
220
- train_cfg=dict(),
221
- type='EncoderDecoder')
222
- norm_cfg = dict(requires_grad=True, type='BN')
223
- num_stages = 3
224
- optim_wrapper = dict(
225
- clip_grad=dict(max_norm=1, norm_type=2),
226
- optimizer=dict(
227
- betas=(
228
- 0.9,
229
- 0.999,
230
- ), lr=6e-05, type='AdamW', weight_decay=0.0005),
231
- paramwise_cfg=dict(
232
- custom_keys=dict(
233
- absolute_pos_embed=dict(decay_mult=0.0),
234
- norm=dict(decay_mult=0.0),
235
- relative_position_bias_table=dict(decay_mult=0.0))),
236
- type='OptimWrapper')
237
- optimizer = dict(lr=0.01, momentum=0.9, type='SGD', weight_decay=0.0005)
238
- param_scheduler = [
239
- dict(
240
- begin=0, by_epoch=False, end=1000, start_factor=0.001,
241
- type='LinearLR'),
242
- dict(
243
- begin=1000,
244
- by_epoch=False,
245
- end=80000,
246
- milestones=[
247
- 60000,
248
- 72000,
249
- ],
250
- type='MultiStepLR'),
251
- ]
252
- randomness = dict(seed=0)
253
- resume = False
254
- test_cfg = dict(type='TestLoop')
255
- test_dataloader = dict(
256
- batch_size=1,
257
- dataset=dict(
258
- data_prefix=dict(img_path='img_dir/val', seg_map_path='ann_dir/val'),
259
- data_root='PanicleDataset/',
260
- pipeline=[
261
- dict(type='LoadImageFromFile'),
262
- dict(keep_ratio=True, scale=(
263
- 2048,
264
- 1024,
265
- ), type='Resize'),
266
- dict(type='LoadAnnotations'),
267
- dict(type='PackSegInputs'),
268
- ],
269
- type='TzyDataset'),
270
- num_workers=4,
271
- persistent_workers=True,
272
- sampler=dict(shuffle=False, type='DefaultSampler'))
273
- test_evaluator = dict(
274
- iou_metrics=[
275
- 'mIoU',
276
- 'mDice',
277
- 'mFscore',
278
- ], type='IoUMetric')
279
- test_pipeline = [
280
- dict(type='LoadImageFromFile'),
281
- dict(keep_ratio=True, scale=(
282
- 2048,
283
- 1024,
284
- ), type='Resize'),
285
- dict(type='LoadAnnotations'),
286
- dict(type='PackSegInputs'),
287
- ]
288
- train_cfg = dict(max_iters=20000, type='IterBasedTrainLoop', val_interval=500)
289
- train_dataloader = dict(
290
- batch_size=2,
291
- dataset=dict(
292
- data_prefix=dict(
293
- img_path='img_dir/train', seg_map_path='ann_dir/train'),
294
- data_root='PanicleDataset/',
295
- pipeline=[
296
- dict(type='LoadImageFromFile'),
297
- dict(type='LoadAnnotations'),
298
- dict(
299
- keep_ratio=True,
300
- ratio_range=(
301
- 0.5,
302
- 2.0,
303
- ),
304
- scale=(
305
- 2048,
306
- 1024,
307
- ),
308
- type='RandomResize'),
309
- dict(
310
- cat_max_ratio=0.75, crop_size=(
311
- 512,
312
- 512,
313
- ), type='RandomCrop'),
314
- dict(prob=0.5, type='RandomFlip'),
315
- dict(type='PhotoMetricDistortion'),
316
- dict(type='PackSegInputs'),
317
- ],
318
- type='TzyDataset'),
319
- num_workers=2,
320
- persistent_workers=True,
321
- sampler=dict(shuffle=True, type='InfiniteSampler'))
322
- train_pipeline = [
323
- dict(type='LoadImageFromFile'),
324
- dict(type='LoadAnnotations'),
325
- dict(
326
- keep_ratio=True,
327
- ratio_range=(
328
- 0.5,
329
- 2.0,
330
- ),
331
- scale=(
332
- 2048,
333
- 1024,
334
- ),
335
- type='RandomResize'),
336
- dict(cat_max_ratio=0.75, crop_size=(
337
- 512,
338
- 512,
339
- ), type='RandomCrop'),
340
- dict(prob=0.5, type='RandomFlip'),
341
- dict(type='PhotoMetricDistortion'),
342
- dict(type='PackSegInputs'),
343
- ]
344
- tta_model = dict(type='SegTTAModel')
345
- tta_pipeline = [
346
- dict(file_client_args=dict(backend='disk'), type='LoadImageFromFile'),
347
- dict(
348
- transforms=[
349
- [
350
- dict(keep_ratio=True, scale_factor=0.5, type='Resize'),
351
- dict(keep_ratio=True, scale_factor=0.75, type='Resize'),
352
- dict(keep_ratio=True, scale_factor=1.0, type='Resize'),
353
- dict(keep_ratio=True, scale_factor=1.25, type='Resize'),
354
- dict(keep_ratio=True, scale_factor=1.5, type='Resize'),
355
- dict(keep_ratio=True, scale_factor=1.75, type='Resize'),
356
- ],
357
- [
358
- dict(direction='horizontal', prob=0.0, type='RandomFlip'),
359
- dict(direction='horizontal', prob=1.0, type='RandomFlip'),
360
- ],
361
- [
362
- dict(type='LoadAnnotations'),
363
- ],
364
- [
365
- dict(type='PackSegInputs'),
366
- ],
367
- ],
368
- type='TestTimeAug'),
369
- ]
370
- val_cfg = dict(type='ValLoop')
371
- val_dataloader = dict(
372
- batch_size=1,
373
- dataset=dict(
374
- data_prefix=dict(img_path='img_dir/val', seg_map_path='ann_dir/val'),
375
- data_root='PanicleDataset/',
376
- pipeline=[
377
- dict(type='LoadImageFromFile'),
378
- dict(keep_ratio=True, scale=(
379
- 2048,
380
- 1024,
381
- ), type='Resize'),
382
- dict(type='LoadAnnotations'),
383
- dict(type='PackSegInputs'),
384
- ],
385
- type='TzyDataset'),
386
- num_workers=4,
387
- persistent_workers=True,
388
- sampler=dict(shuffle=False, type='DefaultSampler'))
389
- val_evaluator = dict(
390
- iou_metrics=[
391
- 'mIoU',
392
- 'mDice',
393
- 'mFscore',
394
- ], type='IoUMetric')
395
- vis_backends = [
396
- dict(type='LocalVisBackend'),
397
- ]
398
- visualizer = dict(
399
- name='visualizer',
400
- type='SegLocalVisualizer',
401
- vis_backends=[
402
- dict(type='LocalVisBackend'),
403
- ])
404
- work_dir = './work_dirs/TzyDataset-KNet-0721'