AI-driven, automated SVR reconstruction packaged as an AIDE Application, based on
the open-source
MONAI Application Package (MAP) standard.
View repo
·
Report Bug
·
Request Feature
The slice-to-volume reconstruction toolkit (SVRTK) is an image-based registration framework for reconstruction of 3D volumes from multiple 2D image slices. SVRTK is used extensively for performing motion-corrected reconstruction of MRI data.
Currently, this MAP implements SVRTK for reconstruction of 2D fetal brain MRI data into motion-corrected 3D volumes. Further MAPs for reconstruction of other fetal organs are in development and coming soon.
AIDE is an open-source platform for the deployment of AI applications in healthcare settings. This repo, created and led by Tom Roberts, packages automated 3D fetal brain MRI reconstruction into a MONAI Application Package (MAP) for execution on AIDE, and other platforms compatible with the MAP standard.
The input to the aide-svrtk MAP is multiple 2D DICOM Series, each containing multi-slice 2D MRI data. The output is a 3D MRI DICOM Series contained the motion-corrected reconstruction.
The aide-svrtk MAP consists of three operators:
dcm2nii_operator.py
– converts the input 2D MRI DICOM Series into NIfTI format required by SVRTK, using dcm2niixfetal_mri_3d_brain_recon_operator.py
– runs automated fetal brain SVRTK reconstruction, in three main steps: a. AI-driven brain masking b. Slice-to-volume registration reconstruction c. AI-driven brain reorientationnii2dcm_operator.py
– converts the SVRTK output NIfTI into a 3D DICOM Series, using nii2dcm
- GPU-enabled machine
- Docker
- Required for running the MAP
- Download
git clone https://github.com/SVRTK/aide-svrtk.git
- Setup virtual env
cd aide-svrtk
python -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- Create
input
andoutput
directories
mkdir input output
- Ensure Python venv running
- Copy DICOM Series files to
input/
directory- Standard or Enhanced DICOMs
# input - 2D multi-stack DICOM Series files
# output – 3D SVRTK-reconstructed DICOM Series
monai-deploy exec app -i input/ -o -output/
- Ensure Python venv running
- Ensure Docker running
- Copy DICOM Series files within
input/
directory
Important: we create an initial MAP map-init
upon which we build any 3rd-party non-Python software (e.g. dcm2niix).
The final MAP is called map
# Initial packaging of MAP
monai-deploy package app -t ghcr.io/svrtk/aide-svrtk/map-init:0.2.0 -r requirements.txt -l DEBUG
# Build 3rd-party software on top of MAP
docker build -t ghcr.io/svrtk/aide-svrtk/map:0.2.0 app/
# Test MAP with MONAI Deploy
monai-deploy run ghcr.io/svrtk/aide-svrtk/map:0.2.0 input/ output/
# Push initial MAP and final MAP to GHCR
docker push ghcr.io/svrtk/aide-svrtk/map-init:0.2.0
docker push ghcr.io/svrtk/aide-svrtk/map:0.2.0
Enter Docker container for testing
docker run --gpus all -it --rm -v local/path/to/aide-svrtk/input:/var/monai/input/ --entrypoint /bin/bash ghcr.io/svrtk/aide-svrtk/map:0.2.0
Run on specified GPU if machine has >1 available
CUDA_VISIBLE_DEVICES=2 monai-deploy run ghcr.io/svrtk/aide-svrtk/map:0.2.0 input/ output/
To run aide-svrtk MAP on AIDE, two files from the app/workflows
directory are required, namely:
fetal-3d-brain-mri.json
– AIDE Clinical Workflow file.- Effectively a sequence of tasks run on AIDE
fetal-brain-3d-recon-argo-template.yaml
– Argo Workflow Template file.- Called by the AIDE Clinical Workflow file. Executes the aide-svrtk MAP using Argo. This is the central task within the AIDE Clinical Workflow file.