This repository contains the build information and automation script for creating the tumor_segmentation Docker image, distributed using github's container registry. This requires a personal access token (classic not fine-grained) with at least read access for packages. For more information on generating access tokens, refer to this guide.
docker login ghcr.io -u <user> -p <personal access token>
docker pull ghcr.io/mccle/tumor_segmentation:latest
The meningioma segmentation model accompanies the following manuscript:
A deep learning algorithm for fully automated volumetric measurement of meningioma burden
Mason C Cleveland, Albert E Kim, Thomas N McNeal, Maya Viera, Owen C McCall, Kevin W Lou, Jay B Patel, Dagoberto Pulido-Arias, Scott Plotkin, Jayashree Kalpathy-Cramer, Priscilla K Brastianos, Christopher P Bridge, Elizabeth R Gerstner
Neuro-Oncology Advances. 2026. https://doi.org/10.1093/noajnl/vdag137
This model has been evaluated on an internal dataset and externally assessed on the BraTS 2023 Meningioma Dataset. It represents the primary supported workflow provided by this container.
When using this model, please cite the associated manuscript.
The glioma segmentation model is included as a supplementary research model for use within this container. It has not undergone formal validation and should not be interpreted as a finalized or clinically validated model. Performance should not be assumed to be comparable to the meningioma segmentation model or to established glioma segmentation tools.
The command autosegment is provided to fully automate the process of preprocessing MRI data and deploying the meningioma or glioma segmentation models. In brief, it performs the following steps by utilizing the mr-series-selection, preprocessing, and nnunet_wrapper repositories:
- Read through the provided DICOMs, creating a series level dataset CSV and assigning anonymized subject and session identifiers
- Perform series selection based on DICOM metadata to identify T1 weighted post-contrast series
- Convert only the T1Posts to NIfTI files
- Preprocess the T1Posts for deep learning
- Use the model and preprocessed inputs to produce NIfTI segmentations
It is recommended that that volumes are mounted to all of the following paths to fully accomodate these steps:
/dicoms(strictly required)/niftis/preprocessed/predictions(strictly required)
To call on autosegment, run the following through in the CLI:
docker run --gpus all -v <DICOM input directory>:/dicoms -v <converted NIfTI directory>:/niftis -v <preprocessed NIfTI directory>:/preprocessed -v <model predictions directory>:/predictions ghcr.io/mccle/tumor_segmentation:latest autosegment
Although it is primarily automated, it is possible to perform dataset reorganization or allocate additional resources for parallel preprocessing and model inference by passing arguments to autosegment. For more information, consult autosegment -h. The container will also work without GPU, but model inference will take significantly longer.
Lastly, it is useful to note that should autosegment not accommodate a specific use case, the tumor_segmentation container will default to bash and allow the user complete control to manually intervene for any and all steps in the aforementioned process. All of the cited repositories support CLIs of their own or can be used via the Python API to complete steps with a much higher degree of control than can be provided through automation. For any additional comments or concerns, please contact mcleveland2@mgh.harvard.edu.
The convert-seg command is provided for converting segmentations from NIfTI to DICOM-SEG format. The source DICOM series is required for this conversion. For more information, consult convert-seg -h.
The predict-study command is provided for creating segmentations for a single series without the traditional dataset framework during preprocessing. A DICOM series or NIfTI file may be used for input and segmentations can be written to NIfTI or DICOM-SEG (only if using a DICOM series as input) format. Intermediate steps take place in temporary storage and are deleted when no longer required. For more information, consult predict-study -h.
The main repository source code is licensed under AGPL-3.0.
Included submodules may be distributed under separate licenses. Refer to the corresponding repositories for additional details.
Model weights are licensed separately under CC BY-NC 4.0.