Semantic Context Forests for Learning-Based Knee Cartilage Segmentation in 3D MR Images
Organizations: Siemens Corporate Research, Princeton, NJ 08540, USA · Rensselaer Polytechnic Institute, Troy, NY 12180, USA
Abstract
The automatic segmentation of human knee cartilage from 3D MR images is a useful yet challenging task due to the thin sheet structure of the cartilage with diffuse boundaries and inhomogeneous intensities. In this paper, we present an iterative multi-class learning method to segment the femoral, tibial and patellar cartilage simultaneously, which effectively exploits the spatial contextual constraints between bone and cartilage, and also between different cartilages. First, based on the fact that the cartilage grows in only certain area of the corresponding bone surface, we extract the distance features of not only to the surface of the bone, but more informatively, to the densely registered anatomical landmarks on the bone surface. Second, we introduce a set of iterative discriminative classifiers that at each iteration, probability comparison features are constructed from the class confidence maps derived by previously learned classifiers. These features automatically embed the semantic context information between different cartilages of interest. Validated on a total of 176 volumes from the Osteoarthritis Initiative (OAI) dataset, the proposed approach demonstrates high robustness and accuracy of segmentation in comparison with existing state-of-the-art MR cartilage segmentation methods. Code: https://github.com/wq2012/kneeseg Pretrained Models: https://huggingface.co/collections/wq2012/knee-mri-segmentation
Figures & tables
| Femur DSC (%) | Tibia DSC (%) | Patella DSC (%) | |
|---|---|---|---|
| Before RW | |||
| After RW |
| Fem. Cart. DSC | Tib. Cart. DSC | Pat. Cart. DSC | |||||
| Author | Dataset | Mean | Std. | Mean | Std. | Mean | Std. |
| Shan [ 16 ] | 18 SPGR images | 78.2% | 5.2% | 82.6% | 3.8% | – | – |
| Folkesson [ 5 ] | 139 Esaote C-Span images | 77% | 8.0% | 81% | 6.0% | – | – |
| Fripp [ 6 ] | 20 FS SPGR images | 84.8% | 7.6% | 82.6% | 8.3% | 83.3% | 13.5% |
| Lee [ 9 ] | 10 images in OAI | 82.5% | – | 80.8% | – | 82.1% | – |
| Yin [ 21 ] | 60 images in OAI | 84% | 4% | 80% | 4% | 80% | 4% |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Resource | Location / Details |
|---|---|
| GitHub Repository | https://github.com/wq2012/kneeseg |
| PyPI Package | kneeseg (v0.2.5) — https://pypi.org/project/kneeseg/ |
| HF Model Collection | https://huggingface.co/collections/wq2012/knee-mri-segmentation |
| License | MIT License (source code and all five Hugging Face pretrained models) |
| Core Dependencies | numpy , scipy , scikit-learn , scikit-image , SimpleITK , ml_dtypes , pycpd , joblib , threadpoolctl , tqdm , jsonschema |
| Pipeline Stage | Original 2013 Paper (Siemens C++) | Open-Source kneeseg (Python v0.2.5) |
|---|---|---|
| Bone Segmentation (Section 2 ) | 3-step mesh pipeline: Marginal Space Learning (MSL) pose estimation , Active Shape Model (ASM) mesh deformation with Coherent Point Drift (CPD) correspondences, and 3D Random Walks (RW) refinement. | Self-contained 2-Pass Physical-Space Auto-Context Forest ( bone_rf_p1 , bone_rf_p2 ) + Binary Subchondral Articular Surface Refiner ( RefBone V2 , blended with RefBone V1 on SKI10) with 1D cortical enclosure rays, 3D bone atlases, Patellofemoral Specialist, and shaft hole-filling cleanup. Standalone CPD and 3D RW modules also included. |
| Bone Distance Features ( – , Section 3 ) | Signed Euclidean distances to refined bone meshes and sum/difference combinations , . | Exact physical-millimeter Signed Maurer Distance Transforms ( SimpleITK ) and linear combinations , computed directly from predicted 3D bone masks. |
| Anatomical Localization ( , Section 3 ) | Euclidean distances to densely registered CPD bone mesh points . | Deterministic quantile-based 18 articular surface landmarks per bone ( condylar/plateau grids) + multi-resolution 4D Articular Coordinate Probabilistic Atlases (8 tables on SKI10, 11 on OAI) built via Leave-One-Out (LOO) cross-validation. |
| Appearance & Context Features ( ) | Raw intensity , gradient magnitude , and voxel-offset Random Shift Intensity Differences (RSID) . | ROI interquartile ( ) normalized intensity, multi-scale physical-mm Gaussian, gradient, Laplacian, and structure-tensor features, physical-mm RSID, and 1D surface-normal ray profiles ( ) along . |
| Iterative Semantic Context Forests ( – , Section 3 ) | 2-pass custom C++ Random Forest (60 trees, depth 18, 1000 node candidates). Pass 2 extracts class probabilities and RSPD features from in-sample Pass-1 predictions. | 4-Class Compartment-Specialist Ensemble ( ExtraTrees + HistGradientBoosting ) predicting { Background , Subchondral Bone/Meniscus , Target Cart. , Opposing Cart. }. Pass-2 RSPD and normal-ray probability profiles are trained via 4-fold Out-Of-Fold (OOF) stacking. |
| Post-Processing (Section 3 ) | Multi-label Graph Cuts energy minimization . | 4-fold OOF Stage-3 Subchondral Boundary Refiner (multi-family 103–167 features on SKI10; 101-feature specialist on OAI) + OOF Ridge Threshold & Bone-Penalty Calibrator + physical-space Gaussian smoothing + contact resolution and component filtering. |
| Module Path | Description |
|---|---|
| kneeseg/bone_rf.py | BoneClassifier implementing the 2-pass physical-space bone auto-context forest and binary RefBone V1 / V2 subchondral surface refiner for SKI10. |
| kneeseg/cartilage_v6.py | 8-table 4D Articular Coordinate Probabilistic Atlases, 4-class femorotibial cartilage ensembles, multi-family (103–167 feature) Stage-3 boundary refiner, and OOF Ridge calibrator. |
| kneeseg/rf_seg.py | CartilageClassifier orchestrating 2-pass iterative semantic context cartilage training and inference across SKI10, OAI, and unified models. |
| kneeseg/oai_subchondral_atlas.py | 6-structure subchondral atlas pipeline for OAI, Patellofemoral Specialist, C/Fortran layout standardization, and unified SKI10+OAI domain router. |
| kneeseg/features.py | Base intensity ( ), gradient magnitude ( ), signed Maurer distance transforms ( – ), landmark distances ( ), RSID ( ), and RSPD ( – ) extractors. |
| kneeseg/io.py | 3D medical volume I/O ( load_volume , save_volume , OAIImageReader ) for MetaImage ( .mhd / .raw ), NIfTI, and OAI ( .hdr / .img ) formats. |
| Hugging Face Model ID | Architecture | Train Set | Size | Target Structures & Domain |
|---|---|---|---|---|
| wq2012/knee_3d_mri_segmentation_SKI10_subchondral_atlas | Subchondral Atlas + Stage-3 OOF | 80 SKI10 | 1.56 GB | 4 labels (Femur, Tibia, Fem. Cart., Tib. Cart.) on high-res SKI10 ( ). |
| wq2012/knee_3d_mri_segmentation_OAI_downsampled_subchondral_atlas | Subchondral Atlas + RefBone V2 | 128 OAI | 1.33 GB | 6 labels (Femur, Tibia, Patella, Fem., Tib., and Pat. Cart.) on isotropic OAI ( ). |
| wq2012/knee_3d_mri_segmentation_SKI10_OAI_subchondral_atlas | Unified Dual-Domain Cascade | 80 SKI10 + 128 OAI | 2.93 GB | Unified 4-label SKI10 and 6-label OAI segmentation with automatic domain routing and 208-scan atlas regularization. |
| wq2012/knee_3d_mri_segmentation_SKI10 | Baseline v1 Cascade | 100 SKI10 | 5.67 GB | 4 labels on SKI10 (initial baseline without 4D articular atlases or OOF stacking). |
| wq2012/knee_3d_mri_segmentation_OAI_downsampled | Baseline v1 Cascade | 128 OAI | 6.44 GB | 6 labels on downsampled OAI (initial baseline prior to layout standardization and 4D atlases). |
| Model Architecture / Checkpoint ( wq2012/* ) | Femur | Tibia | Fem. Cart. | Tib. Cart. | Overall Mean |
|---|---|---|---|---|---|
| Baseline v1 Architecture ( ..._SKI10 , 80/20 split) | |||||
| ..._SKI10_subchondral_atlas | |||||
| ..._SKI10_OAI_subchondral_atlas |
| Method / Pretrained Model | Femur | Tibia | Patella | Fem. Cart. | Tib. Cart. | Pat. Cart. |
| Original Paper (Before RW, ) | — | — | — | |||
| Original Paper (Full Pipeline, ) | ||||||
| ..._OAI_downsampled (Baseline v1, ) | ||||||
| ..._OAI_downsampled_subchondral_atlas ( all) | ||||||
| Seen-subject companion visits ( , ) | ||||||
| Strictly unseen subjects ( , ) |
Medical Image Segmentation
Medical image segmentation delineates organs, lesions, and other structures in scans to support measurement, diagnosis, treatment planning, and research.
See all 788 papers