Electrocardiogram Classification Based on Faster Regions with Convolutional Neural Network
"> Figure 1
<p>Overall procedure involved in electrocardiogram (ECG) beat classification.</p> "> Figure 2
<p>Individual intrinsic mode functions (IMFs) after ECG decomposition.</p> "> Figure 3
<p>ECG signal processing flow based on empirical mode decomposition (EMD).</p> "> Figure 4
<p>Comparison of the original signal and the processed signal.</p> "> Figure 5
<p>Find the position of the R wave based on discrete wavelet transform (DWT).</p> "> Figure 6
<p>ECG beat extraction process.</p> "> Figure 7
<p>Normal beat and four ECG arrhythmia beats.</p> "> Figure 8
<p>Faster regions with a convolutional neural network (Faster R-CNN) architecture.</p> "> Figure 9
<p>Region proposal network [<a href="#B36-sensors-19-02558" class="html-bibr">36</a>].</p> "> Figure 10
<p>Intersection-over-union (IoU).</p> "> Figure 11
<p>Non-maximum suppression.</p> "> Figure 12
<p>The detected ECG beats.</p> "> Figure 13
<p>Score threshold test results.</p> "> Figure 14
<p>The detected sample graph consisting of multiple ECG beats.</p> "> Figure 15
<p>Faster R-CNN and one versus rest support vector machine (OVR SVM) comparison results.</p> ">
Abstract
:1. Introduction
2. Methods
2.1. ECG Signal Pre-Processing
2.2. Transforming the ECG Signals into ECG Images
2.2.1. R Wave Detection
2.2.2. Extracting the ECG Beat
2.3. Faster R-CNN Architecture
2.3.1. Region Proposal Network
2.3.2. Loss Function
2.3.3. Convergence Feature Sharing
- (a)
- Initialize the network parameters with a pre-trained model on ImageNet, and fine-tune the RPN network [37];
- (b)
- Use the initialized RPN network in step (a) to extract the region proposal training Fast R-CNN network;
- (c)
- Re-initialize the RPN using the Fast R-CNN network in step (b), fix its convolutional layer while training the RPN network, and only fine-tune its unique layer;
- (d)
- Fix the convolutional layer parameters after the Fast R-CNN learning in step (b). On this basis, use the region proposal extracted by the RPN in step (c) to fine-tune the Fast R-CNN network.
2.3.4. Non-Maximum Suppression
3. Experimental Design
3.1. Experimental Platform
3.2. ECG Beat Classification Criteria
- (1)
- Specificity (Spe): The proportion of normal ECG beats that are correctly classified, which represents the correct rate of non-patients.
- (2)
- Sensitivity (Sen): The proportion of abnormal ECG beats that are correctly classified, which represents the correct ratio of patients.
- (3)
- Positive rate (Pre): The number of abnormally classified ECG beats is correctly classified as the proportion of abnormal ECG beats.
- (4)
- Accuracy (Acc): Proportion of correct classification of ECG beats to all ECG beats.
3.3. Building Dataset
3.4. Network Parameter Optimization
3.4.1. Impact of Learning Rate on Classification Performance
3.4.2. Effect of Weight Attenuation Coefficient on Classification Performance
3.4.3. Influence of the Number of Iterations on Classification Performance
4. Experimental Results and Comparative Analysis
4.1. Experimental Results
- No manual feature extraction is required.
- The sampling rate of the original ECG signal does not need to be considered.
- The approach is insensitive to the ECG signal quality.
- High classification accuracy.
- Training set samples need to be manually labeled.
- Requires long training hours, and specialized hardware to efficiently train datasets (graphics processing unit (GPU)).
4.2. Comparison with Existing Approaches
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Das, M.K.; Ari, S. ECG Beats Classification Using Mixture of Features. Int. Sch. Res. Not. 2014, 2014, 178436. [Google Scholar] [CrossRef] [PubMed]
- Yuzhen, C.; Zengfei, F. Feature search algorithm based on maximum divergence for heart rate classification. J. Biomed. Eng. 2008, 25, 53–56. [Google Scholar]
- Martis, R.J.; Acharya, U.R.; Min, L.C. ECG beat classification using PCA, LDA, ICA and discrete wavelet transform. Biomed. Signal Process. Control 2013, 8, 437–448. [Google Scholar] [CrossRef]
- Martis, R.J.; Acharya, U.R.; Lim, C.M.; Suri, J.S. Characterization of ECG beats from cardiac arrhythmia using discrete cosine transform in PCA framework. Knowl.-Based Syst. 2013, 45, 76–82. [Google Scholar] [CrossRef]
- Dehan, L.; Guanggui, X.U.; Yuhua, Z. Research on ECG signal diagnosis model based on multi-order artificial neural network. Chin. J. Sci. Instrum. 2008, 29, 27–32. [Google Scholar]
- Osowski, S.; Linh, T.H. ECG beat recognition using fuzzy hybrid neural network. IEEE Trans. Biomed. Eng. 2001, 48, 1265–1271. [Google Scholar] [CrossRef] [PubMed]
- Ceylan, R.; Zbay, Y. Comparison of FCM, PCA and WT techniques for classification ECG arrhythmias using artificial neural network. Expert Syst. Appl. 2007, 33, 286–295. [Google Scholar] [CrossRef]
- Hu, J.I. Research on Key Technologies for Automatic Analysis of ECG Signals; National University of Defense Technology: Changsha, China, 2006. [Google Scholar]
- Song, M.H.; Lee, J.; Cho, S.P.; Lee, K.J.; Yoo, S.K. Support vector machine based arrhythmia classification using reduced features. Int. J. Control Autom. Syst. 2005, 3, 571. [Google Scholar]
- Melgani, F.; Bazi, Y. Classification of electrocardiogram signals with support vector machines and particle swarm optimization. IEEE Trans. Inf. Technol. Biomed. 2008, 12, 667–677. [Google Scholar] [CrossRef]
- Martis, R.J.; Acharya, U.R.; Mandana, K.M.; Ray, A.K. Cardiac decision making using higher order spectra. Biomed. Signal Process. Control 2013, 8, 193–203. [Google Scholar] [CrossRef]
- Pławiak, P. Novel Genetic Ensembles of Classifiers Applied to Myocardium Dysfunction Recognition Based on ECG Signals. Swarm Evol. Comput. 2018, 39C, 192–208. [Google Scholar] [CrossRef]
- Labati, R.D.; Munoz, E.; Piuri, V.; Sassi, R. Deep-ECG: Convolultional Neural Networks for ECG biometric recognition. Pattern Recognit. Lett. 2018. [Google Scholar] [CrossRef]
- Pławiak, P. Novel Methodology of Cardiac Health Recognition Based on ECG Signals and Evolutionary-Neural System. Expert Syst. Appl. 2018, 92, 334–349. [Google Scholar] [CrossRef]
- Pławiak, P.; Acharya, U.R. Novel deep genetic ensemble of classifiers for arrhythmia detection using ECG signals. Neural Comput. Appl. 2018. [Google Scholar] [CrossRef]
- Rajpurkar, P.; Hannun, A.Y.; Haghpanahi, M.; Tison, G.H.; Bourn, C.; Turakhia, M.P.; Ng, A.Y. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat. Med. 2019, 25, 65–69. [Google Scholar]
- Beyli, E.D. Combining recurrent neural networks with eigenvector methods for classification of ECG beats. Digit. Signal Process. 2009, 19, 320–329. [Google Scholar]
- Kumar, R.G.; Kumaraswamy, Y.S. Investigating cardiac arrhythmia in ECG using random forest classification. Int. J. Comput. Appl. 2012, 37, 31–34. [Google Scholar]
- Park, J.; Lee, K.; Kang, K. Arrhythmia detection from heartbeat using k-nearest neighbor classifier. In Proceedings of the IEEE International Conference on Bioinformatics and Biomedicine, Shanghai, China, 18–21 December 2013; pp. 15–22. [Google Scholar]
- Jun, T.J.; Park, H.J.; Yoo, H.; Kim, Y. GPU based cloud system for high-performance arrhythmia detection with parallel k-NN algorithm. In Proceedings of the Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Orlando, FL, USA, 16–20 August 2016; pp. 5327–5330. [Google Scholar]
- Kiranyaz, S.; Ince, T.; Gabbouj, M. Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Trans. Biomed. Eng. 2016, 63, 664–675. [Google Scholar] [CrossRef]
- Rajpurkar, P.; Hannun, A.Y.; Haghpanahi, M.; Bourn, C.; Ng, A.Y. Cardiologist-level arrhythmia detection with convolutional neural networks. arXiv 2017, arXiv:1707.01836. [Google Scholar]
- Jun, T.J.; Nguyen, H.M.; Kang, D.; Kim, D.; Kim, D.; Kim, Y. ECG arrhythmia classification using a 2-D convolutional neural network. arXiv 2018, arXiv:1804.06812. [Google Scholar]
- Yıldırım, Ö.; Pławiak, P.; Tan, R.S.; Acharyae, 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]
- Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adam, M.; Gertych, A.; Tan, R.S. A Deep Convolutional Neural Network Model to Classify Heartbeats. Comput. Biol. Med. 2017, 89, 389–396. [Google Scholar] [CrossRef] [PubMed]
- Acharya, U.R.; Fujita, H.; Sudarshan, V.K.; Oh, S.L.; Adam, M.; Koh, J.E.W. Automated detection and localization of myocardial infarction using electrocardiogram: A comparative study of different leads. Knowl.-Based Syst. 2016, 99, 146–156. [Google Scholar] [CrossRef]
- Chauhan, S.; Vig, L. Anomaly detection in ECG time signals via deep long short-term memory networks. In Proceedings of the 2015 IEEE International Conference on Data Science and Advanced Analytics (DSAA), Paris, France, 19–21 October 2015. [Google Scholar]
- Yildirim, Ö. A novel wavelet sequences based on deep bidirectional LSTM network model for ECG signal classification. Comput. Biol. Med. 2018, 96, 189–202. [Google Scholar] [CrossRef] [PubMed]
- Tan, J.H.; Hagiwara, Y.; Pang, W.; Lim, I.; Oh, S.L.; Adam, M.; Tan, R.S.; Chen, M.; Acharya, U.R. Application of stacked convolutional and long short-term memory network for accurate identification of CAD ECG signals. Comput. Biol. Med. 2018, 94, 19–26. [Google Scholar] [CrossRef] [PubMed]
- Warrick, P.; Homsi, M.N. Cardiac Arrhythmia Detection from ECG Combining Convolutional and Long Short-term Memory Networks. arXiv 2018, arXiv:1801.10033. [Google Scholar]
- Shu, L.O.; Eddie, Y.K.; Tan, R.S.; Acharya, U.R. Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats. Comput. Biol. Med. 2018, 102, 278–287. [Google Scholar]
- Hwang, B.; You, J.; Vaessen, T.; Myin-Germeys, I.; Park, C.; Zhang, B.T. Deep ECGNet: An Optimal Deep Learning Framework for Monitoring Mental Stress Usin Ultra Short-Term ECG Signals. Telemed J. E Health 2018, 24, 753–772. [Google Scholar] [CrossRef] [PubMed]
- Huang, N.E.; Shen, Z.; Long, S.R. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc. R. Soc. Lond. A Math. Phys. Eng. Sci. R. Soc. 1998, 454, 903–995. [Google Scholar] [CrossRef]
- Xiao, T.; Li, T.; Zhiwen, M.O. ECG classification strategy based on SVM. J. Biomed. Eng. 2008, 25, 246–249. [Google Scholar]
- Xiaohua, W.; Xuejun, X.; Qiuya, H. An improved electrocardiogram QRS group detection algorithm. Comput. Eng. Sci. 2016, 5, 983–987. [Google Scholar]
- Ren, S.; He, K.; Girshick, R. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Deng, J.; Dong, W.; Socher, R. ImageNet: A large-scale hierarchical image database. In Proceedings of the Conference on IEEE Computer Vision and Pattern Recognition, Miami, FL, USA, 22–24 June 2009; pp. 248–255. [Google Scholar]
- De, C.P.; Reilly, R.B. A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features. IEEE Trans. Biomed. Eng. 2006, 53, 2535–2543. [Google Scholar]
- Zubair, M.; Kim, J.; Yoon, C. An Automated ECG Beat Classification System Using Convolutional Neural Networks. In Proceedings of the 2016 6th International Conference on IT Convergence and Security (ICITCS), Prague, Czech Republic, 26 September 2016. [Google Scholar]
- Prasad, H.; Martis, R.J.; Acharya, U.R.; Min, L.C.; Suri, J.S. of higher order spectra for accurate delineation of atrial arrhythmia. Eng. Med. Biol. Soc. 2013, 2013, 57–60. [Google Scholar]
Software Information | Version Number |
---|---|
MATLAB | 2017a |
CUDA | 8.0 |
OpenCV | 2.4.9 |
Python | 3.5 |
Visual Studio | 2012 |
AAMI ECG Beat Class | MIT-BIH ECG Beat Types |
---|---|
Normal (N) | Normal (NOR), left bundle branch block (LBBB), right bundle branch block (RBBB), atrial escape (AE), nodal (junctional) escape beat (NE) |
Supraventricular (S) | Atrial premature (AP), aberrated atrial premature (aAP), nodal (junctional) premature (NP), supraventricular premature (SP) |
Ventricular (V) | Premature ventricular contraction (PVC), ventricular escape (VE) |
Fusion (F) | Fusion of ventricular and normal (FVN) |
Unknown (Q) | Paced (/), fusion of paced and normal (FPN), unclassified (U) |
Type | Definition |
---|---|
True positive (TP) | The number of abnormal ECG beats correctly classified |
False positive (FP) | Abnormal ECG beats divided into normal numbers |
True negative (TN) | The number of normal ECG beats correctly classified |
False negative (FN) | Normal ECG beats divided into abnormal numbers |
Type | Records | Number |
---|---|---|
NOR | 100, 101, 103, 105, 108, 112, 113, 114, 115, 117, 121, 122, 123, 202, 205, 219, 230, 234 | 75,052 |
LBBB | 109, 111, 207, 213 | 8074 |
RBBB | 118, 124, 212, 231 | 7259 |
PVC | 106, 116, 119, 200, 201, 203, 208, 210, 213, 215, 221, 228, 233 | 7129 |
FVN | 108, 109, 114, 124, 200, 201, 202, 203, 205, 208, 210, 213, 214, 215, 219, 223, 233 | 803 |
Type | NOR | LBBB | RBBB | PVC | FVN | Total |
---|---|---|---|---|---|---|
Label | N | L | R | V | F | |
Patient data | 2000 | 2000 | 2000 | 2000 | 2000 | 10,000 |
MIT-BIH data | 8500 | 8074 | 7259 | 7129 | 8030 | 38,992 |
Training set number | 5250 | 5037 | 4630 | 4565 | 5015 | 24,497 |
Test set number | 5250 | 5037 | 4629 | 4564 | 5015 | 24,495 |
Learning Rate | Loss | mAP |
---|---|---|
0.0001 | 0.011 | 0.992 |
0.001 | 0.015 | 0.987 |
0.01 | 0.031 | 0.952 |
0.1 | 0.072 | 0.85 |
Weight Decay | Loss | mAP |
---|---|---|
0.0001 | 0.006 | 0.981 |
0.0005 | 0.013 | 0.987 |
0.001 | 0.017 | 0.983 |
0.05 | 0.052 | 0.974 |
0.1 | 0.064 | 0.970 |
Iterations | mAP |
---|---|
2000 | 0.86 |
4000 | 0.987 |
6000 | 0.954 |
8000 | 0.923 |
Reference Label | Algorithm Label | ||||||||
Type | N | L | R | V | F | Acc (%) | Sen (%) | Spe (%) | |
N | 5149 | 33 | 30 | 9 | 29 | 99.11 | 98.27 | 99.39 | |
L | 13 | 4975 | 21 | 4 | 24 | 99.32 | 98.77 | 99.47 | |
R | 35 | 27 | 4520 | 12 | 35 | 99.09 | 97.65 | 99.43 | |
V | 52 | 15 | 26 | 4452 | 19 | 99.38 | 97.54 | 99.44 | |
F | 17 | 29 | 37 | 14 | 4918 | 99.17 | 98.07 | 99.50 |
Type | Positive Sample | Negative Sample |
---|---|---|
Training set number (N) | 5250 | 19,245 |
Training set number (L) | 5037 | 19,458 |
Training set number (R) | 4629 | 19,866 |
Training set number (V) | 4564 | 19,931 |
Training set number (F) | 5015 | 19,480 |
Reference Label | Algorithm Label | ||||||||
Type | N | L | R | V | F | Acc (%) | Sen (%) | Spe (%) | |
N | 4917 | 67 | 107 | 43 | 116 | 96.82 | 93.66 | 97.69 | |
L | 175 | 4465 | 120 | 126 | 151 | 96.35 | 88.64 | 98.35 | |
R | 114 | 57 | 4252 | 114 | 92 | 96.55 | 91.86 | 97.64 | |
V | 82 | 111 | 147 | 4117 | 107 | 96.68 | 90.21 | 98.16 | |
F | 74 | 87 | 95 | 84 | 4675 | 96.71 | 93.22 | 97.61 |
Method | Work | Type | Acc (%) | Sen (%) | Spe (%) |
---|---|---|---|---|---|
Faster R-CNN | Proposed | 5 | 99.21 | 98.06 | 99.45 |
Nine-Layer CNN | U Rajendra Acharya [26] | 5 | 94.03 | 96.71 | 91.54 |
1D CNN | Kiranyaz et al. [21] | 5 | 96.4 | 68.8 | 99.5 |
CNN | Zub air et al. [39] | 5 | 92.70 | - | - |
CNN + LSTM | Shu Lih Oh et al. [31] | 5 | 98.10 | 97.50 | 98.70 |
RNN | Ubeyli et al. [17] | 4 | 98.06 | 98.15 | 97.78 |
K-NN | Prasad et al. [40] | 3 | 97.65 | 98.16 | 98.75 |
K-NN | Park et al. [19] | 17 | 97 | 96.6 | 95.8 |
© 2019 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 (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ji, Y.; Zhang, S.; Xiao, W. Electrocardiogram Classification Based on Faster Regions with Convolutional Neural Network. Sensors 2019, 19, 2558. https://doi.org/10.3390/s19112558
Ji Y, Zhang S, Xiao W. Electrocardiogram Classification Based on Faster Regions with Convolutional Neural Network. Sensors. 2019; 19(11):2558. https://doi.org/10.3390/s19112558
Chicago/Turabian StyleJi, Yinsheng, Sen Zhang, and Wendong Xiao. 2019. "Electrocardiogram Classification Based on Faster Regions with Convolutional Neural Network" Sensors 19, no. 11: 2558. https://doi.org/10.3390/s19112558