This Docker container implements the cortical lesion segmentation approach presented in:
Gordaliza, P. M., Müller, J., Cagol, A., Molchanova, N., La Rosa, F., Tsagkas, C., Granziera, C., & Bach Cuadra, M. (2025). Fluid and White Matter Suppression Contrasts MRI Improves Deep Learning Detection of Multiple Sclerosis Cortical Lesions. Preprint, DOI: 10.1101/2025.01.19.25320792
The implementation offers an automated solution for cortical lesion segmentation using deep learning, specifically optimized for MP2RAGE and FLAWS MRI sequences. Built upon the nnU-Net framework, it provides state-of-the-art segmentation performance through an easy-to-use interface.
The segmentation model can work with three different input configurations:
Your input data must follow these guidelines:
sub-01_ses-01_T1w.nii.gz
sub-01_ses-01_FLAWS-HCO.nii.gz
sub-01_ses-01_FLAWS-MIN.nii.gz
Basic command structure:
docker run -it \
-v /path/to/your/data:/data \
--gpus device=0 \
--shm-size=40gb \
petermcgor/corles-seg-flaws-based:1.0.0 \
predict \
-i /data/input_folder \
-o /data/output_folder \
[options]
-i: Input folder containing your images-o: Output folder for segmentation results--mp2rage_suffix: Suffix for MP2RAGE images (e.g., "T1", "_0000" if you follow nnUNet format, ect.)--flaws-hco_suffix: Suffix for FLAWS-HCO images (e.g., "HCO", "_0001" if you follow nnUNet format, ect.)--flaws-min_suffix: Suffix for FLAWS-MIN images (e.g., "MIN", "_0002" if you follow nnUNet format, ect.)-f: Specify which model folds to use (default: 0 1 2 3 4)-npp: Number of preprocessing processes (default: 3)-nps: Number of segmentation processes (default: 3)--save_probabilities: Save probability maps--disable_tta: Disable test-time augmentation--verbose: Enable detailed output--disable_progress_bar: Hide progress bar--device: Choose computing device (cuda/cpu/mps)docker run -it \
-v /path/to/data:/data \
--gpus device=0 \
--shm-size=40gb \
petermcgor/corles-seg-flaws-based:1.0.0 \
predict \
-i /data/input \
-o /data/output \
--mp2rage_suffix _0000
docker run -it \
-v /path/to/data:/data \
--gpus device=0 \
--shm-size=40gb \
petermcgor/corles-seg-flaws-based:1.0.0 \
predict \
-i /data/input \
-o /data/output \
--mp2rage_suffix T1 \
--flaws-hco_suffix HCO \
--flaws-min_suffix MIN \
-npp 15 -nps 15 \
--save_probabilities
The implementation benefits from powerful computing resources to ensure optimal performance. The container requires an NVIDIA GPU with CUDA support. For optimal performance, we recommend utilizing systems with substantial RAM, as this allows you to increase the number of parallel processes (-npp and -nps parameters) to speed up processing. The default values (npp=3, nps=3) are conservative and can be increased based on your system's available memory.
This implementation builds upon the nnU-Net framework, inheriting its robust architecture while specializing in cortical lesion segmentation. While many parameters align with standard nnU-Net usage, we have made specific adaptations for our use case:
Sequence Handling: We've added specialized parameters for handling different MRI sequence combinations:
Simplified Parameters: We've streamlined the interface by removing nnU-Net parameters that aren't relevant for cortical lesion segmentation, making the tool more focused and user-friendly.
Fixed Configurations: Some nnU-Net parameters have been fixed to their optimal values for our specific use case, reducing the complexity of usage while maintaining high performance.
For users familiar with nnU-Net, most command-line parameters maintain their original functionality, though some have been preset to optimal values for cortical lesion segmentation. The main additions are the sequence-specific parameters (--mp2rage_suffix, --flaws-hco_suffix, --flaws-min_suffix) that facilitate our multi-sequence approach.
The container generates:
Common issues and solutions:
If you use this tool in your research, please cite:
Gordaliza, P. M., Müller, J., Cagol, A., Molchanova, N., La Rosa, F., Tsagkas, C., Granziera, C., & Bach Cuadra, M. (2025). Fluid and White Matter Suppression Contrasts MRI Improves Deep Learning Detection of Multiple Sclerosis Cortical Lesions, DOI: 10.1101/2025.01.19.25320792
Müller, J., La Rosa, F., Beaumont, J., Tsagkas, C., Rahmanzadeh, R., Weigel, M., Bach Cuadra, M., Gambarota, G., & Granziera, C. (2022). Fluid and White Matter Suppression: New Sensitive 3 T Magnetic Resonance Imaging Contrasts for Cortical Lesion Detection in Multiple Sclerosis, Investigative Radiology, 57(9), 592-600. DOI: 10.1097/RLI.0000000000000877
Isensee, F., Jaeger, P. F., Kohl, S. A. A., et al. (2021). nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation, Nature Methods, 18, 203-211. DOI: 10.1038/s41592-020-01008-z
[License information to be added]
For issues, questions, or contributions:
This implementation uses the nnU-Net framework and builds upon previous work in medical image segmentation.
Content type
Image
Digest
sha256:1ec530696…
Size
37 GB
Last updated
over 1 year ago
docker pull petermcgor/corles-seg-flaws-based:1.0.0