Bone Fracture Detection in X-rays

A hairline crack on an X-ray is easy to miss on a busy shift. Can a model catch it, and point to exactly where?

A deep-learning pipeline that reads a radiograph, decides whether a bone is fractured, and highlights the region that drove its decision, built to support a clinician's read, not replace it.

This is an assistive concept: it highlights potential fractures for a clinician to review. It is not a diagnostic device, and every flag needs expert confirmation.

Stage 1 · The data

Radiographs from across the body, labelled fracture or normal

Training starts from X-ray images of many regions (wrist, ankle, knee, hand), each labelled by radiologists as normal or fractured, often with the fracture's location marked. Real fracture datasets are imbalanced and subtle: most films are normal, and a break can be a single faint line.

Wrist · Normal
Ankle · Fracture
Knee · Normal
Hand · Fracture

Synthetic radiographs generated for this page; no patient images are used. Two of the four carry a fracture.

Stage 2 · One radiograph

What a fracture looks like to a pixel

An X-ray is a grayscale map of density: dense bone stops more radiation and shows bright, soft tissue shows dark. A fracture breaks that smooth bright cortex: a thin dark lucent line, a step in the bone's edge, or a change in texture. Here, a transverse break crosses the distal radius at the wrist, the most common fracture site of all.

The arrow marks the break across the distal radius.

Stage 3 · Preprocess

Make the bone edges speak

Raw films are noisy and unevenly exposed, so each image is cleaned before the model sees it. Contrast enhancement (CLAHE) lifts faint structure out of flat regions; a smoothing filter suppresses grain; and edge detection sharpens the cortical outlines where fractures hide. The result is resized, normalised, and augmented (flips, small rotations) to enlarge the dataset.

The original film: faint, grainy, unevenly lit.

Stage 4 · CNN

A CNN reads structure, coarse to fine

The prepared image flows through a deep convolutional network. Early layers fire on edges and gradients; middle layers assemble them into bone outlines and joint spaces; deep layers respond to the abnormal patterns of a break: a discontinuity in the cortex, an unexpected lucency. Each block shrinks the map and grows the channels, distilling the film into features a classifier can judge.

inputX-ray
conv1edges
conv2outlines
conv3joints
deepfracture?

conv → pool, repeated: local detail becomes abstract "fracture-ness."

Stage 5 · Localise

Grad-CAM: not just "yes", but "here"

A yes/no answer isn't enough for a clinician; they need to know where. Grad-CAM traces the "fracture" decision back through the final convolutional layer to produce a heatmap over the image, warm where the evidence is strongest. Overlaid on the film, it turns a label into a pointer, drawing the eye straight to the suspected break for confirmation.

Illustrative heatmap. A true Grad-CAM map is computed from the model's own gradients, not drawn.

Stage 6 · The verdict

Reading the output, and choosing how cautious to be

The classifier returns a fracture probability. Turning that into a flag means picking a threshold, and that choice is a trade-off: lower it and you catch more fractures (high sensitivity) at the cost of more false alarms (lower specificity). For a triage tool meant to catch missed breaks, you lean toward sensitivity and let the clinician rule out the extras. Drag the threshold to feel the trade-off.

⚑ Flagged for review · p(fracture)=0.72
Sensitivity80%
Specificity68%

Illustrative operating curve: the shape of the sensitivity/specificity trade-off, not measured values. The p(fracture) of 0.72 is an example output, also illustrative.

However it's tuned, the output is a flag for a radiologist, never a final diagnosis.