lesion_ms_mp2rage¶
MS lesion segmentation on cropped MP2RAGE data
This segmentation model for multiple sclerosis lesion segmentation on cropped MP2RAGE-UNIT1 spinal cord data. Uses a 3D U-Net, trained with the nnUNetV2 framework. It is a single-class model outputting binary MS lesions segmentations. Training consisted of MP2RAGE data on UNIT1 contrast at 1.0 mm3 isotropic (322 subjects from 3 sites: National Institutes of Health, Bethesda, USA, University Hospital Basel and University of Basel, Basel, Switzerland and Center for Magnetic Resonance in Biology and Medicine, CRMBM-CEMEREM, UMR 7339, CNRS, Aix-Marseille University, Marseille, France). To crop the data you can first segment the spinal cord using the contrast agnostic model. This could be done using: “sct_deepseg spinalcord -i IMAGE -o IMAGE_sc”, then crop the image with 30 mm of dilation on axial orientation around the spinal cord. This could be done using: “sct_crop_image -i IMAGE -m IMAGE_sc -dilate 30x30x5”. Note that 30 is only for 1mm isotropic resolution, for images with another resolution divide 30/your_axial_resolution.
Reference¶
@inproceedings{laines2024automatic,
author={Laines Medina, N. and Mchinda, S. and Testud, B. and Demorti{\`e}re, S. and Chen, M. and Granziera, G. and Reich, D. and Tsagkas, C. and Cohen-Adad,
J. and Callot, V.},
title={Automatic Multiple Sclerosis Lesion Segmentation in the Spinal Cord on 3T and 7T MP2RAGE Images},
booktitle={Proceedings of the 40th Annual Scientific Meeting of the ESMRMB},
year={2024},
address={Barcelona, Spain},
pages={171}
}
Project URL: https://github.com/ivadomed/model_seg_ms_mp2rage
usage: sct_deepseg lesion_ms_mp2rage [-i <file> [<file> ...]] [-o <str>]
[-install]
[-custom-url CUSTOM_URL [CUSTOM_URL ...]]
[-largest {0,1}] [-fill-holes {0,1}]
[-remove-small REMOVE_SMALL [REMOVE_SMALL ...]]
[-qc <folder>] [-qc-dataset <str>]
[-qc-subject <str>] [-qc-plane <str>]
[-qc-seg <file>] [-h] [-v <int>] [-r {0,1}]
[-test-time-aug]
INPUT/OUTPUT¶
- -i
Image filename(s) to segment. If segmenting multiple files, separate filenames with a space.
Note: For
lesion_ms_mp2rage, the input data must be cropped around the spinal cord. (To crop the data you can first segment the spinal cord using the contrast agnostic model. This could be done using: “sct_deepseg spinalcord -i IMAGE -o IMAGE_sc”, then crop the image with 30 mm of dilation on axial orientation around the spinal cord. This could be done using: “sct_crop_image -i IMAGE -m IMAGE_sc -dilate 30x30x5”. Note that 30 is only for 1mm isotropic resolution, for images with another resolution divide 30/your_axial_resolution.)- -o
Output file name. The chosen filename will be used as a base name, and model-specific suffixes will be added to the end depending on the type of output (e.g. ‘_cord.nii.gz’, ‘_gm.nii.gz’, etc.).
TASKS¶
- -install
Install models that are required for specified task.
Default:
False- -custom-url
URL(s) pointing to the
.zipasset for a model release. This option can be used with-installto install a specific version of a model. To use this option, navigate to the ‘Releases’ page of the model, find release you wish to install, and right-click + copy the URL of the.ziplisted under ‘Assets’. Example:sct_deepseg lesion_ms_mp2rage -install -custom-url CUSTOM_URLsct_deepseg lesion_ms_mp2rage -i t2.nii.gz
PARAMETERS¶
- -largest
Possible choices: 0, 1
Keep the largest connected object from each output segmentation; if not set, all objects are kept.
Default:
0- -fill-holes
Possible choices: 0, 1
If set, small holes in the segmentation will be filled in automatically.
Default:
0- -remove-small
Minimal object size to keep with unit (mm3 or vox). A single value can be provided or one value per prediction class. Single value example: 1mm3, 5vox. Multiple values example: 10 20 10vox (remove objects smaller than 10 voxels for class 1 and 3, and smaller than 20 voxels for class 2).
- -test-time-aug
Perform test-time augmentation (TTA) by flipping the input image along all axes and averaging the resulting predictions. Note: The time it takes to run the model will increase due to the additional predictions.
Default:
False
MISC ARGUMENTS¶
- -qc
The path where the quality control generated content will be saved.
- -qc-dataset
If provided, this string will be mentioned in the QC report as the dataset the process was run on.
- -qc-subject
If provided, this string will be mentioned in the QC report as the subject the process was run on.
- -qc-plane
Possible choices: Axial, Sagittal
Plane of the output QC. If Sagittal, it is highly recommended to provide the
-qc-segoption, as it will ensure the output QC is cropped to a reasonable field of view.Default:
'Axial'- -qc-seg
Segmentation file to use for cropping the QC. This option is useful when you want to QC a region that is different from the output segmentation. For example, it might be useful to provide a dilated cord segmentation to expand the QC field of view.
If
-qc-segis not provided, the default behavior will depend on the value of-qc-plane:‘Axial’: Without ‘-qc-seg’, a sensible crop radius between 15-40 vox will be automatically used, depending on the resolution and segmentation type.
‘Sagittal’: Without ‘-qc-seg’, the full image will be displayed by default. (For very large images, this may cause a crash, so using
-qc-segis highly recommended.)
- -v
Possible choices: 0, 1, 2
Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode.
Default:
1- -r
Possible choices: 0, 1
Remove temporary files.
Default:
1