Cardiac Anomalies Detection Through 2D-CNN and ECG Spectrograms

Jonathan Roberto Torres Castillo and Miguel Padilla Castañeda
Universidad Nacional Autónoma de México


Abstract

Heart abnormalities represent around 26 % of the deaths for illnesses in the world. Cardiac arrhythmias (CAs) are the most common. Diagnose these diseases through electrocardiograms (ECG) is a clinical practice. The development of detection computational tools for ECG interpretation plays a critical role in the diagnosis of CAs. Aims: The goal of this work is to develop an automated pattern recognition method for the reliable detection of 27 different CAs. Proposal: An improved deep learning (DL) model was employed by using raw-data images and signal spectrograms. Methods: With a database of 43,101 ECGS of 12-leads a four-step method was created. 1. Preprocessing. The data were normalized, filtered, and trimmed or filled in so that they were the same length. 2. Representation. Next, the preprocessed data was segmented and transformed into two sets, one with the raw images and the other with spectrograms through Wavelet Synchrosqueezing (WS). 3. Feature extraction. A CNN network was chosen to get relevant features of the images. 4. Classification. A 3-layer neuronal network was used to classify the signals. A 10-fold cross-validation method (CV) was carried out. Different hyperparameters were tested during the training phase to find the best model. Each model obtained in the CV was used to choose the classification threshold. Thirty values between 0 and 1 were tested, and then the best-performance thresholds were averaged. Results: The presented model obtained an S-score of 0.658 for 12-leads, 0.535 for 6 leads, 0.627 for 3-leads, and 0.604 for 2-leads using the training data. Due to computer limitations, this approach was not submitted in the unofficial phase, an earlier version was submitted with an unofficial S-score of -0.01 for the UIDT_UNAM team.