circleLZY commited on
Commit
2b79cff
·
verified ·
1 Parent(s): 3b1d3bf

Upload 164 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. BAN-vit-b16-clip-mit-b0/distill/config.py +102 -0
  2. BAN-vit-b16-clip-mit-b0/initial/config.py +92 -0
  3. BAN-vit-b16-clip-mit-b0/large/config.py +89 -0
  4. BAN-vit-b16-clip-mit-b0/medium/config.py +89 -0
  5. BAN-vit-b16-clip-mit-b0/small/config.py +89 -0
  6. BAN-vit-b16-clip-mit-b2/initial/best_mIoU_iter_15000.pth +3 -0
  7. BAN-vit-b16-clip-mit-b2/initial/config.py +15 -0
  8. BAN-vit-b16-clip-mit-b2/large/best_mIoU_iter_1000.pth +3 -0
  9. BAN-vit-b16-clip-mit-b2/large/config.py +15 -0
  10. BAN-vit-b16-clip-mit-b2/medium/best_mIoU_iter_41000.pth +3 -0
  11. BAN-vit-b16-clip-mit-b2/medium/config.py +15 -0
  12. BAN-vit-b16-clip-mit-b2/small/best_mIoU_iter_23000.pth +3 -0
  13. BAN-vit-b16-clip-mit-b2/small/config.py +15 -0
  14. BAN-vit-b16-in21k-mit-b0/initial/config.py +92 -0
  15. BAN-vit-b16-in21k-mit-b0/large/config.py +113 -0
  16. BAN-vit-b16-in21k-mit-b0/medium/config.py +113 -0
  17. BAN-vit-b16-in21k-mit-b0/small/config.py +113 -0
  18. BAN-vit-b16-in21k-mit-b2/initial/best_mIoU_iter_30000.pth +3 -0
  19. BAN-vit-b16-in21k-mit-b2/initial/config.py +15 -0
  20. BAN-vit-b16-in21k-mit-b2/large/best_mIoU_iter_7000.pth +3 -0
  21. BAN-vit-b16-in21k-mit-b2/large/config.py +15 -0
  22. BAN-vit-b16-in21k-mit-b2/medium/best_mIoU_iter_6000.pth +3 -0
  23. BAN-vit-b16-in21k-mit-b2/medium/config.py +15 -0
  24. BAN-vit-b16-in21k-mit-b2/small/best_mIoU_iter_19000.pth +3 -0
  25. BAN-vit-b16-in21k-mit-b2/small/config.py +15 -0
  26. BAN-vit-l14-clip-mit-b0/distill/config.py +40 -0
  27. BAN-vit-l14-clip-mit-b0/initial/config.py +29 -0
  28. BAN-vit-l14-clip-mit-b0/large/config.py +57 -0
  29. BAN-vit-l14-clip-mit-b0/medium/config.py +57 -0
  30. BAN-vit-l14-clip-mit-b0/small/config.py +57 -0
  31. BAN-vit-l14-clip-mit-b2/distill/best_mIoU_iter_15000.pth +3 -0
  32. BAN-vit-l14-clip-mit-b2/distill/config.py +27 -0
  33. BAN-vit-l14-clip-mit-b2/initial/best_mIoU_iter_17000.pth +3 -0
  34. BAN-vit-l14-clip-mit-b2/initial/config.py +18 -0
  35. BAN-vit-l14-clip-mit-b2/large/best_mIoU_iter_24000.pth +3 -0
  36. BAN-vit-l14-clip-mit-b2/large/config.py +18 -0
  37. BAN-vit-l14-clip-mit-b2/medium/best_mIoU_iter_10000.pth +3 -0
  38. BAN-vit-l14-clip-mit-b2/medium/config.py +18 -0
  39. BAN-vit-l14-clip-mit-b2/small/best_mIoU_iter_35000.pth +3 -0
  40. BAN-vit-l14-clip-mit-b2/small/config.py +18 -0
  41. BIT/distill/best_mIoU_iter_71000.pth +3 -0
  42. BIT/distill/config.py +52 -0
  43. BIT/initial/best_mIoU_iter_80000.pth +3 -0
  44. BIT/initial/config.py +3 -0
  45. BIT/large/best_mIoU_iter_24000.pth +3 -0
  46. BIT/large/config.py +29 -0
  47. BIT/medium/best_mIoU_iter_8000.pth +3 -0
  48. BIT/medium/config.py +29 -0
  49. BIT/small/best_mIoU_iter_74000.pth +3 -0
  50. BIT/small/config.py +29 -0
BAN-vit-b16-clip-mit-b0/distill/config.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/rmcd-kd/configs/_base_/models/KD-ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/rmcd-kd/configs/common/standard_512x512_200k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ checkpoint_student = None
11
+ checkpoint_teacher_l = None
12
+ checkpoint_teacher_m = None
13
+ checkpoint_teacher_s = None
14
+
15
+ # model settings
16
+ model = dict(
17
+ init_cfg=dict(type='Pretrained', checkpoint=checkpoint_student),
18
+ # teacher large
19
+ init_cfg_t_l = dict(type='Pretrained', checkpoint=checkpoint_teacher_l),
20
+ # teacher medium
21
+ init_cfg_t_m = dict(type='Pretrained', checkpoint=checkpoint_teacher_m),
22
+ # teacher small
23
+ init_cfg_t_s = dict(type='Pretrained', checkpoint=checkpoint_teacher_s),
24
+
25
+ asymetric_input=True,
26
+ encoder_resolution=dict(
27
+ size=(224, 224),
28
+ mode='bilinear'),
29
+ image_encoder=dict(
30
+ frozen_exclude=[]),
31
+ decode_head=dict(
32
+ type='BitemporalAdapterHead',
33
+ ban_cfg=dict(
34
+ clip_channels=768,
35
+ fusion_index=[1, 2, 3],
36
+ side_enc_cfg=dict(
37
+ type='mmseg.MixVisionTransformer',
38
+ in_channels=3,
39
+ embed_dims=32,
40
+ num_stages=4,
41
+ num_layers=[2, 2, 2, 2],
42
+ num_heads=[1, 2, 5, 8],
43
+ patch_sizes=[7, 3, 3, 3],
44
+ sr_ratios=[8, 4, 2, 1],
45
+ out_indices=(0, 1, 2, 3),
46
+ mlp_ratio=4,
47
+ qkv_bias=True,
48
+ drop_rate=0.0,
49
+ attn_drop_rate=0.0,
50
+ drop_path_rate=0.1)),
51
+ ban_dec_cfg=dict(
52
+ type='BAN_MLPDecoder',
53
+ in_channels=[32, 64, 160, 256],
54
+ channels=128,
55
+ dropout_ratio=0.1,
56
+ num_classes=2,
57
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
58
+ align_corners=False)),
59
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
60
+
61
+ optim_wrapper = dict(
62
+ _delete_=True,
63
+ type='AmpOptimWrapper',
64
+ optimizer=dict(
65
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
66
+ paramwise_cfg=dict(
67
+ custom_keys={
68
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
69
+ 'norm': dict(decay_mult=0.),
70
+ 'mask_decoder': dict(lr_mult=10.)
71
+ }),
72
+ loss_scale='dynamic',
73
+ clip_grad=dict(max_norm=0.01, norm_type=2))
74
+
75
+ train_dataloader = dict(batch_size=8, num_workers=8)
76
+ val_dataloader = dict(batch_size=1, num_workers=1)
77
+
78
+ param_scheduler = [
79
+ dict(
80
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
81
+ dict(
82
+ type='PolyLR',
83
+ power=1.0,
84
+ begin=1000,
85
+ end=100000,
86
+ eta_min=0.0,
87
+ by_epoch=False,
88
+ )
89
+ ]
90
+ # training schedule for 100k
91
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
92
+ val_cfg = dict(type='ValLoop')
93
+ test_cfg = dict(type='TestLoop')
94
+ default_hooks = dict(
95
+ timer=dict(type='IterTimerHook'),
96
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
97
+ param_scheduler=dict(type='ParamSchedulerHook'),
98
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
99
+ save_best='mIoU'),
100
+ sampler_seed=dict(type='DistSamplerSeedHook'),
101
+ visualization=dict(type='CDVisualizationHook', interval=1,
102
+ img_shape=(512, 512, 3)))
BAN-vit-b16-clip-mit-b0/initial/config.py ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/standard_512x512_200k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
11
+
12
+ model = dict(
13
+ asymetric_input=True,
14
+ encoder_resolution=dict(
15
+ size=(224, 224),
16
+ mode='bilinear'),
17
+ image_encoder=dict(
18
+ frozen_exclude=[]),
19
+ decode_head=dict(
20
+ type='BitemporalAdapterHead',
21
+ ban_cfg=dict(
22
+ clip_channels=768,
23
+ fusion_index=[1, 2, 3],
24
+ side_enc_cfg=dict(
25
+ type='mmseg.MixVisionTransformer',
26
+ init_cfg=dict(
27
+ type='Pretrained', checkpoint=checkpoint),
28
+ in_channels=3,
29
+ embed_dims=32,
30
+ num_stages=4,
31
+ num_layers=[2, 2, 2, 2],
32
+ num_heads=[1, 2, 5, 8],
33
+ patch_sizes=[7, 3, 3, 3],
34
+ sr_ratios=[8, 4, 2, 1],
35
+ out_indices=(0, 1, 2, 3),
36
+ mlp_ratio=4,
37
+ qkv_bias=True,
38
+ drop_rate=0.0,
39
+ attn_drop_rate=0.0,
40
+ drop_path_rate=0.1)),
41
+ ban_dec_cfg=dict(
42
+ type='BAN_MLPDecoder',
43
+ in_channels=[32, 64, 160, 256],
44
+ channels=128,
45
+ dropout_ratio=0.1,
46
+ num_classes=2,
47
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
48
+ align_corners=False)),
49
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
50
+
51
+ optim_wrapper = dict(
52
+ _delete_=True,
53
+ type='AmpOptimWrapper',
54
+ optimizer=dict(
55
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
56
+ paramwise_cfg=dict(
57
+ custom_keys={
58
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
59
+ 'norm': dict(decay_mult=0.),
60
+ 'mask_decoder': dict(lr_mult=10.)
61
+ }),
62
+ loss_scale='dynamic',
63
+ clip_grad=dict(max_norm=0.01, norm_type=2))
64
+
65
+ train_dataloader = dict(batch_size=8, num_workers=8)
66
+ val_dataloader = dict(batch_size=1, num_workers=1)
67
+
68
+ param_scheduler = [
69
+ dict(
70
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
71
+ dict(
72
+ type='PolyLR',
73
+ power=1.0,
74
+ begin=1000,
75
+ end=100000,
76
+ eta_min=0.0,
77
+ by_epoch=False,
78
+ )
79
+ ]
80
+ # training schedule for 100k
81
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
82
+ val_cfg = dict(type='ValLoop')
83
+ test_cfg = dict(type='TestLoop')
84
+ default_hooks = dict(
85
+ timer=dict(type='IterTimerHook'),
86
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
87
+ param_scheduler=dict(type='ParamSchedulerHook'),
88
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
89
+ save_best='mIoU'),
90
+ sampler_seed=dict(type='DistSamplerSeedHook'),
91
+ visualization=dict(type='CDVisualizationHook', interval=1,
92
+ img_shape=(512, 512, 3)))
BAN-vit-b16-clip-mit-b0/large/config.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_large_512x512_100k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
11
+
12
+ model = dict(
13
+ asymetric_input=True,
14
+ encoder_resolution=dict(
15
+ size=(224, 224),
16
+ mode='bilinear'),
17
+ image_encoder=dict(
18
+ frozen_exclude=[]),
19
+ decode_head=dict(
20
+ type='BitemporalAdapterHead',
21
+ ban_cfg=dict(
22
+ clip_channels=768,
23
+ fusion_index=[1, 2, 3],
24
+ side_enc_cfg=dict(
25
+ type='mmseg.MixVisionTransformer',
26
+ init_cfg=dict(
27
+ type='Pretrained', checkpoint=checkpoint),
28
+ in_channels=3,
29
+ embed_dims=32,
30
+ num_stages=4,
31
+ num_layers=[2, 2, 2, 2],
32
+ num_heads=[1, 2, 5, 8],
33
+ patch_sizes=[7, 3, 3, 3],
34
+ sr_ratios=[8, 4, 2, 1],
35
+ out_indices=(0, 1, 2, 3),
36
+ mlp_ratio=4,
37
+ qkv_bias=True,
38
+ drop_rate=0.0,
39
+ attn_drop_rate=0.0,
40
+ drop_path_rate=0.1)),
41
+ ban_dec_cfg=dict(
42
+ type='BAN_MLPDecoder',
43
+ in_channels=[32, 64, 160, 256],
44
+ channels=128,
45
+ dropout_ratio=0.1,
46
+ num_classes=2,
47
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
48
+ align_corners=False)),
49
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
50
+
51
+ optim_wrapper = dict(
52
+ _delete_=True,
53
+ type='AmpOptimWrapper',
54
+ optimizer=dict(
55
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
56
+ paramwise_cfg=dict(
57
+ custom_keys={
58
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
59
+ 'norm': dict(decay_mult=0.),
60
+ 'mask_decoder': dict(lr_mult=10.)
61
+ }),
62
+ loss_scale='dynamic',
63
+ clip_grad=dict(max_norm=0.01, norm_type=2))
64
+
65
+ param_scheduler = [
66
+ dict(
67
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
68
+ dict(
69
+ type='PolyLR',
70
+ power=1.0,
71
+ begin=1000,
72
+ end=100000,
73
+ eta_min=0.0,
74
+ by_epoch=False,
75
+ )
76
+ ]
77
+ # training schedule for 100k
78
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
79
+ val_cfg = dict(type='ValLoop')
80
+ test_cfg = dict(type='TestLoop')
81
+ default_hooks = dict(
82
+ timer=dict(type='IterTimerHook'),
83
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
84
+ param_scheduler=dict(type='ParamSchedulerHook'),
85
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
86
+ save_best='mIoU'),
87
+ sampler_seed=dict(type='DistSamplerSeedHook'),
88
+ visualization=dict(type='CDVisualizationHook', interval=1,
89
+ img_shape=(512, 512, 3)))
BAN-vit-b16-clip-mit-b0/medium/config.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_medium_512x512_100k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
11
+
12
+ model = dict(
13
+ asymetric_input=True,
14
+ encoder_resolution=dict(
15
+ size=(224, 224),
16
+ mode='bilinear'),
17
+ image_encoder=dict(
18
+ frozen_exclude=[]),
19
+ decode_head=dict(
20
+ type='BitemporalAdapterHead',
21
+ ban_cfg=dict(
22
+ clip_channels=768,
23
+ fusion_index=[1, 2, 3],
24
+ side_enc_cfg=dict(
25
+ type='mmseg.MixVisionTransformer',
26
+ init_cfg=dict(
27
+ type='Pretrained', checkpoint=checkpoint),
28
+ in_channels=3,
29
+ embed_dims=32,
30
+ num_stages=4,
31
+ num_layers=[2, 2, 2, 2],
32
+ num_heads=[1, 2, 5, 8],
33
+ patch_sizes=[7, 3, 3, 3],
34
+ sr_ratios=[8, 4, 2, 1],
35
+ out_indices=(0, 1, 2, 3),
36
+ mlp_ratio=4,
37
+ qkv_bias=True,
38
+ drop_rate=0.0,
39
+ attn_drop_rate=0.0,
40
+ drop_path_rate=0.1)),
41
+ ban_dec_cfg=dict(
42
+ type='BAN_MLPDecoder',
43
+ in_channels=[32, 64, 160, 256],
44
+ channels=128,
45
+ dropout_ratio=0.1,
46
+ num_classes=2,
47
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
48
+ align_corners=False)),
49
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
50
+
51
+ optim_wrapper = dict(
52
+ _delete_=True,
53
+ type='AmpOptimWrapper',
54
+ optimizer=dict(
55
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
56
+ paramwise_cfg=dict(
57
+ custom_keys={
58
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
59
+ 'norm': dict(decay_mult=0.),
60
+ 'mask_decoder': dict(lr_mult=10.)
61
+ }),
62
+ loss_scale='dynamic',
63
+ clip_grad=dict(max_norm=0.01, norm_type=2))
64
+
65
+ param_scheduler = [
66
+ dict(
67
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
68
+ dict(
69
+ type='PolyLR',
70
+ power=1.0,
71
+ begin=1000,
72
+ end=100000,
73
+ eta_min=0.0,
74
+ by_epoch=False,
75
+ )
76
+ ]
77
+ # training schedule for 100k
78
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
79
+ val_cfg = dict(type='ValLoop')
80
+ test_cfg = dict(type='TestLoop')
81
+ default_hooks = dict(
82
+ timer=dict(type='IterTimerHook'),
83
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
84
+ param_scheduler=dict(type='ParamSchedulerHook'),
85
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
86
+ save_best='mIoU'),
87
+ sampler_seed=dict(type='DistSamplerSeedHook'),
88
+ visualization=dict(type='CDVisualizationHook', interval=1,
89
+ img_shape=(512, 512, 3)))
BAN-vit-b16-clip-mit-b0/small/config.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_small_512x512_100k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
11
+
12
+ model = dict(
13
+ asymetric_input=True,
14
+ encoder_resolution=dict(
15
+ size=(224, 224),
16
+ mode='bilinear'),
17
+ image_encoder=dict(
18
+ frozen_exclude=[]),
19
+ decode_head=dict(
20
+ type='BitemporalAdapterHead',
21
+ ban_cfg=dict(
22
+ clip_channels=768,
23
+ fusion_index=[1, 2, 3],
24
+ side_enc_cfg=dict(
25
+ type='mmseg.MixVisionTransformer',
26
+ init_cfg=dict(
27
+ type='Pretrained', checkpoint=checkpoint),
28
+ in_channels=3,
29
+ embed_dims=32,
30
+ num_stages=4,
31
+ num_layers=[2, 2, 2, 2],
32
+ num_heads=[1, 2, 5, 8],
33
+ patch_sizes=[7, 3, 3, 3],
34
+ sr_ratios=[8, 4, 2, 1],
35
+ out_indices=(0, 1, 2, 3),
36
+ mlp_ratio=4,
37
+ qkv_bias=True,
38
+ drop_rate=0.0,
39
+ attn_drop_rate=0.0,
40
+ drop_path_rate=0.1)),
41
+ ban_dec_cfg=dict(
42
+ type='BAN_MLPDecoder',
43
+ in_channels=[32, 64, 160, 256],
44
+ channels=128,
45
+ dropout_ratio=0.1,
46
+ num_classes=2,
47
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
48
+ align_corners=False)),
49
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
50
+
51
+ optim_wrapper = dict(
52
+ _delete_=True,
53
+ type='AmpOptimWrapper',
54
+ optimizer=dict(
55
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
56
+ paramwise_cfg=dict(
57
+ custom_keys={
58
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
59
+ 'norm': dict(decay_mult=0.),
60
+ 'mask_decoder': dict(lr_mult=10.)
61
+ }),
62
+ loss_scale='dynamic',
63
+ clip_grad=dict(max_norm=0.01, norm_type=2))
64
+
65
+ param_scheduler = [
66
+ dict(
67
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
68
+ dict(
69
+ type='PolyLR',
70
+ power=1.0,
71
+ begin=1000,
72
+ end=100000,
73
+ eta_min=0.0,
74
+ by_epoch=False,
75
+ )
76
+ ]
77
+ # training schedule for 100k
78
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
79
+ val_cfg = dict(type='ValLoop')
80
+ test_cfg = dict(type='TestLoop')
81
+ default_hooks = dict(
82
+ timer=dict(type='IterTimerHook'),
83
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
84
+ param_scheduler=dict(type='ParamSchedulerHook'),
85
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
86
+ save_best='mIoU'),
87
+ sampler_seed=dict(type='DistSamplerSeedHook'),
88
+ visualization=dict(type='CDVisualizationHook', interval=1,
89
+ img_shape=(512, 512, 3)))
BAN-vit-b16-clip-mit-b2/initial/best_mIoU_iter_15000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:184e2e7aadcb8e6af5ad71fc3dc2404d482ef5eaecf981b5343f8ea274bd0376
3
+ size 367861071
BAN-vit-b16-clip-mit-b2/initial/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/initial/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-clip-mit-b2/large/best_mIoU_iter_1000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14580d22a98d70d35a75cbcdbbca2f476b2cda63de66a0d1fb4add85d558b138
3
+ size 365786767
BAN-vit-b16-clip-mit-b2/large/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/large/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-clip-mit-b2/medium/best_mIoU_iter_41000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:133dcc00fa7b44c63f3030298839dbe1ca38077997a90f5886ed119fe9a0c69f
3
+ size 371713615
BAN-vit-b16-clip-mit-b2/medium/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/medium/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-clip-mit-b2/small/best_mIoU_iter_23000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93578f2d4d362516e8842e67760265f2639a8464d8673d0859ee1ace769d449e
3
+ size 369088591
BAN-vit-b16-clip-mit-b2/small/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/small/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-in21k-mit-b0/initial/config.py ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/standard_512x512_200k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ vit_checkpoint_file = 'pretrain/augreg_B_16-i21k-300ep-lr_0.001-aug_medium1-wd_0.1-do_0.0-sd_0.0.pth' # noqa
11
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
12
+
13
+ model = dict(
14
+ pretrained=None,
15
+ asymetric_input=True,
16
+ encoder_resolution=dict(
17
+ size=(224, 224),
18
+ mode='bilinear'),
19
+ image_encoder=dict(
20
+ type='mmseg.VisionTransformer',
21
+ init_cfg=dict(
22
+ type='Pretrained', checkpoint=vit_checkpoint_file),
23
+ img_size=(224, 224),
24
+ patch_size=16,
25
+ in_channels=3,
26
+ embed_dims=768,
27
+ num_layers=12,
28
+ num_heads=12,
29
+ mlp_ratio=4,
30
+ out_indices=(5, 8, 11),
31
+ qkv_bias=True,
32
+ drop_rate=0.0,
33
+ attn_drop_rate=0.0,
34
+ drop_path_rate=0.0,
35
+ with_cls_token=True,
36
+ norm_cfg=dict(type='LN', eps=1e-6),
37
+ act_cfg=dict(type='GELU'),
38
+ norm_eval=False,
39
+ patch_bias=True,
40
+ interpolate_mode='bicubic',
41
+ frozen_exclude=[]),
42
+ decode_head=dict(
43
+ type='BitemporalAdapterHead',
44
+ ban_cfg=dict(
45
+ clip_channels=768,
46
+ fusion_index=[1, 2, 3],
47
+ side_enc_cfg=dict(
48
+ type='mmseg.MixVisionTransformer',
49
+ init_cfg=dict(
50
+ type='Pretrained', checkpoint=checkpoint),
51
+ in_channels=3,
52
+ embed_dims=32,
53
+ num_stages=4,
54
+ num_layers=[2, 2, 2, 2],
55
+ num_heads=[1, 2, 5, 8],
56
+ patch_sizes=[7, 3, 3, 3],
57
+ sr_ratios=[8, 4, 2, 1],
58
+ out_indices=(0, 1, 2, 3),
59
+ mlp_ratio=4,
60
+ qkv_bias=True,
61
+ drop_rate=0.0,
62
+ attn_drop_rate=0.0,
63
+ drop_path_rate=0.1)),
64
+ ban_dec_cfg=dict(
65
+ type='BAN_MLPDecoder',
66
+ in_channels=[32, 64, 160, 256],
67
+ channels=128,
68
+ dropout_ratio=0.1,
69
+ num_classes=2,
70
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
71
+ align_corners=False,
72
+ )),
73
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
74
+
75
+ optim_wrapper = dict(
76
+ _delete_=True,
77
+ type='AmpOptimWrapper',
78
+ optimizer=dict(
79
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
80
+ paramwise_cfg=dict(
81
+ custom_keys={
82
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
83
+ 'norm': dict(decay_mult=0.),
84
+ 'mask_decoder': dict(lr_mult=10.)
85
+ }),
86
+ loss_scale='dynamic',
87
+ clip_grad=dict(max_norm=0.01, norm_type=2))
88
+
89
+ train_dataloader = dict(batch_size=8, num_workers=8)
90
+ val_dataloader = dict(batch_size=1, num_workers=1)
91
+
92
+ # find_unused_parameters=True
BAN-vit-b16-in21k-mit-b0/large/config.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_large_512x512_100k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ vit_checkpoint_file = 'pretrain/augreg_B_16-i21k-300ep-lr_0.001-aug_medium1-wd_0.1-do_0.0-sd_0.0.pth' # noqa
11
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
12
+
13
+ model = dict(
14
+ pretrained=None,
15
+ asymetric_input=True,
16
+ encoder_resolution=dict(
17
+ size=(224, 224),
18
+ mode='bilinear'),
19
+ image_encoder=dict(
20
+ type='mmseg.VisionTransformer',
21
+ init_cfg=dict(
22
+ type='Pretrained', checkpoint=vit_checkpoint_file),
23
+ img_size=(224, 224),
24
+ patch_size=16,
25
+ in_channels=3,
26
+ embed_dims=768,
27
+ num_layers=12,
28
+ num_heads=12,
29
+ mlp_ratio=4,
30
+ out_indices=(5, 8, 11),
31
+ qkv_bias=True,
32
+ drop_rate=0.0,
33
+ attn_drop_rate=0.0,
34
+ drop_path_rate=0.0,
35
+ with_cls_token=True,
36
+ norm_cfg=dict(type='LN', eps=1e-6),
37
+ act_cfg=dict(type='GELU'),
38
+ norm_eval=False,
39
+ patch_bias=True,
40
+ interpolate_mode='bicubic',
41
+ frozen_exclude=[]),
42
+ decode_head=dict(
43
+ type='BitemporalAdapterHead',
44
+ ban_cfg=dict(
45
+ clip_channels=768,
46
+ fusion_index=[1, 2, 3],
47
+ side_enc_cfg=dict(
48
+ type='mmseg.MixVisionTransformer',
49
+ init_cfg=dict(
50
+ type='Pretrained', checkpoint=checkpoint),
51
+ in_channels=3,
52
+ embed_dims=32,
53
+ num_stages=4,
54
+ num_layers=[2, 2, 2, 2],
55
+ num_heads=[1, 2, 5, 8],
56
+ patch_sizes=[7, 3, 3, 3],
57
+ sr_ratios=[8, 4, 2, 1],
58
+ out_indices=(0, 1, 2, 3),
59
+ mlp_ratio=4,
60
+ qkv_bias=True,
61
+ drop_rate=0.0,
62
+ attn_drop_rate=0.0,
63
+ drop_path_rate=0.1)),
64
+ ban_dec_cfg=dict(
65
+ type='BAN_MLPDecoder',
66
+ in_channels=[32, 64, 160, 256],
67
+ channels=128,
68
+ dropout_ratio=0.1,
69
+ num_classes=2,
70
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
71
+ align_corners=False,
72
+ )),
73
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
74
+
75
+ optim_wrapper = dict(
76
+ _delete_=True,
77
+ type='AmpOptimWrapper',
78
+ optimizer=dict(
79
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
80
+ paramwise_cfg=dict(
81
+ custom_keys={
82
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
83
+ 'norm': dict(decay_mult=0.),
84
+ 'mask_decoder': dict(lr_mult=10.)
85
+ }),
86
+ loss_scale='dynamic',
87
+ clip_grad=dict(max_norm=0.01, norm_type=2))
88
+
89
+ param_scheduler = [
90
+ dict(
91
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
92
+ dict(
93
+ type='PolyLR',
94
+ power=1.0,
95
+ begin=1000,
96
+ end=100000,
97
+ eta_min=0.0,
98
+ by_epoch=False,
99
+ )
100
+ ]
101
+ # training schedule for 100k
102
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
103
+ val_cfg = dict(type='ValLoop')
104
+ test_cfg = dict(type='TestLoop')
105
+ default_hooks = dict(
106
+ timer=dict(type='IterTimerHook'),
107
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
108
+ param_scheduler=dict(type='ParamSchedulerHook'),
109
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
110
+ save_best='mIoU'),
111
+ sampler_seed=dict(type='DistSamplerSeedHook'),
112
+ visualization=dict(type='CDVisualizationHook', interval=1,
113
+ img_shape=(512, 512, 3)))
BAN-vit-b16-in21k-mit-b0/medium/config.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_medium_512x512_100k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ vit_checkpoint_file = 'pretrain/augreg_B_16-i21k-300ep-lr_0.001-aug_medium1-wd_0.1-do_0.0-sd_0.0.pth' # noqa
11
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
12
+
13
+ model = dict(
14
+ pretrained=None,
15
+ asymetric_input=True,
16
+ encoder_resolution=dict(
17
+ size=(224, 224),
18
+ mode='bilinear'),
19
+ image_encoder=dict(
20
+ type='mmseg.VisionTransformer',
21
+ init_cfg=dict(
22
+ type='Pretrained', checkpoint=vit_checkpoint_file),
23
+ img_size=(224, 224),
24
+ patch_size=16,
25
+ in_channels=3,
26
+ embed_dims=768,
27
+ num_layers=12,
28
+ num_heads=12,
29
+ mlp_ratio=4,
30
+ out_indices=(5, 8, 11),
31
+ qkv_bias=True,
32
+ drop_rate=0.0,
33
+ attn_drop_rate=0.0,
34
+ drop_path_rate=0.0,
35
+ with_cls_token=True,
36
+ norm_cfg=dict(type='LN', eps=1e-6),
37
+ act_cfg=dict(type='GELU'),
38
+ norm_eval=False,
39
+ patch_bias=True,
40
+ interpolate_mode='bicubic',
41
+ frozen_exclude=[]),
42
+ decode_head=dict(
43
+ type='BitemporalAdapterHead',
44
+ ban_cfg=dict(
45
+ clip_channels=768,
46
+ fusion_index=[1, 2, 3],
47
+ side_enc_cfg=dict(
48
+ type='mmseg.MixVisionTransformer',
49
+ init_cfg=dict(
50
+ type='Pretrained', checkpoint=checkpoint),
51
+ in_channels=3,
52
+ embed_dims=32,
53
+ num_stages=4,
54
+ num_layers=[2, 2, 2, 2],
55
+ num_heads=[1, 2, 5, 8],
56
+ patch_sizes=[7, 3, 3, 3],
57
+ sr_ratios=[8, 4, 2, 1],
58
+ out_indices=(0, 1, 2, 3),
59
+ mlp_ratio=4,
60
+ qkv_bias=True,
61
+ drop_rate=0.0,
62
+ attn_drop_rate=0.0,
63
+ drop_path_rate=0.1)),
64
+ ban_dec_cfg=dict(
65
+ type='BAN_MLPDecoder',
66
+ in_channels=[32, 64, 160, 256],
67
+ channels=128,
68
+ dropout_ratio=0.1,
69
+ num_classes=2,
70
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
71
+ align_corners=False,
72
+ )),
73
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
74
+
75
+ optim_wrapper = dict(
76
+ _delete_=True,
77
+ type='AmpOptimWrapper',
78
+ optimizer=dict(
79
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
80
+ paramwise_cfg=dict(
81
+ custom_keys={
82
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
83
+ 'norm': dict(decay_mult=0.),
84
+ 'mask_decoder': dict(lr_mult=10.)
85
+ }),
86
+ loss_scale='dynamic',
87
+ clip_grad=dict(max_norm=0.01, norm_type=2))
88
+
89
+ param_scheduler = [
90
+ dict(
91
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
92
+ dict(
93
+ type='PolyLR',
94
+ power=1.0,
95
+ begin=1000,
96
+ end=100000,
97
+ eta_min=0.0,
98
+ by_epoch=False,
99
+ )
100
+ ]
101
+ # training schedule for 100k
102
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
103
+ val_cfg = dict(type='ValLoop')
104
+ test_cfg = dict(type='TestLoop')
105
+ default_hooks = dict(
106
+ timer=dict(type='IterTimerHook'),
107
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
108
+ param_scheduler=dict(type='ParamSchedulerHook'),
109
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
110
+ save_best='mIoU'),
111
+ sampler_seed=dict(type='DistSamplerSeedHook'),
112
+ visualization=dict(type='CDVisualizationHook', interval=1,
113
+ img_shape=(512, 512, 3)))
BAN-vit-b16-in21k-mit-b0/small/config.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ban_vit-b16.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_small_512x512_100k_cgwx.py']
4
+
5
+ dataset_type = 'LEVIR_CD_Dataset'
6
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
7
+
8
+ crop_size = (512, 512)
9
+
10
+ vit_checkpoint_file = 'pretrain/augreg_B_16-i21k-300ep-lr_0.001-aug_medium1-wd_0.1-do_0.0-sd_0.0.pth' # noqa
11
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b0_20220624-7e0fe6dd.pth' # noqa
12
+
13
+ model = dict(
14
+ pretrained=None,
15
+ asymetric_input=True,
16
+ encoder_resolution=dict(
17
+ size=(224, 224),
18
+ mode='bilinear'),
19
+ image_encoder=dict(
20
+ type='mmseg.VisionTransformer',
21
+ init_cfg=dict(
22
+ type='Pretrained', checkpoint=vit_checkpoint_file),
23
+ img_size=(224, 224),
24
+ patch_size=16,
25
+ in_channels=3,
26
+ embed_dims=768,
27
+ num_layers=12,
28
+ num_heads=12,
29
+ mlp_ratio=4,
30
+ out_indices=(5, 8, 11),
31
+ qkv_bias=True,
32
+ drop_rate=0.0,
33
+ attn_drop_rate=0.0,
34
+ drop_path_rate=0.0,
35
+ with_cls_token=True,
36
+ norm_cfg=dict(type='LN', eps=1e-6),
37
+ act_cfg=dict(type='GELU'),
38
+ norm_eval=False,
39
+ patch_bias=True,
40
+ interpolate_mode='bicubic',
41
+ frozen_exclude=[]),
42
+ decode_head=dict(
43
+ type='BitemporalAdapterHead',
44
+ ban_cfg=dict(
45
+ clip_channels=768,
46
+ fusion_index=[1, 2, 3],
47
+ side_enc_cfg=dict(
48
+ type='mmseg.MixVisionTransformer',
49
+ init_cfg=dict(
50
+ type='Pretrained', checkpoint=checkpoint),
51
+ in_channels=3,
52
+ embed_dims=32,
53
+ num_stages=4,
54
+ num_layers=[2, 2, 2, 2],
55
+ num_heads=[1, 2, 5, 8],
56
+ patch_sizes=[7, 3, 3, 3],
57
+ sr_ratios=[8, 4, 2, 1],
58
+ out_indices=(0, 1, 2, 3),
59
+ mlp_ratio=4,
60
+ qkv_bias=True,
61
+ drop_rate=0.0,
62
+ attn_drop_rate=0.0,
63
+ drop_path_rate=0.1)),
64
+ ban_dec_cfg=dict(
65
+ type='BAN_MLPDecoder',
66
+ in_channels=[32, 64, 160, 256],
67
+ channels=128,
68
+ dropout_ratio=0.1,
69
+ num_classes=2,
70
+ norm_cfg=dict(type='SyncBN', requires_grad=True),
71
+ align_corners=False,
72
+ )),
73
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
74
+
75
+ optim_wrapper = dict(
76
+ _delete_=True,
77
+ type='AmpOptimWrapper',
78
+ optimizer=dict(
79
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.0001),
80
+ paramwise_cfg=dict(
81
+ custom_keys={
82
+ 'img_encoder': dict(lr_mult=0.1, decay_mult=1.0),
83
+ 'norm': dict(decay_mult=0.),
84
+ 'mask_decoder': dict(lr_mult=10.)
85
+ }),
86
+ loss_scale='dynamic',
87
+ clip_grad=dict(max_norm=0.01, norm_type=2))
88
+
89
+ param_scheduler = [
90
+ dict(
91
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
92
+ dict(
93
+ type='PolyLR',
94
+ power=1.0,
95
+ begin=1000,
96
+ end=200000,
97
+ eta_min=0.0,
98
+ by_epoch=False,
99
+ )
100
+ ]
101
+ # training schedule for 100k
102
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=200000, val_interval=1000)
103
+ val_cfg = dict(type='ValLoop')
104
+ test_cfg = dict(type='TestLoop')
105
+ default_hooks = dict(
106
+ timer=dict(type='IterTimerHook'),
107
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
108
+ param_scheduler=dict(type='ParamSchedulerHook'),
109
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
110
+ save_best='mIoU'),
111
+ sampler_seed=dict(type='DistSamplerSeedHook'),
112
+ visualization=dict(type='CDVisualizationHook', interval=1,
113
+ img_shape=(512, 512, 3)))
BAN-vit-b16-in21k-mit-b2/initial/best_mIoU_iter_30000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e408bf4ee3dab555f143f1dd975a5e643413fb7e6c3b7aa333b88cf824d0dd1e
3
+ size 455144133
BAN-vit-b16-in21k-mit-b2/initial/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-in21k-mit-b0/initial/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-in21k-mit-b2/large/best_mIoU_iter_7000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d8fc2343b5b9c252c86b7032711da60404eff6ab2b1f575f69a29615525c46c
3
+ size 451744005
BAN-vit-b16-in21k-mit-b2/large/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-in21k-mit-b0/large/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-in21k-mit-b2/medium/best_mIoU_iter_6000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7917af7d31f1ee68ff7fda449bc0d048b2232bf147d15fd5aca12a5a9523da6
3
+ size 451598277
BAN-vit-b16-in21k-mit-b2/medium/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-in21k-mit-b0/medium/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-b16-in21k-mit-b2/small/best_mIoU_iter_19000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1642ec06e0bcdced0e04a56b9dc5ec75a37f5251c1b8512045311da40a42aaa1
3
+ size 453552645
BAN-vit-b16-in21k-mit-b2/small/config.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-in21k-mit-b0/small/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
BAN-vit-l14-clip-mit-b0/distill/config.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/distill/config.py']
2
+
3
+ checkpoint_student = None
4
+ checkpoint_teacher_l = None
5
+ checkpoint_teacher_m = None
6
+ checkpoint_teacher_s = None
7
+
8
+ # model settings
9
+ model = dict(
10
+ init_cfg=dict(type='Pretrained', checkpoint=checkpoint_student),
11
+ # teacher large
12
+ init_cfg_t_l = dict(type='Pretrained', checkpoint=checkpoint_teacher_l),
13
+ # teacher medium
14
+ init_cfg_t_m = dict(type='Pretrained', checkpoint=checkpoint_teacher_m),
15
+ # teacher small
16
+ init_cfg_t_s = dict(type='Pretrained', checkpoint=checkpoint_teacher_s),
17
+
18
+ type='DistillBAN',
19
+ encoder_resolution=dict(
20
+ size=(336, 336),
21
+ mode='bilinear'),
22
+ image_encoder=dict(
23
+ type='mmseg.VisionTransformer',
24
+ img_size=(336, 336),
25
+ patch_size=14,
26
+ patch_pad=0,
27
+ embed_dims=1024,
28
+ num_layers=18,
29
+ num_heads=16,
30
+ out_indices=(5, 11, 17)),
31
+ decode_head=dict(
32
+ type='BitemporalAdapterHead',
33
+ ban_cfg=dict(
34
+ fusion_index=[1, 2, 3],
35
+ clip_channels=1024),
36
+ ban_dec_cfg=dict(
37
+ in_channels=[32, 64, 160, 256])))
38
+
39
+ train_dataloader = dict(batch_size=8, num_workers=8)
40
+ val_dataloader = dict(batch_size=1, num_workers=1)
BAN-vit-l14-clip-mit-b0/initial/config.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/initial/config.py']
2
+
3
+ pretrained = 'pretrain/clip_vit-large-patch14-336_3rdparty-0b5df9cb.pth' # noqa
4
+
5
+ model = dict(
6
+ type='BAN',
7
+ pretrained=pretrained,
8
+ encoder_resolution=dict(
9
+ size=(336, 336),
10
+ mode='bilinear'),
11
+ image_encoder=dict(
12
+ type='mmseg.VisionTransformer',
13
+ img_size=(336, 336),
14
+ patch_size=14,
15
+ patch_pad=0,
16
+ embed_dims=1024,
17
+ num_layers=18,
18
+ num_heads=16,
19
+ out_indices=(5, 11, 17)),
20
+ decode_head=dict(
21
+ type='BitemporalAdapterHead',
22
+ ban_cfg=dict(
23
+ fusion_index=[1, 2, 3],
24
+ clip_channels=1024),
25
+ ban_dec_cfg=dict(
26
+ in_channels=[32, 64, 160, 256])))
27
+
28
+ train_dataloader = dict(batch_size=8, num_workers=8)
29
+ val_dataloader = dict(batch_size=1, num_workers=1)
BAN-vit-l14-clip-mit-b0/large/config.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/large/config.py']
2
+
3
+ dataset_type = 'LEVIR_CD_Dataset'
4
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
5
+
6
+ crop_size = (512, 512)
7
+
8
+ pretrained = 'pretrain/clip_vit-large-patch14-336_3rdparty-0b5df9cb.pth' # noqa
9
+
10
+ model = dict(
11
+ type='BAN',
12
+ pretrained=pretrained,
13
+ encoder_resolution=dict(
14
+ size=(336, 336),
15
+ mode='bilinear'),
16
+ image_encoder=dict(
17
+ type='mmseg.VisionTransformer',
18
+ img_size=(336, 336),
19
+ patch_size=14,
20
+ patch_pad=0,
21
+ embed_dims=1024,
22
+ num_layers=18,
23
+ num_heads=16,
24
+ out_indices=(5, 11, 17)),
25
+ decode_head=dict(
26
+ type='BitemporalAdapterHead',
27
+ ban_cfg=dict(
28
+ fusion_index=[1, 2, 3],
29
+ clip_channels=1024),
30
+ ban_dec_cfg=dict(
31
+ in_channels=[32, 64, 160, 256])))
32
+
33
+ param_scheduler = [
34
+ dict(
35
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
36
+ dict(
37
+ type='PolyLR',
38
+ power=1.0,
39
+ begin=1000,
40
+ end=100000,
41
+ eta_min=0.0,
42
+ by_epoch=False,
43
+ )
44
+ ]
45
+ # training schedule for 100k
46
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
47
+ val_cfg = dict(type='ValLoop')
48
+ test_cfg = dict(type='TestLoop')
49
+ default_hooks = dict(
50
+ timer=dict(type='IterTimerHook'),
51
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
52
+ param_scheduler=dict(type='ParamSchedulerHook'),
53
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
54
+ save_best='mIoU'),
55
+ sampler_seed=dict(type='DistSamplerSeedHook'),
56
+ visualization=dict(type='CDVisualizationHook', interval=1,
57
+ img_shape=(512, 512, 3)))
BAN-vit-l14-clip-mit-b0/medium/config.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/medium/config.py']
2
+
3
+ dataset_type = 'LEVIR_CD_Dataset'
4
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
5
+
6
+ crop_size = (512, 512)
7
+
8
+ pretrained = 'pretrain/clip_vit-large-patch14-336_3rdparty-0b5df9cb.pth' # noqa
9
+
10
+ model = dict(
11
+ type='BAN',
12
+ pretrained=pretrained,
13
+ encoder_resolution=dict(
14
+ size=(336, 336),
15
+ mode='bilinear'),
16
+ image_encoder=dict(
17
+ type='mmseg.VisionTransformer',
18
+ img_size=(336, 336),
19
+ patch_size=14,
20
+ patch_pad=0,
21
+ embed_dims=1024,
22
+ num_layers=18,
23
+ num_heads=16,
24
+ out_indices=(5, 11, 17)),
25
+ decode_head=dict(
26
+ type='BitemporalAdapterHead',
27
+ ban_cfg=dict(
28
+ fusion_index=[1, 2, 3],
29
+ clip_channels=1024),
30
+ ban_dec_cfg=dict(
31
+ in_channels=[32, 64, 160, 256])))
32
+
33
+ param_scheduler = [
34
+ dict(
35
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
36
+ dict(
37
+ type='PolyLR',
38
+ power=1.0,
39
+ begin=1000,
40
+ end=100000,
41
+ eta_min=0.0,
42
+ by_epoch=False,
43
+ )
44
+ ]
45
+ # training schedule for 100k
46
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
47
+ val_cfg = dict(type='ValLoop')
48
+ test_cfg = dict(type='TestLoop')
49
+ default_hooks = dict(
50
+ timer=dict(type='IterTimerHook'),
51
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
52
+ param_scheduler=dict(type='ParamSchedulerHook'),
53
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
54
+ save_best='mIoU'),
55
+ sampler_seed=dict(type='DistSamplerSeedHook'),
56
+ visualization=dict(type='CDVisualizationHook', interval=1,
57
+ img_shape=(512, 512, 3)))
BAN-vit-l14-clip-mit-b0/small/config.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-b16-clip-mit-b0/small/config.py']
2
+
3
+ dataset_type = 'LEVIR_CD_Dataset'
4
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
5
+
6
+ crop_size = (512, 512)
7
+
8
+ pretrained = 'pretrain/clip_vit-large-patch14-336_3rdparty-0b5df9cb.pth' # noqa
9
+
10
+ model = dict(
11
+ type='BAN',
12
+ pretrained=pretrained,
13
+ encoder_resolution=dict(
14
+ size=(336, 336),
15
+ mode='bilinear'),
16
+ image_encoder=dict(
17
+ type='mmseg.VisionTransformer',
18
+ img_size=(336, 336),
19
+ patch_size=14,
20
+ patch_pad=0,
21
+ embed_dims=1024,
22
+ num_layers=18,
23
+ num_heads=16,
24
+ out_indices=(5, 11, 17)),
25
+ decode_head=dict(
26
+ type='BitemporalAdapterHead',
27
+ ban_cfg=dict(
28
+ fusion_index=[1, 2, 3],
29
+ clip_channels=1024),
30
+ ban_dec_cfg=dict(
31
+ in_channels=[32, 64, 160, 256])))
32
+
33
+ param_scheduler = [
34
+ dict(
35
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
36
+ dict(
37
+ type='PolyLR',
38
+ power=1.0,
39
+ begin=1000,
40
+ end=100000,
41
+ eta_min=0.0,
42
+ by_epoch=False,
43
+ )
44
+ ]
45
+ # training schedule for 100k
46
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
47
+ val_cfg = dict(type='ValLoop')
48
+ test_cfg = dict(type='TestLoop')
49
+ default_hooks = dict(
50
+ timer=dict(type='IterTimerHook'),
51
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
52
+ param_scheduler=dict(type='ParamSchedulerHook'),
53
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
54
+ save_best='mIoU'),
55
+ sampler_seed=dict(type='DistSamplerSeedHook'),
56
+ visualization=dict(type='CDVisualizationHook', interval=1,
57
+ img_shape=(512, 512, 3)))
BAN-vit-l14-clip-mit-b2/distill/best_mIoU_iter_15000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f7b3f408dfe0131948e00ef1ccbb8bab424eea22a0cf3b79c490b6cbc31d999
3
+ size 4300572453
BAN-vit-l14-clip-mit-b2/distill/config.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-l14-clip-mit-b0/distill/config.py']
2
+
3
+ checkpoint_student = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BAN/vit-l14-clip-mit-b2/initial/best_mIoU_iter_17000.pth'
4
+ checkpoint_teacher_l = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BAN/vit-l14-clip-mit-b2/large/best_mIoU_iter_24000.pth'
5
+ checkpoint_teacher_m = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BAN/vit-l14-clip-mit-b2/medium/best_mIoU_iter_10000.pth'
6
+ checkpoint_teacher_s = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BAN/vit-l14-clip-mit-b2/small/best_mIoU_iter_35000.pth'
7
+
8
+ # model settings
9
+ model = dict(
10
+ init_cfg=dict(type='Pretrained', checkpoint=checkpoint_student),
11
+ # teacher large
12
+ init_cfg_t_l = dict(type='Pretrained', checkpoint=checkpoint_teacher_l),
13
+ # teacher medium
14
+ init_cfg_t_m = dict(type='Pretrained', checkpoint=checkpoint_teacher_m),
15
+ # teacher small
16
+ init_cfg_t_s = dict(type='Pretrained', checkpoint=checkpoint_teacher_s),
17
+
18
+ decode_head=dict(
19
+ ban_cfg=dict(
20
+ side_enc_cfg=dict(
21
+ embed_dims=64,
22
+ num_layers=[3, 4, 6, 3])),
23
+ ban_dec_cfg=dict(
24
+ in_channels=[64, 128, 320, 512])))
25
+
26
+ train_dataloader = dict(batch_size=8, num_workers=8)
27
+ val_dataloader = dict(batch_size=1, num_workers=1)
BAN-vit-l14-clip-mit-b2/initial/best_mIoU_iter_17000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23d8a1374f3e46e16b79dc24e6aa96264805d185c827bc42a262a8724ca3b805
3
+ size 1022820983
BAN-vit-l14-clip-mit-b2/initial/config.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-l14-clip-mit-b0/initial/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
16
+
17
+ train_dataloader = dict(batch_size=8, num_workers=8)
18
+ val_dataloader = dict(batch_size=1, num_workers=1)
BAN-vit-l14-clip-mit-b2/large/best_mIoU_iter_24000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b08b38a473bbd18da541adfd8a0ed305365b5fe40d017a8e9cf380a26ac875e1
3
+ size 1023807991
BAN-vit-l14-clip-mit-b2/large/config.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-l14-clip-mit-b0/large/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
16
+
17
+ train_dataloader = dict(batch_size=8, num_workers=8)
18
+ val_dataloader = dict(batch_size=1, num_workers=1)
BAN-vit-l14-clip-mit-b2/medium/best_mIoU_iter_10000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4f2c30db1ed4e5347f9b041e627d533529b97f6743154dd8bce205f7ac1ac24
3
+ size 1021734263
BAN-vit-l14-clip-mit-b2/medium/config.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-l14-clip-mit-b0/medium/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
16
+
17
+ train_dataloader = dict(batch_size=8, num_workers=8)
18
+ val_dataloader = dict(batch_size=1, num_workers=1)
BAN-vit-l14-clip-mit-b2/small/best_mIoU_iter_35000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d0a0d046231ad98ec3ef6a1a066f41730b8e5ba79d37355a93d3d59639177d0
3
+ size 1025483063
BAN-vit-l14-clip-mit-b2/small/config.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = ['/nas/datasets/lzy/RS-ChangeDetection/Best_ckpt-KD/BAN-vit-l14-clip-mit-b0/small/config.py']
2
+
3
+ checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/segformer/mit_b2_20220624-66e8bf70.pth' # noqa
4
+
5
+ # model settings
6
+ model = dict(
7
+ decode_head=dict(
8
+ ban_cfg=dict(
9
+ side_enc_cfg=dict(
10
+ init_cfg=dict(
11
+ type='Pretrained', checkpoint=checkpoint),
12
+ embed_dims=64,
13
+ num_layers=[3, 4, 6, 3])),
14
+ ban_dec_cfg=dict(
15
+ in_channels=[64, 128, 320, 512])))
16
+
17
+ train_dataloader = dict(batch_size=8, num_workers=8)
18
+ val_dataloader = dict(batch_size=1, num_workers=1)
BIT/distill/best_mIoU_iter_71000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd3bb9b5333aeeff68c4df27ab52f8f25f3548b09afa715b9a204cbf458c7110
3
+ size 57559345
BIT/distill/config.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/rmcd-kd/configs/_base_/models/KD-bit_r18.py',
3
+ '/home/liuziyuan/proj/rmcd-kd/configs/common/standard_512x512_200k_cgwx.py']
4
+
5
+
6
+ dataset_type = 'LEVIR_CD_Dataset'
7
+ data_root = '/nas/datasets/lzy/RS-ChangeDetection/CGWX'
8
+
9
+ crop_size = (512, 512)
10
+
11
+ checkpoint_student = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BIT/teacher_ckpt/initial/best_mIoU_iter_80000.pth'
12
+ checkpoint_teacher_l = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BIT/teacher_ckpt/large/best_mIoU_iter_24000.pth'
13
+ checkpoint_teacher_m = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BIT/teacher_ckpt/medium/best_mIoU_iter_8000.pth'
14
+ checkpoint_teacher_s = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/BIT/teacher_ckpt/small/best_mIoU_iter_74000.pth'
15
+
16
+ model = dict(
17
+ # student
18
+ init_cfg=dict(type='Pretrained', checkpoint=checkpoint_student),
19
+ # teacher large
20
+ init_cfg_t_l = dict(type='Pretrained', checkpoint=checkpoint_teacher_l),
21
+ # teacher medium
22
+ init_cfg_t_m = dict(type='Pretrained', checkpoint=checkpoint_teacher_m),
23
+ # teacher small
24
+ init_cfg_t_s = dict(type='Pretrained', checkpoint=checkpoint_teacher_s)
25
+ )
26
+
27
+ param_scheduler = [
28
+ dict(
29
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
30
+ dict(
31
+ type='PolyLR',
32
+ power=1.0,
33
+ begin=1000,
34
+ end=100000,
35
+ eta_min=0.0,
36
+ by_epoch=False,
37
+ )
38
+ ]
39
+
40
+ # training schedule for 100k
41
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
42
+ val_cfg = dict(type='ValLoop')
43
+ test_cfg = dict(type='TestLoop')
44
+ default_hooks = dict(
45
+ timer=dict(type='IterTimerHook'),
46
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
47
+ param_scheduler=dict(type='ParamSchedulerHook'),
48
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
49
+ save_best='mIoU'),
50
+ sampler_seed=dict(type='DistSamplerSeedHook'),
51
+ visualization=dict(type='CDVisualizationHook', interval=1,
52
+ img_shape=(512, 512, 3)))
BIT/initial/best_mIoU_iter_80000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82f1f885af047d77cf07545897cae644585949239a3a5b44e66e89da9a0f545d
3
+ size 20862109
BIT/initial/config.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/bit_r18.py',
3
+ '/home/liuziyuan/proj/rmcd-kd/configs/common/standard_512x512_200k_cgwx.py']
BIT/large/best_mIoU_iter_24000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f36287b98dc665e93b015ec230aa64b43ff957eb87cc3ea145afb2a8afafc5bf
3
+ size 14719581
BIT/large/config.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/bit_r18.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_large_512x512_100k_cgwx.py']
4
+
5
+ param_scheduler = [
6
+ dict(
7
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
8
+ dict(
9
+ type='PolyLR',
10
+ power=1.0,
11
+ begin=1000,
12
+ end=100000,
13
+ eta_min=0.0,
14
+ by_epoch=False,
15
+ )
16
+ ]
17
+ # training schedule for 100k
18
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
19
+ val_cfg = dict(type='ValLoop')
20
+ test_cfg = dict(type='TestLoop')
21
+ default_hooks = dict(
22
+ timer=dict(type='IterTimerHook'),
23
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
24
+ param_scheduler=dict(type='ParamSchedulerHook'),
25
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
26
+ save_best='mIoU'),
27
+ sampler_seed=dict(type='DistSamplerSeedHook'),
28
+ visualization=dict(type='CDVisualizationHook', interval=1,
29
+ img_shape=(512, 512, 3)))
BIT/medium/best_mIoU_iter_8000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b2aca7ff4a2f2f2e6ea8d1c5419f5c1fd1cc92521466a0ffd88f58625c301f0
3
+ size 12964765
BIT/medium/config.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/bit_r18.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_medium_512x512_100k_cgwx.py']
4
+
5
+ param_scheduler = [
6
+ dict(
7
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
8
+ dict(
9
+ type='PolyLR',
10
+ power=1.0,
11
+ begin=1000,
12
+ end=100000,
13
+ eta_min=0.0,
14
+ by_epoch=False,
15
+ )
16
+ ]
17
+ # training schedule for 100k
18
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
19
+ val_cfg = dict(type='ValLoop')
20
+ test_cfg = dict(type='TestLoop')
21
+ default_hooks = dict(
22
+ timer=dict(type='IterTimerHook'),
23
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
24
+ param_scheduler=dict(type='ParamSchedulerHook'),
25
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
26
+ save_best='mIoU'),
27
+ sampler_seed=dict(type='DistSamplerSeedHook'),
28
+ visualization=dict(type='CDVisualizationHook', interval=1,
29
+ img_shape=(512, 512, 3)))
BIT/small/best_mIoU_iter_74000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cba07cd8ddb7fc840f90b2318a0f695fa256b2782c92aa615f22815dc5174b8d
3
+ size 20356061
BIT/small/config.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/bit_r18.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_small_512x512_100k_cgwx.py']
4
+
5
+ param_scheduler = [
6
+ dict(
7
+ type='LinearLR', start_factor=1e-6, by_epoch=False, begin=0, end=1000),
8
+ dict(
9
+ type='PolyLR',
10
+ power=1.0,
11
+ begin=1000,
12
+ end=100000,
13
+ eta_min=0.0,
14
+ by_epoch=False,
15
+ )
16
+ ]
17
+ # training schedule for 100k
18
+ train_cfg = dict(type='IterBasedTrainLoop', max_iters=100000, val_interval=1000)
19
+ val_cfg = dict(type='ValLoop')
20
+ test_cfg = dict(type='TestLoop')
21
+ default_hooks = dict(
22
+ timer=dict(type='IterTimerHook'),
23
+ logger=dict(type='LoggerHook', interval=100, log_metric_by_epoch=False),
24
+ param_scheduler=dict(type='ParamSchedulerHook'),
25
+ checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=1000,
26
+ save_best='mIoU'),
27
+ sampler_seed=dict(type='DistSamplerSeedHook'),
28
+ visualization=dict(type='CDVisualizationHook', interval=1,
29
+ img_shape=(512, 512, 3)))