-
Notifications
You must be signed in to change notification settings - Fork 5
/
config_ves_seg-S_GAN.yml
289 lines (289 loc) · 6.1 KB
/
config_ves_seg-S_GAN.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
---
General:
amp: true
device: cuda:0
task: ves-seg
model:
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]
Train:
data:
image:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/CSV/FOLDER/**/*.csv
label:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/CSV/FOLDER/**/*.csv
background:
files: /ABSOLUTE/PATH/TO/SYNTHETIC/BACKGROUND/FOLDER/**/*.png
epochs: 30
epochs_decay: 10
val_interval: 1
save_interval: 5
batch_size: 4
lr: 0.0001
loss: DiceBCELoss
AT: false
data_augmentation:
- name: LoadImaged
keys:
- background
image_only: true
- name: LoadGraphAndFilterByRandomRadiusd
keys:
- image
- label
image_resolutions:
- [304,304] # for 304x304 images
- [1216,1216]
# - [512,512] # for 512x512 images
# - [1216,1216]
# min_radius: [0,0.0033] # OCTA-500
# min_radius: [0,0.0015] # ROSE-1
min_radius: [0,0] # Giarratano (detailed)
max_dropout_prob: 0.02
- name: ScaleIntensityd
keys:
- image
- label
- background
minv: 0
maxv: 1
- name: EnsureChannelFirstd
keys:
- image
- label
- background
strict_check: false
channel_dim: no_channel
- name: Resized
keys:
- background
spatial_size:
- 304
- 304
# - 512
# - 512
mode: bilinear
- name: AddRandomBackgroundNoised
keys:
- image
delete_background: False
- name: ImageToImageTranslationd
model_path: /ABSOLUTE/PATH/TO/checkpoints/125_G_model.pth
keys:
- image
- name: Resized
keys:
- image
- label
spatial_size:
# Giarratano
# - 360
# - 360
# OCTA-500 and ROSE-1
- 1216
- 1216
mode: bilinear
- name: SpeckleBrightnesd
keys:
- image
- name: RandFlipd
keys:
- image
- label
prob: 0.5
spatial_axis:
- 0
- 1
- name: RandRotate90d
keys:
- image
- label
prob: 0.75
- name: RandRotated
keys:
- image
- label
prob: 1
range_x: 0.17453292519943295
padding_mode: zeros
# For Giarratano
# - name: RandCropOrPadd
# keys:
# - image
# - label
# prob: 1
# min_factor: 0.2965
# max_factor: 0.2965
- name: AsDiscreted
keys:
- label
threshold: 0.1
- name: CastToTyped
keys:
- image
- label
dtype: dtype
post_processing:
prediction:
- name: Activations
sigmoid: true
- name: AsDiscrete
threshold: 0.5
- name: RemoveSmallObjects
min_size: 160
label:
- name: CastToType
dtype: uint8
Validation:
batch_size: 4
data:
image:
files: /ABSOLUTE/PATH/TO/OCTA-500/images/**/*.png
# files: /ABSOLUTE/PATH/TO/ROSE-1/images/**/*.png
# files: /ABSOLUTE/PATH/TO/Giarratano/original_images/**/*.png
split: /ABSOLUTE/PATH/TO/OCTA-500/val_0.txt
# split: /ABSOLUTE/PATH/TO/ROSE-1/val_0.txt
# split: /ABSOLUTE/PATH/TO/Giarratano/val_0.txt
label:
files: /ABSOLUTE/PATH/TO/OCTA-500/segmentations/**/*.png
# files: /ABSOLUTE/PATH/TO/ROSE-1/segmentations/**/*.png
# files: /ABSOLUTE/PATH/TO/Giarratano/segmented_images/**/*.png
split: /ABSOLUTE/PATH/TO/OCTA-500/val_0.txt
# split: /ABSOLUTE/PATH/TO/ROSE-1/val_0.txt
# split: /ABSOLUTE/PATH/TO/Giarratano/val_0.txt
data_augmentation:
- name: LoadImaged
keys:
- image
- label
image_only: true
- name: ToGrayScaled
keys:
- image
- label
- name: ScaleIntensityd
keys:
- image
- label
minv: 0
maxv: 1
- name: EnsureChannelFirstd
keys:
- image
- label
strict_check: false
channel_dim: no_channel
- name: Resized
keys:
- image
- label
spatial_size:
# Giarratano
# - 360
# - 360
# OCTA-500 and ROSE-1
- 1216
- 1216
mode: bilinear
- name: Rotate90d
keys:
- image
- label
k: 1
- name: Flipd
keys:
- image
- label
spatial_axis: 0
- name: AsDiscreted
keys:
- label
threshold: 0.1
- name: CastToTyped
keys:
- image
- label
dtype: dtype
post_processing:
prediction:
- name: Activations
sigmoid: true
- name: AsDiscrete
threshold: 0.5
- name: RemoveSmallObjects
min_size: 128
label:
- name: CastToType
dtype: uint8
Test:
batch_size: 1
data:
image:
files: /ABSOLUTE/PATH/TO/OCTA-500/images/**/*.png
# files: /ABSOLUTE/PATH/TO/ROSE-1/images/**/*.png
# files: /ABSOLUTE/PATH/TO/Giarratano/original_images/**/*.png
split: /ABSOLUTE/PATH/TO/OCTA-500/val_0.txt
# split: /ABSOLUTE/PATH/TO/ROSE-1/val_0.txt
# split: /ABSOLUTE/PATH/TO/Giarratano/val_0.txt
save_comparisons: false
data_augmentation:
- name: LoadImaged
keys:
- image
image_only: true
- name: ToGrayScaled
keys:
- image
- name: ScaleIntensityd
keys:
- image
minv: 0
maxv: 1
- name: EnsureChannelFirstd
keys:
- image
strict_check: false
channel_dim: no_channel
- name: Resized
keys:
- image
spatial_size:
# Giarratano
# - 360
# - 360
# OCTA-500 and ROSE-1
- 1216
- 1216
mode: bilinear
- name: Rotate90d
keys:
- image
k: 1
- name: Flipd
keys:
- image
spatial_axis: 0
- name: CastToTyped
keys:
- image
dtype: dtype
post_processing:
prediction:
- name: Activations
sigmoid: true
- name: AsDiscrete
threshold: 0.5
- name: RemoveSmallObjects
min_size: 128
label:
- name: CastToType
dtype: uint8
Output:
save_dir: ./ves-seg-S_GAN
save_to_disk: true
save_to_tensorboard: false