Identification of Cardiac Arrhythmias from 12-lead ECG using Beat-wise QR-code Generation and Multi-channel Convolutional Neural Network

Mohanad Alkhodari, Leontios J. Hadjileontiadis, Ahsan H. Khandoker
Khalifa University


Abstract

Introduction: Throughout the years, there have been many attempts to develop an accurate cardiac arrhythmias identification algorithm. However, despite achieving acceptable results, they have been only applied on either small or homogenous datasets. Methods: A study was developed herein to identify cardiac arrhythmias from varied-length 12-lead ECG signals obtained from the 2020 PhysioNet/Computing in Cardiology Challenge and acquired from a wide set of sources. The training dataset included a total of 6877 patients suffering from 8 different arrhythmia types along with a control patients’ group. Initially, data augmentation of only time-axis stretching was applied on all patient data to ensure a balanced dataset across all 9 patients’ groups. Then, all signals were subjected to z-score normalization and wavelet denoising prior to any further analysis. A beat-to-beat segmentation approach was then followed using the famous Pan-Tompkins algorithm to divide the signal of each lead into multiple beats. Next, Beat-wise cross-correlation was performed to obtain only 5 beats of the lowest correlation values representing cardiac abnormalities. After preparing the data, a QR-code corresponding to each of the 12-lead beats was generated using Zebra-Crossing (ZXing) 2D image processing Java library. In addition, QR-codes based on the demographics (gender, age) as well as the wavelet leaders and Singular Value Decomposition (SVD) features were incorporated for each patient. At the end, the 16 QR-code images of every patient were used as inputs to a pre-defined multi-dimensional convolutional neural network of 16-channels to train the model. Results: The 10-fold cross-validation AUROC, AUPRC, Accuracy, F-measure, Fbeta-measure, Gbeta-measure, and Geometric-mean were 0.997, 0.977, 0.924, 0.657, 0.659, 0.411, and 0.520, respectively. Furthermore, the unofficial testing phase resulted in 0.548, 0.311, and 0.413 for the Fbeta-measure, Gbeta-measure, and Geometric-mean, respectively. Conclusions: This study suggests 2D ECG classification using generated QR-code images as a promising cardiac arrhythmia identification technique.