This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### Training segmentation network with selective sampling of image windows | ||
|
||
To run this application (from NiftyNet source code root folder) | ||
with a config file (e.g., `niftynet/contrib/segmentation_selective_sampler/selective_seg.ini`) | ||
```bash | ||
python net_run.py train -a niftynet.contrib.segmentation_selective_sampler.ss_app.SelectiveSampling \ | ||
-c niftynet/contrib/segmentation_selective_sampler/selective_seg.ini | ||
``` |
80 changes: 80 additions & 0 deletions
80
niftynet/contrib/segmentation_selective_sampler/selective_seg.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
############################ input configuration sections | ||
[modality1] | ||
csv_file= | ||
path_to_search = ./example_volumes/monomodal_parcellation | ||
filename_contains = T1 | ||
filename_not_contains = | ||
spatial_window_size = (20, 42, 42) | ||
interp_order = 3 | ||
pixdim=(1.0, 1.0, 1.0) | ||
axcodes=(A, R, S) | ||
|
||
[label] | ||
path_to_search = ./example_volumes/monomodal_parcellation | ||
filename_contains = Label | ||
filename_not_contains = | ||
spatial_window_size = (20, 42, 42) | ||
interp_order = 0 | ||
pixdim=(1.0, 1.0, 1.0) | ||
axcodes=(A, R, S) | ||
|
||
############################## system configuration sections | ||
[SYSTEM] | ||
cuda_devices = "" | ||
num_threads = 2 | ||
num_gpus = 1 | ||
model_dir = ./models/model_monomodal_toy | ||
|
||
[NETWORK] | ||
name = toynet | ||
activation_function = prelu | ||
batch_size = 1 | ||
decay = 0.1 | ||
reg_type = L2 | ||
|
||
# volume level preprocessing | ||
volume_padding_size = 21 | ||
# histogram normalisation | ||
histogram_ref_file = ./example_volumes/monomodal_parcellation/standardisation_models.txt | ||
norm_type = percentile | ||
cutoff = (0.01, 0.99) | ||
normalisation = False | ||
whitening = False | ||
normalise_foreground_only=True | ||
foreground_type = otsu_plus | ||
multimod_foreground_type = and | ||
|
||
queue_length = 20 | ||
|
||
|
||
[TRAINING] | ||
sample_per_volume = 32 | ||
rotation_angle = (-10.0, 10.0) | ||
scaling_percentage = (-10.0, 10.0) | ||
random_flipping_axes= 1 | ||
lr = 0.01 | ||
loss_type = Dice | ||
starting_iter = 0 | ||
save_every_n = 100 | ||
max_iter = 10 | ||
max_checkpoints = 20 | ||
|
||
[INFERENCE] | ||
border = (0, 0, 1) | ||
#inference_iter = 10 | ||
save_seg_dir = ./output/toy | ||
output_interp_order = 0 | ||
spatial_window_size = (0, 0, 3) | ||
|
||
############################ custom configuration sections | ||
[SEGMENTATION] | ||
image = modality1 | ||
label = label | ||
output_prob = False | ||
num_classes = 160 | ||
label_normalisation = True | ||
|
||
rand_samples=0 | ||
num_min_labels=1 | ||
proba_connect=True | ||
compulsory_labels=0, 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters