Back to research
Medical imaging AI / Quality control

WriVision: AI quality control for wrist X-rays.

This project asked a practical question: can an AI model help technologists catch wrist X-ray labeling and acquisition problems before the patient leaves? I worked on a DenseNet121 multi-task model for those checks. Here I explain where it worked and where it still struggled.

8,718
original wrist radiographs
6,823
filtered training set images
4
simultaneous output heads
97.23%
projection F1 score
Four checks, F1 score per output head
Projection97.23%
Laterality82.52%
Cast97.70%
Hardware92.27%

We built the model for four checks: projection/view, laterality marker, cast presence, and hardware presence. A disagreement could trigger a correction while the patient was still in the department.

01Clinical workflow

I wanted the quality check to happen before the patient leaves.

Most MSK radiographs are not reviewed by a radiologist until after acquisition. That delay matters: if a wrist is mislabeled, the patient may already be gone. We designed the system to help technologists check image quality in near real time.
152 million
X-rays are taken each year
89%
of panoramic jaw radiographs in one study had positioning errors
21%
of hand surgeons surveyed reported performing wrong-site surgery at least once
Step 02

Classify

One multi-task DenseNet121 model reads the image and predicts projection, laterality, cast, and hardware at the same time.

02Interactive architecture

How the model works.

We used a multi-task DenseNet121 backbone so the same visual representation could support four quality-control decisions. Click a layer in the diagram or selector to inspect what it contributed.
DenseNet121 flow
DenseNet121 flowClassificationProjectionLateralityCastHardwareInput imageInput image224 x 224 radiographConvolutionConvolutionPoolingPoolingDense blockDense blockx6 layersTransitionTransitionDense blockDense blockx12 layersTransitionTransitionDense blockDense blockx24 layersTransitionTransitionDense blockDense blockx16 layersFinal feature mapFinal feature mapFour output headsFour output headsprojection / laterality / cast / hardware
Active layer

Dense blocks

DenseNet121 reused features across layers, which helped one model learn related tasks instead of training four isolated classifiers.

03Dataset

The filtered dataset.

Only posteroanterior, oblique, and lateral views were kept. Scaphoid and carpal tunnel views were excluded because there were not enough examples to represent the variety.
Projection
Posteroanterior2,825
Oblique1,152
Lateral2,846
Laterality
Left marker3,173
Right marker3,190
No marker captured460
Cast
Cast790
No cast6,033
Hardware
Hardware576
No hardware6,247

6,823 images from 2,591 patients. Bars show share of all images.

04Model performance

Four outputs, one quality-control decision.

I think the outputs are most useful when we interpret them together. Projection, laterality, cast, and hardware each answer a different question about whether the image is safe to send forward.
Selected task

Laterality

F1 score82.52%
PR AUC0.958
Classes

Left marker, right marker, no marker

Laterality was the clinically important stress test: the model needed to catch whether the L/R marker matched what was entered into the imaging workflow.

The hardest cases were missing or incorrectly captured markers. The no-marker precision-recall AUC dropped to 0.597, which made this the main limitation.
05Training and validation

We tested whether the model could generalize.

The dataset started with 8,718 wrist radiographs and was filtered to 6,823 de-identified images from 2,591 patients after excluding low-quantity views and enforcing label consistency.

We split images into training/validation and test subsets, stratifying by projection. The final training setup used mini-batches of 64, Adam optimization, weighted categorical cross-entropy, learning-rate decay, and early stopping after validation loss plateaued.

We used five-fold cross-validation to check whether the model generalized beyond the training distribution. That was especially important because the class balance varied across projection, marker, cast, and hardware labels.

Five-fold rotation
A
B
C
D
E
E
A
B
C
D
D
E
A
B
C
C
D
E
A
B
B
C
D
E
A
Held-out validation fold
06What I learned

I learned to ask what happens when the model gets a quality check wrong.

Marker dependence

Laterality was the most fragile output because missing or poorly captured markers were harder for the model than ordinary left/right marker reads. Future work should force the model to learn anatomy by training with marker-cropped images.

Saliency as a safety layer

Saliency maps helped show which regions influenced the prediction, especially for hardware and cast. That makes the model easier to audit before it is integrated into clinical software.

Next version

I would like to test whether this can move upstream: apply a similar model to a live patient-hand view before radiation is administered, then expand from wrist radiographs into other anatomy such as ankle studies where projection and laterality checks matter in a similar way.