Efficient Lightweight Multimodel Deep Fusion Based on ECG for Arrhythmia Classification
Abstract
:1. Introduction
- We propose a lightweight deep learning model with low parameters and a small number of layers, which makes this model less complex than other previous models for arrhythmia classification. We proposed a model that consists of lower layers and achieved high accuracy, whereas other lightweight models obtained very low accuracy.
- We propose a novel multimodal deep fusion and hypered architecture that makes use of CNNs based on ECG for arrhythmia classification. Our model investigates whole signals rather than segments, which avoids unnecessary computations when segments overlap and allows our network to scale up more effectively as signal quality increases.
- The proposed multimodel is a totally end-to-end learning model that uses CNN for single-lead ECG signal, which decreases the complexity of the model and decreases the time of implementation. Unlike some previous models that used separate classifiers or separate stages for extracting or selecting the features, our model combines all these stages into only one stage.
- The cross-validation technique is employed to solve the unbalanced problem of the used data. In addition, it makes our system more robust and fix the overfitting problem.
- We demonstrate an accurate model that outperforms most of the previous methods on small datasets, especially the lightweight deep models.
2. Previous Methods for Arrythmia Classification
3. Materials and Methods
MIT–BIH Database
- In the first case, we tested the proposed first deep model as a single model and evaluated the performance of this model on the dataset. This model consists of four convolutional layers and each one is followed by one batch normalization, maxpooling layer, and ReLU activation function. Table 1 shows the analysis of the layers for the first proposed model.
- In the second case, we tested the proposed second deep model as a single model and evaluated the performance of this model on the dataset. This model consists of eight convolutional layers and every two layers are followed by one batch normalization, maxpooling layer, and finally ReLU activation function. Table 2 shows the analysis of the layers for the second proposed model.
- In the third case, we combine the two models into one model to take advantage of their prior knowledge and weights found for arrhythmia classification. Figure 4 shows the architecture of our multimodal where the input is the ECG signals from the dataset.
- Instead of using one convolutional layer, we used two convolutional layers, which allows a hierarchical decomposition of the input.
- We employed eight convolutional layers instead of using three convolutional layers, which makes the model deeper and capable of extracting more features.
- We employed in this model three maxpooling layers and the output of the third one was passed to the fully connected layer. In contrast to the first model, the output of the last convolutional layer is passed to the fully connected layer.
- The size of the feature map that is fed to the fully connected layer is 50 × 50, unlike the first model which is 100 × 100.
- Finally, this model consists of eight convolutional layers and only three maxpooling layers, which is considered to be a lightweight model.
4. Experimental Study, Results, and Discussion
4.1. Implementation Environment, Performance Metrics, and Evaluation Method
4.2. Experimental Results and Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Rolls, H.K.; Stevenson, W.G.; Strichartz, G.R.; Lilly, L.S. Mechanisms of cardiac arrhythmias. In Pathophysiology of Heart Disease, 4th ed.; Lippincott Wiliams & Wilkins: Philadelphia, PA, USA, 2007; pp. 280–302. [Google Scholar]
- Klatsky, A. Alcohol and cardiovascular diseases: Where do we stand today? J. Intern. Med. 2015, 278, 238–250. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Watkinson, W.P.; Campen, M.J.; Costa, D.L. Cardiac arrhythmia induction after exposure to residual oil fly ash particles in a rodent model of pulmonary hypertension. Toxicol. Sci. 1998, 41, 209–216. [Google Scholar] [CrossRef] [PubMed]
- Hammad, M.; Maher, A.; Wang, K.; Jiang, F.; Amrani, M. Detection of abnormal heart conditions based on characteristics of ECG signals. Measurement 2018, 125, 634–644. [Google Scholar] [CrossRef]
- Sakr, A.S.; Soliman, N.F.; Al-Gaashani, M.S.; Pławiak, P.; Ateya, A.A.; Hammad, M. An Efficient Deep Learning Approach for Colon Cancer Detection. Appl. Sci. 2022, 12, 8450. [Google Scholar] [CrossRef]
- Hammad, M.; Bakrey, M.; Bakhiet, A.; Tadeusiewicz, R.; Abd El-Latif, A.A.; Pławiak, P. A novel end-to-end deep learning approach for cancer detection based on microscopic medical images. Biocybern. Biomed. Eng. 2022, 42, 737–748. [Google Scholar] [CrossRef]
- Hammad, M.; Tawalbeh, L.; Iliyasu, A.M.; Sedik, A.; Abd El-Samie, F.E.; Alkinani, M.H.; Abd El-Latif, A.A. Efficient multimodal deep-learning-based COVID-19 diagnostic system for noisy and corrupted images. J. King Saud Univ. Sci. 2022, 34, 101898. [Google Scholar] [CrossRef]
- Alam, S.; Shuaib, M.; Ahmad, S.; Jayakody, D.N.K.; Muthanna, A.; Bharany, S.; Elgendy, I.A. Blockchain-Based Solutions Supporting Reliable Healthcare for Fog Computing and Internet of Medical Things (IoMT) Integration. Sustainability 2022, 14, 15312. [Google Scholar] [CrossRef]
- Kiranyaz, S.; Ince, T.; Gabbouj, M. Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Trans. Biomed. Eng. 2015, 63, 664–675. [Google Scholar] [CrossRef]
- Diker, A.; Cömert, Z.; Avcı, E.; Toğaçar, M.; Ergen, B. A novel application based on spectrogram and convolutional neural network for ECG classification. In Proceedings of the 2019 1st International Informatics and Software Engineering Conference (UBMYK), Ankara, Turkey, 6–7 November 2019; IEEE: New York, NY, USA, 2019; pp. 1–6. [Google Scholar]
- Singh, S.; Pandey, S.K.; Pawar, U.; Janghel, R.R. Classification of ECG arrhythmia using recurrent neural networks. Procedia Comput. Sci. 2018, 132, 1290–1297. [Google Scholar] [CrossRef]
- Xu, S.S.; Mak, M.W.; Cheung, C.C. Towards end-to-end ECG classification with raw signal extraction and deep neural networks. IEEE J. Biomed. Health Inform. 2018, 23, 1574–1584. [Google Scholar] [CrossRef]
- Fan, X.; Yao, Q.; Cai, Y.; Miao, F.; Sun, F.; Li, Y. Multiscaled fusion of deep convolutional neural networks for screening atrial fibrillation from single lead short ECG recordings. IEEE J. Biomed. Health Inform. 2018, 22, 1744–1753. [Google Scholar] [CrossRef]
- Panda, R.; Jain, S.; Tripathy, R.; Acharya, U.R. Detection of shockable ventricular cardiac arrhythmias from ECG signals using FFREWT filter-bank and deep convolutional neural network. Comput. Biol. Med. 2020, 124, 103939. [Google Scholar] [CrossRef]
- 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]
- Hammad, M.; Abd El-Latif, A.A.; Hussain, A.; Abd El-Samie, F.E.; Gupta, B.B.; Ugail, H.; Sedik, A. Deep Learning Models for Arrhythmia Detection in IoT Healthcare Applications. Comput. Electr. Eng. 2022, 100, 108011. [Google Scholar] [CrossRef]
- Hammad, M.; Iliyasu, A.M.; Subasi, A.; Ho, E.S.; Abd El-Latif, A.A. A multitier deep learning model for arrhythmia detection. IEEE Trans. Instrum. Meas. 2020, 70, 1–9. [Google Scholar] [CrossRef]
- Hammad, M.; Chelloug, S.A.; Alkanhel, R.; Prakash, A.J.; Muthanna, A.; Elgendy, I.A.; Pławiak, P. Automated Detection of Myocardial Infarction and Heart Conduction Disorders Based on Feature Selection and a Deep Learning Model. Sensors 2022, 22, 6503. [Google Scholar] [CrossRef]
- Houssein, E.H.; Hassaballah, M.; Ibrahim, I.E.; AbdElminaam, D.S.; Wazery, Y.M. An automatic arrhythmia classification model based on improved marine predators algorithm and convolutions neural networks. Expert Syst. Appl. 2022, 187, 115936. [Google Scholar] [CrossRef]
- Atal, D.K.; Singh, M. Arrhythmia classification with ECG signals based on the optimization-enabled deep convolutional neural network. Comput. Methods Programs Biomed. 2020, 196, 105607. [Google Scholar] [CrossRef]
- Chen, C.; Hua, Z.; Zhang, R.; Liu, G.; Wen, W. Automated arrhythmia classification based on a combination network of CNN and LSTM. Biomed. Signal Process. Control 2020, 57, 101819. [Google Scholar] [CrossRef]
- Ji, Y.; Zhang, S.; Xiao, W. Electrocardiogram classification based on faster regions with convolutional neural network. Sensors 2019, 19, 2558. [Google Scholar] [CrossRef]
- 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]
- Romdhane, T.F.; Alhichri, H.; Ouni, R.; Atri, M. Electrocardiogram heartbeat classification based on a deep convolutional neural network and focal loss. Comput. Biol. Med. 2020, 123, 103866. [Google Scholar] [CrossRef] [PubMed]
- Shi, H.; Qin, C.; Xiao, D.; Zhao, L.; Liu, C. Automated heartbeat classification based on deep neural network with multiple input layers. Knowl. Based Syst. 2020, 188, 105036. [Google Scholar] [CrossRef]
- Yıldırım, Ö.; Pławiak, P.; Tan, R.S.; Acharya, U.R. Arrhythmia detection using deep convolutional neural network with long duration ECG signals. Comput. Biol. Med. 2018, 102, 411–420. [Google Scholar] [CrossRef] [PubMed]
- Yildirim, O.; Baloglu, U.B.; Tan, R.S.; Ciaccio, E.J.; Acharya, U.R. A new approach for arrhythmia classification using deep coded features and LSTM networks. Comput. Methods Programs Biomed. 2019, 176, 121–133. [Google Scholar] [CrossRef] [PubMed]
- Gui, G.; Liu, F.; Sun, J.; Yang, J.; Zhou, Z.; Zhao, D. Flight delay prediction based on aviation big data and machine learning. IEEE Trans. Veh. Technol. 2019, 69, 140–150. [Google Scholar] [CrossRef]
- Luz, E.J.d.S.; Nunes, T.M.; De Albuquerque, V.H.C.; Papa, J.P.; Menotti, D. ECG arrhythmia classification based on optimum-path forest. Expert Syst. Appl. 2013, 40, 3561–3573. [Google Scholar] [CrossRef] [Green Version]
- Pan, G.; Xin, Z.; Shi, S.; Jin, D. Arrhythmia classification based on wavelet transformation and random forests. Multimed. Tools Appl. 2018, 77, 21905–21922. [Google Scholar] [CrossRef]
- Li, H.; Yuan, D.; Wang, Y.; Cui, D.; Cao, L. Arrhythmia classification based on multi-domain feature extraction for an ECG recognition system. Sensors 2016, 16, 1744. [Google Scholar] [CrossRef] [Green Version]
- Hammad, M.; Kandala, R.N.; Abdelatey, A.; Abdar, M.; Zomorodi-Moghadam, M.; San Tan, R.; Acharya, U.R.; Pławiak, J.; Tadeusiewicz, R.; Makarenkov, V.; et al. Automated detection of Shockable ECG signals: A Review. Inf. Sci. 2021, 571, 580–604. [Google Scholar] [CrossRef]
- Liu, X.; Wang, H.; Li, Z.; Qin, L. Deep learning in ECG diagnosis: A review. Knowl. Based Syst. 2021, 227, 107187. [Google Scholar] [CrossRef]
- Rahul, J.; Sharma, L.D. Artificial intelligence-based approach for atrial fibrillation detection using normalised and short-duration time-frequency ECG. Biomed. Signal Process. Control 2022, 71, 103270. [Google Scholar] [CrossRef]
- Hammad, M.; Zhang, S.; Wang, K. A novel two-dimensional ECG feature extraction and classification algorithm based on convolution neural network for human authentication. Future Gener. Comput. Syst. 2019, 101, 180–196. [Google Scholar] [CrossRef]
- Moody, G.B.; Mark, R.G. The impact of the MIT-BIH arrhythmia database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef]
- Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, e215–e220. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Prusty, S.; Patnaik, S.; Dash, S.K. SKCV: Stratified K-fold cross-validation on ML classifiers for predicting cervical cancer. Front. Nanotechnol. 2022, 4, 972421. [Google Scholar] [CrossRef]
No. | Name | Type | Activation | Learnable |
---|---|---|---|---|
1 | imageinput 400 × 400 × 3 images | Image Input | 400 × 400 × 3 | - |
2 | conv_1 8 3 × 3 × 3 convolutions with stride [1 1] and padding ’same’ | Convolution | 400 × 400 × 8 | Weight 3 × 3 × 8
Bias 1 × 1 × 8 |
3 | batchnorm_1 Batch normalization with 8 channels | Batch normalization | 400 × 400 × 8 | Offest 1 × 1 × 8 Scale 1 × 1 × 8 |
4 | relu_1 ReLU | ReLU | 400 × 400 × 8 | - |
5 | maxpool_1 2 × 2 max pooling with stride [2 2] and padding [0 0 0 0] | Maxpooling | 200 × 200 × 8 | - |
6 | conv_2 16 3 × 3 × 8 convolutions with stride [1 1] and padding ’same’ | Convolution | 200 × 200 × 16 | Weight 3 × 3 × 8 × 16
Bias 1 × 1 × 16 |
7 | batchnorm_2 Batch normalization with 16 channels | Batch normalization | 200 × 200 × 16 | Offest 1 × 1 × 16 Scale 1 × 1 × 16 |
8 | relu_2 ReLU | ReLU | 200 × 200 × 16 | - |
9 | maxpool_2 2 × 2 max pooling with stride [2 2] and padding [0 0 0 0] | Max Pooling | 100 × 100 × 16 | - |
10 | conv_3 32 3 × 3 × 16 convolutions with stride [1 1] and padding ’same’ | Convolution | 100 × 100 × 32 | Weight 3 × 3 × 16 × 32
Bias 1 × 1 × 32 |
11 | batchnorm_3 Batch normalization with 32 channels | Batch normalization | 100 × 100 × 32 | Offest 1 × 1 × 32 Scale 1 × 1 × 32 |
12 | relu_3 ReLU | ReLU | 100 × 100 × 32 | - |
13 | fc 5 fully connected layer | Fully Connected | 1 × 1 × 5 | Weight 5 × 320,000
Bias 5 × 1 |
14 | softmax softmax | softmax | 1 × 1 × 5 | - |
15 | classoutput crossentropyex | Classification Output | - | - |
No. | Name | Type | Activation | Learnable |
---|---|---|---|---|
1 | inputimage 400 × 400 × 3 images | Input Image | 400 × 400 × 3 | - |
2 | convol_1 8 3 × 3 × 3 with stride = [1 1] and padding = ’same’ | Convolutional | 400 × 400 × 8 | Weight 3 × 3 × 8
Bias 1 × 1 × 8 |
3 | convol_2 8 3 × 3 × 8 | Convolutional | 400 × 400 × 8 | Weight 3 × 3 × 8 × 8
Bias 1 × 1 × 8 |
4 | batchnorm_1 with 8 channels | Batch normalization | 400 × 400 × 8 | Offset 1 × 18
Scale 1 × 1 × 8 |
5 | relu_1 | ReLU | 400 × 400 × 8 | - |
6 | maxpool_1 2 × 2 with stride = [2 2] and padding = [0 0 0 0] | Maxpooling | 200 × 200 × 8 | - |
7 | convol_3 16 3 × 3 × 8 | Convolutional | 200 × 200 × 16 | Weight 3 × 3 × 8 × 16
Bias 1 × 1 × 16 |
8 | convol_4 16 3 × 3 × 16 | Convolutional | 200 × 200 × 16 | Weight 3 × 3 × 16 × 16
Bias 1 × 1 × 16 |
9 | batchnorm_2 with 16 channels | Batch normalization | 200 × 200 × 16 | Offest 1 × 1 × 16
Scale 1 × 1 × 16 |
10 | relu_2 | ReLU | 200 × 200 × 16 | - |
11 | maxpool_2 2 × 2 | Maxpooling | 100 × 100 × 16 | - |
12 | convol_5 32 3 × 3 × 16 | Convolutional | 100 × 100 × 32 | Weight 3 × 3 × 16 × 32
Bias 1 × 1 × 32 |
13 | convol_6 32 3 × 3 × 32 | Convolutional | 100 × 100 × 32 | Weight 3 × 3 × 32 × 32
Bias 1 × 1 × 32 |
14 | batchnorm_3 with 32 channels | Batch normalization | 100 × 100 × 32 | Offest 1 × 1 × 32 Scale 1 × 1 × 32 |
15 | relu_3 | ReLU | 100 × 100 × 32 | - |
16 | convol_7 64 3 × 3 × 32 | Convolutional | 100 × 100 × 64 | Weight 3 × 3 × 32 × 64
Bias 1 × 1 × 64 |
17 | convol_8 64 3 × 3 × 32 | Convolutional | 100 × 100 × 64 | Weight 3 × 3 × 64 × 64
Bias 1 × 1 × 64 |
18 | batchnorm_4 with 64 channels | Batch normalization | 100 × 100 × 64 | Offest 1 × 1 × 64 Scale 1 × 1 × 64 |
19 | relu_4 | ReLU | 100 × 100 × 64 | - |
20 | maxpool_3 2 × 2 | Maxpooling | 50 × 50 × 16 | - |
21 | fc 5 fully connected layer | Fully Connected | 1 × 1 × 5 | Weight 5 × 160,000 Bias 5 × 1 |
22 | softmax | Softmax | 1 × 1 × 5 | - |
23 | classoutput crossentropyex | Classification Output | - | - |
Model | Accuracy (Acc) | Speciificity (Speci) | Sensitivity (Se) | Elapsed Time |
---|---|---|---|---|
First Model | 0.640 | 0.761 | 0.542 | 96 s |
Second Model | 0.862 | 0.897 | 0.826 | 134 s |
Multimodal | 0.988 | 0.988 | 0.988 | 153 s |
Fold# | TP | FN | FB | TN | +Pr | Se | Acc |
---|---|---|---|---|---|---|---|
1 | 42 | 1 | 0 | 5 | 1 | 0.976 | 0.979 |
2 | 42 | 1 | 1 | 4 | 0.976 | 0.976 | 0.958 |
3 | 43 | 0 | 0 | 5 | 1 | 1 | 1 |
4 | 43 | 0 | 0 | 5 | 1 | 1 | 1 |
5 | 43 | 0 | 2 | 3 | 0.955 | 1 | 0.961 |
6 | 43 | 0 | 0 | 5 | 1 | 1 | 1 |
7 | 41 | 2 | 0 | 5 | 1 | 0.953 | 0.980 |
8 | 43 | 0 | 0 | 5 | 1 | 1 | 1 |
9 | 43 | 0 | 0 | 5 | 1 | 1 | 1 |
10 | 41 | 2 | 1 | 4 | 0.976 | 0.953 | 0.997 |
Avg/total | 424 | 6 | 4 | 46 | 0.990 | 0.986 | 0.988 |
Author Ref. | Methodology | No. of Layers | Elapsed Time | Performance |
---|---|---|---|---|
Diker et al. [10] | CNN | 12 | N/A | Acc = 0.8382 Se = 0.9545 Speci = 0.6250 |
Singh et al. [11] | RNN+LSTM | 10 | N/A | Acc = 0.8810 Se = 0.9240 Speci = 0.8335 |
Xu et al. [12] | DNN | 10 | N/A | Acc = 0.9970 Se = 0.9768 Speci = 0.9989 |
Fan et al. [13] | CNN | 22 | N/A | Acc = 0.9813 Se = 0.9377 Speci = 0.9877 |
Panda et al. [14] | CNN | 11 | 2151.055 s | Acc = 0.9759, Speci = 0.9955%, Se = 0.9314 |
Rahul and sharma et al. [34] | Bi-directional LSTM | 102 | N/A | Acc = 0.9885, Speci = 0.9890%, Se = 0.9880 |
Amin Ullah et al. [15] | 2D CNN | 24 | N/A | Avg Acc = 98.92%, Avg Speci = 99.67%, Avg Se = 97.26% |
Hammad et al. [16] | CNN+ConvLSTM | 35 | 7200 s | Best Acc = 98% |
Hammad et al. [17] | LSTM+Genetic+KNN | 38 | 322.35 s | Acc = 98.00%, Se = 99.70%, Speci = 95.80% |
Proposed Model | Fusion of CNN | 22 | 153 s | Acc = 98.80%, Se = 98.80%, Speci = 98.80% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hammad, M.; Meshoul, S.; Dziwiński, P.; Pławiak, P.; Elgendy, I.A. Efficient Lightweight Multimodel Deep Fusion Based on ECG for Arrhythmia Classification. Sensors 2022, 22, 9347. https://doi.org/10.3390/s22239347
Hammad M, Meshoul S, Dziwiński P, Pławiak P, Elgendy IA. Efficient Lightweight Multimodel Deep Fusion Based on ECG for Arrhythmia Classification. Sensors. 2022; 22(23):9347. https://doi.org/10.3390/s22239347
Chicago/Turabian StyleHammad, Mohamed, Souham Meshoul, Piotr Dziwiński, Paweł Pławiak, and Ibrahim A. Elgendy. 2022. "Efficient Lightweight Multimodel Deep Fusion Based on ECG for Arrhythmia Classification" Sensors 22, no. 23: 9347. https://doi.org/10.3390/s22239347
APA StyleHammad, M., Meshoul, S., Dziwiński, P., Pławiak, P., & Elgendy, I. A. (2022). Efficient Lightweight Multimodel Deep Fusion Based on ECG for Arrhythmia Classification. Sensors, 22(23), 9347. https://doi.org/10.3390/s22239347