circleLZY commited on
Commit
bfc7be4
·
verified ·
1 Parent(s): d8c9a63

Upload 10 files

Browse files
TTP/distill/best_mIoU_epoch_62.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4da4157232f82dd7b508bebb25b9bbfc5a3afa5ee1b22c0fa05e34f5e9dbd779
3
+ size 5657329713
TTP/distill/config.py ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/rmcd-kd/configs/_base_/models/KD-ttp_vit-sam-l.py',
3
+ '/home/liuziyuan/proj/rmcd-kd/configs/common/standard_512x512_300e_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 = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/TTP/teacher_ckpt/initial/best_mIoU_epoch_110.pth'
11
+ checkpoint_teacher_l = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/TTP/teacher_ckpt/large/best_mIoU_epoch_90.pth'
12
+ checkpoint_teacher_m = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/TTP/teacher_ckpt/medium/best_mIoU_epoch_100.pth'
13
+ checkpoint_teacher_s = '/nas/datasets/lzy/RS-ChangeDetection/checkpoints_distill/TTP/teacher_ckpt/small/best_mIoU_epoch_115.pth'
14
+
15
+ model = dict(
16
+ # student
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
+ backbone=dict(
26
+ encoder_cfg=dict(img_size=crop_size)),
27
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
28
+
29
+ train_pipeline = [
30
+ dict(type='MultiImgLoadImageFromFile'),
31
+ dict(type='MultiImgLoadAnnotations'),
32
+ dict(type='MultiImgRandomRotate', prob=0.5, degree=180),
33
+ dict(type='MultiImgRandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
34
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='horizontal'),
35
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='vertical'),
36
+ # dict(type='MultiImgExchangeTime', prob=0.5),
37
+ dict(
38
+ type='MultiImgPhotoMetricDistortion',
39
+ brightness_delta=10,
40
+ contrast_range=(0.8, 1.2),
41
+ saturation_range=(0.8, 1.2),
42
+ hue_delta=10),
43
+ dict(type='MultiImgPackSegInputs')
44
+ ]
45
+
46
+ # By default, models are trained on 8 GPUs with 2 images per GPU
47
+ train_dataloader = dict(
48
+ batch_size=8,
49
+ num_workers=4,
50
+ sampler=dict(type='DefaultSampler', shuffle=True),
51
+ dataset=dict(pipeline=train_pipeline))
52
+
53
+ # optimizer
54
+ max_epochs = 100
55
+
56
+ optim_wrapper = dict(
57
+ _delete_=True,
58
+ type='OptimWrapper',
59
+ optimizer=dict(
60
+ type='AdamW', lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05))
61
+
62
+ param_scheduler = [
63
+ dict(
64
+ type='LinearLR', start_factor=1e-4, by_epoch=True, begin=0, end=5, convert_to_iter_based=True),
65
+ dict(
66
+ type='CosineAnnealingLR',
67
+ T_max=max_epochs,
68
+ begin=5,
69
+ by_epoch=True,
70
+ end=max_epochs,
71
+ convert_to_iter_based=True
72
+ ),
73
+ ]
74
+
75
+ test_pipeline = [
76
+ dict(type='MultiImgLoadImageFromFile'),
77
+ dict(type='MultiImgResize', scale=(512, 512), keep_ratio=True),
78
+ # add loading annotation after ``Resize`` because ground truth
79
+ # does not need to do resize data transform
80
+ dict(type='MultiImgLoadAnnotations'),
81
+ dict(type='MultiImgPackSegInputs')
82
+ ]
83
+
84
+ train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=2)
85
+ default_hooks = dict(checkpoint=dict(interval=2))
TTP/initial/best_mIoU_epoch_110.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59a48ae1689ea33d9800e12d7004c79e7f532ab772027b2aa7f5c978b77be595
3
+ size 1419294427
TTP/initial/config.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ttp_vit-sam-l.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/standard_512x512_300e_cgwx.py']
4
+
5
+ crop_size = (512, 512)
6
+
7
+ model = dict(
8
+ backbone=dict(
9
+ encoder_cfg=dict(img_size=crop_size)),
10
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
11
+
12
+ train_pipeline = [
13
+ dict(type='MultiImgLoadImageFromFile'),
14
+ dict(type='MultiImgLoadAnnotations'),
15
+ dict(type='MultiImgRandomRotate', prob=0.5, degree=180),
16
+ dict(type='MultiImgRandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
17
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='horizontal'),
18
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='vertical'),
19
+ # dict(type='MultiImgExchangeTime', prob=0.5),
20
+ dict(
21
+ type='MultiImgPhotoMetricDistortion',
22
+ brightness_delta=10,
23
+ contrast_range=(0.8, 1.2),
24
+ saturation_range=(0.8, 1.2),
25
+ hue_delta=10),
26
+ dict(type='MultiImgPackSegInputs')
27
+ ]
28
+
29
+ # By default, models are trained on 8 GPUs with 2 images per GPU
30
+ train_dataloader = dict(
31
+ batch_size=8,
32
+ num_workers=4,
33
+ sampler=dict(type='DefaultSampler', shuffle=True),
34
+ dataset=dict(pipeline=train_pipeline))
35
+
36
+ # optimizer
37
+ max_epochs = 300
38
+
39
+ optim_wrapper = dict(
40
+ _delete_=True,
41
+ type='OptimWrapper',
42
+ optimizer=dict(
43
+ type='AdamW', lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05))
44
+
45
+ param_scheduler = [
46
+ dict(
47
+ type='LinearLR', start_factor=1e-4, by_epoch=True, begin=0, end=5, convert_to_iter_based=True),
48
+ dict(
49
+ type='CosineAnnealingLR',
50
+ T_max=max_epochs,
51
+ begin=5,
52
+ by_epoch=True,
53
+ end=max_epochs,
54
+ convert_to_iter_based=True
55
+ ),
56
+ ]
57
+
58
+ train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=5)
59
+ default_hooks = dict(checkpoint=dict(interval=5))
TTP/large/best_mIoU_epoch_90.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb3ea21ad14e349de399594f0e79f7e050b52fd4927632c86679a7f3e8024b96
3
+ size 1414011867
TTP/large/config.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ttp_vit-sam-l.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_large_512x512_200e_cgwx.py']
4
+
5
+ crop_size = (512, 512)
6
+
7
+ model = dict(
8
+ backbone=dict(
9
+ encoder_cfg=dict(img_size=crop_size)),
10
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
11
+
12
+ train_pipeline = [
13
+ dict(type='MultiImgLoadImageFromFile'),
14
+ dict(type='MultiImgLoadAnnotations'),
15
+ dict(type='MultiImgRandomRotate', prob=0.5, degree=180),
16
+ dict(type='MultiImgRandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
17
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='horizontal'),
18
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='vertical'),
19
+ # dict(type='MultiImgExchangeTime', prob=0.5),
20
+ dict(
21
+ type='MultiImgPhotoMetricDistortion',
22
+ brightness_delta=10,
23
+ contrast_range=(0.8, 1.2),
24
+ saturation_range=(0.8, 1.2),
25
+ hue_delta=10),
26
+ dict(type='MultiImgPackSegInputs')
27
+ ]
28
+
29
+ # By default, models are trained on 8 GPUs with 2 images per GPU
30
+ train_dataloader = dict(
31
+ batch_size=8,
32
+ num_workers=4,
33
+ sampler=dict(type='DefaultSampler', shuffle=True),
34
+ dataset=dict(pipeline=train_pipeline))
35
+
36
+ # optimizer
37
+ max_epochs = 200
38
+
39
+ optim_wrapper = dict(
40
+ _delete_=True,
41
+ type='OptimWrapper',
42
+ optimizer=dict(
43
+ type='AdamW', lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05))
44
+
45
+ param_scheduler = [
46
+ dict(
47
+ type='LinearLR', start_factor=1e-4, by_epoch=True, begin=0, end=5, convert_to_iter_based=True),
48
+ dict(
49
+ type='CosineAnnealingLR',
50
+ T_max=max_epochs,
51
+ begin=5,
52
+ by_epoch=True,
53
+ end=max_epochs,
54
+ convert_to_iter_based=True
55
+ ),
56
+ ]
57
+
58
+ train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=5)
59
+ default_hooks = dict(checkpoint=dict(interval=5))
TTP/medium/best_mIoU_epoch_100.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68e361691e7fee59bdfe990f8392b35959c432c3350d5c419a7bd6900f3be341
3
+ size 1414948827
TTP/medium/config.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ttp_vit-sam-l.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_medium_512x512_200e_cgwx.py']
4
+
5
+ crop_size = (512, 512)
6
+
7
+ model = dict(
8
+ backbone=dict(
9
+ encoder_cfg=dict(img_size=crop_size)),
10
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
11
+
12
+ train_pipeline = [
13
+ dict(type='MultiImgLoadImageFromFile'),
14
+ dict(type='MultiImgLoadAnnotations'),
15
+ dict(type='MultiImgRandomRotate', prob=0.5, degree=180),
16
+ dict(type='MultiImgRandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
17
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='horizontal'),
18
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='vertical'),
19
+ # dict(type='MultiImgExchangeTime', prob=0.5),
20
+ dict(
21
+ type='MultiImgPhotoMetricDistortion',
22
+ brightness_delta=10,
23
+ contrast_range=(0.8, 1.2),
24
+ saturation_range=(0.8, 1.2),
25
+ hue_delta=10),
26
+ dict(type='MultiImgPackSegInputs')
27
+ ]
28
+
29
+ # By default, models are trained on 8 GPUs with 2 images per GPU
30
+ train_dataloader = dict(
31
+ batch_size=8,
32
+ num_workers=4,
33
+ sampler=dict(type='DefaultSampler', shuffle=True),
34
+ dataset=dict(pipeline=train_pipeline))
35
+
36
+ # optimizer
37
+ max_epochs = 200
38
+
39
+ optim_wrapper = dict(
40
+ _delete_=True,
41
+ type='OptimWrapper',
42
+ optimizer=dict(
43
+ type='AdamW', lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05))
44
+
45
+ param_scheduler = [
46
+ dict(
47
+ type='LinearLR', start_factor=1e-4, by_epoch=True, begin=0, end=5, convert_to_iter_based=True),
48
+ dict(
49
+ type='CosineAnnealingLR',
50
+ T_max=max_epochs,
51
+ begin=5,
52
+ by_epoch=True,
53
+ end=max_epochs,
54
+ convert_to_iter_based=True
55
+ ),
56
+ ]
57
+
58
+ train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=5)
59
+ default_hooks = dict(checkpoint=dict(interval=5))
TTP/small/best_mIoU_epoch_115.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c38e2f33063a4e4cb57cf37e50d648f7606063efdcde67bb36eaa702b6bb0016
3
+ size 1417865883
TTP/small/config.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = [
2
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/_base_/models/ttp_vit-sam-l.py',
3
+ '/home/liuziyuan/proj/RS-CD/rs-cd-cgwx/configs/common/train_small_512x512_200e_cgwx.py']
4
+
5
+ crop_size = (512, 512)
6
+
7
+ model = dict(
8
+ backbone=dict(
9
+ encoder_cfg=dict(img_size=crop_size)),
10
+ test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2)))
11
+
12
+ train_pipeline = [
13
+ dict(type='MultiImgLoadImageFromFile'),
14
+ dict(type='MultiImgLoadAnnotations'),
15
+ dict(type='MultiImgRandomRotate', prob=0.5, degree=180),
16
+ dict(type='MultiImgRandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
17
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='horizontal'),
18
+ dict(type='MultiImgRandomFlip', prob=0.5, direction='vertical'),
19
+ # dict(type='MultiImgExchangeTime', prob=0.5),
20
+ dict(
21
+ type='MultiImgPhotoMetricDistortion',
22
+ brightness_delta=10,
23
+ contrast_range=(0.8, 1.2),
24
+ saturation_range=(0.8, 1.2),
25
+ hue_delta=10),
26
+ dict(type='MultiImgPackSegInputs')
27
+ ]
28
+
29
+ # By default, models are trained on 8 GPUs with 2 images per GPU
30
+ train_dataloader = dict(
31
+ batch_size=8,
32
+ num_workers=4,
33
+ sampler=dict(type='DefaultSampler', shuffle=True),
34
+ dataset=dict(pipeline=train_pipeline))
35
+
36
+ # optimizer
37
+ max_epochs = 200
38
+
39
+ optim_wrapper = dict(
40
+ _delete_=True,
41
+ type='OptimWrapper',
42
+ optimizer=dict(
43
+ type='AdamW', lr=0.0004, betas=(0.9, 0.999), weight_decay=0.05))
44
+
45
+ param_scheduler = [
46
+ dict(
47
+ type='LinearLR', start_factor=1e-4, by_epoch=True, begin=0, end=5, convert_to_iter_based=True),
48
+ dict(
49
+ type='CosineAnnealingLR',
50
+ T_max=max_epochs,
51
+ begin=5,
52
+ by_epoch=True,
53
+ end=max_epochs,
54
+ convert_to_iter_based=True
55
+ ),
56
+ ]
57
+
58
+ train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=5)
59
+ default_hooks = dict(checkpoint=dict(interval=5))