Skip to content

Case study, page T-0059

Held for retake, version 2

Normal ECG

PTB-XL record 20671, a woman aged 66. 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.01

median match with the original recording

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

0 of 2

cardiologists' statements that TraceRead AI also flagged

12

extra patterns flagged for the doctor to keep or remove

78

heart rate from the photo, beats a minute

62 on the original recording

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

  • The flattened page is stretched by a factor of 2.20 along one side, which suggests the page was read a quarter turn wrong.
  • The trace was found along only 31 percent of the length of a typical lead.

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-0059 was read wrongly (median correlation 0.015, 0.139 with a shift) but was not held for retake: the layout match score was 0.926 (held below 0.888), the AI's own uncertainty was 0.479 (held above 0.497) and 0 of 12 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 20671

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.01.

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 20671, a woman aged 66. A4 paper, 12 rows of one lead, pulses read 0 of 12.

Measures

MeasureFrom the photoOriginal recording
Heart rate (beats a minute)7862
PR interval (ms)198134
QRS width (ms)19594
QT interval (ms)404400
QTc, corrected for heart rate (ms)441405
Heart axis (degrees)5973

Patterns flagged, with TraceRead AI's score

  • First degree AV block

    the signal takes a little longer than usual to pass from the upper chambers to the lower chambers

    20
  • Atrial fibrillation

    an irregular rhythm where the upper heart chambers quiver

    16
  • Anteroseptal infarct pattern

    a pattern linked to damage to the front wall of the heart muscle and the wall between the lower chambers

    10
  • Unspecific ST changes

    small changes in the middle part of the beat that do not point to one cause

    8
  • Incomplete right bundle branch block

    a milder delay of the signal on its way to the right lower chamber

    8
  • Unspecific wide QRS

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

    8
  • Left atrial enlargement

    the upper left chamber may be larger or under more strain than usual

    5
  • Pacemaker rhythm

    the heartbeat is set by an artificial pacemaker that is working as expected

    4
  • Sinus arrhythmia

    the heart rate speeds up and slows down a little, often with breathing, which is often normal

    3
  • Anterolateral infarct pattern

    a pattern linked to damage to the front and side wall of the heart muscle

    3
  • Inferolateral infarct pattern

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

    2
  • Q waves present

    a small downward dip at the start of the main spike, which can be normal or can follow damage to the heart muscle

    2

Also checked, below the flag line: Sinus rhythm (35), Abnormal QRS (14), Early beats from the lower chambers (11).

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 12 patterns. 0 of them are also among the dataset's statements. Not in the dataset's statements: First degree AV block, Atrial fibrillation, Anteroseptal infarct pattern, Unspecific ST changes and 8 more. In the dataset but not flagged: Normal ECG and Sinus rhythm.

Found by both 0

None of the cardiologists' statements was flagged.

Recorded by the cardiologists only 2

  • Normal ECG

    A heartbeat pattern that looks normal.

  • Sinus rhythm

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

    35

Flagged by TraceRead AI only 12

  • First degree AV block

    The signal takes a little longer than usual to pass from the upper chambers to the lower chambers.

    20
  • Atrial fibrillation

    An irregular rhythm where the upper heart chambers quiver.

    16
  • Anteroseptal infarct pattern

    A pattern linked to damage to the front wall of the heart muscle and the wall between the lower chambers.

    10
  • Unspecific ST changes

    Small changes in the middle part of the beat that do not point to one cause.

    8
  • Incomplete right bundle branch block

    A milder delay of the signal on its way to the right lower chamber.

    8
  • Unspecific wide QRS

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

    8
  • Left atrial enlargement

    The upper left chamber may be larger or under more strain than usual.

    5
  • Pacemaker rhythm

    The heartbeat is set by an artificial pacemaker that is working as expected.

    4
  • Sinus arrhythmia

    The heart rate speeds up and slows down a little, often with breathing, which is often normal.

    3
  • Anterolateral infarct pattern

    A pattern linked to damage to the front and side wall of the heart muscle.

    3
  • Inferolateral infarct pattern

    A pattern linked to damage to the bottom and side wall of the heart muscle.

    2
  • Q waves present

    A small downward dip at the start of the main spike, which can be normal or can follow damage to the heart muscle.

    2

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 V6 (0.06), V5 (0.01), V4 (-0.03), V3 (0.08) and V2 (-0.00) and 7 more. Compare those leads with the paper first.
  2. 2Heart rate: 78 from the photo against 62 on the original recording (beats a minute).
  3. 3PR interval: 198 from the photo against 134 on the original recording (ms).
  4. 4QRS width: 195 from the photo against 94 on the original recording (ms).
  5. 5QTc, corrected for heart rate: 441 from the photo against 405 on the original recording (ms).
  6. 6The cardiologists recorded normal ECG and sinus rhythm, which TraceRead AI did not flag.
  7. 7TraceRead AI flagged 12 patterns the cardiologists did not record: first degree AV block, atrial fibrillation, anteroseptal infarct pattern, unspecific ST changes, incomplete right bundle branch block, unspecific wide QRS, left atrial enlargement, pacemaker rhythm, sinus arrhythmia, anterolateral infarct pattern, inferolateral infarct pattern and Q waves present. The doctor keeps or removes each one.
  8. 8TraceRead decided that the page is turned by 1 quarter turn and read it that way.
  9. 9No calibration pulse could be read, so the height scale is assumed to be the usual 10 millimetres for each millivolt.
  10. 10Only 0 of 12 calibration pulses could be read.
  11. 11The trace was found along less than nine tenths of its length in I (39%), II (37%), III (36%), aVR (41%) and 8 more.
  12. 12Hold 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 20671, a public research ECG from Germany, was printed as page T-0059 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 woman aged 66. Age and sex are all TraceRead keeps.

Photo made by computer of the printed PTB-XL record 20671
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
90 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
12 rows of one lead
Calibration pulses read
0 of 12
Height of 1 millivolt
10 mm
Paper speed used
25 mm a second
Layout match
0.926

Warnings this step raised

  • TraceRead decided that the page is turned by 1 quarter turn and read it that way.
  • No calibration pulse could be read, so the height scale is assumed to be the usual 10 millimetres for each millivolt.
  • Only 0 of 12 calibration pulses could be read.
  • The trace was found along less than nine tenths of its length in I (39%), II (37%), III (36%), aVR (41%) and 8 more.

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
V60 to 1028%0.060.12
V50 to 1019%0.010.05
V40 to 1016%-0.030.09
V30 to 1015%0.080.09
V20 to 1018%-0.000.03
V10 to 1023%0.010.07
aVF0 to 1035%-0.050.03
aVL0 to 1034%-0.02-0.02
aVR0 to 1041%-0.070.02
III0 to 1036%-0.010.08
II0 to 1037%-0.010.03
I0 to 1039%-0.080.01

Median match for this page: 0.01.

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.

V6
V5
V4
V3
V2
V1
aVF
aVL
aVR
III
II
I
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.926 (a photo is held back when the score is below 0.888) and 0 of 12 calibration pulses were read. The AI's own uncertainty about the five main heart groups was 0.479 (a photo is held back above 0.497). Neither check fired, so the photo is used.

Version 2Held for retake
  • The flattened page is stretched by a factor of 2.20 along one side, which suggests the page was read a quarter turn wrong.
  • The trace was found along only 31 percent of the length of a typical lead.
CheckValueLimitResult
page_foundpassed
gain_standardnone0.05passed
paper_speednone2434passed
layout_match0.9260.889passed
page_shape2.2031.7failed
ink_median0.3110.9failed
coverage11passed
lead_ii_agreenone0.49passed
lead_ii_amplitudenone0.5passed
goldberger0.8911.45passed
edge_clipping0.0230.027passed
flat_run0.1320.34passed
lead_ii_rawnone0.2passed

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)786262
PR interval (ms)198134122
QRS width (ms)1959496
QT interval (ms)404400412
QTc, corrected for heart rate (ms)441405416
Heart axis (degrees)597381
PR 108 msQRS 202 msQT 442 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 12 patterns. 0 of them are also among the dataset's statements. Not in the dataset's statements: First degree AV block, Atrial fibrillation, Anteroseptal infarct pattern, Unspecific ST changes and 8 more. In the dataset but not flagged: Normal ECG and Sinus rhythm.

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

  • Sinus rhythm

    below the line

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

    35
  • First degree AV block

    flagged

    the signal takes a little longer than usual to pass from the upper chambers to the lower chambers

    20
  • Atrial fibrillation

    flagged

    an irregular rhythm where the upper heart chambers quiver

    16
  • Abnormal QRS

    below the line

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

    14
  • Early beats from the lower chambers

    below the line

    extra beats that start early in the lower chambers

    11
  • Anteroseptal infarct pattern

    flagged

    a pattern linked to damage to the front wall of the heart muscle and the wall between the lower chambers

    10
  • Unspecific ST changes

    flagged

    small changes in the middle part of the beat that do not point to one cause

    8
  • Incomplete right bundle branch block

    flagged

    a milder delay of the signal on its way to the right lower chamber

    8
  • Unspecific wide QRS

    flagged

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

    8
  • Left atrial enlargement

    flagged

    the upper left chamber may be larger or under more strain than usual

    5
  • Pacemaker rhythm

    flagged

    the heartbeat is set by an artificial pacemaker that is working as expected

    4
  • Sinus arrhythmia

    flagged

    the heart rate speeds up and slows down a little, often with breathing, which is often normal

    3
  • Anterolateral infarct pattern

    flagged

    a pattern linked to damage to the front and side wall of the heart muscle

    3
  • Inferolateral infarct pattern

    flagged

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

    2
  • Q waves present

    flagged

    a small downward dip at the start of the main spike, which can be normal or can follow damage to the heart muscle

    2

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.