|
| 1 | +backbone_norm_cfg=dict(requires_grad=True,type='LN') |
| 2 | +checkpoint_file='pretrain/upernet_swinB_pretrain_ImageNet22K_ade20k_row4.pth' |
| 3 | +data_preprocessor=dict( |
| 4 | +bgr_to_rgb=True, |
| 5 | +mean=[ |
| 6 | +124.95, |
| 7 | +124.95, |
| 8 | +124.95, |
| 9 | + ], |
| 10 | +pad_val=0, |
| 11 | +seg_pad_val=255, |
| 12 | +size_divisor=32, |
| 13 | +std=[ |
| 14 | +24.735, |
| 15 | +24.735, |
| 16 | +24.735, |
| 17 | + ], |
| 18 | +type='SegDataPreProcessor') |
| 19 | +dataset_type='HeadCTDataset' |
| 20 | +default_hooks=dict( |
| 21 | +checkpoint=dict(by_epoch=False,interval=5000,type='CheckpointHook'), |
| 22 | +logger=dict(interval=50,log_metric_by_epoch=False,type='LoggerHook'), |
| 23 | +param_scheduler=dict(type='ParamSchedulerHook'), |
| 24 | +sampler_seed=dict(type='DistSamplerSeedHook'), |
| 25 | +timer=dict(type='IterTimerHook'), |
| 26 | +visualization=dict(interval=1,type='HeadCTVisualizationHook')) |
| 27 | +default_scope='mmseg' |
| 28 | +env_cfg=dict( |
| 29 | +cudnn_benchmark=True, |
| 30 | +dist_cfg=dict(backend='nccl'), |
| 31 | +mp_cfg=dict(mp_start_method='fork',opencv_num_threads=0)) |
| 32 | +img_ratios= [ |
| 33 | +0.5, |
| 34 | +0.75, |
| 35 | +1.0, |
| 36 | +1.25, |
| 37 | +1.5, |
| 38 | +1.75, |
| 39 | +] |
| 40 | +launcher='pytorch' |
| 41 | +load_from=None |
| 42 | +log_level='INFO' |
| 43 | +log_processor=dict(by_epoch=False) |
| 44 | +model=dict( |
| 45 | +auxiliary_head=dict( |
| 46 | +align_corners=False, |
| 47 | +channels=256, |
| 48 | +concat_input=False, |
| 49 | +dropout_ratio=0.1, |
| 50 | +in_channels=512, |
| 51 | +in_index=2, |
| 52 | +loss_decode=dict( |
| 53 | +loss_weight=0.4,type='CrossEntropyLoss',use_sigmoid=False), |
| 54 | +norm_cfg=dict(requires_grad=True,type='SyncBN'), |
| 55 | +num_classes=7, |
| 56 | +num_convs=1, |
| 57 | +type='FCNHead'), |
| 58 | +backbone=dict( |
| 59 | +act_cfg=dict(type='GELU'), |
| 60 | +attn_drop_rate=0.0, |
| 61 | +depths=[ |
| 62 | +2, |
| 63 | +2, |
| 64 | +18, |
| 65 | +2, |
| 66 | + ], |
| 67 | +drop_path_rate=0.3, |
| 68 | +drop_rate=0.0, |
| 69 | +embed_dims=128, |
| 70 | +init_cfg=dict( |
| 71 | +checkpoint= |
| 72 | +'pretrain/upernet_swinB_pretrain_ImageNet22K_ade20k_row4.pth', |
| 73 | +type='Pretrained'), |
| 74 | +mlp_ratio=4, |
| 75 | +norm_cfg=dict(requires_grad=True,type='LN'), |
| 76 | +num_heads=[ |
| 77 | +4, |
| 78 | +8, |
| 79 | +16, |
| 80 | +32, |
| 81 | + ], |
| 82 | +out_indices=( |
| 83 | +0, |
| 84 | +1, |
| 85 | +2, |
| 86 | +3, |
| 87 | + ), |
| 88 | +patch_norm=True, |
| 89 | +patch_size=4, |
| 90 | +pretrain_img_size=224, |
| 91 | +qk_scale=None, |
| 92 | +qkv_bias=True, |
| 93 | +strides=( |
| 94 | +4, |
| 95 | +2, |
| 96 | +2, |
| 97 | +2, |
| 98 | + ), |
| 99 | +type='SwinTransformer', |
| 100 | +use_abs_pos_embed=False, |
| 101 | +window_size=7), |
| 102 | +data_preprocessor=dict( |
| 103 | +bgr_to_rgb=True, |
| 104 | +mean=[ |
| 105 | +124.95, |
| 106 | +124.95, |
| 107 | +124.95, |
| 108 | + ], |
| 109 | +pad_val=0, |
| 110 | +seg_pad_val=255, |
| 111 | +size_divisor=32, |
| 112 | +std=[ |
| 113 | +24.735, |
| 114 | +24.735, |
| 115 | +24.735, |
| 116 | + ], |
| 117 | +type='SegDataPreProcessor'), |
| 118 | +decode_head=dict( |
| 119 | +align_corners=False, |
| 120 | +channels=512, |
| 121 | +dropout_ratio=0.1, |
| 122 | +in_channels=[ |
| 123 | +128, |
| 124 | +256, |
| 125 | +512, |
| 126 | +1024, |
| 127 | + ], |
| 128 | +in_index=[ |
| 129 | +0, |
| 130 | +1, |
| 131 | +2, |
| 132 | +3, |
| 133 | + ], |
| 134 | +loss_decode=dict( |
| 135 | +class_weight=[ |
| 136 | +1.0, |
| 137 | +1.0, |
| 138 | +2.0, |
| 139 | +1.0, |
| 140 | +1.0, |
| 141 | +3.0, |
| 142 | +1.0, |
| 143 | + ], |
| 144 | +loss_weight=1.0, |
| 145 | +type='CrossEntropyLoss', |
| 146 | +use_sigmoid=False), |
| 147 | +norm_cfg=dict(requires_grad=True,type='SyncBN'), |
| 148 | +num_classes=7, |
| 149 | +pool_scales=( |
| 150 | +1, |
| 151 | +2, |
| 152 | +3, |
| 153 | +6, |
| 154 | + ), |
| 155 | +sampler=dict(min_kept=20000,thresh=0.5,type='OHEMPixelSampler'), |
| 156 | +type='UPerHead'), |
| 157 | +pretrained=None, |
| 158 | +test_cfg=dict(mode='whole'), |
| 159 | +train_cfg=dict(), |
| 160 | +type='EncoderDecoder') |
| 161 | +norm_cfg=dict(requires_grad=True,type='SyncBN') |
| 162 | +num_classes=7 |
| 163 | +optim_wrapper=dict( |
| 164 | +optimizer=dict( |
| 165 | +betas=( |
| 166 | +0.9, |
| 167 | +0.999, |
| 168 | + ),lr=0.00018,type='AdamW',weight_decay=0.01), |
| 169 | +paramwise_cfg=dict( |
| 170 | +custom_keys=dict( |
| 171 | +absolute_pos_embed=dict(decay_mult=0.0), |
| 172 | +head=dict(lr_mult=5.0), |
| 173 | +norm=dict(decay_mult=0.0), |
| 174 | +relative_position_bias_table=dict(decay_mult=0.0))), |
| 175 | +type='OptimWrapper') |
| 176 | +param_scheduler= [ |
| 177 | +dict( |
| 178 | +begin=0,by_epoch=False,end=1500,start_factor=1e-06, |
| 179 | +type='LinearLR'), |
| 180 | +dict( |
| 181 | +begin=1500, |
| 182 | +by_epoch=False, |
| 183 | +end=160000, |
| 184 | +eta_min=0.0, |
| 185 | +power=1.0, |
| 186 | +type='PolyLR'), |
| 187 | +] |
| 188 | +ratio_range= ( |
| 189 | +0.6, |
| 190 | +1.66, |
| 191 | +) |
| 192 | +reduce_zero_label=False |
| 193 | +resume=True |
| 194 | +test_cfg=dict(type='TestLoop') |
| 195 | +test_crop_size= ( |
| 196 | +512, |
| 197 | +512, |
| 198 | +) |
| 199 | +test_data_root='data/track' |
| 200 | +test_dataloader=dict( |
| 201 | +batch_size=4, |
| 202 | +dataset=dict( |
| 203 | +data_prefix=dict( |
| 204 | +img_path='images/validation', |
| 205 | +seg_map_path='annotations/validation'), |
| 206 | +data_root='data/track', |
| 207 | +pipeline=[ |
| 208 | +dict(type='LoadImageFromFile'), |
| 209 | +dict(keep_ratio=True,scale=( |
| 210 | +512, |
| 211 | +512, |
| 212 | + ),type='Resize'), |
| 213 | +dict(reduce_zero_label=False,type='LoadAnnotations'), |
| 214 | +dict(type='PackSegInputs'), |
| 215 | + ], |
| 216 | +type='HeadCTDataset'), |
| 217 | +num_workers=4, |
| 218 | +persistent_workers=True, |
| 219 | +sampler=dict(shuffle=False,type='DefaultSampler')) |
| 220 | +test_evaluator=dict( |
| 221 | +iou_metrics=[ |
| 222 | +'mDice', |
| 223 | +'mIoU', |
| 224 | + ],type='IoUROCMetric') |
| 225 | +test_pipeline= [ |
| 226 | +dict(type='LoadImageFromFile'), |
| 227 | +dict(keep_ratio=True,scale=( |
| 228 | +512, |
| 229 | +512, |
| 230 | + ),type='Resize'), |
| 231 | +dict(reduce_zero_label=False,type='LoadAnnotations'), |
| 232 | +dict(type='PackSegInputs'), |
| 233 | +] |
| 234 | +total_steps=160000 |
| 235 | +train_cfg=dict( |
| 236 | +max_iters=160000,type='IterBasedTrainLoop',val_interval=32000) |
| 237 | +train_crop_size= ( |
| 238 | +256, |
| 239 | +256, |
| 240 | +) |
| 241 | +train_data_root='data/gotham' |
| 242 | +train_dataloader=dict( |
| 243 | +batch_size=15, |
| 244 | +dataset=dict( |
| 245 | +data_prefix=dict( |
| 246 | +img_path='images/training',seg_map_path='annotations/training'), |
| 247 | +data_root='data/gotham', |
| 248 | +pipeline=[ |
| 249 | +dict(type='LoadImageFromFile'), |
| 250 | +dict(reduce_zero_label=False,type='LoadAnnotations'), |
| 251 | +dict( |
| 252 | +keep_ratio=True, |
| 253 | +ratio_range=( |
| 254 | +0.6, |
| 255 | +1.66, |
| 256 | + ), |
| 257 | +scale=( |
| 258 | +512, |
| 259 | +512, |
| 260 | + ), |
| 261 | +type='RandomResize'), |
| 262 | +dict( |
| 263 | +cat_max_ratio=0.99,crop_size=( |
| 264 | +256, |
| 265 | +256, |
| 266 | + ),type='RandomCrop'), |
| 267 | +dict(prob=0.5,type='RandomFlip'), |
| 268 | +dict(type='PhotoMetricDistortion'), |
| 269 | +dict(type='PackSegInputs'), |
| 270 | + ], |
| 271 | +type='HeadCTDataset'), |
| 272 | +num_workers=4, |
| 273 | +persistent_workers=True, |
| 274 | +sampler=dict(shuffle=True,type='InfiniteSampler')) |
| 275 | +train_img_path='images/training' |
| 276 | +train_pipeline= [ |
| 277 | +dict(type='LoadImageFromFile'), |
| 278 | +dict(reduce_zero_label=False,type='LoadAnnotations'), |
| 279 | +dict( |
| 280 | +keep_ratio=True, |
| 281 | +ratio_range=( |
| 282 | +0.6, |
| 283 | +1.66, |
| 284 | + ), |
| 285 | +scale=( |
| 286 | +512, |
| 287 | +512, |
| 288 | + ), |
| 289 | +type='RandomResize'), |
| 290 | +dict(cat_max_ratio=0.99,crop_size=( |
| 291 | +256, |
| 292 | +256, |
| 293 | + ),type='RandomCrop'), |
| 294 | +dict(prob=0.5,type='RandomFlip'), |
| 295 | +dict(type='PhotoMetricDistortion'), |
| 296 | +dict(type='PackSegInputs'), |
| 297 | +] |
| 298 | +train_seg_map_path='annotations/training' |
| 299 | +tta_model=dict(type='SegTTAModel') |
| 300 | +tta_pipeline= [ |
| 301 | +dict(backend_args=None,type='LoadImageFromFile'), |
| 302 | +dict( |
| 303 | +transforms=[ |
| 304 | + [ |
| 305 | +dict(keep_ratio=True,scale_factor=0.5,type='Resize'), |
| 306 | +dict(keep_ratio=True,scale_factor=0.75,type='Resize'), |
| 307 | +dict(keep_ratio=True,scale_factor=1.0,type='Resize'), |
| 308 | +dict(keep_ratio=True,scale_factor=1.25,type='Resize'), |
| 309 | +dict(keep_ratio=True,scale_factor=1.5,type='Resize'), |
| 310 | +dict(keep_ratio=True,scale_factor=1.75,type='Resize'), |
| 311 | + ], |
| 312 | + [ |
| 313 | +dict(direction='horizontal',prob=0.0,type='RandomFlip'), |
| 314 | +dict(direction='horizontal',prob=1.0,type='RandomFlip'), |
| 315 | + ], |
| 316 | + [ |
| 317 | +dict(type='LoadAnnotations'), |
| 318 | + ], |
| 319 | + [ |
| 320 | +dict(type='PackSegInputs'), |
| 321 | + ], |
| 322 | + ], |
| 323 | +type='TestTimeAug'), |
| 324 | +] |
| 325 | +val_cfg=dict(type='ValLoop') |
| 326 | +val_dataloader=dict( |
| 327 | +batch_size=4, |
| 328 | +dataset=dict( |
| 329 | +data_prefix=dict( |
| 330 | +img_path='images/validation', |
| 331 | +seg_map_path='annotations/validation'), |
| 332 | +data_root='data/track', |
| 333 | +pipeline=[ |
| 334 | +dict(type='LoadImageFromFile'), |
| 335 | +dict(keep_ratio=True,scale=( |
| 336 | +512, |
| 337 | +512, |
| 338 | + ),type='Resize'), |
| 339 | +dict(reduce_zero_label=False,type='LoadAnnotations'), |
| 340 | +dict(type='PackSegInputs'), |
| 341 | + ], |
| 342 | +type='HeadCTDataset'), |
| 343 | +num_workers=4, |
| 344 | +persistent_workers=True, |
| 345 | +sampler=dict(shuffle=False,type='DefaultSampler')) |
| 346 | +val_evaluator=dict( |
| 347 | +iou_metrics=[ |
| 348 | +'mDice', |
| 349 | +'mIoU', |
| 350 | + ],type='IoUROCMetric') |
| 351 | +val_img_path='images/validation' |
| 352 | +val_interval=32000 |
| 353 | +val_seg_map_path='annotations/validation' |
| 354 | +vis_backends= [ |
| 355 | +dict(type='LocalVisBackend'), |
| 356 | +] |
| 357 | +vis_interval=1 |
| 358 | +visualizer=dict( |
| 359 | +name='visualizer', |
| 360 | +type='HeadCTVisualizer', |
| 361 | +vis_backends=[ |
| 362 | +dict(type='LocalVisBackend'), |
| 363 | + ]) |
| 364 | +warmup_steps=1500 |
| 365 | +work_dir='./work_dirs/20240223_4gpu_b60_p256_iter160k' |