AirwayNet
is a robust, end-to-end deep learning pipeline enabling fully automatic and comprehensive airway anatomical labeling at lobar, segmental, and subsegmental resolutions. To facilitate precise clinical interpretation, we further propose an anatomical signature, quantifying critical morphological airway features—including stenosis, ectasia, tortuosity, divergence, length, and complexity. Additionally, AirwayNet supports efficient automated branching pattern analysis, significantly enhancing bronchoscopic navigation planning and procedural safety.
AirwayNet was deployed and rigorously validated on a Linux workstation operating on Ubuntu 20.04. The hardware configuration includes a 12th Gen Intel® Core™ i9-12900KF CPU, 64 GB system memory, and an NVIDIA RTX 3090 GPU with 24 GB of VRAM.
- Linux: Ubuntu 20.04
AirwayNet
mainly depends on the Python scientific stack.
torch
pycuda
monai
numpy
SimpleITK
... ...
The full packages with specific version is included in requirements.txt
git clone https://github.com/EndoluminalSurgicalVision-IMR/AirMorph
cd AirMorph
Create the virtual environment with Anaconda
conda create -n airwayatlas python=3.10
conda activate airwayatlas
Install PyTorch based on your system configuration. For example:
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
Then, install the remaining dependencies:
pip install -r requirements.txt
We provide a dedicated pipeline wrapper in airwayatlas_pipeline.py
, which utilizes the sample_data
directory as the default input folder. For a quick start, simply execute the following command:
python airwayatlas_pipeline.py
This will run the pipeline, enabling users to quickly test and explore the functionality of AirwayNet.
For comprehensive guidance on utilizing the software and analyzing the output, please refer to the detailed instructions provided in Detailed_Instruction.md.
The data is provided in /sample_data
, which include the patient chest CT scan. AirwayNet processes these CT scans as input to generate binary airway models and hierarchical anatomical labels.
The dicated pipeline wrapper in airwayatlas_pipeline.py
, simply execute the following command:
python airwayatlas_pipeline.py
You will see similar log messages as follows:
(INFO) AirwayNet: Binary Airway initialized.
(INFO) AirwayNet: Multi-class Airway Anatomy initialized.
(INFO) AirwayNet: Lobe extraction complete.
(INFO) AirwayNet: Airway modeling complete.
(INFO) AirwayNet: Skeleton computation complete.
(INFO) AirwayNet: Saving complete.
(INFO) AirwayNet: Finished tree-parsing.
(INFO) AirwayNet: Finished feature extraction.
(INFO) AirwayNet: Finished inference dataset building.
(INFO) AirwayNet: Finished prediction.
Data input structure:
project_root/
├── sample_data/ # Input directory containing patient chest CT scans
│ ├── patient_01/
│ │ ├── image.nii.gz # CT scan file
After the AirwayNet processing is complete, the main results are, by default, saved in the same directory as the input data:
project_root/
├── sample_data/ # Input directory containing patient chest CT scans
│ ├── patient_01/
│ │ ├── image.nii.gz # CT scan file
│ │ ├── airway_bin.nii.gz # binary airway structure
│ │ ├── patient_01_pred_lob.nii.gz # lobar airway anatomy
│ │ ├── patient_01_pred_seg.nii.gz # segmental airway anatomy
│ │ ├── patient_01_pred_sub.nii.gz # subsegmental airway anatomy
Meanwhile, the efficient Branching Pattern Analysis can be found in branchingpattern/airwaybranchpattern_pipeline.py
. The morphological airway signatures can be found in features/airway_morph_features.py
.
These are described in detail in the Method section
with accompanying pseudocode.
AirwayNet was deployed and tested on a system with the following hardware configuration: a 12th Gen Intel® Core™ i9-12900KF CPU, 64 GB of system memory, and an NVIDIA RTX 3090 GPU with 24 GB of VRAM.
The pipeline processes relatively large 3D CT scans (with a typical volume size of approximately 700×512×512) as input and requires about 5–7 minutes per case to complete the entire process.