Skip to content

Commit 1e34d00

Browse files
committed
support fc-ef fc-siam-conc fc-siam-diff
1 parent 67ac0d8 commit 1e34d00

File tree

7 files changed

+543
-183
lines changed

7 files changed

+543
-183
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ Toolbox:
2222

2323
Change detection model:
2424

25-
- [x] [Changer (arXiv'2022)](configs/changer)
26-
- [x] [FC-Siam-Diff (ICIP'2018)](configs/fcsn)
25+
- [x] [FC-EF (ICIP'2018)](configs/fcsn)
26+
- [x] [FC-Siam-diff (ICIP'2018)](configs/fcsn)
27+
- [x] [FC-Siam-conc (ICIP'2018)](configs/fcsn)
2728
- [x] [SNUNet (GRSL'2021)](configs/snunet)
2829
- [x] [BiT (TGRS'2021)](configs/bit)
30+
- [x] [Changer (arXiv'2022)](configs/changer)
2931
- [ ] ...
3032

3133
The code of some models are borrowed directly from their official repositories.

configs/_base_/models/fc_ef.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# model settings
2+
norm_cfg = dict(type='SyncBN', requires_grad=True)
3+
base_channels = 16
4+
model = dict(
5+
type='DIEncoderDecoder',
6+
pretrained=None,
7+
backbone=dict(
8+
type='FC_EF',
9+
in_channels=6,
10+
base_channel=base_channels),
11+
decode_head=dict(
12+
type='FCNHead',
13+
in_channels=base_channels,
14+
channels=base_channels,
15+
in_index=-1,
16+
num_convs=0,
17+
concat_input=False,
18+
num_classes=2,
19+
loss_decode=dict(
20+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
21+
# model training and testing settings
22+
train_cfg=dict(),
23+
test_cfg=dict(mode='whole'))

configs/_base_/models/fc_siam_conc.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# model settings
2+
norm_cfg = dict(type='SyncBN', requires_grad=True)
3+
base_channels = 16
4+
model = dict(
5+
type='DIEncoderDecoder',
6+
pretrained=None,
7+
backbone=dict(
8+
type='FC_Siam_conc',
9+
in_channels=3,
10+
base_channel=base_channels),
11+
decode_head=dict(
12+
type='FCNHead',
13+
in_channels=base_channels,
14+
channels=base_channels,
15+
in_index=-1,
16+
num_convs=0,
17+
concat_input=False,
18+
num_classes=2,
19+
loss_decode=dict(
20+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
21+
# model training and testing settings
22+
train_cfg=dict(),
23+
test_cfg=dict(mode='whole'))

configs/_base_/models/fc_siam_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
type='DIEncoderDecoder',
66
pretrained=None,
77
backbone=dict(
8-
type='SiamUnet_diff',
8+
type='FC_Siam_diff',
99
in_channels=3,
1010
base_channel=base_channels),
1111
decode_head=dict(

opencd/models/backbones/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .interaction_resnet import IA_ResNetV1c
22
from .interaction_resnest import IA_ResNeSt
3-
from .siamunet_diff import SiamUnet_diff
3+
from .fcsn import FC_EF, FC_Siam_diff, FC_Siam_conc
44
from .snunet import SNUNet_ECAM
55

6-
__all__ = ['IA_ResNetV1c', 'IA_ResNeSt', 'SiamUnet_diff', 'SNUNet_ECAM']
6+
__all__ = ['IA_ResNetV1c', 'IA_ResNeSt', 'FC_EF', 'FC_Siam_diff',
7+
'FC_Siam_conc', 'SNUNet_ECAM']

0 commit comments

Comments
 (0)