KneeGuru — Medical imaging — research

KneeGuru — Knee MRI Abnormality Detection

A 12-finding knee-MRI classifier learned from multilingual radiology reports, with a clinical records platform built around its reads.

Findings
Twelve per study
Expert labels
58 of 4,407 studies
Paper
IEEE EMBC format

What it had to solve

Every other study in the data had nothing but a free-text report in one of ten languages, and a report that says nothing about a finding is not the same as a report that rules it out. Whether a report mentions a finding depends on its language for all twelve findings, so silence is not missing at random. The 58 expert-labelled studies are too few to rank close models, and the obvious way to use the unlabelled bulk, self-training on out-of-fold pseudo-labels, turns out to reward leakage. And a score is not care: a knee is scanned several times after an ACL reconstruction or a meniscus repair, and each report usually sits alone.

The decisions that shaped it

A documented training ladder, one change per step

Every experiment was pre-registered with a single change and the rule that would decide it, and logged in a ledger. ResNet-50 at 256 px gave way to a CoAtNet at 384 px (+0.054 R1x on fold 0), then full training data, a ConvNeXt family, and an osteoarthritis-supervised initialisation that produced the best model: 0.920 on the expert subset, 0.940 and 0.925 on the public and private test partitions.

Reading a study the way a radiologist does

Each study becomes five slots (sagittal and coronal, fat-suppressed and not, plus axial), slices sorted by physical position over a 140 mm field of view. Three adjacent slices form one RGB 2.5D window, 44 windows per study, and gated-attention pooling keeps a separate attention map per finding, so each head attends to the planes that matter for it.

Labels from reports, with silence handled per finding

Targets are a rank consensus of four public report-label tables, with a per-finding silence policy rather than one rule for everything. Three rulers measure every step: out-of-fold AUC against explicit report statements for decisions, the expert subset only to catch gross failure, and the independent test partition for final confirmation.

Proving the leak instead of shipping it

A pre-registered replication (three seeds, two folds, 26 runs) compared standard out-of-fold teachers with nested ones that never see the student’s validation fold. Standard pseudo-labels won by +0.0225 R1x, and a teacher-size-matched control kept almost all of the gap, so the gain was leakage, not teacher strength. Once leakage is removed the gain is +0.0025, below the pre-registered bar, and the paper says so.

The model as a second opinion, never the decision

In KneeGuru Cloud nothing is pre-filled from the model. The radiologist grades every finding by hand, a signed report is immutable, and a correction is a new version with a reason. A deterministic rule engine compares confirmed reads with the patient’s own KOOS questionnaires to draft a trend for the clinician to sign, and conflicting or missing evidence gives Needs review rather than a guess.

Images stay on the hospital PC

The model runs at the edge: 0.62 s per study on a laptop GPU, so there is no GPU bill. Only the twelve scores reach the record. Patient identity is an HMAC of the hospital number under a key that never leaves the PC, names sit in an encrypted vault, and every read and write is chained by hash so an edited event is detected. The records side is written for AWS within the free tier, and a test fails the build if a billable resource is added.

How the pieces sit together

Input
DICOM study → series classification → verified 44-slice builder, five view slots
Model
CoAtNet and ConvNeXt backbones via timm with a learned slot embedding; gated-attention MIL per finding
Labels
Rank consensus of four report-label tables, per-finding silence policy, de-biased out-of-fold teachers
Evaluation
Three rulers: grouped out-of-fold AUC, the 58-study expert subset, an independent scored test partition
Inference
FastAPI service on the hospital PC; weights checked against a SHA-256 before loading
Care platform
Pathways, trend engine, signed reports, follow-ups, pseudonym vault, hash-chained audit trail
Consoles
Next.js console and Kneeview: six roles, worklist, slice viewer with the model’s attention, report editor
Cloud
AWS CDK stack: API Gateway with Cognito JWT, Lambda, DynamoDB, KMS, CloudWatch, a 1 USD budget

Built into the product

Slice viewer with attention

Opens on the view and slice the model weighted most, with a finding-by-view table. The interface says plainly that attention is not a causal explanation.

Report editor

Every finding graded by the radiologist, the model score shown beside it as a band, and signed reports versioned with a reason for every amendment.

Care pathways

ACL reconstruction, meniscus repair, knee osteoarthritis and acute injury, each defining tracked findings, follow-up schedule and milestones.

Longitudinal trend

Improving, Stable, Worsening, Off-track or Needs review, always shown with the rules behind it. Model scores never set the status.

Outcomes and monitoring

Outcomes by pathway, model-versus-radiologist agreement and drift, aggregate only, for the quality lead.

Privacy by design

Images never leave the PC, names live in an encrypted local vault, consent and erasure are recorded per patient.

What it is built out of

Model
PyTorch, timm, CoAtNet, ConvNeXt, ResNet-50
Training
AdamW, bf16, Gradient checkpointing, One 8 GB GPU
Inference
FastAPI, pydicom, Docker
Platform
Python, SQLite, DynamoDB, Fernet
Consoles
Next.js, TypeScript, Vite
Cloud
AWS CDK, Lambda, API Gateway, Cognito, KMS

What it looks like

KneeGuru — Kneeview’s analysis page: the MRI, the model’s weight on each slice, and all twelve scores.
Kneeview’s analysis page: the MRI, the model’s weight on each slice, and all twelve scores.
KneeGuru — The same screen at full size, captured from the running app on a demo study.
The same screen at full size, captured from the running app on a demo study.
KneeGuru — The imaging report: every finding graded by the radiologist, the model as a second opinion.
The imaging report: every finding graded by the radiologist, the model as a second opinion.
KneeGuru — Confirmed grades across visits, with the model score beneath each.
Confirmed grades across visits, with the model score beneath each.
KneeGuru — A drafted longitudinal progress report, for the clinician to complete and sign.
A drafted longitudinal progress report, for the clinician to complete and sign.
KneeGuru — Outcomes by pathway and model monitoring, aggregate only.
Outcomes by pathway and model monitoring, aggregate only.
KneeGuru — Per-finding ROC curves on the expert-labelled subset.
Per-finding ROC curves on the expert-labelled subset.

What it produced

0.817 → 0.925
Macro ROC-AUC across the documented training ladder
+0.0225
Leakage effect, pre-registered and replicated
0.62 s
Per study on the hospital PC’s GPU, so no GPU bill