ECG Signals Classification using
Continuous Wavelet Transform (CWT)
& Deep Neural Network
ECE2006- Digital Signal Processing
2
B.Bhargav Reddy( 19BEC0802 )
SAI SIVA RAMA (19BEC0097)
Shahukari Chetan ( 19BEC0858 )
TEAM MEMBERS
The aim of this study is to develop an algorithm to detect and classify the types of electrocardiogram (ECG)
signal beats By using Continuous Wavelet Transform (CWT) & Deep Neural Network. The goal is to train a CNN to
distinguish Between ARR, CHF and NSR.
Early detection of arrhythmia and effective treatment can prevent deaths caused by cardiovascular disease (CVD).
In clinical practice, the diagnosis is made by checking the electrocardiogram (ECG) beat-by-beat, but this is
usually time-consuming and laborious. In the paper, we propose an automatic ECG classification method based on
Continuous Wavelet Transform (CWT) and Convolutional Neural Network (CNN). CWT is used to decompose ECG
signals to obtain different time-frequency components, and CNN is used to extract features from the 2D-
scalogram composed of the above time-frequency components. Considering the surrounding R peak interval (also
called RR interval) is also useful for the diagnosis of arrhythmia, four RR interval features are extracted and
combined with the CNN features to input into a fully connected layer for ECG classification. By testing in the MIT-
BIH arrhythmia database, our method achieves an overall performance of 70.75%, 67.47%, 68.76%, and 98.74% for
positive predictive value, sensitivity, F1-score, and accuracy, respectively. Compared with existing methods, the
overall F1-score of our method is increased by 4.75~16.85%. Because our method is simple and highly accurate, it
can potentially be used as a clinical auxiliary diagnostic tool. 3
Abstract
4
Abstract:
Recently, the obvious increasing number of cardiovascular disease, the automatic classification
research of Electrocardiogram signals (ECG) has been playing a important part in the clinical
diagnosis of cardiovascular disease. Convolution neural network (CNN) based method is proposed to
classify ECG signals. The proposed CNN model consists of five layers in addition to the input layer
and the output layer, i.e., two convolution layers, two down sampling layers and one full connection
layer, extracting the effective features from the original data and classifying the features using wavelet
.The classification of ARR (Arrhythmia), CHF (Congestive Heart Failure), and NSR (Normal Sinus
Rhythm) signals. The experimental results contains on ARR signals from the MIT-BIH arrhythmia,CHF
signals from the BIDMC Congestive Heart Failure and NSR signals from the MIT-BIH Normal Sinus
Rhythm Databases show that the proposed method achieves a promising classification accuracy of
90.63%, significantly outperforming several typical ECG classification methods.
Block Diagram
5
ECG SIGNAL
Pre-processing
Main process Classification
6
INTRODUCTION
« Combination of two powerful methods in Continuous Wavelet Transform.
« Proper fine tuning of CNNs to make extremely robust and accurate
predictions with a small training dataset to examine the efficacy of Deep
learning methods under data constraints.
« Increase our understanding of the features being used and finding the
best suited combination of features and Neural networks.
7
CONTINUOUS WAVELET TRANSFORM
 The continuous wavelet transform - mathematical and signal processing tool
primarily aimed for image compression, image denoising, etc.
 Used in many other fields such as Biomedical Signal processing, namely ECG
and EEG analysis, Financial Time Series Analysis, Partial Differential
equations solving, etc.
 Coefficients directly fed into the input layer of the convolutional neural
networks as an ‘image’ in effect creating a “Transfer learning’ scenario.
 In this work we have used only Mortlet Wavelet.
Characteristics of ECG signal
 P wave is the ECG display of atrial depolarization and
contraction.
 QRS complex is the ventricular contraction
 Q wave is the first part of the QRS complex, but only if it goes
downward.
 R wave is the upward deflection of the QRS complex whether
there is a q wave or not
 S wave follows R wave and is called as such as long as the S wave
dips below the baseline.
 T wave is repolarization of the ventricles i.e., their return to a
resting state.
8
9
What Is a Deep Neural Network?
Machine learning techniques have been widely applied
in various areas such as pattern recognition, natural
language processing, and computational
learning. During the past decades, machine learning
has brought enormous influence on our daily life with
examples including efficient web search, self-driving
systems, computer vision, and optical character
recognition.
Especially, deep neural network models have become a
powerful tool of machine learning and artificial
intelligence. A deep neural network (DNN) is
an artificial neural network (ANN) with multiple layers
between the input and output layers.
The success of deep neural networks has led to
breakthroughs such as reducing word error rates in
speech recognition by 30% over traditional approaches
(the biggest gain in 20 years) or drastically cutting the
error rate in an image recognition competition since
2011 (from 26% to 3.5% while humans achieve 5%).
3 Types of Deep Neural Networks
Three following types of deep neural networks are
popularly used today:
1.Multi-Layer Perceptrons (MLP)
2.Convolutional Neural Networks (CNN)
3.Recurrent Neural Networks (RNN)
10
Deep neural networks
A deep neural network (DNN) is an artificial neural network (ANN) with multiple layers between the input and output layers.
There are different types of neural networks but they always consist of the same components: neurons, synapses, weights,
biases, and functions. These components functioning similar to the human brains and can be trained like any other ML
algorithm.
For example, a DNN that is trained to recognize dog breeds will go over the given image and calculate the probability that the
dog in the image is a certain breed. The user can review the results and select which probabilities the network should display
(above a certain threshold, etc.) and return the proposed label. Each mathematical manipulation as such is considered a
layer, and complex DNN have many layers, hence the name "deep" networks.
DNNs can model complex non-linear relationships. DNN architectures generate compositional models where the object is
expressed as a layered composition of primitives. The extra layers enable composition of features from lower layers,
potentially modeling complex data with fewer units than a similarly performing shallow network. For instance, it was proved
that sparse multivariate polynomials are exponentially easier to approximate with DNNs than with shallow networks.[ Deep
architectures include many variants of a few basic approaches. Each architecture has found success in specific domains. It is
not always possible to compare the performance of multiple architectures, unless they have been evaluated on the same data
sets.
DNNs are typically feedforward networks in which data flows from the input layer to the output layer without looping back. At
first, the DNN creates a map of virtual neurons and assigns random numerical values, or "weights", to connections between
them. The weights and inputs are multiplied and return an output between 0 and 1. If the network did not accurately recognize
a particular pattern, an algorithm would adjust the weights. That way the algorithm can make certain parameters more
influential, until it determines the correct mathematical manipulation to fully process the data.
Recurrent neural networks (RNNs), in which data can flow in any direction, are used for applications such as language
modeling. Long short-term memory is particularly effective for this use.
Convolutional deep neural networks (CNNs) are used in computer vision. CNNs also have been applied to acoustic
modeling for automatic speech recognition (ASR).[
11
👉ARR: Arrhythmias
👉CHF: Congestive Heart Failure
👉NSR: Normal Sinus Rhythm
Types of ECG Signals for Classification
12
Arrhythmias are deviations from normal heartbeat pattern. They include
abnormalities of impulse formation, such as heart rate, rhythm, or site of impulse
origin and conduction disturbances, which disrupt the normal sequence of atrial
and ventricular Activation.
Congestive Heart Failure is a clinical syndrome in which the heart is unable to
pump sufficient blood to meet the metabolic requirements of the body, or can do
so only at an elevated filling pressure
Normal sinus rhythm (NSR) is the rhythm that originates from the sinus node and
describes the characteristic rhythm of the healthy human heart. The rate in NSR
is generally regular but will vary depending on autonomic inputs into the sinus
node.
13
14
Time schedule to complete this task
Week 1 : Research and collect data, learn to work with MATLAB.
Week 2 :We will Learning How to convert 1D ECG signals to image using CWT coefficients in the
form of Scalogram. And we Start researching on ECG signals making aspects,
Week 3 : We will learn what is transfer learning and How we can train Alex net which is a deep CNN
on our set of images. With the help of Matlab we will design the Database creation.
Week 4 : We will come with Complete ECG Signals Classification using Continuous Wavelet
Transform (CWT) & Deep Neural Network design, carry out simulations and test controller.
15
Reference:
[1]“https://www.researchgate.net/publication/224226027_Heart_arrhythmia_detection_using_continuous
_wavelet_transform_and_principal_component_analysis_with_neural_network_classifier ”
[2] “https://www.researchgate.net/figure/Schematic-of-the-designed-algorithm_fig2_224226027”
[3] “Sannino, G.; De Pietro, G. A deep learning approach for ECG-based heartbeat classification for
arrhythmia detection. Future Gener. Comput. Syst. 2018, 86, 446–455.”
[4] “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. “
16

Dsp review

  • 1.
    ECG Signals Classificationusing Continuous Wavelet Transform (CWT) & Deep Neural Network ECE2006- Digital Signal Processing
  • 2.
    2 B.Bhargav Reddy( 19BEC0802) SAI SIVA RAMA (19BEC0097) Shahukari Chetan ( 19BEC0858 ) TEAM MEMBERS
  • 3.
    The aim ofthis study is to develop an algorithm to detect and classify the types of electrocardiogram (ECG) signal beats By using Continuous Wavelet Transform (CWT) & Deep Neural Network. The goal is to train a CNN to distinguish Between ARR, CHF and NSR. Early detection of arrhythmia and effective treatment can prevent deaths caused by cardiovascular disease (CVD). In clinical practice, the diagnosis is made by checking the electrocardiogram (ECG) beat-by-beat, but this is usually time-consuming and laborious. In the paper, we propose an automatic ECG classification method based on Continuous Wavelet Transform (CWT) and Convolutional Neural Network (CNN). CWT is used to decompose ECG signals to obtain different time-frequency components, and CNN is used to extract features from the 2D- scalogram composed of the above time-frequency components. Considering the surrounding R peak interval (also called RR interval) is also useful for the diagnosis of arrhythmia, four RR interval features are extracted and combined with the CNN features to input into a fully connected layer for ECG classification. By testing in the MIT- BIH arrhythmia database, our method achieves an overall performance of 70.75%, 67.47%, 68.76%, and 98.74% for positive predictive value, sensitivity, F1-score, and accuracy, respectively. Compared with existing methods, the overall F1-score of our method is increased by 4.75~16.85%. Because our method is simple and highly accurate, it can potentially be used as a clinical auxiliary diagnostic tool. 3 Abstract
  • 4.
    4 Abstract: Recently, the obviousincreasing number of cardiovascular disease, the automatic classification research of Electrocardiogram signals (ECG) has been playing a important part in the clinical diagnosis of cardiovascular disease. Convolution neural network (CNN) based method is proposed to classify ECG signals. The proposed CNN model consists of five layers in addition to the input layer and the output layer, i.e., two convolution layers, two down sampling layers and one full connection layer, extracting the effective features from the original data and classifying the features using wavelet .The classification of ARR (Arrhythmia), CHF (Congestive Heart Failure), and NSR (Normal Sinus Rhythm) signals. The experimental results contains on ARR signals from the MIT-BIH arrhythmia,CHF signals from the BIDMC Congestive Heart Failure and NSR signals from the MIT-BIH Normal Sinus Rhythm Databases show that the proposed method achieves a promising classification accuracy of 90.63%, significantly outperforming several typical ECG classification methods.
  • 5.
  • 6.
    6 INTRODUCTION « Combination oftwo powerful methods in Continuous Wavelet Transform. « Proper fine tuning of CNNs to make extremely robust and accurate predictions with a small training dataset to examine the efficacy of Deep learning methods under data constraints. « Increase our understanding of the features being used and finding the best suited combination of features and Neural networks.
  • 7.
    7 CONTINUOUS WAVELET TRANSFORM The continuous wavelet transform - mathematical and signal processing tool primarily aimed for image compression, image denoising, etc.  Used in many other fields such as Biomedical Signal processing, namely ECG and EEG analysis, Financial Time Series Analysis, Partial Differential equations solving, etc.  Coefficients directly fed into the input layer of the convolutional neural networks as an ‘image’ in effect creating a “Transfer learning’ scenario.  In this work we have used only Mortlet Wavelet.
  • 8.
    Characteristics of ECGsignal  P wave is the ECG display of atrial depolarization and contraction.  QRS complex is the ventricular contraction  Q wave is the first part of the QRS complex, but only if it goes downward.  R wave is the upward deflection of the QRS complex whether there is a q wave or not  S wave follows R wave and is called as such as long as the S wave dips below the baseline.  T wave is repolarization of the ventricles i.e., their return to a resting state. 8
  • 9.
    9 What Is aDeep Neural Network? Machine learning techniques have been widely applied in various areas such as pattern recognition, natural language processing, and computational learning. During the past decades, machine learning has brought enormous influence on our daily life with examples including efficient web search, self-driving systems, computer vision, and optical character recognition. Especially, deep neural network models have become a powerful tool of machine learning and artificial intelligence. A deep neural network (DNN) is an artificial neural network (ANN) with multiple layers between the input and output layers. The success of deep neural networks has led to breakthroughs such as reducing word error rates in speech recognition by 30% over traditional approaches (the biggest gain in 20 years) or drastically cutting the error rate in an image recognition competition since 2011 (from 26% to 3.5% while humans achieve 5%). 3 Types of Deep Neural Networks Three following types of deep neural networks are popularly used today: 1.Multi-Layer Perceptrons (MLP) 2.Convolutional Neural Networks (CNN) 3.Recurrent Neural Networks (RNN)
  • 10.
    10 Deep neural networks Adeep neural network (DNN) is an artificial neural network (ANN) with multiple layers between the input and output layers. There are different types of neural networks but they always consist of the same components: neurons, synapses, weights, biases, and functions. These components functioning similar to the human brains and can be trained like any other ML algorithm. For example, a DNN that is trained to recognize dog breeds will go over the given image and calculate the probability that the dog in the image is a certain breed. The user can review the results and select which probabilities the network should display (above a certain threshold, etc.) and return the proposed label. Each mathematical manipulation as such is considered a layer, and complex DNN have many layers, hence the name "deep" networks. DNNs can model complex non-linear relationships. DNN architectures generate compositional models where the object is expressed as a layered composition of primitives. The extra layers enable composition of features from lower layers, potentially modeling complex data with fewer units than a similarly performing shallow network. For instance, it was proved that sparse multivariate polynomials are exponentially easier to approximate with DNNs than with shallow networks.[ Deep architectures include many variants of a few basic approaches. Each architecture has found success in specific domains. It is not always possible to compare the performance of multiple architectures, unless they have been evaluated on the same data sets. DNNs are typically feedforward networks in which data flows from the input layer to the output layer without looping back. At first, the DNN creates a map of virtual neurons and assigns random numerical values, or "weights", to connections between them. The weights and inputs are multiplied and return an output between 0 and 1. If the network did not accurately recognize a particular pattern, an algorithm would adjust the weights. That way the algorithm can make certain parameters more influential, until it determines the correct mathematical manipulation to fully process the data. Recurrent neural networks (RNNs), in which data can flow in any direction, are used for applications such as language modeling. Long short-term memory is particularly effective for this use. Convolutional deep neural networks (CNNs) are used in computer vision. CNNs also have been applied to acoustic modeling for automatic speech recognition (ASR).[
  • 11.
    11 👉ARR: Arrhythmias 👉CHF: CongestiveHeart Failure 👉NSR: Normal Sinus Rhythm Types of ECG Signals for Classification
  • 12.
    12 Arrhythmias are deviationsfrom normal heartbeat pattern. They include abnormalities of impulse formation, such as heart rate, rhythm, or site of impulse origin and conduction disturbances, which disrupt the normal sequence of atrial and ventricular Activation. Congestive Heart Failure is a clinical syndrome in which the heart is unable to pump sufficient blood to meet the metabolic requirements of the body, or can do so only at an elevated filling pressure Normal sinus rhythm (NSR) is the rhythm that originates from the sinus node and describes the characteristic rhythm of the healthy human heart. The rate in NSR is generally regular but will vary depending on autonomic inputs into the sinus node.
  • 13.
  • 14.
  • 15.
    Time schedule tocomplete this task Week 1 : Research and collect data, learn to work with MATLAB. Week 2 :We will Learning How to convert 1D ECG signals to image using CWT coefficients in the form of Scalogram. And we Start researching on ECG signals making aspects, Week 3 : We will learn what is transfer learning and How we can train Alex net which is a deep CNN on our set of images. With the help of Matlab we will design the Database creation. Week 4 : We will come with Complete ECG Signals Classification using Continuous Wavelet Transform (CWT) & Deep Neural Network design, carry out simulations and test controller. 15
  • 16.
    Reference: [1]“https://www.researchgate.net/publication/224226027_Heart_arrhythmia_detection_using_continuous _wavelet_transform_and_principal_component_analysis_with_neural_network_classifier ” [2] “https://www.researchgate.net/figure/Schematic-of-the-designed-algorithm_fig2_224226027” [3]“Sannino, G.; De Pietro, G. A deep learning approach for ECG-based heartbeat classification for arrhythmia detection. Future Gener. Comput. Syst. 2018, 86, 446–455.” [4] “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. “ 16

Editor's Notes

  • #12 An electrocardiogram (ECG) might be utilized to analyze arrhythmia(ARR). It is a perusing of pulse and mood. Congestive heart disappointment (CHF) is a clinical disorder wherein the heart neglects to siphon blood at the rate required by the using tissues or in which the heart can do as such just with a height in filling weight. NSR used to mean a particular kind of sinus musicality where every single other estimation on the ECG additionally fall inside assigned ordinary breaking points as shown in Figure..