Skip to content

Commit

Permalink
Merge pull request #11 from ivadomed/um/baseline_ivadomed_training
Browse files Browse the repository at this point in the history
`ivadomed` configs for training lesion segmentation
  • Loading branch information
uzaymacar authored Dec 23, 2021
2 parents 0990668 + ac64912 commit feb791f
Show file tree
Hide file tree
Showing 3 changed files with 296 additions and 0 deletions.
148 changes: 148 additions & 0 deletions config/seg_lesion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"command": "train",
"gpu_ids": [0],
"path_output": "seg_lesion_output",
"model_name": "seg_lesion_model",
"debugging": true,
"object_detection_params": {
"object_detection_path": null,
"safety_factor": [1.0, 1.0, 1.0]
},
"loader_parameters": {
"path_data": ["basel-mp2rage-preprocessed/data_processed_lesionseg"],
"subject_selection": {
"n": [],
"metadata": [],
"value": []
},
"target_suffix": [["_lesion-manual", "_lesion-manual2"]],
"extensions": [],
"roi_params": {
"suffix": null,
"slice_filter_roi": null
},
"contrast_params": {
"training_validation": ["UNIT1"],
"testing": ["UNIT1"],
"balance": {}
},
"slice_filter_params": {
"filter_empty_mask": false,
"filter_empty_input": false
},
"slice_axis": "sagittal",
"multichannel": false,
"soft_gt": false
},
"split_dataset": {
"fname_split": null,
"random_seed": 42,
"center_test": [],
"method": "per_patient",
"balance": null,
"train_fraction": 0.75,
"test_fraction": 0.2
},
"training_parameters": {
"batch_size": 4,
"loss": {
"name": "DiceLoss"
},
"training_time": {
"num_epochs": 500,
"early_stopping_patience": 200,
"early_stopping_epsilon": 0.001
},
"scheduler": {
"initial_lr": 1e-3,
"lr_scheduler": {
"name": "CosineAnnealingLR",
"base_lr": 1e-5,
"max_lr": 1e-3
}
},
"balance_samples": {
"applied": false,
"type": "gt"
},
"mixup_alpha": null,
"transfer_learning": {
"retrain_model": null,
"retrain_fraction": 1.0,
"reset": true
}
},
"default_model": {
"name": "Unet",
"dropout_rate": 0.3,
"bn_momentum": 0.1,
"depth": 4,
"is_2d": false,
"final_activation": "sigmoid"
},
"uncertainty": {
"epistemic": false,
"aleatoric": false,
"n_it": 0
},
"postprocessing": {"binarize_prediction": {"thr": 0.5}},
"evaluation_parameters": {},
"transformation": {
"Resample": {
"wspace": 1.0,
"hspace": 1.0,
"dspace": 1.0
},
"CenterCrop": {
"size": [128, 64, 32]
},
"RandomReverse": {
"applied_to": ["im", "gt"],
"dataset_type": ["training"]
},
"RandomAffine": {
"degrees": 10,
"scale": [0.3, 0.3, 0.3],
"translate": [0.1, 0.1, 0.1],
"applied_to": ["im", "gt"],
"dataset_type": ["training"]
},
"ElasticTransform": {
"alpha_range": [25.0, 35.0],
"sigma_range": [3.5, 5.5],
"p": 0.5,
"applied_to": ["im", "gt"],
"dataset_type": ["training"]
},
"RandomGamma": {
"log_gamma_range": [-1.5, 1.5],
"p": 0.5,
"applied_to": ["im"],
"dataset_type": ["training"]
},
"RandomBiasField": {
"coefficients": 0.5,
"order": 3,
"p": 0.3,
"applied_to": ["im"],
"dataset_type": ["training"]
},
"RandomBlur": {
"sigma_range": [0.0, 1.0],
"p": 0.3,
"applied_to": ["im"],
"dataset_type": ["training"]
},
"NumpyToTensor": {},
"NormalizeInstance": {
"applied_to": ["im"]
}
},
"Modified3DUNet": {
"applied": true,
"length_3D": [128, 64, 32],
"stride_3D": [128, 64, 32],
"attention": false,
"n_filters": 8
}
}
74 changes: 74 additions & 0 deletions config/test_on_rater1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"command": "test",
"gpu_ids": [0],
"path_output": "seg_lesion_output",
"model_name": "seg_lesion_model",
"debugging": true,
"object_detection_params": {
"object_detection_path": null,
"safety_factor": [1.0, 1.0, 1.0]
},
"loader_parameters": {
"path_data": ["basel-mp2rage-preprocessed/data_processed_lesionseg"],
"subject_selection": {
"n": [],
"metadata": [],
"value": []
},
"target_suffix": ["_lesion-manual"],
"extensions": [],
"roi_params": {
"suffix": null,
"slice_filter_roi": null
},
"contrast_params": {
"training_validation": ["UNIT1"],
"testing": ["UNIT1"],
"balance": {}
},
"slice_filter_params": {
"filter_empty_mask": true,
"filter_empty_input": true
},
"slice_axis": "sagittal",
"multichannel": false,
"soft_gt": false
},
"split_dataset": {
"fname_split": null,
"random_seed": 42,
"center_test": [],
"method": "per_patient",
"balance": null,
"train_fraction": 0.75,
"test_fraction": 0.2
},
"uncertainty": {
"epistemic": false,
"aleatoric": false,
"n_it": 0
},
"postprocessing": {"binarize_prediction": {"thr": 0.5}},
"evaluation_parameters": {},
"transformation": {
"Resample": {
"wspace": 1.0,
"hspace": 1.0,
"dspace": 1.0
},
"CenterCrop": {
"size": [128, 64, 32]
},
"NumpyToTensor": {},
"NormalizeInstance": {
"applied_to": ["im"]
}
},
"Modified3DUNet": {
"applied": true,
"length_3D": [128, 64, 32],
"stride_3D": [128, 64, 32],
"attention": false,
"n_filters": 8
}
}
74 changes: 74 additions & 0 deletions config/test_on_rater2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"command": "test",
"gpu_ids": [0],
"path_output": "seg_lesion_output",
"model_name": "seg_lesion_model",
"debugging": true,
"object_detection_params": {
"object_detection_path": null,
"safety_factor": [1.0, 1.0, 1.0]
},
"loader_parameters": {
"path_data": ["basel-mp2rage-preprocessed/data_processed_lesionseg"],
"subject_selection": {
"n": [],
"metadata": [],
"value": []
},
"target_suffix": ["_lesion-manual2"],
"extensions": [],
"roi_params": {
"suffix": null,
"slice_filter_roi": null
},
"contrast_params": {
"training_validation": ["UNIT1"],
"testing": ["UNIT1"],
"balance": {}
},
"slice_filter_params": {
"filter_empty_mask": true,
"filter_empty_input": true
},
"slice_axis": "sagittal",
"multichannel": false,
"soft_gt": false
},
"split_dataset": {
"fname_split": null,
"random_seed": 42,
"center_test": [],
"method": "per_patient",
"balance": null,
"train_fraction": 0.75,
"test_fraction": 0.2
},
"uncertainty": {
"epistemic": false,
"aleatoric": false,
"n_it": 0
},
"postprocessing": {"binarize_prediction": {"thr": 0.5}},
"evaluation_parameters": {},
"transformation": {
"Resample": {
"wspace": 1.0,
"hspace": 1.0,
"dspace": 1.0
},
"CenterCrop": {
"size": [128, 64, 32]
},
"NumpyToTensor": {},
"NormalizeInstance": {
"applied_to": ["im"]
}
},
"Modified3DUNet": {
"applied": true,
"length_3D": [128, 64, 32],
"stride_3D": [128, 64, 32],
"attention": false,
"n_filters": 8
}
}

0 comments on commit feb791f

Please sign in to comment.