Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit c77181b

Browse files
csudrewyli
authored andcommitted
Creation of a bias field augmentation layer. Usage presented in the segmentation_bfaug application in contrib. The bias field is modelled as a linear combination of polynomial functions, exponentiated and multiplicative to the image to augment.
1 parent 7e99697 commit c77181b

File tree

5 files changed

+616
-0
lines changed

5 files changed

+616
-0
lines changed

config/default_segmentation_bf.ini

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
############################ input configuration sections
2+
[modality1]
3+
csv_file=
4+
path_to_search = ./example_volumes/monomodal_parcellation
5+
filename_contains = T1
6+
filename_not_contains =
7+
spatial_window_size = (20, 42, 42)
8+
interp_order = 3
9+
pixdim=(1.0, 1.0, 1.0)
10+
axcodes=(A, R, S)
11+
12+
[label]
13+
path_to_search = ./example_volumes/monomodal_parcellation
14+
filename_contains = Label
15+
filename_not_contains =
16+
spatial_window_size = (20, 42, 42)
17+
interp_order = 0
18+
pixdim=(1.0, 1.0, 1.0)
19+
axcodes=(A, R, S)
20+
21+
############################## system configuration sections
22+
[SYSTEM]
23+
cuda_devices = ""
24+
num_threads = 2
25+
num_gpus = 1
26+
model_dir = ./models/model_monomodal_toy
27+
28+
[NETWORK]
29+
name = toynet
30+
activation_function = prelu
31+
batch_size = 1
32+
decay = 0.1
33+
reg_type = L2
34+
35+
# volume level preprocessing
36+
volume_padding_size = 21
37+
# histogram normalisation
38+
histogram_ref_file = ./example_volumes/monomodal_parcellation/standardisation_models.txt
39+
norm_type = percentile
40+
cutoff = (0.01, 0.99)
41+
normalisation = False
42+
whitening = False
43+
normalise_foreground_only=True
44+
foreground_type = otsu_plus
45+
multimod_foreground_type = and
46+
47+
queue_length = 20
48+
49+
50+
[TRAINING]
51+
sample_per_volume = 32
52+
rotation_angle =
53+
scaling_percentage =
54+
bf_order = 3
55+
bias_field_range = (-0.5, 0.5)
56+
random_flipping_axes= 1
57+
lr = 0.01
58+
loss_type = Dice
59+
starting_iter = 0
60+
save_every_n = 100
61+
max_iter = 10
62+
max_checkpoints = 20
63+
64+
[INFERENCE]
65+
border = (0, 0, 1)
66+
#inference_iter = 10
67+
save_seg_dir = ./output/toy
68+
output_interp_order = 0
69+
spatial_window_size = (0, 0, 3)
70+
71+
############################ custom configuration sections
72+
[SEGMENTATION]
73+
image = modality1
74+
label = label
75+
output_prob = False
76+
num_classes = 160
77+
label_normalisation = True

niftynet/contrib/segmentation_bf_aug/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)