Add model card with performance metrics and usage example
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- bone-age
|
| 5 |
+
- medical-imaging
|
| 6 |
+
- tanner-whitehouse-2
|
| 7 |
+
- efficientnet-b3
|
| 8 |
+
- multi-task-learning
|
| 9 |
+
- pediatric-radiology
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# BoneAgeTW2 — EfficientNet-B3 Multi-Head TW2 Stage Classifier
|
| 15 |
+
|
| 16 |
+
**Paper:** [arXiv:2607.23224](https://arxiv.org/abs/2607.23224)
|
| 17 |
+
**Code:** [github.com/jmmana/BoneAgeTW2](https://github.com/jmmana/BoneAgeTW2)
|
| 18 |
+
**Author:** Juan Manuel Castillo Pinto — Universidad de La Salle, Bogotá
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## What is this?
|
| 23 |
+
|
| 24 |
+
A PyTorch checkpoint of the stage classifier from **BoneAgeTW2**, an end-to-end deep learning
|
| 25 |
+
system for automated **Tanner-Whitehouse 2 (TW2)** skeletal maturation assessment.
|
| 26 |
+
|
| 27 |
+
The model uses a shared **EfficientNet-B3** backbone with **20 independent classification heads**
|
| 28 |
+
(one per TW2 bone site) to simultaneously predict the maturation stage of each bone in a
|
| 29 |
+
hand radiograph.
|
| 30 |
+
|
| 31 |
+
## Model Performance (Validation, n=1,262 — RSNA Bone Age Dataset)
|
| 32 |
+
|
| 33 |
+
| Metric | Value |
|
| 34 |
+
|---|---|
|
| 35 |
+
| Mean exact accuracy (all 20 bones) | **65.82%** |
|
| 36 |
+
| Mean within-1 accuracy (all 20 bones) | **96.77%** |
|
| 37 |
+
| End-to-end MAE (RUS pathway) | **14.71 months** |
|
| 38 |
+
| Carpal bones exact accuracy | 65.1–84.4% |
|
| 39 |
+
| RUS long bones exact accuracy | 56.7–66.8% |
|
| 40 |
+
|
| 41 |
+
The within-1 accuracy of 96.77% falls within the human radiologist inter-rater range (King et al., 1994).
|
| 42 |
+
|
| 43 |
+
## Checkpoint
|
| 44 |
+
|
| 45 |
+
| File | Size | Epochs | Loss |
|
| 46 |
+
|---|---|---|---|
|
| 47 |
+
| `models/stage_classifier_epoch2.pt` | 72 MB | 2 | 0.9477 |
|
| 48 |
+
|
| 49 |
+
## Loading the Model
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
import torch, timm
|
| 53 |
+
from huggingface_hub import hf_hub_download
|
| 54 |
+
|
| 55 |
+
# Download
|
| 56 |
+
ckpt_path = hf_hub_download("maktub83/BoneAgeTW2", "models/stage_classifier_epoch2.pt")
|
| 57 |
+
checkpoint = torch.load(ckpt_path, map_location="cpu")
|
| 58 |
+
|
| 59 |
+
# Rebuild backbone
|
| 60 |
+
backbone = timm.create_model("efficientnet_b3", pretrained=False, num_classes=0)
|
| 61 |
+
backbone.load_state_dict(checkpoint["backbone"])
|
| 62 |
+
backbone.eval()
|
| 63 |
+
|
| 64 |
+
# feat_dim = 1536
|
| 65 |
+
feat_dim = checkpoint["feat_dim"]
|
| 66 |
+
|
| 67 |
+
# Each head: Linear(feat_dim, n_stages)
|
| 68 |
+
# See github.com/jmmana/BoneAgeTW2/training/04_train_stage_classifier.py
|
| 69 |
+
# for build_model() and BONE_NAMES
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## TW2 Bones (20 heads)
|
| 73 |
+
|
| 74 |
+
**RUS (13):** radius, ulna, mc1, mc3, mc5, pp1, pp3, pp5, mp3, mp5, dp1, dp3, dp5
|
| 75 |
+
**Carpal (7):** capitate, hamate, triquetral, lunate, scaphoid, trapezoid, trapezium
|
| 76 |
+
|
| 77 |
+
## Pseudo-Label Method
|
| 78 |
+
|
| 79 |
+
Training labels were generated by **Gaussian inversion** of the published TW2 reference
|
| 80 |
+
distributions: for each bone, age, and sex, the MAP stage from `gaussian_params.json`
|
| 81 |
+
is assigned as the pseudo-label. This produces 252,220 annotations from 12,611 RSNA
|
| 82 |
+
radiographs without any manual effort.
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
```bibtex
|
| 87 |
+
@article{castillo2026boneagetw2,
|
| 88 |
+
author = {Castillo~Pinto, Juan~Manuel},
|
| 89 |
+
title = {{BoneAgeTW2}: Automated Skeletal Maturation Assessment via the {Tanner-Whitehouse 2} Method, Deep Learning, and Clinical Report Generation with Distribution Curves},
|
| 90 |
+
journal = {arXiv preprint arXiv:2607.23224},
|
| 91 |
+
year = {2026}
|
| 92 |
+
}
|
| 93 |
+
```
|