Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Khushnuma Maqbool, Ravinder Pal Singh, Dr. Monika Mehra
DOI Link: https://doi.org/10.22214/ijraset.2022.47413
Certificate: View Certificate
The biggest cause of mortality globally is cardiac illness. If the initial diagnosis was more accurate, cardiac problems may be avoided. ECG testing is typically used as a diagnostic technique to screen for heart disorders. The electric cardiac signal is recorded by an ECG to look for various heart conditions. Utilizing a variety of datasets, a number of algorithms and methodologies have been developed to detect different heart illnesses. However, this study proposes to examine whether convolutional neural network (CNN) model and ResNet 50 can be used to identify cardiac illnesses such arrhythmia or abnormal heartbeat (AHB), myocardial infarction (MI), and previous history of MI (PMI) from electrocardiogram (ECG) trace images. A 1937 ECG image dataset from Kaggle is examined... The ECG pictures in the dataset are separated into four categories: normal, MI, AHB, and PMI. The suggested approach examined categorization of normal and various heart disorders with 99.12% accuracy (MI, AHB, and PMI)
I. INTRODUCTION
In most animals, the heart is a muscular organ. Blood is pumped by this organ through the circulatory system's blood arteries. The blood that is pumped around the body supplies nutrients and oxygen to the body, while also transporting metabolic waste like Carbon dioxide [1].The human heart is situated in the centre of the chest roughly the size of fist. The heart is made up of four chambers in humans, other mammals, and birds: upper left and right atria, and bottom left and right ventricles. Fish have two chambers: an atrium and a ventricle, whereas most reptiles have three. In a healthy heart, blood flows one way through the heart due to heart valves, which prevent backflow. The heart is enclosed in a protective sac called the pericardium, which also contains a small amount of fluid. Epicardium, myocardium, and endocardium are the three layers that make up the heart's wall . Deoxygenated blood from the superior and inferior vena cavae enters the human heart through the right atrium and travels to the right ventricle. It is then pushed into the pulmonary circulation and delivered to the lungs, where it is oxygenated and released carbon dioxide.. It then passes through arteries, arterioles, and capillaries, where nutrients and other substances are exchanged with cells, losing oxygen and gaining carbon dioxide, before being brought back to the heart through veins and venules [2]. At rest, the heart beats roughly 72 times per minute. Exercise improves heart health and lowers resting heart rate over time, although briefly raising it.
The largest cause of death worldwide is cardiovascular illness, which includes heart diseases. The bulk of cardiovascular disease is non communicable, linked to lifestyle choices and other variables, and is increasingly common as people get older. An average of 30% of all fatalities worldwide in 2008 were due to heart disease, making it a major killer. In high-income nations, this rate ranges from a low 28% to a high 40%. Cardiologists are medical professionals that specialize in the heart. Doctors, cardiothoracic surgeons, intensivists, and allied health workers like physiotherapists and dieticians are just a few of the medical experts who treat heart disorders.
Heart disorders
A. Arrhythmia
An irregular heartbeat is referred to as a heart arrhythmia (uh-RITH-me-uh). When the electrical signals that control how often the heart beats are coordinated improperly, heart rhythm issues (heart arrhythmias) result. The heart beats excessively quickly (tachycardia), too slowly (bradycardia), or irregularly as a result of the poor signaling.
Heart arrhythmias, which may be completely safe, sometimes feel like that heart is speeding or fluttering. However, some heart rhythms can result in uncomfortable or even life-threatening symptoms. Heart arrhythmias are often catagorized according to how quickly the heart beats. For instance:A rapid heart is known as tachycardia. The heart beats more than 100 times per minute while at rest.Bradycardia is the medical term for a sluggish heartbeat. Less than 60 beats per minute constitute the resting heart rate.
B. Myocardial Infarction
A heart attack, also known as a myocardial infarction, is a very serious ailment brought on by poor blood supply to the heart muscle. Although there are numerous potential causes, a blockage in one or more of the heart's arteries is the most common one. The injured cardiac muscle will start to deteriorate without blood flow. A heart attack might result in lasting cardiac damage and perhaps death if blood flow isn't rapidly restored. In the United States, 635,000 people experience a new heart attack each year. Every year, over 300,000 people get a second heart attack. Heart attacks and other forms of coronary -heart disease account for about one in seven fatalities in the worldwide.
C. Perioperative myocardial ischemia (PMI)
A significant source of morbidity and mortality in cardiac patients undergoing noncardiac surgery is perioperative myocardial ischemia (PMI). With regard to patients, those who have coronary artery disease have the highest incidence of PMI. About one-third of all patients receiving noncardiac surgery each year have confirmed coronary artery disease . According to a meta-analysis research, the prevalence of PMI ranges from 20% to 63%. PMI results in an unfavourable prognosis in 70% of instances (unstable angina pectoris, nonfatal myocardial infarction, myocardial revascularization and heart death).
Techniques to detect heart disease
A number of different tests are used to diagnose heart-related problems, including:
Coronary angiograms are part of a general group of procedures known as heart (cardiac) catheterizations. Heart and blood vascular problems can be detected and treated via cardiac catheterization treatments. The most frequent cardiac catheterization procedure is a coronary angiography, which can be used to diagnose heart problems. A sort of dye that may be seen on an X-ray equipment is injected into heart's blood veins during a coronary angiography. blood vessels are visible on the angiograms, which are quickly taken by the X-ray machine. During coronary angiography, doctor may perform an angioplasty to clear blocked heart arteries if necessary.
4. Radionuclide Tests: Radionuclides are used in a variety of tests to assess the condition of your heart.
Your health and symptoms will dictate the test you should do and any prospective hospital treatments that are indicated for you. It is believed that radionuclide testing are safe. Nevertheless, the exam will expose you to some radiation.
Because radiation exists naturally in the environment, we are exposed to it every day. Although excessive exposure can increase the chance of getting cancer, the quantities used in these tests are minuscule. Your doctor will suggest you undergo the test if they determine it to be both safe and essential..
5. MRI Scans: The use of magnetic resonance imaging (MRI) scans is widespread around the world. An intense magnetic field and radio waves are used in MRI to provide precise images of the body's organs and tissues.Since its creation, MRI techniques have been improved upon by medical professionals and researchers to aid in both research and medicinal treatments. The invention of MRI transformed medicine.This page focuses on MRI scans, including its operation and medical applications.
6. Electrocardiogram (ECG): To check for various cardiac diseases, an electrocardiogram (ECG or EKG) measures the electrical signal from the heart. Electrodes are positioned on the chest to capture the electrical impulses that drive heartbeat. The signals are displayed as waves on a computer monitor or printer that is connected. An electrocardiogram, commonly known as an ECG or EKG, is frequently performed in a doctor's office, clinic, or hospital room. Operating rooms and ambulances come equipped with ECG units as normal. Smart watches and other personal electronics provide ECG monitoring. Find out if this is a possibility for by speaking with doctor. Many common cardiac disorders can be diagnosed using an ECG, which is a painless, non invasive procedure. An ECG may be used by a medical professional to establish or spot
The ECG technique has no risks. Electrical shock is not a concern because the test electrodes don't produce electricity. The electrodes only record the electrical activity of the heart..
a. ECG Principal
The electrical activity of the heart is captured by the ECG, which is typically displayed as a graph of voltage values vs time. Through the skin, electrodes are used to measure electrical changes brought on by cardiac muscle cell depolarization and repolarization away from the heart. It should be noted that this test makes use of an electrocardiograph. The heart's conducting tissues, which include the His bundle, Bachmann's bundle, the left and right bundle branches, the Purkinje fibres, and the cardiac myocytes themselves, are depicted in a simplified manner in Figure 1. The atrial and ventricular wall myocytes are contractile tissues. Extraction of data and signals is important since this graphic clearly illustrates the key parts of the heart.
The Basis for Interpreting ECGs. Evaluation of the morphology (look) of the waves and intervals on the ECG curve is a part of ECG interpretation. As a result, structuring the evaluation of the waves and intervals is necessary for ECG interpretation. The heart's depolarization/repolarization phase is depicted in Figure 2 by multiple P waves, QRS waves, and T waves on an electrocardiogram.
P wave: The sinus node causes atrial depolarization, which results in this P wave. The left and right atria receive the signal from pacemaker cells at this node. An aberrant atrial repolarization is visible on the ECG.
The inner (endocardial) and outer (epicardial) cardiomyocyte depolarization waves are averaged to form the QRS complex (1.2.1). When endocardial cardiomyocytes depolarize a little bit sooner than the outer layers, a classic QRS pattern is created.
The first negative deflection after the P wave is the Q wave. If the initial deflection is not negative, the Q is absent. The positive deflection is the R wave. The negative deflection that follows the R wave is known as the S wave.The T wave shows that the heart has repolarized. The cardiac muscle does not contract during the T wave. In ECG analysis, pathologies or anomalies are found and categorised according to how far they deviate from the heart's regular rhythm. When there is normal cardiac activity and there is no deviation from or change in the morphology of the ECG signal, this is referred to as normal sinus rhythm (NSR).
Figure .3 De polarilzation phases of the heart that are represented electrocardiographically by various P waves, QRS, and T wave Similar to removing a bandage, can feel a little discomfort when the electrodes are removed. A minor rash may develop where the patches were applied in some people. During an ECG, up to 12 sensors (electrodes) may be attached to the limbs and chest. The electrodes are skin-adhering, wire-connected adhesive patches. It is possible to record the electrical impulses that the heart uses to beat. A computer stores the information, which is then shown as waves on a screen or on paper. breathe during the test, but have to sit still. Make sure to be warm and prepared to lie still. The results of the test could be impacted by speaking, moving, or shivering. A standard ECG takes a few minutes.
II. Literature review
Heart Disease Detection Using Machine Learning Majority Voting Ensemble Method by Rahma Atallah A,mjed Al-Mousa et al. ”. In order to predict the potential occurrence of heart disease in humans, this research provides a majority voting ensemble technique. The forecast is based on straightforward, reasonably priced medical exams performed at any nearby clinic. Since the model was trained using actual data from healthy and unwell patients, the project's goal is to increase the trust and accuracy of the doctor's diagnosis. In order to deliver more accurate results than using only one model, the model categorises the patient based on the consensus of numerous machine learning models. Finally, using the hard voting ensemble model, our method generated an accuracy of 90%.
S Stern and D Tzivoni (1974) et al in the paper titled “Early detection of silent ischemic heart disease by 24-hour electrocardiographic monitoring of active subjects.” In this study, our goal is to accurately predict whether a person is at risk of developing heart disease. On the training data that offer, machine learning methods will be used to make this prediction. After providing the needed information, the algorithm is run to provide the desired outcome. It goes without saying that accuracy is expected to suffer from incomplete medical data. the prediction model to data from actual hospitals is applied. It is suggested employing the convolutional neural network technique to forecast illness risk using patient data that is structured and possibly even unstructured. The created model yields accuracy that varies between 85 and 88%. By utilising additional machne learning methods over the practise data, its been have suggested to predict the risk of disease.
VirenViraj Shankar, Varun Kumar (2020) et al in the paper titled “Heart disease prediction using CNN algorithm”, In this study, our goal is to accurately predict whether a person is at risk of developing heart disease. On the training data that is offered, machine learning methods will be used to make this prediction. After providing the needed information, the algorithm is run to provide the desired outcome. It goes without saying that accuracy is expected to suffer from incomplete medical data. The prediction model is applied to data from actual hospitals. It is suggested employing the convolutional neural network technique to forecast illness risk using patient data that is structured and possibly even unstructured. Between 85 and 88% of the accuracy was attained utilising the developed model. In order to determine the most accurate machine learning algorithm, its been further proposed using various machine learning algorithms over the training data to predict the risk of diseases. Additionally, attributes can be changed in an effort to boost accuracy even more.
Sayali Ambekar, Rashmi Phalnikar (2019) et al in the paper titled “Disease Risk Prediction by Using Convolutional Neural Network”. the undertake data cleaning and imputation to convert the incomplete data to complete data to solve the issue of missing medical data. With the use of the Nave Bayes and KNN algorithms, there is an attempt to predict heart disease based on the dataset. It is suggested the illness risk prediction utilising structured data as an extension of this study. There is employmemt of a unimodel disease risk prediction technique based on convolutional neural networks. The CNN-UDRP algorithm's prediction accuracy exceeds 65%. Additionally, this system provides answers to health-related queries that people encounter on a daily basis.
III. PROBLEM FORMULATION AND Methodology
A. Research Gap
After an extensive literature review, it is found that there are some gaps in the research. The use of computer vision to detect cardio vascular disease has been extensively studied. In order to separate diseased images from normal, current technology uses subjective, lightly, or automatically applied guns boundary detection algorithms. The earlier methods for diagnosing this illness were manual and devoid of technology. In those systems, samples are found manually, which entails routine examination of blood samples under a microscope. The segments of each cell were briefly examined. It took a long time because each of these tasks had to be completed by hand.
Despite the fact that several studies and research projects have used algorithms to detect heart disease at the earliest, but in many remote areas, a lack of medical equipment and medical personnel that are respectively necessary for producing high quality data and annotating data, have caused a data gap and has prevented the deployment of using CAD systems in those areas.
Medical image classification using AI algorithms is becoming a common practise and is essential for making accurate diagnoses of many disorders. CAD systems that are now in use rely significantly on high-quality, annotated data that is gathered by specialised medical equipment. As a result, Python 3.110 and Anaconda Navigator 2.2.0 are used in the suggested methodology for the categorization and detection of heart disease. The number of training images, number of epochs, size of training images, number of hidden layers of CNN employed, matrix, etc. are some of the variables that affect accuracy. The accuracy is improved, nevertheless, as the number of training photos increases.
The implementation of effective models and additional investigation into the use of machine learning in healthcare settings are necessary for early heart disease detection. Heart disease cases can be forwarded to human professionals for examination after being identified and classified by CNN, which will lessen their burden, save them time, and ensure that treatment is initiated as soon as possible to avoid complications.
B. Objectives
C. Methodology
The methodology of cardiac disease detection and classification using CNN is as follows:
a. Removing The Black Border: The black border surrounding the pictures has been removed because it does not offer any information to the fundus image and is therefore superfluous.
b. Remove The Black Corner: The fundus image is round, so even after the black border was removed, there were some dark corners left. In this step, the dark edges of the image are removed.
c. Image Resizing: The images have been shrunk to 120*120 pixels (width*height).
d. Adding the Gaussian Blur: By setting the kernel size, the pictures are given a Gaussian blur. Gaussian noise can be reduced with the use of this method.
5. Data Augmentation: Data augmentation is an integral process in deep learning, as in deep learning a need of large amounts of data is required and in some cases it is not feasible to collect thousands or millions of images, so data augmentation comes to the rescue.
6. Visualizing The Designed Model: To clearly understand all the layers involved into the model architecture, the ResNet-50 model is created and shown.
7. Training The Model: The model must now be trained after being designed. Multiple epochs are used to feed the dataset into the ResNet layers, which results in the creation and application of an appropriate learning mechanism.
8. Plotting The Graph: With regard to epochs, the pattern of losses and accuracy in training and validation is depicted. The training process is ended and the model is saved if the training parameters and validation parameters, such as training loss, training accuracy, validation loss, and validation accuracy, do not improve as the number of epochs increases
9. Plot Confusion Matrix: The model that was previously saved is now put to the test using the testing dataset, and the results are presented as a confusion matrix.
IV. IMPLEMENTATION and results
A. Implementation
The most popular machine learning technique for classifying photos with CNN is deep learning. The best Python library for this is Keras, which makes creating a CNN model quite easy. Tensorflow, another library employed in this architecture, aids in providing the framework for backend operations. Testing, training, and designing are further uses for Keras. The other one that has been utilised is Matplotlib. Graphs can be plotted with it. For performing mathematical operations and converting data into arrays, utilise Numpy. Confusion matrix is plotted using Scikit-Learn and is displayed in the results section. Each block's purpose after importing the libraries is described below.
.
B. Initiate Generator
My dataset's path is provided by the "Initiate Generator" block in the first block. This procedure also involves a number of other operations. Creating a training and validation set from the data is the first of these. 20% of the overall dataset is still reserved for validation.
.
C. Initiate Model
"initiateModel" is in the second block. It requires as an input the number of classes. This approach is used for the subsequent work.
.
D. Initiate Params
The "initiateParams" block follows, and it accepts the class names, the model, and the learning rate as input. This technique is used for the subsequent work.
E. Model Fit
The "modelFit" block comes next. The following work is done using the model, checkpoint, number of epochs, and batch size as inputs.
F. Plot Output
The "plotOutput" performs the following actions when given the model history, class names, and number of epochs as input:
G. Eval Model and Save Model
The "evalModel" and "SaveModel" come next.
H. Confusion Matrix
The "plot confusion matrix" approach is the next. Based on the outputs that our model is anticipated to produce, it depicts the confusion matrix.
.
V. Results
The ResNet50 image had an exceptional accuracy of 99.12%. The loss is going down and the precision is becoming better and better as more images are being taught. Weights are updated after an epoch is complete. The training was finished with a 99.12% accuracy rate. The testing results for several epochs are shown below.
A. Epoch 5
Figure 5.1(A) represents the graphs for training and validation accuracy for 5 epochs. X-axis represents the epochs and Y-axis represents accuracy percentage. The blue line represents the training accuracy and the yellow line represents the validation accuracy. It is clear from the graph that the training and validation accuracy increases as the epochs increase. Figure 5.2(B) represents the training and validation loss. As per the graph the training loss decreases over the increasing epochs.
B. Epoch 10
Figure 5.2(A) represents the graphs for training and validation accuracy on 10 epochs. X-axis represents the epochs and the Y-axis represents the accuracy percentage. The blue line represents the training accuracy and the yellow line represents the validation accuracy. It is clear from the graph that the training accuracy increases over the increasing epochs. However, Validation accuracy remains somehow constant.
Figure 5.2(B) represents training and validation loss. The Validation loss decreases over the increasing epochs. However, Validation loss increases slightly over increasing epochs. The overall accuracy on the Test Set is 98.35%.
C. Epoch 30
Figure 5.3(A) represents the graphs for training and validation accuracy on 10 epochs. X-axis represents the epochs and the Y-axis represents the accuracy percentage. The blue line represents the training accuracy and the yellow line represents the validation accuracy. It is clear from the graph that the training and validation accuracy increases as the epochs increase.
Figure 5.3(B) represents the graph for training and validation loss. As per the graph the training loss decreases over the increasing epochs. However, the validation loss increases as the epochs increase. The accuracy on the Test Set is 99.12%.
As seen from the confusion matrix, the accuracy of the model is 98.1%. It is more than the previous models.
D. Comparison of results for various epochs
EPOCH |
ACC. |
LOSS |
VAL. ACC. |
VAL. LOSS |
5 |
97.88 |
16.741 |
93.33 |
37.92 |
10 |
98.35 |
5.64 |
96.23 |
27.44 |
30 |
99.12 |
2.44 |
98.1 |
20.52 |
|
|
|
|
|
In this study, system approach for the detection and classification of cardiovascular diseases is described. For the purpose of detecting and classifying heart diseases. This study suggests that cardio vascular abnormalities could be diagnosed using Deep Learning technology. It investigated how to improve the heart disease detection and classification by enhancing the features of ECG imaging by using CNN with ResNet-50 model. The experimental findings demonstrated that the system algorithm performed with the accuracy of 97.88% and 99.12% for 5 epochs and 30 epochs respectively. The best accuracy was obtained for 30 epochs i.e.,99.12%. A. Future Scope Possible futuristic works have been discussed below: 1) More improvement in this devised approach is possible by applying various deep learning approaches. 2) It is possible to make improvement in the algorithmic approach by comparing it with other existing heart disease detection algorithmic approaches.
[1] Hall, Joh, “Guyton and Hall Textbook of Medical Physiology”, Philadelphia Saunders/Elsevier, ISBN 978-1-4160-4574-8, (2011). [2] Betts, J. Gordon (2013). Anatomy & physiology. pp. 787–846. ISBN 978-1-938168-13-0. Archived from the original on 27 February 2021. Retrieved 11 August 2014. [3] mpanozi, Garyfalia Krinke, Eileen; Laberke, Patrick; Schweitzer, \"Comparing fist size to heart size is not a viable technique to assess cardiomegaly\". Cardiovascular Pathology, volume 36, page 1–5, (7 May 2018) [4] Susan Standring, Neil R. Borley, “the anatomical basis of clinical practice, Gray\'s anatomy” Churchill Livingstone, ISBN 978-0-8089-2371-8, (2008). [5] J. Tortora, Gerard (2009). Principles of human anatomy. Nielsen, Mark T. (Mark Thomas) (11th ed.). Hoboken, NJ: J. Wiley. ISBN 978-0-471-78931-4. OCLC 213300667 [6] Thomson JJ, “The Discharge of Electricity through Gasses”, USA, Charles Scribner\'s Sons, pages 182–186, (1903). [7] Kesim,”Exploring the effect of image enhancement techniques on COVID-19 detection using chest X-ray images”,pubmed, volume 132: 104319, may (2021). [8] R B Devereux, “Methods for detection of left ventricular hypertrophy: application to hypertensive heart disease”, Volume 14, pp. 8–15, PubMed, July (1993). [9] S Stern and D Tzivoni, “Early detection of silent ischemic heart disease by 24-hour electrocardiographic monitoring of active subjects”, PubMed, pp.481-486, May (1974). [10] Mark K.FriedbergMD, “Prenatal Detection of Congenital Heart Disease” The Journal of Pediatrics” Volume 155, Pages 26-31, July (2009). [11] R. Chitra and Dr.V. Seenivasagam “Heart Disease Prediction System Using Supervised Learning Classifier”, Bonfring, Pages 940945, (2016) [12] Nikhil Gawande, Alka Barhatte,“ Heart diseases classification using convolutional neural network”, 2017 2nd International Conference on Communication and Electronics Systems (ICCES) IEEE Xplore, (2017) [13] Jelmer M. Wolterink, Tim Leiner, “dilated convolutional neural networks (CNNs) for segmentation of the myocardium and blood pool in cardiovascular MR”, Springer, volume 10129, (2016) [14] Wenbo Zhang, Limin Yu,“ECG Signal Classification with Deep Learning for Heart Disease Identification”, 2018 International Conference on Big Data and Artificial Intelligence (BDAI) IEEE Xplore, 201, pp. 505-509 (2018) [15] Lahcen Elbouny, Mohammed and Khalil, “An End-to End Multi-Level Wavelet Convolutional Neural Networks for heart diseases diagnosis”, Science Direct, Volume 417, December(2020) [16] Girmaw Abebe, Tadesse Tingting, Zhu, “Cardiovascular disease diagnosis using cross-domain transfer learning” 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC) IEEE Xplore, 07 October 2019 [17] Ankita Tyagi & Ritika Mehra,\" Intellectual heartbeats classification model for diagnosis of heart disease from ECG signal using hybrid convolutional neural network with GOA\" Springer, February (2021) [18] Rahma Atallah, Amjed Al-Mousa, “Heart Disease Detection Using Machine Learning Majority Voting Ensemble Method”, 2019 2nd International Conference on new Trends in Computing Sciences (ICTCS) IEEE Xplore, December (2019) [19] VirenViraj Shankar, Varun Kumar, “Heart disease prediction using CNN algorithm” Springer, 15 May 2020 [20] Sayali Ambekar, Rashmi Phalnikar, “Disease Risk Prediction by Using Convolutional Neural Network”,2018 Fourth International Conference on Computing Communication Control and Automation (ICCUBEA) IEEE Xplore, April 2019 [21] Andreas Hauptmann,Simon Arridge,Felix Lucka, “Real-time cardiovascular MR with spatio-temporal artifact suppression using deep learning–proof of concept in congenital heart disease” Pubmed 2019 Feb
Copyright © 2022 Khushnuma Maqbool, Ravinder Pal Singh, Dr. Monika Mehra. 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.
Paper Id : IJRASET47413
Publish Date : 2022-11-11
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here