HUB
Sign inSign up

pulks/docker_purple_mri

By pulks

•Updated 2 days ago

High-resolution ex vivo brain MRI

Image
Machine learning & AI
Data science
0

280

pulks/docker_purple_mri repository overview

⁠purple-mri

A containerized pipeline for high-resolution postmortem human brain MRI, combining deep-learning segmentation, post-hoc topology correction, cortical surface reconstruction, and anatomical parcellation.

Source code and documentation⁠

⁠Available workflows

OptionWorkflow
exvivo_dlAdult segmentation, component cleanup, buried-sulcus removal, MTL and amygdala subfields, subcortical segmentation, and label merging.
exvivo_surfaceCortical reconstruction and atlas parcellation from the topology-corrected Purple segmentation.
exvivo_dl exvivo_surfaceRun both workflows sequentially.

exvivo_all remains available as a compatibility alias for exvivo_dl. Infant workflow options are placeholders and are not yet implemented.

⁠Download

docker pull pulks/docker_purple_mri:v1.1.0

Platform: Linux AMD64.

The image includes pretrained nnU-Net models, FreeSurfer 7.4.0, Convert3D, the custom Purple pial-placement binary, and atlas resources.

⁠Prepare your input

Place MRI files inside:

/path/to/project/data_for_inference/

Use the nnU-Net naming convention, for example:

subject_0000.nii.gz

Process left and right hemispheres in separate runs.

⁠Run segmentation and surface reconstruction

Replace the host paths below with your project directory and FreeSurfer license file.

docker run --rm --gpus all --shm-size=8g \
  -v /path/to/project:/data/exvivo \
  -v /path/to/license.txt:/license.txt:ro \
  -e FS_LICENSE=/license.txt \
  -e NO_FSFAST=1 \
  -e EXVIVO_HEMI=rh \
  -e EXVIVO_THREADS=24 \
  pulks/docker_purple_mri:v1.1.0 \
  /bin/bash /src/commands_nnunet_inference.sh \
  exvivo_dl exvivo_surface

Set EXVIVO_HEMI=lh for a left hemisphere or rh for a right hemisphere. Adjust EXVIVO_THREADS to your available CPU resources.

This command uses an NVIDIA GPU for segmentation and requires Docker GPU support on the host. FreeSurfer is included in the image; supply your own FreeSurfer license for surface processing.

⁠Run segmentation only

docker run --rm --gpus all --shm-size=8g \
  -v /path/to/project:/data/exvivo \
  pulks/docker_purple_mri:v1.1.0 \
  /bin/bash /src/commands_nnunet_inference.sh exvivo_dl

⁠Outputs

Results are written to your mounted project directory under:

data_for_inference/output_from_nnunet_inference/

Outputs include:

  • Original, component-cleaned, and topology-corrected Purple segmentations.
  • Buried-sulcus masks and intermediate model predictions.
  • MTL, amygdala, and subcortical labels, plus the final merged segmentation.
  • White and pial surfaces, cortical atlas parcellations, and morphometric statistics.
  • Processing logs and timing reports.

Intermediate NIfTI files are retained for inspection. Surface reconstruction uses the corrected Purple 10-label segmentation.

⁠Documentation and citations

See the purple-mri GitHub repository⁠ and Read the Docs documentation⁠ for input preparation, individual model options, pipeline details, and citation information.

Tag summary

Content type

Image

Digest

sha256:e39b799b3…

Size

18.8 GB

Last updated

2 days ago

docker pull pulks/docker_purple_mri:v1.2.1