-
Notifications
You must be signed in to change notification settings - Fork 102
JSON configuration for deep learning based segmentation
JSON-format configuration files are used to specify the input data format, label maps to be exported, and various pre-processing options (including cropping, resizing, and populating image channels). Processed data may be exported to NIfTI (3D volume), NRRD (3D volume) or HDF5 (2-D slice-wise fashion or 3-D volume) format, as required by the user.
JSON outline
Sample settings (Click to expand)
Training | Inference |
---|---|
Templates: basic and advanced | View configurations for pre-trained models distributed with CERR. |
- Supported input types: scan, structure
- Supported output types: labelMap, DVF
1. scan : This field specifies scan identifiers and pre-processing parameters. Settings for multiple scans can be input as nested lists.
See supported settings
2. inputFileType : May be "DICOM" or "CERR".
3. dataSplit : This setting is used to randomly split data into training, validation, and testing (inference) sets per user-specified proportions.
Default: testing split of 100% is assumed.
"dataSplit": [0 0]
1. structure: Specify names of structures to be exported and associated numeric label.
structure": {"name": "GTV_copy"}
Model I/O related parameters.
-
modelInputFormat, modelOutputFormat : Data formats input to & output by the segmentation model. Supported options: "NRRD","NIFTI","H5"(default).
-
exportedFilePrefix : Prefix for exported H5 file names. Default: "inputFileName".
-
passedScanDim : May be "2D" (one H5 file per scan slice) or "3D" (one NIfTI/NRRD/H5 file per scan volume).
Note: (1) passedScanDim is assumed to be "3D" for NIfTI or NRRD model I/O formats.
(2) If multiple channels are specified, passedScanDim must be "2D". This produces one 3D (multi-channel) H5 file per slice.
Optional fields for inference only:
-
strNameToLabelMap: May be either (a) dictionary of output structure names and corresponding numeric labels returned by the segmentation model. Required dictionary fields are: "structureName" and "value". or (b) Name of JSON file containing the structure name-to-label dictionary, generated by the segmentation wrapper.
Syntax:
(a) "strNameToLabelMap":[{"structureName" : "structName1", "value" : 1}, {"structureName" : "structName2", "value" : 2}]"
(b) "strNameToLabelMap": "labelMapFileName.json" -
postProc: List of parameter dictionaries (one per structure) for post-processing segmentations returned by DL models.
Syntax:
"postProc" : {"Struct1": [{"method": "method1", params" : {"param1": val1}}],
"Struct2": [{"method": "method2", params" : {"param2": val2}}]}Supported methods and associated parameters are listed in the table below.
Method | Parameters | Description | Usage |
---|---|---|---|
getLargestConnComps |
numCC |
Returns 'numCC' largest connected components in structure mask. | "numCC" : n (numeric) |
getLargestOverlappingComp |
roiName |
Returns largest connected component that overlaps with selected ROI. | "roiName" : "str1" |
getSegInROI |
roiName |
Returns intersection of auto-segmented structure with selected ROI. | "roiName" : "str1" |
removeBackgroundFP |
threshold |
Removes false positive detections outside the patient's outline. "threshold" (HU) is the intensity used to separate background (air) voxels. | "threshold ": -400 |
Additionally, custom post-processing can be applied by specifying the corresponding function name and parameters through the "method" and "params" fields, respectively. Custom functions should follow the signature [outputMask3M, planC] = func_name(strNum,paramS,planC)
.
Example:
"postProc" : {"LungNodule": [{"method": "getLargestConnComps", "params" : {"numCC": 1}}]}
-
inputStrNameToLabelMap : For models requiring input label maps, structure names, associated scan identifiers and labels are specified.
Syntax:
"inputStrNameToLabelMap" :[{ "structureName" : "Str1", "value" : 1, "assocScanIdentifier": { "scan_identifier" : "value" }},
{"structureName": "Str2","value": 2, "assocScanIdentifier":{"scan_identifier":"value"}}]
- basic settings for building segmentation models
- advanced settings for building segmentation models
- sample settings for deploying segmentation models.
Configuration files for pre-trained models.