Skip to content

Case study, page T-0053

Held for retake, version 2

Normal ECG

PTB-XL record 8170, a man aged 47. A public research ECG from Germany, printed on A4, photographed by TraceRead's photo simulator and read end to end. Below is the AI first read, next to the original recording and what the dataset's cardiologists recorded.

0.00

median match with the original recording

0.79 after lining up by up to a tenth of a second

2 of 2

cardiologists' statements that TraceRead AI also flagged

0

extra patterns flagged for the doctor to keep or remove

80

heart rate from the photo, beats a minute

80 on the original recording

Hold rule version 2 holds this photo for a retake. No first read is given.

  • The lead II piece in the grid and the long lead II strip agree only 0.07 over the same seconds without sliding, so part of the trace is misplaced or misread.

Version 1 of the rule let this photo through. The first read it produced is kept below, marked as withdrawn, so you can see what went wrong.

This page was read wrongly

T-0053 was read wrongly (median correlation minus 0.004, 0.794 with a shift) but was not held for retake: the layout match score was 0.896 (held below 0.888), the AI's own uncertainty was 0.110 (held above 0.497) and 4 of 4 calibration pulses were read.

Withdrawn: what version 1 produced

The first read version 1 gave, now withdrawn

Hover a lead to see how closely the red rebuilt line follows the original recording. Untick the box to see the page without it.

Flattened page of PTB-XL record 8170

Numbers under each lead: how closely the rebuilt line follows the original recording, where 1.00 is a perfect match. Median for this page: -0.00.

Held for retake, hold rule version 2Version 1 let it through

No first read is given for this photo. What follows is what version 1 produced, kept so you can see what went wrong.

PTB-XL record 8170, a man aged 47. A4 paper, 3x4 with one lead II strip, pulses read 4 of 4.

Measures

MeasureFrom the photoOriginal recording
Heart rate (beats a minute)8080
PR interval (ms)161165
QRS width (ms)9466
QT interval (ms)382380
QTc, corrected for heart rate (ms)420419
Heart axis (degrees)6843

Patterns flagged, with TraceRead AI's score

  • Sinus rhythm

    the usual rhythm, started by the heart's natural pacemaker

    99
  • Normal ECG

    a heartbeat pattern that looks normal

    93

Also checked, below the flag line: Abnormal QRS (3), Unspecific wide QRS (2), Inferior infarct pattern (1).

What the dataset's cardiologists recorded for this ECG

  • Normal ECG
  • Sinus rhythm

Against the cardiologists

TraceRead AI and the dataset's cardiologists, side by side

TraceRead AI flagged 2 patterns. 2 of them are also among the dataset's statements (Sinus rhythm and Normal ECG).

Found by both 2

  • Normal ECG

    A heartbeat pattern that looks normal.

    93
  • Sinus rhythm

    The usual rhythm, started by the heart's natural pacemaker.

    99

Recorded by the cardiologists only 0

Nothing: TraceRead AI flagged every statement they recorded.

Flagged by TraceRead AI only 0

Nothing extra.

The doctor's review

What the reading doctor would check here

Worked out from this run's own numbers: where the rebuilt line strays, which measures moved, and which flags to keep or remove.

  1. 1The rebuilt line strays from the original recording in I (0.29), aVR (-0.12), V1 (0.07), V4 (-0.04) and II (0.20) and 8 more. Compare those leads with the paper first.
  2. 2QRS width: 94 from the photo against 66 on the original recording (ms).
  3. 3Heart axis: 68 from the photo against 43 on the original recording (degrees).
  4. 4The calibration pulse looks wider than expected, which would mean a paper speed of about 31.4 millimetres a second. TraceRead still reads the page at 25 millimetres a second, the usual speed, so timings could be a little off if that reading were right.
  5. 5The lead II piece in the first column and the long lead II strip agree less than they should (correlation 0.07), so part of the trace may be misread.
  6. 6Hold rule version 2 holds this photo for a retake, so there is no first read to review. Version 1 let it through.

An AI first read is not the last word.

  • A qualified doctor reviews every AI first read. Nothing reaches a patient until a doctor signs it.
  • Do not rely on TraceRead alone in an emergency.
  • A normal AI first read does not rule out heart disease.
  • For adults, 18 and over.

Stage by stage

How TraceRead read this page

Every step of this run, with what went in and what came out.

Step 1: the photo

On the phone

What went in: one photo of a printed ECG

PTB-XL record 8170, a public research ECG from Germany, was printed as page T-0053 on A4 at 25 mm a second and 10 mm per millivolt. TraceRead's photo simulator then took a photo of it: tilted, lit unevenly, slightly blurred, with sensor noise and JPEG compression, the way a phone camera would.

This record was in PTB-XL's test set, so TraceRead AI never saw it during training. The person was a man aged 47. Age and sex are all TraceRead keeps.

Photo made by computer of the printed PTB-XL record 8170
Shown at 1600 by 1200 pixels.

Step 2: page finder

TraceRead AI

Find the paper and how it is turned

TraceRead AI looks at the whole photo and marks the four corners of the page, and which way up it is. Fixed code then measures the printed millimetre grid to correct the scale and the tilt, and makes the page flat.

Page found
yes
Turned
0 degrees
Paper
A4
The photo with the four page corners TraceRead AI found
The four corners TraceRead AI found, in red.

Step 3: layout reader

TraceRead AI

Work out where each lead sits

Every row of a printout starts with a calibration pulse, a small square step that is 10 mm tall for 1 millivolt. TraceRead AI finds the pulses, and fixed code matches them against 14 known page layouts to work out where each of the 12 leads sits and how long it runs.

Layout
3x4 with one lead II strip
Calibration pulses read
4 of 4
Height of 1 millivolt
10 mm
Paper speed used
25 mm a second
Pulse width suggested
31.4 mm a second
Layout match
0.896

Warnings this step raised

  • The calibration pulse looks wider than expected, which would mean a paper speed of about 31.4 millimetres a second. TraceRead still reads the page at 25 millimetres a second, the usual speed, so timings could be a little off if that reading were right.
  • The lead II piece in the first column and the long lead II strip agree less than they should (correlation 0.07), so part of the trace may be misread.

Step 4: trace rebuild

TraceRead AI

Rebuild every lead as a digital signal

TraceRead AI marks which pixels are trace ink. Fixed code then follows the ink of each lead, column by column, and turns it into millivolts, 500 points a second. The rebuilt line is drawn back over the paper so a doctor can see at a glance if a lead was misread.

Because this ECG is public, we can check the rebuilt signal against the original recording. 1.00 would be a perfect match; the second number allows the two to be lined up by up to a tenth of a second.

LeadSeconds shownInk foundMatchLined up
I0 to 2.5100%0.290.37
aVR2.5 to 5100%-0.120.84
V15 to 7.5100%0.070.99
V47.5 to 1099%-0.040.74
II0 to 2.5100%0.200.41
aVL2.5 to 5100%0.090.86
V25 to 7.5100%0.150.95
V57.5 to 1099%-0.040.69
III0 to 2.5100%0.120.55
aVF2.5 to 5100%-0.170.94
V35 to 7.5100%-0.040.87
V67.5 to 10100%0.010.64
II, rhythm strip0 to 10-0.020.47

Median match for this page: -0.00.

The flattened page with every rebuilt lead drawn over it in red
The flat page with every rebuilt lead drawn over it in red.

Step 5: coverage map

Fixed code

Mark which seconds the paper shows

A 3x4 printout shows each lead for only 2.5 of the 10 seconds the machine recorded. The coverage map tells the pattern finder exactly which seconds of each lead it has, so a part that is not on the paper is never read as a flat line.

I
aVR
V1
V4
II
aVL
V2
V5
III
aVF
V3
V6
II strip
0 s5 s10 s

Step 6: hold for retake

Fixed code

Decide whether the photo can be read

Before any pattern is read, a fixed hold rule decides whether the rebuild can be trusted. Version 1 looked only at how well the page matched a known layout and how unsure the AI was about the five main groups. Version 2 also checks the calibration, the page shape, how much trace was found, whether the overlapping lead II pieces agree, and clipped or flat parts. If the rebuilt trace looks unreliable, it asks for a new photo instead of giving a first read. Both versions' decisions for this page are shown below.

Version 1Photo usable

The layout match score was 0.896 (a photo is held back when the score is below 0.888) and 4 of 4 calibration pulses were read. The AI's own uncertainty about the five main heart groups was 0.110 (a photo is held back above 0.497). Neither check fired, so the photo is used.

Version 2Held for retake
  • The lead II piece in the grid and the long lead II strip agree only 0.07 over the same seconds without sliding, so part of the trace is misplaced or misread.
CheckValueLimitResult
page_foundpassed
gain_standard0.0250.05passed
paper_speed31.432434passed
layout_match0.8960.889passed
page_shape1.0031.7passed
ink_median10.9passed
coverage11passed
lead_ii_agree0.880.49passed
lead_ii_amplitude0.1210.5passed
goldberger0.2871.45passed
edge_clipping00.027passed
flat_run0.0160.34passed
lead_ii_raw0.0740.2failed

Step 7: measures

Fixed code

Measure the heartbeat

Fixed code finds every beat, lines the leads up and measures them together. The same code run on the original recording shows how much the photo changed each number, and a reference ECG program from the PTB-XL+ dataset gives a second opinion.

MeasureFrom the photoOriginal recordingReference program
Heart rate (beats a minute)808079
PR interval (ms)161165158
QRS width (ms)946690
QT interval (ms)382380390
QTc, corrected for heart rate (ms)420419427
Heart axis (degrees)684342
PR 160 msQRS 68 msQT 376 ms
The median heartbeat of lead II, from the photo, with the points the PR, QRS and QT measures start and end at.

Step 8: pattern finder

TraceRead AI

Score 71 patterns and flag the ones that pass their line

TraceRead AI reads the 12 rebuilt leads and the coverage map together and scores 71 patterns of rhythm, conduction, thickened heart muscle and ST and T changes. A pattern is flagged when its score passes a line set in advance on other ECGs, never on this one. The lines are set so that patterns are not missed, which is why a pattern can be flagged with a low score, and why some flags are wrong: the doctor decides.

What the dataset's cardiologists recorded for this ECG

  • Normal ECG
  • Sinus rhythm

TraceRead AI flagged 2 patterns. 2 of them are also among the dataset's statements (Sinus rhythm and Normal ECG).

TraceRead AI's score for each pattern, from 0 to 100. The thin line is where that pattern gets flagged.

  • Sinus rhythm

    flagged

    the usual rhythm, started by the heart's natural pacemaker

    99
  • Normal ECG

    flagged

    a heartbeat pattern that looks normal

    93
  • Abnormal QRS

    below the line

    the main spike of each beat has an unusual shape or width

    3
  • Unspecific wide QRS

    below the line

    the signal spreads slowly inside the lower chambers, so the main spike is wide

    2
  • Inferior infarct pattern

    below the line

    a pattern linked to damage to the bottom wall of the heart muscle

    1

See TraceRead read a paper ECG

We show you TraceRead reading public research ECGs, step by step, and talk through how your team prints, photographs and reads ECGs today.