ribline-3d-unet: Lightweight 3D U-Net Tubularity Detector + 24-Rib Statistical Atlas

Official standalone Lightweight 3D U-Net (rib_unet_3d.pth) and 24-rib statistical atlas (rib_atlas.joblib) checkpoints for ribline (v0.3.0), described in Hybrid Context Forests and Bilateral Viterbi Matching for 3D Rib Centerline Tracing in CT (PDF) and part of the ribline Hugging Face Collection:

Hugging Face Repository Model Variant 12-Scan LCD (mm) 12-Scan Acc (%) 5-Fold CV LCD (mm) 5-Fold CV Acc (%)
wq2012/ribline-3d-ct-centerline Hybrid SCF + 3D U-Net + Stage 3 (Full Suite) 2.05 +/- 0.48 97.2 % 3.64 +/- 3.90 91.8 %
wq2012/ribline-anatomical-scf Anatomically Anchored SCF + Stage 3 (CPU-only) 2.88 +/- 1.32 95.1 % 5.28 +/- 4.62 86.9 %
wq2012/ribline-3d-unet Lightweight 3D U-Net + Stage 3 3.40 +/- 1.99 92.0 % 7.44 +/- 8.93 78.2 %
wq2012/ribline-scf-pass2-autocontext 2-Pass Auto-Context SCF Baseline + Stage 3 9.36 +/- 10.57 71.0 % -- --

Model Description

This repository provides the standalone 3D U-Net centerline probability detector (rib_unet_3d.pth, md5: 9e456ba9ff81c402a58436c666f152ef) together with the 24-rib statistical shape atlas (rib_atlas.joblib).

  • Architecture: Plain 3-level 3D encoder-decoder U-Net (ribline.model.unet.model.RibUNet3D) with channel widths (16, 32, 64), two Conv3d(3x3x3) -> GroupNorm(4) -> ReLU blocks per stage, MaxPool3d(2) downsampling, trilinear upsampling with skip concatenations, and a 1x1x1 sigmoid output head (339,889 trainable parameters, 1.4 MB weights).
  • Training Recipe (train_config_unet.json): Trained for 20 epochs on the 47 training volumes of the SCR 2 mm isotropic thoracic CT benchmark using 64 x 64 x 64 patches (70 % foreground-centered, 30 % uniform random), per-volume z-score normalization of raw stored intensities, 0.5 * SoftDice + 0.5 * BCE loss against a 1.5-voxel (3.0 mm) tubular ground-truth centerline mask, and Adam (lr = 1e-3, batch size 2).

Paired with Stage-3 bilateral polar dynamic programming and RibSnake refinement, the standalone 3D U-Net achieves 3.40 +/- 1.99 mm Labeled Chamfer Distance (LCD), 92.0 % symmetric labeling accuracy (263 / 286 ribs), and 100.0 % precision (0 false-positive curves) on the 12-scan evaluation set.


Included Files

File Description
rib_unet_3d.pth Trained 3D U-Net PyTorch state dictionary (339,889 parameters, epoch 20, md5: 9e456ba9ff81c402a58436c666f152ef).
train_config_unet.json Complete training hyperparameters and architecture configuration.
rib_atlas.joblib 24-rib statistical shape atlas (mean canonical curves, 5-D descriptor priors, inter-rib spacing priors).
benchmark_val12_fixed_gt.json, benchmark_val12_original_gt.json, benchmark_train47.json, benchmark_cv5.json Full per-subject evaluation reports on the 12-scan test set, 47-scan training set, and 59-scan 5-fold cross-validation.
polar_stats_all59.json, gt_fix_log.json Canonical frame verification statistics and ground-truth audit log.

Quick Start

import torch
from ribline import RibCageStatisticalAtlas
from ribline.model.unet.model import RibUNet3D

atlas = RibCageStatisticalAtlas.load("rib_atlas.joblib")
unet = RibUNet3D(in_channels=1, out_channels=1, base_filters=16)
unet.load_state_dict(torch.load("rib_unet_3d.pth", map_location="cpu"))
unet.eval()

Citation

@article{wang2026hybrid,
  title={Hybrid Context Forests and Bilateral Viterbi Matching for {3D} Rib Centerline Tracing in {CT}},
  author={Wang, Quan},
  journal={arXiv preprint arXiv:2610.16047},
  year={2026},
  url={https://arxiv.org/abs/2610.16047}
}

@inproceedings{wu2012learning,
  title={A learning based deformable template matching method for automatic rib centerline extraction and labeling in {CT} images},
  author={Wu, Dijia and Liu, David and Pusk{\'a}s, Zsolt and Lu, Caiyun and Wimmer, Andreas and Tietjen, Christian and Soza, Grzegorz and Zhou, S Kevin},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  pages={980--987},
  year={2012},
  organization={IEEE}
}

@inproceedings{wang2013semantic,
  title={Semantic context forests for learning-based knee cartilage segmentation in {3D} {MR} images},
  author={Wang, Quan and Wu, Dijia and Lu, Le and Liu, Meizhu and Boyer, Kim L and Zhou, Shaohua Kevin},
  booktitle={International MICCAI Workshop on Medical Computer Vision},
  pages={105--115},
  year={2013},
  organization={Springer}
}
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

Collection including wq2012/ribline-3d-unet

Paper for wq2012/ribline-3d-unet