Spinal Vertebrae Segmentation β€” nnUNet Model

Pre-trained nnUNetv2 model for automatic segmentation of 25 vertebrae classes (C1–C7, T1–T12, L1–L6, T13) from CT scans. Trained on the VerSe 2020 dataset using a Residual Encoder U-Net (ResEncUNet-M) architecture in 3D low-resolution configuration.

Test set performance: Mean Dice 0.729, Mean IoU 0.672 (73 cases). Outperforms general medical segmentation models on the same dataset. (specifically, TotalSegmentator with Dice 0.708).


Model Details

Property Value
Framework nnUNetv2
Configuration 3d_lowres
Planner nnUNetResEncUNetMPlans
Folds 0, 1
Input CT (NIfTI, .nii.gz)
Labels 26 classes (background + C1–C7, T1–T13, L1–L6)

Download

Option 1: Hugging Face CLI

pip install huggingface_hub
huggingface-cli download lukatman/verse-vertebrae-segmentation-nnunet --local-dir ./downloaded_model

Option 2: Git

git clone https://huggingface.co/lukatman/verse-vertebrae-segmentation-nnunet

Usage with nnUNet

1. Install nnUNetv2

pip install nnunetv2

Set environment variables:

export nnUNet_raw="/path/to/nnUNet_raw"
export nnUNet_preprocessed="/path/to/nnUNet_preprocessed"
export nnUNet_results="/path/to/nnUNet_results"

2. Place the model in nnUNet_results

The downloaded folder contains nnUNet_results/nnUNetTrainer__nnUNetResEncUNetMPlans__3d_lowres/. Copy it into your nnUNet results directory under the dataset name:

# After downloading, create the dataset folder and copy the model
mkdir -p $nnUNet_results/Dataset001_VerSe
cp -r downloaded_model/nnUNet_results/nnUNetTrainer__nnUNetResEncUNetMPlans__3d_lowres \
      $nnUNet_results/Dataset001_VerSe/

3. Run inference

nnUNetv2_predict -d 001 -c 3d_lowres -f 0 -p nnUNetResEncUNetMPlans \
    -i /path/to/input/ct/scans \
    -o /path/to/output/predictions

Use -f 1 for fold 1, or run both with -f 0 1 for ensemble.


Label Mapping

Label Vertebra
1–7 C1–C7 (cervical)
8–19 T1–T12 (thoracic)
20–25 L1–L6 (lumbar)
26 T13 (rare variant)

Project & Citation

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support