This Docker image provides a ready-to-use environment for ConfLUNet, a deep learning model that performs instance segmentation of multiple sclerosis lesions in FLAIR MRI images, based on the nnU-Net framework.
As of 0.3.0, the image ships with a default pre-trained model (Dataset321_WMLIS, FLAIR) baked in, so you can run inference out of the box: no training, no data setup, no model download.
No nnU-Net directory structure is needed. Just point --input_dir at a folder of FLAIR images named with nnU-Net's channel suffix (e.g. sub-001_0000.nii.gz), and give an output folder:
docker run -it --gpus all --shm-size=40gb \
-v /path/to/your/flair_inputs:/input \
-v /path/to/your/outputs:/output \
petermcgor/conflunet:0.3.0 \
conflunet_predict --dataset_id 321 \
--input_dir /input --output_dir /output \
--model ConfLUNet_FLAIR_v24-12-11 --postprocessor ConfLUNet
--dataset_id 321 selects the bundled model. For CPU-only machines, omit --gpus all (inference falls back to CPU automatically; it will be slow).
The same image runs on HPC clusters without Docker:
apptainer pull conflunet_0.3.0.sif docker://petermcgor/conflunet:0.3.0
apptainer exec --nv \
--bind /path/to/inputs:/input --bind /path/to/outputs:/output \
conflunet_0.3.0.sif \
conflunet_predict --dataset_id 321 \
--input_dir /input --output_dir /output \
--model ConfLUNet_FLAIR_v24-12-11 --postprocessor ConfLUNet
Use --nv for GPU; bind any paths outside your home with --bind. The image is read-only under Apptainer, so for training point the nnUNet_* locations at writable mounted directories.
For training or inference with your own models, mount a data directory with the standard nnU-Net structure to /opt/conflunet_resources:
/path/to/your/data/
├── nnUNet_raw/ # DatasetXXX_Name/ with images (*_0000.*) and dataset.json
├── nnUNet_preprocessed/ # populated by preprocessing
└── nnUNet_results/ # populated by training
Preprocessing:
docker run -it --gpus all --shm-size=40gb \
-v /path/to/your/data:/opt/conflunet_resources \
petermcgor/conflunet:0.3.0 \
conflunet_plan_and_preprocess --dataset_id [ID] --check_dataset_integrity
Training:
docker run -it --gpus all --shm-size=40gb \
-v /path/to/your/data:/opt/conflunet_resources \
petermcgor/conflunet:0.3.0 \
conflunet_train --dataset_id [ID] --fold [FOLD] --model_name [NAME]
The bundled model lives in a separate path, so mounting your own data over /opt/conflunet_resources does not hide it; --dataset_id 321 still resolves to the baked model (a dataset of your own numbered 321 is overridden for inference, use a different id).
Full instructions: Docker instructions · ConfLUNet GitHub repository
MIT License, see the LICENSE in the GitHub repository.
Content type
Image
Digest
sha256:cdd6b6c3f…
Size
5.6 GB
Last updated
15 days ago
docker pull petermcgor/conflunet:0.3.0