-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgenotypes.py
53 lines (42 loc) · 3.24 KB
/
genotypes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from collections import namedtuple
Genotype = namedtuple('Genotype', 'normal normal_concat normal_tv normal_tv_concat chain_model chain_model_concat chain_fusion chain_fusion_concat')
PRIMITIVES = [
'skip_connect',
'sep_conv_3x3',
'sep_conv_5x5',
'dil_conv_3x3',
'dil_conv_5x5',
'eca_attention',
'se_attention',
'ResidualModules',
'EnhanceREsidualModules'
]
Genotype2 = namedtuple('Genotype', 'normal normal_concat')
fusion_ir = Genotype2(normal=[('SepConv_3_1', 0), ('SPAattention_3', 1)],normal_concat=None)
fusion_vis = Genotype2(normal=[('Residualblocks_3_1', 0), ('SPAattention_3', 1)],normal_concat=None)
fusion_M = Genotype(normal=[('Denseblocks_3_1', 0), ('DilConv_3_2', 1)], normal_concat=[1, 2, 3],
normal_tv=[('Residualblocks_3_1', 0), ('Residualblocks_3_2', 1)], normal_tv_concat=[1, 2, 3],
chain_model=[('Residualblocks_3_1', 0), ('Residualblocks_3_1', 1)], chain_model_concat=[1, 2, 3],
chain_fusion=[('Residualblocks_3_1', 0), ('DilConv_3_2', 1)], chain_fusion_concat=[1, 2, 3])
fusion_mri = Genotype2(normal=[('Residualblocks_5_1', 0), ('Residualblocks_5_1', 1)],normal_concat=None)
fusion_ct = Genotype2(normal=[('Residualblocks_5_1', 0), ('SPAattention_3', 1)],normal_concat=None)
fusion_mri_pet = Genotype2(normal=[('SepConv_3_1', 0), ('Residualblocks_5_1', 1)],normal_concat=None)
fusion_pet = Genotype2(normal=[('Residualblocks_3_1', 0), ('Residualblocks_5_1', 1)],normal_concat=None)
fusion_mri_spect = Genotype2(normal=[('Residualblocks_5_1', 0), ('Denseblocks_3_1', 1)],normal_concat=None)
fusion_spect = Genotype2(normal=[('Residualblocks_3_1', 0), ('SPAattention_3', 1)],normal_concat=None)
## new architecture
fusion_ir_proposed = Genotype2(normal=[('SPAattention_3', 0), ('DilConv_3_2', 1)],normal_concat=None)
fusion_vis_proposed = Genotype2(normal=[('ECAattention_3', 0), ('SPAattention_3', 1)],normal_concat=None)
fusion_ir_Darts = Genotype2(normal=[('ECAattention_3', 0), ('ECAattention_3', 1)],normal_concat=None)
fusion_vis_Darts = Genotype2(normal=[('SPAattention_3', 0), ('SPAattention_3', 1)],normal_concat=None)
fusion_light = Genotype(normal=[('Residualblocks_3_1', 0), ('ECAattention_3', 1)], normal_concat=[1, 2, 3],
normal_tv=[('Denseblocks_5_1', 0), ('Denseblocks_5_1', 1)], normal_tv_concat=[1, 2, 3],
chain_model=[('Denseblocks_5_1', 0), ('Denseblocks_5_1', 1)], chain_model_concat=[1, 2, 3],
chain_fusion=[('Residualblocks_3_1', 0), ('Denseblocks_3_1', 1)], chain_fusion_concat=[1, 2, 3])
#########Jointly Searching
fusion_M4 = Genotype(normal=[('SPAattention_3', 0), ('DilConv_3_2', 1)], normal_concat=[1, 2, 3],
normal_tv=[('Denseblocks_5_1', 0), ('Denseblocks_5_1', 1)], normal_tv_concat=[1, 2, 3],
chain_model=[('Denseblocks_5_1', 0), ('Denseblocks_5_1', 1)], chain_model_concat=[1, 2, 3],
chain_fusion=[('SPAattention_3', 0), ('Residualblocks_5_1', 1)], chain_fusion_concat=[1, 2, 3])
fusion_ir_proposed2 = Genotype2(normal=[('Residualblocks_3_1', 0), ('SPAattention_3', 1)],normal_concat=None)
fusion_vis_proposed2 = Genotype2(normal=[('ECAattention_3', 0), ('Residualblocks_3_1', 1)],normal_concat=None)