ribline-anatomical-scf: Anatomically Anchored Semantic Context Forest + 24-Rib Statistical Atlas
Official standalone CPU-only Anatomically Anchored Semantic Context Forest (SCF) and 24-rib statistical atlas 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 Anatomically Anchored Semantic Context Forest (rib_forest_anatomical.joblib, 150 trees, max depth 24, 286 features) together with the 24-rib statistical shape atlas (rib_atlas.joblib).
Unlike the appearance-only Pass-1/Pass-2 forests, the Anatomically Anchored SCF operates directly in the canonical thoracic coordinate frame (u, v, w) anchored at the lung centroid:
- 28 multi-scale Gaussian differential features (
sigma = 1, 2, 4 mm: smoothed intensity, gradient magnitude, 6 second-order derivatives, Laplacian) on HU-standardized CT intensities (I_HU = I_raw - 1024). - 3 diagonal-curvature tubularity proxies (one per scale, computed from axis-aligned second derivatives without Hessian eigen-decomposition).
- 8 explicit anatomical context features: bilateral distance from the sagittal mid-plane
|u|, signed coordinates(u, v, w), Euclidean distance to the segmented lung parenchymaD_lung(x), and local bone-mask indicators. - 250 Random Shift Intensity Difference (RSID) features with offsets in
[-12, 12]voxels (+/-24 mm).
Paired with Stage-3 bilateral polar dynamic programming (BilateralViterbiLabeler) and active contour refinement (RibSnake), this purely CPU-based model requires no GPU or deep neural network at inference time and achieves 2.88 +/- 1.32 mm Labeled Chamfer Distance (LCD) and 95.1 % symmetric anatomical labeling accuracy (272 / 286 ribs) on the 12-scan SCR evaluation split (5.28 +/- 4.62 mm LCD and 86.9 % accuracy across 59 scans in 5-fold cross-validation).
Included Files
| File | Description |
|---|---|
rib_forest_anatomical.joblib |
Trained Anatomically Anchored Semantic Context Forest (150 trees, max depth 24, 286 features). |
feature_config_anatomical.json |
Deterministic RSID offset and feature extraction 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
from ribline import RibCageStatisticalAtlas, RibForest
atlas = RibCageStatisticalAtlas.load("rib_atlas.joblib")
rf_anat = RibForest.load("rib_forest_anatomical.joblib")
Citation
- Paper: https://arxiv.org/abs/2610.16047 (PDF)
@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}
}