Downloads · 30 days
0
pnhuy/knee-implant-detector
knee-implant-detector is a image classification model from pnhuy. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as mit.
Binary classifier that flags total-knee-replacement hardware in pre-cropped knee radiograph regions. Used as a preprocessing gate for DeepKnee: knees with an implant are discarded instead of KL-graded.
Downloads · 30 days
0
Access
Public
Updated Sep 2, 2026
Repo size
6.2 MB
Likes
0
Public
Click a slice to open those files.
.pt6.2 MB · 100%
From the Hugging Face model README
Binary classifier that flags total-knee-replacement hardware in pre-cropped knee radiograph regions. Used as a preprocessing gate for DeepKnee: knees with an implant are discarded instead of KL-graded.
mobilenet_v3_small (2.5M params),
single-logit head, 256x256 input, ImageNet normalization.state_dict + metadata (arch, input
size, normalization, two operating thresholds). No pickle of custom
classes - loads with torch >= 1.6 and torchvision >= 0.9.infer_implant.py); robust to input
brightness and 8/16-bit depth.Pooled 5-fold out-of-fold: PR-AUC 0.9886, ROC-AUC 0.9998. Hold-out fold 0 via the shipped inference code: PR-AUC 0.9988, sens 51/51, spec 0.9985.
Stored operating points:
| key | threshold | sens | spec |
|---|---|---|---|
threshold (max-F1) | 0.5485 | 98.4% | 99.92% |
threshold_sens99 (gate default) | 0.2992 | 99.2% | 99.85% |
from infer_implant import load_model, predict_image, has_implant
model, meta = load_model() # downloads this checkpoint (or pass a path)
prob = predict_image(model, meta, "knee_crop.png")
discard = has_implant(model, meta, "knee_crop.png") # sens99 threshold
infer_implant.py lives in the KneePilot repo
(experiements/implant_detector/); it depends only on torch,
torchvision, numpy and Pillow, and runs on CPU or GPU.