DOI: 10.1093/eurheartj/ehag785.4369 ISSN: 0195-668X

GDPR-data aligned end-to-end software for clinical artificial intelligence ECG prediction for atrial fibrillation

T Roots, J Grzelak, S Ogbomo-Harmitt, O Aslanidi

Abstract

Background

Atrial fibrillation (AF) is the most common sustained arrhythmia, but its early detection is challenging as many patients exhibit sinus rhythm (SR) during routine examinations. Moreover, most ECGs are stored in paper/pdf formats, leading to incomplete and distorted signals. Although Artificial Intelligence (AI) can improve detection, most existing AI ECG solutions rely on cloud-based infrastructures, requiring transmission of identifiable patient data beyond the local device. This increases cybersecurity risk and reduces direct control over patient data, thereby threatening GDPR compliance by increasing the risk of unauthorised access and data breaches. For widespread clinical adoption, digital ECG analysis tools must enable secure, CPU-based execution within existing on-site computers in healthcare centres.

Aim

We will develop proof-of-concept software for end-to-end digitisation of paper ECGs and running low-computational cost AI models for early AF detection.

Method

The software implements two tasks: 12-lead ECG digitisation, and AI prediction. First, ECG images are converted to binary format, the grid lines are identified via pixel intensity, and the scaling is calibrated using machine paper output rate and voltage scale. Both manual and automatic lead box selection allows quick lead-by-lead digitisation. Second, two convolutional neural networks (CNN) were developed to detect AF from either AF or SR ECGs and integrated into the software. We used the PTB-XL database to provide 12-lead ECG datasets for patients in AF (n=3514) and SR (n=150), which were used to train the respective AF-CNN and SR-CNN models. The SR model was trained using a patient-wise split to prevent data leakage, such that patients in the training set did not appear in the test set and was subsequently evaluated on a small hold-out ECG dataset (n=31).

Results

The software’s graphical user interface enabled streamlined ECG digitisation with an automated box selection tool for each lead. All extracted leads were scaled uniformly in both the vertical and horizontal directions to represent the standard 10-second interval. Mean percentage error measured against ground-truth digital ECG recordings was 9.15%. In subsequent AF prediction, the SR-CNN model achieved an ROC AUC of 95% and F1-score of 91.89%, with a mean CPU inference time of 0.76 ms per ECG. The AF-CNN model achieved an ROC AUC of 95.72% and F1-score of 90.60%, with a mean inference time of 0.48 ms.

Conclusion

This study demonstrates a locally deployable, low-computational-cost AI platform which can accurately digitise paper ECGs and perform AF prediction without the reliance on cloud or GPU infrastructure. By enabling secure, CPU-based analysis within hospital systems, this approach facilitates integration of AI detection into routine clinical practice while maintaining alignment to GDPR standards.

More from our Archive