-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig_gan_ves_seg.yml
217 lines (216 loc) · 4.48 KB
/
config_gan_ves_seg.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
---
General:
amp: true
device: cuda:0
task: gan-ves-seg
inference: G
model:
name: GanSegModel
model_g:
name: resnetGenerator9
model_d:
name: patchGAN70x70
model_s:
name: DynUNet
spatial_dims: 2
in_channels: 1
out_channels: 1
kernel_size: [3,3,3,3,3]
strides: [1,2,2,2,1]
upsample_kernel_size: [1,2,2,2,1]
compute_identity: false
compute_identity_seg: true
Train:
data:
real_B:
files: /ABSOLUTE/PATH/TO/REAL/OCTA/FOLDER/**/*.png
# split: Optional: /PATH/TO/YOUR/INDEX/FILE
real_A:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/CSV/FOLDER/**/*.csv
real_A_seg:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/CSV/FOLDER/**/*.csv
background:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/BACKGROUND/FOLDER/**/*.png
epochs: 100
epochs_decay: 0
save_interval: 25
batch_size: 4
lr: 0.0002
loss_dg: LSGANLoss
loss_s: DiceBCELoss
data_augmentation:
- name: LoadImaged
keys:
- real_B
- background
image_only: true
- name: ToGrayScaled
keys:
- real_B
- name: LoadGraphAndFilterByRandomRadiusd
keys:
- real_A
- real_A_seg
image_resolutions:
- [304,304] # for 304x304 images
- [1216,1216]
# - [512,512] # for 512x512 images
# - [1216,1216]
min_radius: [0,0]
max_dropout_prob: 0.02
- name: EnsureChannelFirstd
keys:
- real_A
- real_B
- real_A_seg
- background
strict_check: false
channel_dim: no_channel
- name: Resized
keys:
- background
- real_B
spatial_size:
- 304
- 304
# - 512
# - 512
mode: bilinear
- name: ScaleIntensityd
keys:
- real_A
- real_B
- real_A_seg
- background
minv: 0
maxv: 1
- name: RandFlipd
keys:
- real_A
- real_B
- real_A_seg
- background
prob: 0.5
spatial_axis:
- 0
- 1
- name: RandRotate90d
keys:
- real_A
- real_B
- real_A_seg
- background
prob: 0.75
- name: RandRotated
keys:
- real_A
- real_B
- real_A_seg
- background
prob: 1
range_x: 0.17453292519943295
padding_mode: zeros
- name: ScaleIntensityd
keys:
- real_A
- real_B
- real_A_seg
minv: 0
maxv: 1
- name: AsDiscreted
keys:
- real_A_seg
threshold: 0.1
- name: AddRandomBackgroundNoised
keys:
- real_A
- name: CastToTyped
keys:
- real_A
- real_A_seg
- real_B
dtype: dtype
post_processing:
prediction:
- name: AsDiscrete
threshold: 0.5
- name: RemoveSmallObjects
min_size: 160
label: null
Test:
batch_size: 1
data:
real_B:
files: /ABSOLUTE/PATH/TO/REAL/OCTA/FOLDER/**/*.png
real_A:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/CSV/FOLDER/**/*.csv
background:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/BACKGROUND/FOLDER/**/*.png
save_comparisons: false
data_augmentation:
- name: LoadImaged
keys:
- real_B
- background
allow_missing_keys: true
image_only: true
- allow_missing_keys: true
name: ToGrayScaled
keys:
- real_B
- name: LoadGraphAndFilterByRandomRadiusd
keys:
- real_A
image_resolutions:
- [304,304]
allow_missing_keys: true
- name: ScaleIntensityd
keys:
- real_A
- real_B
- background
allow_missing_keys: true
minv: 0
maxv: 1
- name: EnsureChannelFirstd
keys:
- real_A
- real_B
- background
allow_missing_keys: true
channel_dim: no_channel
strict_check: false
- name: Rotate90d
allow_missing_keys: true
keys:
- real_B
- background
k: 1
- name: Flipd
allow_missing_keys: true
keys:
- real_B
- background
spatial_axis: 0
- name: AddRandomBackgroundNoised
keys:
- real_A
- name: CastToTyped
keys:
- real_A
- real_B
allow_missing_keys: true
dtype: dtype
post_processing:
# Only if inference=S, else:
# prediction: null
prediction:
- name: AsDiscrete
threshold: 0.5
- name: RemoveSmallObjects
min_size: 160
label: null
Output:
save_dir: ./results/gan-ves-seg # /PATH/TO/YOUR/RESULTS/FOLDER
save_to_disk: true
save_to_tensorboard: false