-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathconfig_segmentation_metrics_brats_default.yaml
More file actions
165 lines (161 loc) · 6.7 KB
/
Copy pathconfig_segmentation_metrics_brats_default.yaml
File metadata and controls
165 lines (161 loc) · 6.7 KB
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
# Choose the segmentation model here
# options: unet, resunet, fcn
version:
{
minimum: 0.1.6-dev,
maximum: 0.1.6-dev
}
model:
{
dimension: 3, # the dimension of the model and dataset: defines dimensionality of computations
base_filters: 32, # Set base filters: number of filters present in the initial module of the U-Net convolution; for IncU-Net, keep this divisible by 4
architecture: resunet, # options: unet, resunet, fcn, uinc
final_layer: sigmoid, # can be either sigmoid, softmax or none (none == regression)
norm_type: instance, # can be either batch or instance
class_list: [0, 255], # Set the list of labels the model should train on and predict
amp: False, # Set if you want to use Automatic Mixed Precision for your operations or not - options: True, False
# n_channels: 3, # set the input channels - useful when reading RGB or images that have vectored pixel types
}
metrics:
- dice
- precision
- iou
- f1
- recall: { average: macro }
problem_type: segmentation_brats
verbose: True
inference_mechanism: { grid_aggregator_overlap: average, patch_overlap: 0 }
modality: rad
# Patch size during training - 2D patch for breast images since third dimension is not patched
patch_size: [32, 32, 32]
# Number of epochs
num_epochs: 1
patience: 1
# Set the batch size
batch_size: 1
# Set the initial learning rate
learning_rate: 0.001
# Set the learning rate scheduler i.e. the way the initial learning rate must be updated while the training progresses
# Options: steplr, exponentiallr, cosineannealinglr, reducelronplateau, cycliclr
scheduler: triangle
# Set which loss function you want to use - options : 'dc' - for dice only, 'dcce' - for sum of dice and CE and you can guess the next (only lower-case please)
# options: dc (dice only), ce (), dcce (sume of dice and ce), mse (), ...
loss_function: dc
weighted_loss: True
# Which optimizer do you want to use - adam/sgd
optimizer: adam
# the value of 'k' for cross-validation, this is the percentage of total training data to use as validation;
# randomized split is performed using sklearn's KFold method
# for single fold run, use '-' before the fold number
nested_training: {
testing: -5, # this controls the holdout data splits for final model evaluation; use '1' if this is to be disabled
validation: -5, # this controls the validation data splits for model training
}
# various data augmentation techniques
# options: affine, elastic, downsample, motion, ghosting, bias, blur, gaussianNoise, swap
# keep/edit as needed
# all transforms: https://torchio.readthedocs.io/transforms/transforms.html?highlight=transforms
data_augmentation: {}
# 'spatial':{
# 'probability': 0.5
# },
# 'kspace':{
# 'probability': 0.5
# },
# 'bias':{
# 'probability': 0.5
# },
# 'blur':{
# 'probability': 0.5
# },
# 'noise':{
# 'probability': 0.5
# },
# 'swap':{
# 'probability': 0.5
# }
data_preprocessing: {
# 'threshold':{
# 'min': 10,
# 'max': 75
# },
# 'clip':{
# 'min': 10,
# 'max': 75
# },
"normalize",
# 'resample':{
# 'resolution': [1,2,3]
# },
#'resize': [128,128], # this is generally not recommended, as it changes image properties in unexpected ways
}
# data postprocessing node
data_postprocessing: {}
# 'largest_component',
# 'hole_filling'
# parallel training on HPC - here goes the command to prepend to send to a high performance computing
# cluster for parallel computing during multi-fold training
# not used for single fold training
# this gets passed before the training_loop, so ensure enough memory is provided along with other parameters
# that your HPC would expect
# ${outputDir} will be changed to the outputDir you pass in CLI + '/${fold_number}'
#parallel_compute_command: <insert parallel command here>
q_max_length: 1
q_samples_per_volume: 1
q_num_workers: 0
panoptica_config: !Panoptica_Evaluator
decision_metric: null
decision_threshold: null
edge_case_handler: !EdgeCaseHandler
empty_list_std: !EdgeCaseResult NAN
listmetric_zeroTP_handling:
!Metric DSC: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult ZERO,
empty_reference_result: !EdgeCaseResult ZERO, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult ZERO}
!Metric clDSC: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult ZERO,
empty_reference_result: !EdgeCaseResult ZERO, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult ZERO}
!Metric IOU: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult ZERO,
empty_reference_result: !EdgeCaseResult ZERO, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult ZERO}
!Metric NSD: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult INF,
empty_reference_result: !EdgeCaseResult INF, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult INF}
!Metric HD95: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult INF,
empty_reference_result: !EdgeCaseResult INF, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult INF}
!Metric RVD: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult NAN,
empty_reference_result: !EdgeCaseResult NAN, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult NAN}
!Metric RVAE: !MetricZeroTPEdgeCaseHandling {empty_prediction_result: !EdgeCaseResult NAN,
empty_reference_result: !EdgeCaseResult NAN, no_instances_result: !EdgeCaseResult NAN,
normal: !EdgeCaseResult NAN}
expected_input: !InputType SEMANTIC
global_metrics: [!Metric DSC]
instance_approximator: !ConnectedComponentsInstanceApproximator {cca_backend: null}
instance_matcher: !NaiveThresholdMatching {allow_many_to_one: false, matching_metric: !Metric IOU,
matching_threshold: 0.5}
instance_metrics: [!Metric DSC, !Metric IOU, !Metric RVD, !Metric NSD, !Metric HD95]
log_times: false
save_group_times: false
segmentation_class_groups: !SegmentationClassGroups
groups:
snfh: !LabelGroup
single_instance: false
value_labels: [2]
et: !LabelGroup
single_instance: false
value_labels: [3]
netc: !LabelGroup
single_instance: false
value_labels: [1]
rc: !LabelGroup
single_instance: false
value_labels: [4]
tc: !LabelMergeGroup
single_instance: false
value_labels: [1, 3, 4]
wt: !LabelMergeGroup
single_instance: false
value_labels: [1, 2, 3, 4]
verbose: false