Skip to content

Latest commit

 

History

History
175 lines (133 loc) · 8.71 KB

README.md

File metadata and controls

175 lines (133 loc) · 8.71 KB

Automated Neurofibroma Segmentation Pipeline

Official Implementation of: Anatomy-Informed Deep Learning and Radiomics for Automated Neurofibroma Segmentation in Whole-Body MRI.

Authors: Georgii Kolokolnikov, Marie-Lena Schmallhofer, Lennart Well, Said Farschtschi, Victor-Felix Mautner, Inka Ristow, and René Werner.


Overview

Motivation

  • Neurofibromatosis Type 1 (NF1) is a genetic disorder characterized by neurofibromas. Accurate segmentation in WB-MRI scans is crucial for NF1 patient management, but manual methods are time-consuming and variable. Additionally, existing fully-automated approaches have shown limited success, especially in handling the diverse morphology and anatomical distribution of neurofibromas (NFs) across body regions​.

  • This project presents an automated anatomy-informed pipeline for NF segmentation in T2-weighted fat-suppressed WB-MRI. Inspired by the Radiology Sample App from MONAI Label, the pipeline integrates seamlessly with 3D Slicer, enabling enhanced usability and potential for future extension.

  • The provided code sets up a backend MONAI Label server that performs segmentation logic. It is recommended to be run on a cluster or a dedicated GPU-equipped machine. 3D Slicer can be used on a client side to get access to the backend MONAI Label server.

  • The proposed automated anatomy-informed pipeline for NF segmentation is depicted below:

Pipeline Diagram

Functionality

🎬 Click here to watch a video demonstration of the NF segmentation pipeline.

The pipeline offers multiple modes:

  • Single-Stage NF Segmentation: Fast segmentation with a single 3D anisotropic U-Net.

  • Multi-Stage NF Segmentation: Anatomy-informed segmentation with an ensemble of 3D anisotropic U-Nets.

    Stages of the pipeline (Click to Expand)
    1. Anatomy Segmentation: Performed using MRSegmentator, which segments anatomical structures and generates a mask. The mask is processed, including addition of a high-risk zone for NF occurrence around the lungs and spine.

    2. Ensemble of 3D Anisotropic Anatomy-Informed U-Nets: Uses anatomical context to enhance segmentation accuracy across distinct anatomical regions.

    3. Confidence Thresholding: A default threshold of 0.5 is applied to the segmentation results, balancing sensitivity and specificity.

  • Post-Processing Modes:

    • Low / Medium / High Confidence Filtering: Applies a threshold of 0.25, 0.5, or 0.75 to the predicted segmentation probability mask.
    • Tumor Candidate Classification: Uses radiomic features to classify each tumor candidate defined via connected component analysis.
  • Anatomy Segmentation: Segments anatomical structures using MRSegmentator, and identifies a high-risk zone around the lungs and spine where NFs are most likely to occur.


Installation

Requirements

Setup

Server-Side

  1. Clone repository and set up environment:

    git clone https://github.com/IPMI-ICNS-UKE/NFSegmentationPipeline.git
    conda env create -f environment.yml -n nf_segmentation_pipeline
  2. Download and set up model weights (Zenodo):

    cd NFSegmentationPipeline/nf_segmentation_app/
    wget https://zenodo.org/record/14035133/files/model.zip
    unzip model.zip && rm model.zip

Client-Side

  1. Install 3D Slicer.
  2. Install the MONAI Label Plugin in 3D Slicer following these instructions.

Usage

Server-side
  1. Activate environment:
    conda activate nf_segmentation_pipeline
  2. Launch MONAI Label Server:
    bash launch_nf_segmentation_server.sh
  3. Configurable pipeline options in launch_nf_segmentation_server.sh:
    • GPU selection: CUDA_VISIBLE_DEVICES=0.
    • Sliding window batch size: --conf batch_size 2.
    • Resample in 2D: --conf resample_only_in_2d True
    • Port: --port 8000.

Click here for more MONAI Label command-line options.

Client-side
  1. Launch 3D Slicer and connect to the MONAI Label server.

    Expand for visual instructions

    step_1

  2. Upload MRI data to the MONAI Label server.

    Expand for visual instructions

    step_2

  3. Select NF segmentation mode (Single-Stage or Multi-Stage).

    Expand for visual instructions

    step_3_1

    Expand to see an example of the NF segmentation

    step_3_2

  4. Apply post-processing (confidence filtering or tumor candidate classification).

    Expand for visual comparison of post-processing effects

    Low Confidence Filtering Medium Confidence Filtering High Confidence Filtering Tumor Candidate Classification
    Low Confidence Medium Confidence High Confidence Tumor Candidate Classification
  5. Optional: Apply Anatomy Segmentation to generate and show an anatomy segmentation mask.

    Expand to see an example of the processed anatomy segmentation

    step_5

  6. Optional: Use Segment Editor for manual adjustments. Learn more about Segment Editor.

    Expand for visual instructions

    step_6

  7. Submit the final version of the segmentation mask to the MONAI Label server.

    Expand for visual instructions

    step_7

  8. Save the final version of the segmentation mask to the local machine.

    Expand for visual instructions

    step_8


Tested Configuration

Data: Highly anisotropic T2-weighted fat-suppressed coronal WB-MRI (1.5T, 3T) with voxel spacing of 0.625 mm x 0.625 mm x 7.8 mm in NIFTI format acquired with:

  • Siemens Magnetom (Siemens Healthineers, Erlangen, Germany)
  • Philips Ingenia (Best, The Netherlands)

Hardware:

  • Machine 1: 64-bit Ubuntu 22.04.5 LTS with an AMD Ryzen Threadripper Pro 3975WX CPU and an NVIDIA RTX A6000 GPU
  • Machine 2: 64-bit Ubuntu 22.04.4 LTS with an AMD Ryzen 9 7950X3D CPU and an NVIDIA GeForce RTX 4090 GPU

Approximate Inference Times on the Machine 2 with batch size = 2:

  • Single-Stage NF Segmentation: 10 seconds
  • Multi-Stage NF Segmentation (with Anatomy): 60 seconds
  • Post-Processing (Low/Medium/High Confidence Filter): 1 second
  • Tumor Candidate Classification (Needs Anatomy): ~120 seconds per patient with approximately 600 tumor candidates
  • Anatomy Segmentation: 40 seconds

Contact

For questions, feedback, or collaboration inquiries, please contact:

For technical issues or feature requests, please open an issue in this repository’s Issues section.