# Hybrid Context Forests and Bilateral Viterbi Matching for 3D Rib Centerline Tracing in CT

arXiv: https://arxiv.org/abs/2610.16047 · HTML: https://mlsanity.com/paper/2610.16047/

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Builds on 4 of its 18 references that are in the map.
- Submitted 12 Oct 2026.

## Builds on (most cited first, 4 of 4)

- [clDice -- A Novel Topology-Preserving Loss Function for Tubular Structure Segmentation](https://mlsanity.com/paper/2003.07311/) (2020)
- [RibSeg v2: A Large-scale Benchmark for Rib Labeling and Anatomical Centerline Extraction](https://mlsanity.com/paper/2210.09309/) (2022)
- [Deep Learning Based Rib Centerline Extraction and Labeling](https://mlsanity.com/paper/1809.07082/) (2018)
- [Semantic Context Forests for Learning-Based Knee Cartilage Segmentation in 3D MR Images](https://mlsanity.com/paper/1307.2965/) (2013)

## Abstract (arXiv)

Automatic extraction and anatomical numbering (R01-R12, L01-L12) of all 24 rib centerlines in thoracic CT is essential for unfolded rib visualization, fracture detection, and surgical navigation, but remains challenging due to adjacent-bone confluence, calcified costal cartilage bridges, kyphotic pose variation, and partial visibility of terminal ribs. We present ribline, an open-source three-stage framework combining: (1) an automatically detected lung-apex and vertebral-midline coordinate frame with a kyphosis-aware azimuthal angle for point ordering along each rib; (2) a hybrid voxel detector fusing an anatomically anchored Semantic Context Forest (SCF) with a lightweight 3D U-Net; and (3) a global stage that decomposes the probability skeleton into candidate curves, assigns rib indices via a bilateral Viterbi dynamic program coupled across both hemithoraces, and refines curves via template recovery and normal-plane centering (RibSnake). On the Siemens Corporate Research 2 mm thoracic CT benchmark (47 training and 12 evaluation scans), our pipeline achieves a labeled Chamfer distance of 2.05 mm, labeled clDice of 0.886 (3 mm) and 0.945 (4 mm), 97.2% labeling accuracy (278/286 ribs), and zero false-positive curves on the evaluation split, and 3.64 mm (median 2.39 mm) with 91.8% labeling accuracy across all 59 annotated scans (1,402 ribs) in 5-fold cross-validation. Code: https://github.com/wq2012/ribline Pretrained Models: https://huggingface.co/collections/wq2012/ribline
