Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Feb 28:27:e67576.
doi: 10.2196/67576.

Deep Learning-Based Electrocardiogram Model (EIANet) to Predict Emergency Department Cardiac Arrest: Development and External Validation Study

Affiliations

Deep Learning-Based Electrocardiogram Model (EIANet) to Predict Emergency Department Cardiac Arrest: Development and External Validation Study

Shao-Chi Lu et al. J Med Internet Res. .

Abstract

Background: In-hospital cardiac arrest (IHCA) is a severe and sudden medical emergency that is characterized by the abrupt cessation of circulatory function, leading to death or irreversible organ damage if not addressed immediately. Emergency department (ED)-based IHCA (EDCA) accounts for 10% to 20% of all IHCA cases. Early detection of EDCA is crucial, yet identifying subtle signs of cardiac deterioration is challenging. Traditional EDCA prediction methods primarily rely on structured vital signs or electrocardiogram (ECG) signals, which require additional preprocessing or specialized devices. This study introduces a novel approach using image-based 12-lead ECG data obtained at ED triage, leveraging the inherent richness of visual ECG patterns to enhance prediction and integration into clinical workflows.

Objective: This study aims to address the challenge of early detection of EDCA by developing an innovative deep learning model, the ECG-Image-Aware Network (EIANet), which uses 12-lead ECG images for early prediction of EDCA. By focusing on readily available triage ECG images, this research seeks to create a practical and accessible solution that seamlessly integrates into real-world ED workflows.

Methods: For adult patients with EDCA (cases), 12-lead ECG images at ED triage were obtained from 2 independent data sets: National Taiwan University Hospital (NTUH) and Far Eastern Memorial Hospital (FEMH). Control ECGs were randomly selected from adult ED patients without cardiac arrest during the same study period. In EIANet, ECG images were first converted to binary form, followed by noise reduction, connected component analysis, and morphological opening. A spatial attention module was incorporated into the ResNet50 architecture to enhance feature extraction, and a custom binary recall loss (BRLoss) was used to balance precision and recall, addressing slight data set imbalance. The model was developed and internally validated on the NTUH-ECG data set and was externally validated on an independent FEMH-ECG data set. The model performance was evaluated using the F1-score, area under the receiver operating characteristic curve (AUROC), and area under the precision-recall curve (AUPRC).

Results: There were 571 case ECGs and 826 control ECGs in the NTUH data set and 378 case ECGs and 713 control ECGs in the FEMH data set. The novel EIANet model achieved an F1-score of 0.805, AUROC of 0.896, and AUPRC of 0.842 on the NTUH-ECG data set with a 40% positive sample ratio. It achieved an F1-score of 0.650, AUROC of 0.803, and AUPRC of 0.678 on the FEMH-ECG data set with a 34.6% positive sample ratio. The feature map showed that the region of interest in the ECG was the ST segment.

Conclusions: EIANet demonstrates promising potential for accurately predicting EDCA using triage ECG images, offering an effective solution for early detection of high-risk cases in emergency settings. This approach may enhance the ability of health care professionals to make timely decisions, with the potential to improve patient outcomes by enabling earlier interventions for EDCA.

Keywords: cardiac arrest; computer vision; deep learning; electrocardiogram; emergency department.

PubMed Disclaimer

Conflict of interest statement

Conflicts of Interest: None declared.

Figures

Figure 1
Figure 1
Overview of the proposed ECG-Image-Aware Network (EIANet) model. SA: spatial attention.
Figure 2
Figure 2
We inserted a spatial attention (SA) block after each layer and before the next layer.
Figure 3
Figure 3
Feature map of a National Taiwan University Hospital electrocardiogram (NTUH-ECG) sample with a spatial attention block.
Figure 4
Figure 4
Feature map of a National Taiwan University Hospital electrocardiogram (NTUH-ECG) sample without a spatial attention block.
Figure 5
Figure 5
Feature map of a Far Eastern Memorial Hospital electrocardiogram (FEMH-ECG) sample with a spatial attention block.
Figure 6
Figure 6
Feature map of a Far Eastern Memorial Hospital electrocardiogram (FEMH-ECG) sample without a spatial attention block.

References

    1. Morrison LJ, Neumar RW, Zimmerman JL, Link MS, Newby LK, McMullan PW, Hoek TV, Halverson CC, Doering L, Peberdy MA, Edelson DP. Strategies for Improving Survival After In-Hospital Cardiac Arrest in the United States: 2013 Consensus Recommendations. Circulation. 2013 Apr 09;127(14):1538–1563. doi: 10.1161/cir.0b013e31828b2770. - DOI - PubMed
    1. Andersen LW, Holmberg MJ, Berg KM, Donnino MW, Granfeldt A. In-hospital cardiac arrest: a review. JAMA. 2019 Mar 26;321(12):1200–1210. doi: 10.1001/jama.2019.1696. https://europepmc.org/abstract/MED/30912843 2728930 - DOI - PMC - PubMed
    1. Nolan JP, Berg RA, Andersen LW, Bhanji F, Chan PS, Donnino MW, Lim SH, Ma MH, Nadkarni VM, Starks MA, Perkins GD, Morley PT, Soar J. Cardiac arrest and cardiopulmonary resuscitation outcome reports: update of the Utstein Resuscitation Registry Template for In-Hospital Cardiac Arrest: a consensus report from a task force of the International Liaison Committee on Resuscitation (American Heart Association, European Resuscitation Council, Australian and New Zealand Council on Resuscitation, Heart and Stroke Foundation of Canada, InterAmerican Heart Foundation, Resuscitation Council of Southern Africa, Resuscitation Council of Asia) Circulation. 2019 Oct 29;140(18):1. doi: 10.1161/cir.0000000000000710. - DOI - PubMed
    1. Merchant RM, Yang L, Becker LB, Berg RA, Nadkarni V, Nichol G, Carr BG, Mitra N, Bradley SM, Abella BS, Groeneveld PW. Incidence of treated cardiac arrest in hospitalized patients in the United States*. Critical Care Medicine. 2011;39(11):2401–2406. doi: 10.1097/ccm.0b013e3182257459. - DOI - PMC - PubMed
    1. Girotra S, Nallamothu BK, Spertus JA, Li Y, Krumholz HM, Chan PS. Trends in survival after in-hospital cardiac arrest. N Engl J Med. 2012 Nov 15;367(20):1912–1920. doi: 10.1056/nejmoa1109148. - DOI - PMC - PubMed

Publication types

LinkOut - more resources