pelvitect-kp β€” Pediatric Hip Keypoint Detection (ViTPose-Plus-Base, 4-ch)

Part of the Pelvitect framework for automated analysis of developmental dysplasia of the hip (DDH).

⚠️ Custom 4-channel input β€” do not load naively

This model has been fine-tuned with a 4-channel input: [R/255, G/255, B/255, seg_mask/12].

Standard transformers image processors expect 3 channels and will either error or silently produce wrong predictions. Always use the Pelvitect wrapper:

from pelvitect.analyzer import KeypointDetector

detector = KeypointDetector()   # downloads this repo automatically
kp = detector.predict(image, mask=mask)
# kp = {"tcc_r": (x, y), "tcc_l": ..., "asm_r": ..., ...}

Or use the full pipeline:

from pelvitect import Pelvitect
import numpy as np
from PIL import Image

img    = np.array(Image.open("xray.png").convert("RGB"))
result = Pelvitect(image=img).analyze()  # seg β†’ keypoints β†’ geometry β†’ classification
print(result.summary())

Model description

ViTPose-Plus-Base fine-tuned on PelviSet (10.5281/zenodo.20615290). Predicts 8 anatomical keypoints (4 per hip side) from per-side ROI crops of anteroposterior pediatric pelvic radiographs.

Keypoints predicted (per side)

Index Name Description
0 TCC Tri-radiate cartilage center
1 ASM Acetabulum superolateral margin
2 FHC Femoral head center
3 MOFM Midpoint of superior margin of ossified femoral metaphysis

Inference pipeline

The model operates on per-side ROI crops, not full images:

Full image
  β”‚
  β”œβ”€ SegFormer-B3 (pelvitect-seg)
  β”‚      β†’ 12-class mask
  β”‚
  β”œβ”€ hip_roi_bbox(mask, side="r")  β†’  right-hip bbox
  β”œβ”€ hip_roi_bbox(mask, side="l")  β†’  left-hip  bbox
  β”‚
  β”œβ”€ crop_to_vitpose(image, bbox, seg_mask)
  β”‚      β†’ (256Γ—192, 4-ch)  [R, G, B, mask/12]
  β”‚
  β”œβ”€ ViTPose forward (this model)
  β”‚      β†’ 4 heatmaps, 64Γ—48
  β”‚
  └─ kp_from_crop_space(peak_x, peak_y, scale_info)
         β†’ (x, y) in original image coords

Training details

  • Base model: usyd-community/vitpose-plus-base
  • Input: 4-channel per-side hip ROI crop, 256 Γ— 192 px
  • Input ch 4: segmentation mask from pelvitect-seg, divided by 12
  • Output: 4 Gaussian heatmaps per side, 64 Γ— 48
  • Dataset: PelviSet β€” 1,978 real-annotated cases (MTDDH DS1+DS2) + pseudo-labeled USTC-DDH and AV-DDH cases
  • No horizontal flip augmentation: laterality is encoded in the mask; flip would corrupt the correspondence between image and mask channels

Citation

@dataset{pelviset2025,
  author    = {Mahdavikia, Amir M.},
  title     = {PelviSet: A Unified Pediatric Pelvic Radiograph Dataset},
  year      = {2025},
  doi       = {10.5281/zenodo.20615290},
}
Downloads last month
187
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support