Next Article in Journal / Special Issue
Multi-Modality Microscopy Image Style Augmentation for Nuclei Segmentation
Previous Article in Journal
Seamless Copy–Move Replication in Digital Images
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Deep-Learning-Based Framework for the Classification of Cardiac Arrhythmia

1
Department of Electronics Engineering, Sejong University, Seoul 05006, Korea
2
Department of Electrical Engineering, Polytechnique Montreal, Montreal, QC H3T 1J4, Canada
*
Author to whom correspondence should be addressed.
J. Imaging 2022, 8(3), 70; https://doi.org/10.3390/jimaging8030070
Submission received: 29 December 2021 / Revised: 1 March 2022 / Accepted: 8 March 2022 / Published: 10 March 2022

Abstract

:
Cardiovascular diseases (CVDs) are the primary cause of death. Every year, many people die due to heart attacks. The electrocardiogram (ECG) signal plays a vital role in diagnosing CVDs. ECG signals provide us with information about the heartbeat. ECGs can detect cardiac arrhythmia. In this article, a novel deep-learning-based approach is proposed to classify ECG signals as normal and into sixteen arrhythmia classes. The ECG signal is preprocessed and converted into a 2D signal using continuous wavelet transform (CWT). The time–frequency domain representation of the CWT is given to the deep convolutional neural network (D-CNN) with an attention block to extract the spatial features vector (SFV). The attention block is proposed to capture global features. For dimensionality reduction in SFV, a novel clump of features (CoF) framework is proposed. The k-fold cross-validation is applied to obtain the reduced feature vector (RFV), and the RFV is given to the classifier to classify the arrhythmia class. The proposed framework achieves 99.84% accuracy with 100% sensitivity and 99.6% specificity. The proposed algorithm outperforms the state-of-the-art accuracy, F1-score, and sensitivity techniques.

1. Introduction

Cardiovascular diseases (CVDs) are the primary cause of death every year. According to the World Health Organization (WHO), approximately 17.9 million people died due to CVD in 2019, which translated as CVDs causing 32% of global deaths. Of these deaths, 85% were due to heart attacks [1]. A heart attack is caused by the blockage of one or more coronary arteries, whereas other CVDs cause the remaining 15% of the deaths due to cardiac arrhythmia. Cardiac arrhythmia is an irregular heartbeat. ECGs are used to monitor heartbeats. The ECG signal is recorded through electrocardiography in which 12 leads are placed on the body. For correct recording of the ECG, the placement of the leads is very important [2]. The correct positions of the leads and the components of the ECG signal are shown in Figure 1.
A normal heartbeat has a regular rhythm in the ECG plot, whereas arrhythmia heartbeats have irregularities. In this article, sixteen classes of cardiac arrhythmia are considered. These classes are atrial premature beats (APBs), atrial flutter (AFL), atrial fibrillation (AFIB), supraventricular tachyarrhythmias (SVTA), Wolff–Parkinson–White (WPW), premature ventricular contraction (PVC), idioventricular rhythm (IVR), ventricular bigeminy, ventricular trigeminy, left bundle branch block (LBBBB), ventricular tachycardia (VT), ventricular flutter (VFL), second-degree heart block (SDHB), the fusion of ventricular and regular beat, right bundle branch block (RBBBB) and short PR [3]. Not all cardiac arrhythmias are harmful, but a few are, such as AFIB and VFL, which can cause heart attacks. Thus, it is necessary to identify the arrhythmia class to avoid potential damage.
The classification of ECG beats into arrhythmic cardiac classes has been performed using several conventional and deep-learning-based algorithms. ECG is a one-dimensional (1D) signal; therefore, the anomalies can be detected using machine learning approaches. Prasad et al. [4] used k-nearest neighbors (kNNs) to classify arrhythmia and achieved a 97.65% accuracy. The framework only considered the nonlinear local features and 1D signals. Similarly, the authors of [5] used kNNs to detect arrhythmia and achieved a sensitivity of 97.22% for the detection. The method only considered the handcrafted features of the 1D signals. With the advancements in deep learning, many deep learning architectures have been proposed to classify arrhythmias. In [6], the authors proposed a multilayer perceptron (MLP) and convolutional neural network (CNN)-based architecture for the classification of arrhythmia using 1D ECG signals. They achieved an accuracy of 88.7% for the MLP and 83.5% for CNN-based framework. Similarly, ref. [7] converted an ECG signal to a 2D signal and used a CNN-based approach to classify arrhythmia. They only considered eight classes and achieved a classification accuracy of 99.11%.
Inspired by this, we propose a novel deep-learning-based framework for classifying cardiac arrhythmia using attention-block-based CNN and the clump of features (CoF). The ECG signal is segmented into beats and converted into a 2D time–frequency domain signal using CWT. The features are extracted using attention-based CNN. After feature extraction, feature reduction is achieved with the help of the CoF model; then, classification is performed using classifiers. The performance of several classifiers is compared.
The rest of the article is organized as follows: Section 2 presents related work; the proposed methodology is explained in Section 3; Section 4 shows the experimental results; and in Section 5, conclusions are drawn.

2. Related Work

ECG signals are widely used for the detection and diagnosis of heart diseases. The signals can also be used for the classification of arrhythmia. These signals are one-dimensional and can be transformed into two-dimensional signals to classify the arrhythmia beats. ECG-based arrhythmia classification can be performed using handcrafted and deep temporal features. In [8], the authors proposed a gray-level co-occurrence matrix (GLCM) and gray-level run-length matrix (GLRLM)-based model for the classification of arrhythmia. They used six machine learning classifiers and achieved 90.42% accuracy for the 1D signal. In this framework, only handcrafted features are considered.
Similarly, in [9], a multi-resolution representation-based deep neural network model is proposed to classify arrhythmia. This model achieved an F1-score of 0.9238. The model is only applicable for the 1D signal and only considers handcrafted features.
In [10], an attention-based model is proposed for the classification of arrhythmia. The authors used the PhysioNet public dataset and achieved 92.8% accuracy, but the ECG signal in 1D is considered classification. In [11], the authors calculated RR intervals to detect arrhythmia. The approach uses conventional methods and achieves an accuracy of 99.98%. They also considered ECG in 1D.
In [12], the authors converted the ECG signal into a 2D spectrogram and proposed a framework based on the spectrogram for arrhythmia classification. They achieved an accuracy of 99.02% for the 2D-based CNN model. They only considered seven classes of arrhythmia. In [13], the authors demonstrated a support vector machine (SVM)-based framework for classifying arrhythmia using a 1D ECG signal. They considered 17 classes of arrhythmia and achieved 97.3% accuracy. The authors of [14] used YOLO to detect arrhythmia, and they considered only four classes of arrhythmia. Similarly [15], proposed a CNN-based framework for classifying cardiac arrhythmia using short-time Fourier transform (STFT) as input signal and achieved 99.00% accuracy, but they only considered four arrhythmia classes.
Furthermore, SVM is used to classify arrhythmia using the MIT-BIH database in [16]. They used selective bands and achieved 97.06% accuracy. Similarly, the authors of [17] used SVM to classify arrhythmia into four classes and achieved an accuracy of 83%. Moreover, in [18], the authors demonstrated cardiac arrhythmia classification using fog computing. They used the LSTM network for the classification of cardiac arrhythmia. Majahad et al. [19] demonstrated the conversion of ECG into time–frequency domain representation to classify arrhythmia. They used bagging methods and achieved 99% accuracy.
Motivated by the conversion of ECG into the 2D signal, we propose a novel deep-learning-based framework for classifying sixteen cardiac arrhythmia classes. A plethora of pre-trained D-CNNs, such as AlexNet [20], ResNet-50 [21], VGG-19 [22], Inception v3 [23], GoogLeNet [24], ShuffleNet [25], SqueezeNet [26], EfficientNetb0 [27], Xception [28], and DarkNet-53 [29], as well as the novel attention-based CNN ArrhythmiaNet, have been used for the feature extraction of 2D time–frequency representations of ECG beats. These features are reduced, and the classifier is trained using reduced features. The upcoming section explains the proposed methodology.

3. Proposed Methodology

The proposed framework consists of four major blocks. In the first block, the ECG signal is segmented into beats and then converted into 2D time–frequency representation using CWT. These 2D signals are given to the second block where the local, as well as global features, are extracted using a novel ArrhythmiaNet architecture. The output of ArrhythmiaNet is SFV. SFV is fed into the third block where the k-means clustering algorithm is applied, and the features are reduced to obtain RFV. This RFV is used to train the classifier in the fourth block, and the outputs of the classifier are the arrhythmia classes. The proposed framework is illustrated in Figure 2.

3.1. Preprocessing

We used the MIT-BIH dataset [30] for this research. The dataset consists of ECG signals of the standard and cardiac arrhythmia classes, and there are a total of 16 classes of cardiac arrhythmia. Table 1 shows the number of samples in each class. Each sample has 1000 fragments.
All the ECG signals are segmented into beats using a timeframe window. The timeframe is kept constant for all ECG signals. Each ECG signal of ten seconds is divided into ten beats of one second. Figure 3 shows the ECG signal and its segmented beats.
After segmentation, the segmented beats are converted into the 2D time–frequency domain representation. For 2D time–frequency domain representation, we have used the CWT method. Traditional arrhythmia detection models extract features from the 1D ECG signal, which causes abortive classification results and low accuracy. We use CWT to transform a 1D signal into a 2D signal for better signal analysis and features extraction.

Continuous Wavelet Transform (CWT)

CWT expresses the signals in the form of wavelet functions. These wavelet functions are localized in the time domain as well as the frequency domain. By allowing the translation and scaling parameters of the wavelets to change constantly, CWT yields a comprehensive representation of the 1D signal. The time–frequency domain representation E C G ω α , β of a continuous ECG beat e c g b e a t t can be expressed as:
E C G ω α , β = 1 α e c g b e a t t Ψ ¯ t β α d t ,   w h e r e   α , β  
Here, α is the scaling parameter and should be greater than 0; β is the translation parameter; t is the instant of time; Ψ ¯ t is the continuous mother wavelet. Ψ ¯ t provides the translation and scaling of the original wavelet e c g b e a t t . The original ECG beats can be expressed as:
e c g b e a t t = C Ψ 1 E C G ω α , β 1 α Ψ ˜ t β α a b d a a 2 ,
where C Ψ is the wavelet constant whose value is 0 < C Ψ < ∞ and can be written as shown in Equation (3).
C Ψ = Ψ ^ ¯ ω Ψ ˜ ^ ω ω d ω ,
The integration of the admissible wavelet must be zero. For this, e c g b e a t t is recovered using the second inverse wavelet transform, as shown in Equation (2).
e c g b e a t t = 1 2 π Ψ ^ ¯ 1 1 α 2 E C G ω α , β e ι t β α d β d α ,
The instantaneous wavelet at time t is defined as:
Ψ t = ω t e ι t
where ω t is the window. We derive the time–frequency representation of the beats by using a filter bank in CWT. All the 2D representations are resized to 256 × 256 and divided into training and testing using tenfold cross-validation.

3.2. Train Test Dataset Split

After preprocessing, the dataset is divided into training and testing. Training involves 70% of the preprocessed data, whereas testing contains 30% of the preprocessed data.

3.3. Features Extraction Using ArrhythmiaNet

After preprocessing, the features of the 2D representations are extracted with the help of a novel ArrhythmiaNet with an attention block. ArrhythmiaNet consists of three 2D convolutional layers with the rectified linear unit (ReLU) as the activation function, one max-pooling layer, attention block, one flatten layer, and one last fully connected layer. The output of the fully connected layer is called the spatial feature vector. The attention block is explained in Section 3.3.1. The output of this attention block is multiplied with the max-pooling layer of the main ArrhythmiaNet. The purpose of this attention block is to capture global features, as explained in [31]. The architecture of the ArrhythmiaNet with the attention block is shown in Figure 4.
The vector from the proposed CNN is called the spatial feature vector (SFV). There are 2097152 full features in the SFV. After feature extraction, these features are reduced to 4096 using a clump of features (CoF) module.

3.3.1. Attention Block

In the attention block, a self-attention mechanism is followed. In particular, the self-attention block calculates the response at one position in the feature map as a weighted sum of the features from all positions. As a result, the weights are calculated with only a small computational cost.
Figure 5 shows the attention block. In the attention block, the input features map denoted by x is transformed into three feature spaces, f, g and h. To derive these feature spaces, initially, the input is passed through 1 × 1 convolution, and then it is multiplied by the trained weighted matrices W using the following equations.
f x i = W x i + b
g x j = W x j + b
h x i = W x i + b
where W denotes the weights and b denotes the bias parameters. Then, matrices f x i T (transpose of f x i ) and matrices g x j are multiplied by the softmax function and the weighted value vectors are summed to obtain the attention map. Then, attention map and matrix h x i are multiplied to derive the attention feature matrix. The attention mechanism used is similar to the self-attention mechanism used in [32]. However, we have not used linear regulizers.

3.4. Feature Reduction Using CoF

The reduced feature vector (RFV) is obtained using the CoF method, as explained in [33]. In CoF, k-means clustering is applied to the SFV to derive the vocabulary of features. k-means clustering is a highly unstable algorithm; therefore, the optimal value of k to make clusters is crucial. The optimal value of the clusters can be obtained with the help of the elbow method, in which the sum of the squared errors is plotted against different values of k, and the optimal value of k is selected. From the elbow plot, we obtained the value of k as 10. We further validated the clusters using silhouette analysis (SA). The pseudo-code of SA is presented in Algorithm 1.
Algorithm 1: Silhouette Analysis (SA)
For every sample
  1.
Find the mean distance from all features in the same cluster ( 𝒶 i )
  2.
Find the mean distance from all features in the closest cluster ( 𝒷 i )
  3.
Find the coefficient: 𝒮 𝒸 = 𝒷 i 𝒶 i m a x ( 𝒶 i , 𝒷 i )
  • If 𝒮 𝒸 = 0 , the sample is very close to the neighboring clusters
  • If 𝒮 𝒸 = 1 , the sample is far away from the neighboring clusters
  • If 𝒮 𝒸 = 1 , the sample is assigned to the wrong clusters
After clustering, the histogram of the clustered vocabularies is drawn to derive the RFV. The RFV has the most important features. In feature reduction, the training and testing features are treated separately because the inter-patient paradigm is more strict than the intra-patient paradigm. The CoF method is illustrated in Figure 6.
After feature reduction, the RFV is given to the classifier for the classification of features into cardiac arrhythmia classes.

3.5. Classification

We used a support vector machine (SVM) for classification [34,35]. An SVM classifies objects by drawing a hyperplane and support vectors. The margin between the support vectors demonstrates the performance of the classifier. The greater the margin of the support vectors, the better the performance of the classifier, and vice versa. We have trained our SVM using RFV of the training dataset, and the RFV of the test dataset was used for performing the classification.
The upcoming section explains the experimental results of the proposed framework.

4. Experimental Results

The proposed framework is evaluated in terms of accuracy, sensitivity, specificity, F1-score, and classification error. Accuracy of the model was calculated using Equation (9).
A c c u r a c y = T P + T N T P + T N + F P + F N
where T P and T N denote true positive and true negative, respectively, whereas F P and F N denote false positive and false negative, respectively. The accuracy of the system shows its ability to correctly classify arrhythmia classes. Specificity is the ratio of the prediction of normal beats present in the case of binary classification and can be calculated using Equation (10).
S p e c i f i c i t y   S P = T N T N + F P
The ratio of the prediction of abnormal or cardiac arrhythmia class is called the sensitivity of the model and can be determined using Equation (11).
S e n s i t i v i t y   S E = T P T P + F N
The F1-score is the mean of the specificity and sensitivity; the formula to calculate the F1-score is given in Equation (12).
F 1 s c o r e = S E S P S E + S P 2
Here, S E and S P denote sensitivity and specificity, respectively. We also considered Cohen’s kappa for the evaluation of our model. This can be calculated using Equation (13).
C o h e n s   K a p p a   κ = T P . T N F P . F N T P + F P . F P + T N + T P + F N . F N + T N 2
The optimal simulation parameters for training of the 36 million parameters of ArrhythmiaNet are shown in Table 2.
The performance of ArrhythmiaNet was compared with the pre-trained D-CNNs, and is shown in Table 3.
From Table 3, the performance of the proposed ArrhythmiaNet based framework is better than the other pre-trained D-CNNs. We have also compared the performance of the proposed ArrhythmiaNet with the PhysioNet dataset. The performance of the different kernels of SVM and kNN for the MIT-BIH and PhysioNet datasets is shown in Figure 7.
We have also compared the accuracy of ArrhythmiaNet with the existing models. This comparison is presented in Table 4.
From Table 4, all the CNN-based models which used ECG as 2D signals considered a maximum of eight classes of cardiac arrhythmia, and the maximum accuracy achieved by [7] was 99.11%. We have considered seventeen classes of arrhythmia and achieved 99.84%, which outperforms all the existing methods.
We also evaluated the classification accuracy of both classifiers for the MIT-BIH dataset for different clusters in the CoF module; the highest accuracy was achieved at 10 clusters. The classification accuracies of SVM and kNN for different clusters are shown in Figure 8 and Figure 9, respectively.
The confusion matrix of ArrhythmiaNet using the SVM classifier is shown in Figure 10.

4.1. Ablation Study

We performed an ablation study to show the impact of the attention block added in ArrhythmiaNet. Initially, we removed the complete block and calculated the performance metrics of the network. Then, we added the block and calculate the performance metrics. The accuracy of ArrhythmiaNet without the attention block was 90.71%, which is significantly lower than the other D-CNN models. However, when attention model block was added, more detailed features were extracted, and the accuracy of the network was 99.84%, which outperformed the other D-CNNs models. Figure 11 shows the confusion matrix of ArrhythmiaNet without the attention block.

4.2. Limitations and Future Directions

The proposed framework is dependent on the attention block, and the accuracy of the model decreases if the attention block is removed. The performance of the model also varies by selecting different features. The inter-patient paradigm is also a factor which affect the performance of the model. These limitations can be resolved by the use of class tokens and the multi attention heads similar to the vision transformers. In future, we plan to use a hybrid model of vision transformers to categorize different classes of arrhythmic cardiac and to resolve these limitations.
Section 5 presents a brief conclusion of this research.

5. Conclusions

Cardiovascular diseases are the primary cause of death. Most deaths are due to heart attacks. An irregular heartbeat causes a heart attack. A normal heartbeat has rhythm in the ECG plot, whereas an abnormal heartbeat shows an irregular ECG plot. These irregular ECGs are called cardiac arrhythmia. The timely classification of these cardiac arrhythmias can avoid potential damage. In this article, we propose the novel attention-based ArrhythmiaNet with a CoF module to categorize seventeen classes of heartbeats. The proposed method achieved 99.84% accuracy with an SVM classifier. The sensitivity of the proposed technique was 100%, and the F1-score was 99%. The classification accuracy of ArrhythmiaNet with a kNN classifier was 98.64%, which is inferior to SVM. We have also compared the proposed framework with existing methods, and the experimental results verify that ArrhythmiaNet outperforms all the existing techniques in terms of accuracy.

Author Contributions

Conceptualization, S.J. and M.R.; methodology, S.J.; software, S.J.; validation, M.R.; formal analysis, S.J.; investigation, M.R.; resources, M.R.; data curation, S.J.; writing—original draft preparation, S.J.; writing—review and editing, M.R.; visualization, M.R.; supervision, M.R.; project administration, M.R.; funding acquisition, M.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Dataset link: https://doi.org/10.17632/7dybx7wyfn.3 (accessed on 1 March 2022).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Mc Namara, K.; Alzubaidi, H.; Jackson, J.K. Cardiovascular disease as a leading cause of death: How are pharmacists getting involved? Integr. Pharm. Res. Pract. 2019, 8, 1–11. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. Gregory, T.S.; Oshinski, J.N.; Tse, Z.T.H. ECG Electrode Placements for Magnetohydrodynamic Voltage Suppression. J. Imaging 2018, 4, 94. [Google Scholar] [CrossRef] [Green Version]
  3. Pławiak, P.; Abdar, M. Novel methodology for cardiac arrhythmias classification based on long-duration ECG signal fragments analysis. In Biomedical Signal Processing; Springer: Singapore, 2020; pp. 225–272. [Google Scholar]
  4. Prasad, H.; Martis, R.J.; Acharya, U.R.; Min, L.C.; Suri, J.S. Application of higher order spectra for accurate delineation of atrial arrhythmia. In Proceedings of the 2013 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, Japan, 3–7 July 2013; pp. 57–60. [Google Scholar]
  5. Park, J.; Lee, K.; Kang, K. Arrhythmia detection from heartbeat using k-nearest neighbor classifier. In Proceedings of the 2013 IEEE International Conference on Bioinformatics and Biomedicine, Shanghai, China, 18–21 December 2013; pp. 15–22. [Google Scholar]
  6. Savalia, S.; Emamian, V. Cardiac Arrhythmia Classification by Multi-Layer Perceptron and Convolution Neural Networks. Bioengineering 2018, 5, 35. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  7. Ullah, A.; Anwar, S.M.; Bilal, M.; Mehmood, R.M. Classification of Arrhythmia by Using Deep Learning with 2-D ECG Spectral Image Representation. Remote Sens. 2020, 12, 1685. [Google Scholar] [CrossRef]
  8. Lee, H.; Yoon, T.; Yeo, C.; Oh, H.; Ji, Y.; Sim, S.; Kang, D. Cardiac Arrhythmia Classification Based on One-Dimensional Morphological Features. Appl. Sci. 2021, 11, 9460. [Google Scholar] [CrossRef]
  9. Wang, D.; Meng, Q.; Chen, D.; Zhang, H.; Xu, L. Automatic Detection of Arrhythmia Based on Multi-Resolution Representation of ECG Signal. Sensors 2020, 20, 1579. [Google Scholar] [CrossRef] [Green Version]
  10. Li, D.; Wu, H.; Zhao, J.; Tao, Y.; Fu, J. Automatic Classification System of Arrhythmias Using 12-Lead ECGs with a Deep Neural Network Based on an Attention Mechanism. Symmetry 2020, 12, 1827. [Google Scholar] [CrossRef]
  11. Faust, O.; Kareem, M.; Ali, A.; Ciaccio, E.J.; Acharya, U.R. Automated Arrhythmia Detection Based on RR Intervals. Diagnostics 2021, 11, 1446. [Google Scholar] [CrossRef]
  12. Ullah, A.; Rehman, S.U.; Tu, S.; Mehmood, R.M.; Fawad; Ehatisham-ul-haq, M. A Hybrid Deep CNN Model for Abnormal Arrhythmia Detection Based on Cardiac ECG Signal. Sensors 2021, 21, 951. [Google Scholar] [CrossRef]
  13. Kobat, M.A.; Karaca, O.; Barua, P.D.; Dogan, S. PrismatoidPatNet54: An Accurate ECG Signal Classification Model Using Prismatoid Pattern-Based Learning Architecture. Symmetry 2021, 13, 1914. [Google Scholar] [CrossRef]
  14. Hwang, W.H.; Jeong, C.H.; Hwang, D.H.; Jo, Y.C. Automatic Detection of Arrhythmias Using a YOLO-Based Network with Long-Duration ECG Signals. Eng. Proc. 2020, 2, 84. [Google Scholar] [CrossRef]
  15. Huang, J.; Chen, B.; Yao, B.; He, W. ECG arrhythmia classification using STFT-based spectrogram and convolutional neural network. IEEE Access 2019, 7, 92871–92880. [Google Scholar] [CrossRef]
  16. Qaisar, S.M.; Mihoub, A.; Krichen, M.; Nisar, H. Multirate Processing with Selective Subbands and Machine Learning for Efficient Arrhythmia Classification. Sensors 2021, 21, 1511. [Google Scholar] [CrossRef] [PubMed]
  17. Sraitih, M.; Jabrane, Y.; Hajjam El Hassani, A. An Automated System for ECG Arrhythmia Detection Using Machine Learning Techniques. J. Clin. Med. 2021, 10, 5450. [Google Scholar] [CrossRef] [PubMed]
  18. Scirè, A.; Tropeano, F.; Anagnostopoulos, A.; Chatzigiannakis, I. Fog-Computing-Based Heartbeat Detection and Arrhythmia Classification Using Machine Learning. Algorithm 2019, Algorithm 12 and Algorithm 32. [CrossRef] [Green Version]
  19. Mjahad, A.; Rosado-Muñoz, A.; Guerrero-Martínez, J.F.; Bataller-Mompeán, M.; Francés-Villora, J.V.; Dutta, M.K. Detection of Ventricular Fibrillation Using the Image from Time-Frequency Representation and Combined Classifiers without Feature Extraction. Appl. Sci. 2018, 8, 2057. [Google Scholar] [CrossRef] [Green Version]
  20. Jamil, S.; Fawad; Rahman, M.; Ullah, A.; Badnava, S.; Forsat, M.; Mirjavadi, S.S. Malicious UAV Detection Using Integrated Audio and Visual Features for Public Safety Applications. Sensors 2020, 20, 3923. [Google Scholar] [CrossRef]
  21. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 770–778. [Google Scholar]
  22. Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
  23. Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 2818–2826. [Google Scholar]
  24. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 1–9. [Google Scholar]
  25. Liu, G.; Zhang, C.; Xu, Q.; Cheng, R.; Song, Y.; Yuan, X.; Sun, J. I3D-Shufflenet Based Human Action Recognition. Algorithm 2020, Algorithm 13 and Algorithm 301. [CrossRef]
  26. Wang, A.; Wang, M.; Jiang, K.; Cao, M.; Iwahori, Y. A Dual Neural Architecture Combined SqueezeNet with OctConv for LiDAR Data Classification. Sensors 2019, 19, 4927. [Google Scholar] [CrossRef] [Green Version]
  27. Tan, M.; Le, Q. Efficientnet: Rethinking model scaling for convolutional neural networks. In Proceedings of the International Conference on Machine Learning (PMLR), Long Beach, CA, USA, 9–15 June 2019; pp. 6105–6114. [Google Scholar]
  28. Chao, X.; Hu, X.; Feng, J.; Zhang, Z.; Wang, M.; He, D. Construction of Apple Leaf Diseases Identification Networks Based on Xception Fused by SE Module. Appl. Sci. 2021, 11, 4614. [Google Scholar] [CrossRef]
  29. Demertzis, K.; Tsiknas, K.; Takezis, D.; Skianis, C.; Iliadis, L. Darknet Traffic Big-Data Analysis and Network Management for Real-Time Automating of the Malicious Intent Detection Process by a Weight Agnostic Neural Networks Framework. Electronics 2021, 10, 781. [Google Scholar] [CrossRef]
  30. Pławiak, P. ECG Signals (1000 Fragments), version 3; Mendeley Data, 2017. [CrossRef]
  31. Yang, Y.; Deng, H. GC-YOLOv3: You Only Look Once with Global Context Block. Electronics 2020, 9, 1235. [Google Scholar] [CrossRef]
  32. Zhou, J.; He, Z.; Song, Y.N.; Wang, H.; Yang, X.; Lian, W.; Dai, H.N. Precious metal price prediction based on deep regularization self-attention regression. IEEE Access 2019, 8, 2178–2187. [Google Scholar] [CrossRef]
  33. Asghar, M.A.; Khan, M.J.; Fawad; Amin, Y.; Rizwan, M.; Rahman, M.; Badnava, S.; Mirjavadi, S.S. EEG-Based Multi-Modal Emotion Recognition using Bag of Deep Features: An Optimal Feature Selection Approach. Sensors 2019, 19, 5218. [Google Scholar] [CrossRef] [Green Version]
  34. Jamil, S.; Rahman, M.; Haider, A. Bag of Features (BoF) Based Deep Learning Framework for Bleached Corals Detection. Big Data Cogn. Comput. 2021, 5, 53. [Google Scholar] [CrossRef]
  35. Bakheet, S. An SVM Framework for Malignant Melanoma Detection Based on Optimized HOG Features. Computation 2017, 5, 4. [Google Scholar] [CrossRef] [Green Version]
Figure 1. ECG lead placement with components of ECG beat.
Figure 1. ECG lead placement with components of ECG beat.
Jimaging 08 00070 g001
Figure 2. Block diagram of the proposed framework.
Figure 2. Block diagram of the proposed framework.
Jimaging 08 00070 g002
Figure 3. Complete ECG signal with its segmented beats: (a) complete ECG signal; (b) segmented beats.
Figure 3. Complete ECG signal with its segmented beats: (a) complete ECG signal; (b) segmented beats.
Jimaging 08 00070 g003
Figure 4. Proposed ArrhythmiaNet with the attention block.
Figure 4. Proposed ArrhythmiaNet with the attention block.
Jimaging 08 00070 g004
Figure 5. Attention block.
Figure 5. Attention block.
Jimaging 08 00070 g005
Figure 6. Features reduction with the clump of features (CoF) method.
Figure 6. Features reduction with the clump of features (CoF) method.
Jimaging 08 00070 g006
Figure 7. Performance of the different kernels of both classifiers on MIT-BIH and PhysioNet datasets: (a) SVM classifier; (b) kNN classifier.
Figure 7. Performance of the different kernels of both classifiers on MIT-BIH and PhysioNet datasets: (a) SVM classifier; (b) kNN classifier.
Jimaging 08 00070 g007aJimaging 08 00070 g007b
Figure 8. Classification accuracy of SVM for different values of k clusters.
Figure 8. Classification accuracy of SVM for different values of k clusters.
Jimaging 08 00070 g008
Figure 9. Classification accuracy of kNN for different values of k clusters.
Figure 9. Classification accuracy of kNN for different values of k clusters.
Jimaging 08 00070 g009
Figure 10. Confusion matrix of the ArrhythmiaNet with SVM classifier.
Figure 10. Confusion matrix of the ArrhythmiaNet with SVM classifier.
Jimaging 08 00070 g010
Figure 11. Confusion matrix of ArrhythmiaNet without the attention block.
Figure 11. Confusion matrix of ArrhythmiaNet without the attention block.
Jimaging 08 00070 g011
Table 1. Summary of dataset classes.
Table 1. Summary of dataset classes.
Class NameNumber of Samples
NSR283
APB66
AFL20
AFIB135
SVTA13
WPW21
PVC133
Bigeminy55
Trigeminy13
VT10
IVR10
VFL10
Fusion11
LBBBB103
RBBBB62
SDHB10
PR45
Table 2. Summary of hyperparameters for ArrhythmiaNet training.
Table 2. Summary of hyperparameters for ArrhythmiaNet training.
Parameter NameParameter Value
OptimizerStochastic Gradient Descent (SGD)
Momentum0.9
Learning Rate0.001
Mini batch size32
Learning rate decay10−7
Loss functionCross entropy
Table 3. Comparison of the testing performance of the different D-CNNs with ArrhythmiaNet.
Table 3. Comparison of the testing performance of the different D-CNNs with ArrhythmiaNet.
Name of D-CNNClassifierAccuracyF1-ScoreSensitivitySpecificityCohen’s KappaError
AlexNet [20]SVM98.70%0.96897.10%96.50%0.9501.30%
ResNet-50 [21]SVM95.40%0.95194.60%95.60%0.9304.60%
VGG-19 [22]SVM89.80%0.91893.3%90.40%0.90010.20%
Inception v3 [23]SVM98.20%0.95194.6%95.60%0.9301.80%
GoogLeNet [24]SVM94.40%0.93092.50%93.50%0.9105.60%
ShuffleNet [25]SVM96.80%0.96495.40%97.40%0.9403.20%
SqueezeNet [26]SVM86.83%0.91893.30%90.40%0.89013.17%
EfficientNetb0 [27]SVM96.50%0.996100%99.20%0.9803.50%
Xception [28]SVM98.55%0.996100%99.20%0.9801.45%
DarkNet-53 [29]SVM96.35%0.92892.3%93.30%0.9003.65%
ArrhythmiaNetSVM99.84%0.998100%99.60%0.9900.16%
Table 4. Comparison of the performance of ArrhythmiaNet with the state-of-the-art techniques.
Table 4. Comparison of the performance of ArrhythmiaNet with the state-of-the-art techniques.
Ref.ModelECG SignalArrhythmia ClassesAccuracy
[4]kNN1D0397.65%
[5]kNN1D1797.22%
[6]MLP1D0988.7%
[7]CNN2D0899.11%
[8]GLCM1D0690.42%
[10]Attention-based CNN1D0792.8%
[12]CNN2D0899.02%
[13]SVM1D1797.3%
[15]CNN2D0499.00%
[16]SVM1D0497.06%
[17]SVM1D0483.00%
This paperArrhythmiaNet2D1799.84%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Jamil, S.; Rahman, M. A Novel Deep-Learning-Based Framework for the Classification of Cardiac Arrhythmia. J. Imaging 2022, 8, 70. https://doi.org/10.3390/jimaging8030070

AMA Style

Jamil S, Rahman M. A Novel Deep-Learning-Based Framework for the Classification of Cardiac Arrhythmia. Journal of Imaging. 2022; 8(3):70. https://doi.org/10.3390/jimaging8030070

Chicago/Turabian Style

Jamil, Sonain, and MuhibUr Rahman. 2022. "A Novel Deep-Learning-Based Framework for the Classification of Cardiac Arrhythmia" Journal of Imaging 8, no. 3: 70. https://doi.org/10.3390/jimaging8030070

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop