Skip to content

Commit 351e256

Browse files
committed
add details for ttp
1 parent 0726840 commit 351e256

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

configs/_base_/models/ttp_vit-sam-l.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# model settings
22
norm_cfg = dict(type='SyncBN', requires_grad=True)
3-
bit_norm_cfg = dict(type='LN', requires_grad=True)
43
fpn_norm_cfg = dict(type='mmpretrain.LN2d', requires_grad=True)
54
data_preprocessor = dict(
65
type='DualInputSegDataPreProcessor',

configs/ttp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TTP
22

3-
Time Travelling Pixels: Bitemporal Features Integration with Foundation Model for Remote Sensing Image Change Detection
3+
[Time Travelling Pixels: Bitemporal Features Integration with Foundation Model for Remote Sensing Image Change Detection](https://arxiv.org/abs/2312.16202)
44

55
## Introduction
66

@@ -42,7 +42,7 @@ pip install peft
4242

4343
| Method | Backbone | Crop Size | Lr schd | Precision | Recall | F1-Score | IoU | config |
4444
| :----: | --------- | :-------: | :-----: | :-------: | :----: | :------: | :--: | :----------------------------------------------------------: |
45-
| TTP | ViT-SAM-L | 512x512 | 300e | | | | | [config](https://github.com/likyoo/open-cd/blob/main/configs/ttp/ttp_vit-sam-l_512x512_300e_levircd.py) |
45+
| TTP | ViT-SAM-L | 512x512 | 300e | 93.0 | 91.7 | 92.1 | 85.6 | [config](https://github.com/likyoo/open-cd/blob/main/configs/ttp/ttp_vit-sam-l_512x512_300e_levircd.py) |
4646

4747

4848
- All metrics are based on the category "change".

configs/ttp/ttp_vit-sam-l_512x512_300e_levircd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@
5353
),
5454
]
5555

56-
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=5)
56+
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=5)
57+
default_hooks = dict(checkpoint=dict(interval=5))

opencd/models/utils/ttp_layer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self,
5454
dropout_layer=dict(type='DropPath', drop_prob=drop_path_rate),
5555
act_cfg=act_cfg)
5656

57-
if self.window_size > 0:
57+
if self.window_size > 0: # TODO: Maybe it should be ``self.window_size == 0`` here.
5858
in_channels = embed_dims * 2
5959
self.down_channel = torch.nn.Conv2d(in_channels, 1, kernel_size=1, stride=1, bias=False)
6060
self.down_channel.weight.data.fill_(1.0 / in_channels)
@@ -89,7 +89,7 @@ def forward(self, x):
8989

9090
x = self.ffn(self.ln2(x), identity=x)
9191
# time phase fusion
92-
if self.window_size > 0:
92+
if self.window_size > 0: # TODO: Maybe it should be ``self.window_size == 0`` here.
9393
x = einops.rearrange(x, 'b h w d -> b d h w') # 2B, C, H, W
9494
x0 = x[:x.size(0)//2]
9595
x1 = x[x.size(0)//2:] # B, C, H, W

0 commit comments

Comments
 (0)