This module helps you to integrate the airway segmentation models to Monai label and to the Slicer.
This is the preffered way to RUN airway segmentation model using Slicer UI
- The Docker image is available on Docker Hub: Link.
- You can easily download and run it using the latest version of Docker Desktop. Please refer to the video below for a step-by-step guide.
This will allow you to run the model on the docker CLI This section outlines how to run the airway segmentation model using the Docker command line interface.
-
Download and unzip this folder, and cd into the folder
-
Execute the following command to build the docker
docker build -t airway_segmentation .- Execute this following command to run the docker
docker run -p 8000:8000 airway_segmentation- Follow steps on
Running Slicer
-
download and unzip this folder.
-
The pre-trained model for the segmentation can be downloaded from the following links
-
Upper airway segmentation (Pre-trained model): Download Here
-
Place the downloaded model inside
apps/model/ -
The name of the model file should be
pretrained_airway_segmentation.pth
-
-
Setup Monai Label (Python >=3.10)
pip install torch
pip install monailabel- Note: Lower version of python have issues with running SAM2
- After unzipping run the following commands in your conda evirnment to initialize the monai label server. Below are commands to start the airway segmentation models. Ensure that you specify the correct app and studies path according to your system.
monailabel start_server --app apps/radiology --studies datasets/ --conf models airway_segmentationThis will start the MONAI Label server locally on your PC at https://localhost:8000.
- Open the .nrrd upper airway volume file you have.
- Navigate to the MONAI Label extension. If it's not installed, please refer to the installation instructions for MONAI Label in Slicer.
- Enter 'https://localhost:8000' in the URL section and refresh to detect the MONAI Label server.
- Once detected, you should see the details filling up in the Slicer module.
- Go to the Inferencing section of the MONAI Label extension and click "Start" to begin the segmentation process.
The model may take a few minutes to run. Once the results are ready, you will see the segmentations displayed on the image.
This module consists of two custom python files located in the app folder. After installing the MONAI radiology app, you can just place these files into the app/radiology folder if you are already familiear with the Monai label.
- File 1: `apps/radiology/lib/configs/airway_segmentation.py`
- File 2: `apps/radiology/lib/infers/airway_segmentation.py`
Please cite the following papers when using the code:
- S Erattakulangara, Exploring Advanced MRI Airway Segmentation Techniques for Voice Analysis: A Comparative Study of 3DUNet, 2DUNet, 3D Transfer Learning UNet, and 3D Transformer UNet
