• Home
  • Submit Paper
  • Check Paper Status
  • Download Certificate/Paper
  • FAQs
  • Contact Us
Email: ijraset@gmail.com
IJRASET Logo
Journal Statistics & Approval Details
Recent Published Paper
Our Author's Feedback
 •  ISRA Impact Factor 7.894       •  SJIF Impact Factor: 7.538       •  Hard Copy of Certificates to All Authors       •  DOI by Crossref for all Published Papers       •  Soft Copy of Certificates- Within 04 Hours       •  Authors helpline No: +91-8813907089(Whatsapp)       •  No Publication Fee for Paper Submission       •  Hard Copy of Certificates to all Authors       •  UGC Approved Journal: IJRASET- Click here to Check     
  • About Us
    • About Us
    • Aim & Scope
  • Editorial Board
  • Impact Factor
  • Call For Papers
    • Submit Paper Online
    • Current Issue
    • Special Issue
  • For Authors
    • Instructions for Authors
    • Submit Paper
    • Download Certificates
    • Check Paper Status
    • Paper Format
    • Copyright Form
    • Membership
    • Peer Review
  • Past Issue
    • Monthly Issue
    • Special Issue
  • Pay Fee
    • Indian Authors
    • International Authors
  • Topics
ISSN: 2321-9653
Estd : 2013
IJRASET - Logo
  • Home
  • About Us
    • About Us
    • Aim & Scope
  • Editorial Board
  • Impact Factor
  • Call For Papers
    • Submit Paper Online
    • Current Issue
    • Special Issue
  • For Authors
    • Instructions for Authors
    • Submit Paper
    • Download Certificates
    • Check Paper Status
    • Paper Format
    • Copyright Form
    • Membership
    • Peer Review
  • Past Issue
    • Monthly Issue
    • Special Issue
  • Pay Fee
    • Indian Authors
    • International Authors
  • Topics

Ijraset Journal For Research in Applied Science and Engineering Technology

  • Home / Ijraset
  • On This Page
  • Abstract
  • Introduction
  • Conclusion
  • References
  • Copyright

Cardiac Arrhythmia Prediction and Prevention of Heart failure using PCG(PhonoCardioGram) and CNN

Authors: Srinivasa Raghuram, Tanziya Niyaz, Harika Purma, Dr. Shruti Bhargava Choubey, Dr. Y Sreenivasulu

DOI Link: https://doi.org/10.22214/ijraset.2022.44671

Certificate: View Certificate

Abstract

Arrhythmias are abnormal cardiac rhythms. According to WHO, in today\\\'s world 31% of deaths occur due to Cardiac Arrhythmia. Life-threatening arrhythmias including Ventricular Tachycardia (VT) and Ventricular Fibrillation are frequent causes of cardiac arrest (VF). The sinus node controls the heart\\\'s rhythm by triggering an electrical signal that goes through the heart, causing the heart to beat and circulate blood around throughout. The heart does not pump efficiently if there is too much electrical activity in the top or bottom chambers. Shortness of breath, fainting, an abrupt loss of heart function, and unconsciousness are the most common signs of Arrhythmia, which can result in death within minutes unless the victim receives emergency medical treatment to restart the heart. The purpose of this research is to use the CNN and VGG16 models in conjunction with data augmentation and picture pixel creation to diagnose cardiac arrhythmias using PCG signals. For greater efficiency, phonocardiography (PCG) is also investigated. The majority of arrhythmia detection and classification methods rely solely on surface ECG analysis. So, to improve the efficiency of heart diagnostics, an algorithm is devised that relates to wavelet analysis at several resolutions combining temporal and wavelet properties of Electrocardiogram and Phonocardiogram, as well as Electrocardiogram-Phonocardiogram interactions. We want to be able to classify phonocardiograms (PCGs) or heartbeat recordings. as \\\"normal\\\" or \\\"abnormal\\\" in order to identify individuals who will require further diagnosis. The main concept is to transform each cardiac sound recording (wav file) into a spectrogram image and train a CNN model on that picture. We will then be able to categorize a fresh PCG recording as normal or abnormal.

Introduction

I. LITERATURE SURVEY

After years of comprehensive research in the discipline of detecting cardiac arrhythmia in earlier stages, in the discipline of both medical and technologies such as AI and ML, we can prevent a lot of health diseases by predicting them in earlier stages.

The authors of [1] used ECG as a source to detect this disease and have achieved an accuracy of 94.74%. The authors of [2] used nonlinear parameters such as Discrete Wavelet Transform(DWT) on ECG and have attained an accuracy of 92.8%. The author of [3] used CNN to detect minor cardiac arrhythmia and got an accuracy score of 84.54%.  The researchers of [4] classified the MIT Arrhythmia ECG database into normal and abnormal using ANN model and have attained an accuracy of 89.66%. The authors of [5] used RNN and feedback loops while the authors of [6] used the LSTM model which is the advanced version of RNN to predict the outcome. The authors of [7] used the GRU model to work on the ECG data. The authors of [8] produced a comparative study between all the deep learning models. 

The authors of  [9] used image recognition techniques and pre-trained models to detect cardiac arrhythmia. The authors of [10] used SVM algorithm and PCG signals to get the best possible disease classification.

II. EXISTING METHODOLOGY

A. DATA SET

The training dataset has 800 images (of which 400 belong to abnormal and 600 to normal class) and the validation set contains around 225 images(80 of abnormal and rest belong to normal class). We convert the .wav file audio recordings into spectrogram images in order for us to operate using our deep learning model.

https://lh5.googleusercontent.com/OsnUqxArSE3uPOdeZpUISddJ_DVk8Aak4oEzXNTV7vmiX3GYi35nr6R8Zn2IhH8ZpSAVgAdyBFWmuBpeSHFy7LNiDh4RNP-Mx68dkq1YY8_0Mrk_TxKKxVJlu3-6uEQbPJODRew21vd-RstS0g https://lh3.googleusercontent.com/KEQunD8W-FqGEKYG_dtaX2X3wKYj57Q6U6Y1uwOmJSV9RChU7oDwGehf_HovbpIcMQN-caNl3cmN4cW6ssEmsT3OZmcAKPoG1CSxo04mAwSRHt8HRrIBi9ag9KefexG-OyQy6S27qdx7T5iMsg

Fig.1 Spectrogram image of a normal heart beat.                  Fig.2 Spectrogram image of abnormal heart beat.

We basically perform FFT.

Fig.1 shows a spectrogram image of a person having normal heart beat and Fig.2 shows the spectrogram image of a person facing abnormal heart beat.

B. CNN

CNN Is a deep learning model which takes an input image and assigns different weights to the items in the image based on the relevance of the features to differentiate from the other image. We use CNN as the pre-processing required for this algorithm is very low compared to any other classification algorithm.

For all our experiments, we used Keras and TensorFlow as backend with a graphics processing unit (GPU). The existing methodologies used models like ANN, CNN, CNN-LSTM, CNN-GRU, etc. The pre-existing models used deep neural network algorithms such as ANN and CNN to classify the PCG images as normal or abnormal.

A cnn model contains four layers

  1. Convolutional Layer: The convolutional layer is the most important component of a CNN since it is where the majority of the processing takes place. To generate a projected output, it requires an input data layer, a filter layer, and a feature map. Assume the input is a colour picture composed of a 3D matrix of pixels. This implies the input will have three dimensions: height, width, and depth, which match to the RGB colour space of a picture. A feature detector, commonly named a kernel or a filter, will scan the image's receptive fields for the existence of the feature.
  2. Pooling Layer: Pooling layers are down sampling layers which reduces the quantity of parameters in the input by doing dimensionality reduction. Similar to the convolutional layer, the pooling method sweeps a filter across the whole input, but this filter does not include any weights. Instead, the kernel populates the output array with values from the receptive field using an aggregation function. They are two types of pooling.
  • Max Pooling
  • Average Pooling

3. Padding Layer: When the filters don't fit the input image, zero-padding is extensively employed. This reduces the size of all elements outside the input matrix to zero, resulting in a bigger or more evenly proportioned output.

4. Fully-connected (FC) Layer: This layer performs classification tasks based on the characteristics retrieved by the preceding input layers and their numerous filters. While ReLu functions are commonly used to detect and categorise inputs in convolutional and pooling layers, FC layers generally utilise a softmax activation function to offer a probability from 0 to 1 for prediction.

C. CNN Architecture

https://lh4.googleusercontent.com/52lDkhsgtcOZU7m0Ba7YO-2mY9WRh6mzYxGsSN_NmaUmbbGUMT2NM3Hims0OATG42ZH8TARLPOin6vI38bqFxbwF5cpy412sYaEIhJdXV5ESZNiFhc2YMbkqUyAozacJ2kijXdXja2EO07wFhw

Fig.3 CNN Architecture

  • Statistical equation of CNN

https://lh3.googleusercontent.com/yinfcIF03ycY9ttNGXf-Zlk9k3im7CQtY2N6r07q3E0yY81eXv0_J9Ey7L7eDYh0t1ATaRWbXG1wZMPRY9MW1GD1UqAh3SvJuPek3y0AUq9CYAkNugYhGZAu053K85bQgM-4BQ1I9v2sYleaKA

To keep the size of the feature maps from shrinking at each layer, we need padding layers to be 2 times the input layers. By this, the dimensions of the input layer picture and feature map will stay unchanged as a result of this.

III. PROPOSED METHODOLOGY

A. Transfer Learning VGG16 Over CNN

  1. VGG16 and It’s Architecture: VGG stands for Visual Geometry Group which is a specific type of convolutional network designed for classification and localization whereas we use a cnn algorithm for basic semantics of the program.

https://lh3.googleusercontent.com/O39bH5xmgZQzLVsv6hO4Xwxfa4HNterlBAN9Oa46JwjyQ1qyIQZZ4u6YqFJtLndISS9FkD-asmeAqPqR_NTCmBGkI2ZG_kpAqF_0drmy0Tzv_xEsXCzdCetPRE01jLouKTlj4Nj2FgXOba0YaA

Fig 4: VGG16 Architecture

The 16 in VGG16 stands for 16 weighted layers. VGG16 comprises 13 convolutional layers, 5 Max Pooling layers, and 3 Dense layers, for a total of 21 layers, but only 16 weight layers, or learnable parameters layers are usable.The RGB picture 224x244 is used as VGG's input. On the training set picture, the average RGB value is determined for all images, and the image is then used as an input to the VGG convolutional network. The convolution step is fixed and a 3x3 or 1x1 filter is employed.VGG completely connected layers range from VGG11 to VGG19, depending on the total number of convolutional layers Plus fully connected layers. VGG11 includes 8 convolutional layers and 3 fully connected layers at the very least. There are 16 convolutional layers in the VGG19 at its maximum. +3 layers that are all related.

2. Work Flow Diagram

https://lh5.googleusercontent.com/Zqmdg_44mbVSXH4PElNIhS58XdINuuwOCcSZwXZWGybJyMK_P49FuwIQBG062kOTjD1s7ZUgdfXhwl7D96LrF_1DK4B931n0LfwllWurF1gdP3e5GxuEe5uxY7uXQyfDfUZwV9UqZ1SdIyPvog

Fig 5: Flow Diagram

The first process is to collect the PCG data i.e, collecting the spectrogram data by performing FFT(Fast Fourier Transform) on the audio files. The data processing and data augmentation process is very important for our model as it never sees the exact same picture twice since different spectrograms look similar. This helps in  preventing overfitting and the model generalizes better. For images, this could be done by rotating the original image, changing lighting conditions, cropping it differently, so for one image we can generate different sub-samples. We perform operations such as resizing, normalization, shear transformation, horizontal flipping, zooming and re-scaling the image. We then split the data into training and validation data and apply the CNN layer and perform transfer learning using the VGG16 layer on  top of the CNN layer for a better prediction with utmost accuracy and precision.

3. VGG Loss Equation: The Perceptual Losses for Real-Time  Transfer Learning framework introduces VGG Loss as a sort of content loss.

This loss is based on the ReLU(Rectified Linear Unit) activation layer of pre pre-trained model.

https://lh3.googleusercontent.com/bml6c1MRogIkt8nBp4pXOPJQtDCMnxkM-j_bOt79ktTyuArRE12AidK435y5OoNvfUB8n6bHAnSIjxEtFOYVoez10dCNZsy4SqRZ_MK1aupm9-nOu9V_orP9lvfZk1qV_EQ7SL_EgB5iUDjvNg

Here,

 https://lh3.googleusercontent.com/H4P2S87GSdoQnUR2yNkFoeAIr5VyMBIu0UvChxo2sd9G1k8ZMZn3wM-7xrlxJ_cSAUDhrlb5KCUR4vwk1_EVJkppw4i-RynCE6rItFNfmndTU-N9IUJhJX_4Ot2YpmIz0TVCq5_CvXpMF2DU1A - Indicates the feature extraction map that we get by jth  convolutional layer and ith max pooling layer.

https://lh5.googleusercontent.com/pXz-lDZz3W57WHmDVRAlUAU5fvnbYSC9-b8wQjGsyHkZ4uHjYk_Wpz4VDS9vMpxfhwkXNnqh-enmDdYyM9oA9FmrpGxBpW5e0f-pv5wMxSNpCPfOTy3t6QH4G7Js1FaKxpcnzajMgBCmdxNwTQ - Image reference.

https://lh3.googleusercontent.com/Gq14NlOXFkW0j24khC2sU4mItyHd9eOyp1vJ2geaz90cqVq6_ZTM8P5GayhuTe31Yv403JjsxhN9BPgo_yzSCBlAxD6aNwgnrdPElYkIp2w0F677ZyKa6K5CRKqUrjI5XI26Ye5iKUtbuJxycA - Reconstructed image feature.

https://lh4.googleusercontent.com/7osto46LinpjGEe1jtqi4fjuvE5Z5E2-2STvFiiiZC-DSmCZQgJV9L1_b2VzU7Q1lXuZKsOmD1idaltv34tTjBXSaGj0oNnGjQZOdxg-E85ATqDMe5m_6_QxOwyhD2V7MEptA-4bYHILN7dRqw - Dimensions of the feature map.

4. VGG Loss Graph

https://lh3.googleusercontent.com/VPEgTSnumHrODQURLyhZtZIJ0G3uOYEHc_OyXJHqpl2uz0EeYr1dQq7UT1Ey6RumVDZAydIVXLHkXclJE-Jm0eyMVYIvUDw0BsDCH_jE8jWhL1IsFRn8Ld4lUg8JCo2WZZNMyluiFlNqU73JfA

Fig.6: VGG Loss Graph

This VGG loss graph shows the loss occurring in training and validation data due to transfer learning of the VGG model over the CNN model.

  • The perceptual VGG loss for our model turned out to be 0.6733 which is better than the previously existing model which had a loss of about 0.7423.

5. CNN Results Of Our Research Work

  • Our model has achieved an accuracy of 0.9618, precision of 0.9621, recall of 0.9672, F-beta score of 0.9572 and loss of 0.1279 which is much less than the previous models.

IV. RESULTS

A. Results Of Various Parameters From The Reference Papers

Algorithm

Accuracy

Loss

DWT

94.74%

0.822

ANN

89.6%

0.673

RNN With feedback loops

67.8%

0.712

GRU

88.62%

0.323

CNN

92.8%

0.55

VGG-16

69.6%

0.179

  1. As we can see from the results formulated by previous works, DWT(Discrete Wavelet Transformation) had a better accuracy score but also had high loss values.
  2. CNN outperformed any others models providing better accuracy and lower losses for the prediction.

B. Results of CNN from our Proposed Model

CNN

Accuracy

Precision

Recall

F-beta score

Loss

0.9618

0.9621

0.9672

0.9578

0.1279

  1. We have used various parameters such as accuracy, precision, recall score, f-beta score to validate the performance of prediction and also used binary cross-entropy loss for loss measurement.
  2. Our proposed model got an accuracy of 96.18% with negligible loss of 0.1279 outperforming all the previous models.
  3. The graph below shows the model accuracy and model loss with increase in the no.of epoch layers.

https://lh5.googleusercontent.com/fmrttVj1NZOSIiU4ve1-zHlKZtl5D-ft1jeFeWxaO9Fn7Yd8Irt8LjUDI6BoYC5q2AI-9GoWJSHmy58LceI-AB56lS6El0qANf4ksCHHxGG5IQ0i_mijXIxoLlErS3ckfVqOeMlyzV-tUgcmcw

C. VGG16 Transfer Learning Results

CNN+VGG16

 (transfer  learning)

Accuracy

Precision

Recall

F-beta score

Perpetual Loss

0.7201

0.7212

0.7204

0.7488

0.6733

We can observe from the table above that our model has a better accuracy of 72.01% and lesser loss compared to previous research works.

Conclusion

Cardiac arrhythmia is a disorder in which the heart beats in an abnormal pattern.. Sudden cardiac death can be caused by certain types of cardiac arrhythmias. As a result, early detection and diagnosis of arrhythmia is critical. Once an arrhythmia has been diagnosed, the following step is to determine the kind of arrhythmia. We compared the performance of CNN, CNN-RNN, CNN-LSTM, and CNN-GRU deep learning architectures and found an accuracy of 0.834. With concern on computational cost, we used PCG instead of ECG. PCG testing is very cost economical compared to ECG. Using a complicated deep learning architecture, the given results can be enhanced even further. Complex network architectures can be learned employing sophisticated hardware and a distributed training technique that we are unable to implement.

References

[1] Naser Safdarian, Nader Jafarnia, and Gholamreza Attarodi. (2014) “A new pattern recognition method for detection and localization of myocardial infarction using T-wave integral and total integral as extracted features from one cycle of ECG signal.” Journal of Biomedical Science and Engineering 7(10):818-824. [2] Rajendra Acharya U., Hamildo Fujita, Vidya K Sudarshan, Shu Lih Oh, Muhammad Adam, et al. (2016) “ Automated detection and localizationofmyocardialinfarctionusingelectrocardiogram:Acomparativestudyofdifferentleads.” Knowledge-BasedSystems99:146-156. [3] Tahsin Reasat and Celia Shahnaz. (2017) “Detection of inferior myocardial infarction using shallow convolutional neural networks.”arXiv preprint arXiv:1710.01115. [4] Abhinav-Vishwa, Lal M.KDixit S, and Vardwaj P. (2011) “Classification of arrhythmic ECG data using machine learning techniques.” International Journal of Interactive Multimedia and Artificial Intelligence1(4):67-70 [5] Jeffrey L. Elman. (1990) “Finding structure in time.”Cognitive Science 14(2): 179-211. [6] Sepp Hochreiter, and Ju?rgen Schmidhuber. (1997) “ Long short-term memory.” Neural Computation 9(8): 1735-1780. [7] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. (2014) “Learning phrase representations using RNN encoder-decoder for statistical machine translation.” arXiv preprint arXiv:1406.1078. [8] V. Sai Krishna, A. Nithya Kalyani (2019, June) Prediction of cardiac arrhythmia using artificial neural network. Int J Recent Technol Eng (IJRTE 8(1S4): ISSN 2277-3878 [9] Kiranyaz S, Ince T, Gabbouj M (2016). “Real-time patient-specific ECG classification by 1-D convolutional neural networks.” IEE Transactions on Biomedical Engineering, Volume 63, pp. 664-675 [10] \\\"UCI machine learning repository: Arrhythmia data set,\\\" 1998. [Online]. Available: https://archive.ics.uci.edu/ml/datasets/Arrhythmia. Accessed:Feb. 10, 2018. [11] Moody GB, Mark RG. The impact of the MIT-BIH arrhythmia database. IEEE Eng Med Biol Mag 2001;20:45–50. [12] Nolle F, Badura F, Catlett J, Bowser R, Sketch M. CREI-GARD, a new concept in com- puterized arrhythmia monitoring systems. Computers in Cardiology 1986;13:515–8. [13] Moody G. A new method for detecting atrial fibrillation using RR intervals. Com- puters in Cardiology 1983:227–30. [14] Clifford G, Liu C, Moody B, Silva I, Li Q, Johnson A, et al. AF classification from a short single lead ECG recording: the PhysioNet computing in cardiology challenge 2017 presented at the Computing in Cardiology Rennes-France ; 2017. [15] https://neurohive.io/en/popular-networks/vgg16/

Copyright

Copyright © 2022 Srinivasa Raghuram, Tanziya Niyaz, Harika Purma, Dr. Shruti Bhargava Choubey, Dr. Y Sreenivasulu. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

IJRASET44671

Download Paper

Paper Id : IJRASET44671

Publish Date : 2022-06-21

ISSN : 2321-9653

Publisher Name : IJRASET

DOI Link : Click Here