Next Article in Journal
Influence of Perforated Soils on Installation of New Piles
Previous Article in Journal
Oxygenated Diesel Fuels and Their Effect on PM Emissions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development of a Convolutional Neural Network Model to Predict Coronary Artery Disease Based on Single-Lead and Twelve-Lead ECG Signals

by
Shrivathsa Thokur Vasudeva
1,*,
Shrikantha Sasihithlu Rao
1,
Navin Karanth Panambur
1,
Arun Kumar Shettigar
1,
Chakrapani Mahabala
2,
Padmanabh Kamath
3,
Manjunath Patel Gowdru Chandrashekarappa
4 and
Emanoil Linul
5,*
1
Department of Mechanical Engineering, National Institute of Technology Karnataka, Surathkal 575025, India
2
Department of Internal Medicine, Kasturba Medical College, Mangalore, Manipal Academy of Higher Education, Manipal 576104, India
3
Department of Cardiology, Kasturba Medical College and Hospital, Mangaluru 575001, India
4
Department of Mechanical Engineering, PES Institute of Technology and Management, Visvesvaraya Technological University, Belagavi 590018, India
5
Department of Mechanics and Strength of Materials, Politehnica University Timisoara, 1 Mihai Viteazu Avenue, 300 222 Timisoara, Romania
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2022, 12(15), 7711; https://doi.org/10.3390/app12157711
Submission received: 16 June 2022 / Revised: 27 July 2022 / Accepted: 27 July 2022 / Published: 31 July 2022

Abstract

:
Coronary artery disease (CAD) is one of the most common causes of heart ailments; many patients with CAD do not exhibit initial symptoms. An electrocardiogram (ECG) is a diagnostic tool widely used to capture the abnormal activity of the heart and help with diagnoses. Assessing ECG signals may be challenging and time-consuming. Identifying abnormal ECG morphologies, especially in low amplitude curves, may be prone to error. Hence, a system that can automatically detect and assess the ECG and treadmill test ECG (TMT-ECG) signals will be helpful to the medical industry in detecting CAD. In the present work, we developed an intelligent system that can predict CAD, based on ECG and TMT signals more accurately than any other system developed thus far. The distinct convolutional neural network (CNN) architecture deals with single-lead and multi-lead (12-lead) ECG and TMT-ECG data effectively. While most artificial intelligence-based systems rely on the universal dataset, the current work used clinical lab data collected from a renowned hospital in the neighborhood. ECG and TMT-ECG graphs of normal and CAD patients were collected in the form of scanned reports. One-dimensional ECG data with all possible features were extracted from the scanned report with the help of a modified image processing method. This feature extraction procedure was integrated with the optimized architecture of the CNN model leading to a novel prediction system for CAD. The automated computer-assisted system helps in the detection and medication of CAD with a high prediction accuracy of 99%.

1. Introduction

Electrocardiogram (ECG) signals provide detailed information related to the abnormal behavior of the heart [1]. An expert cardiologist analyzes [2] these signal patterns during diagnosis. In the last two decades, a good number of intelligent systems have been developed to analyze ECG and TMT-ECG signals of the heart, to assist health care experts. These systems are primarily based on single-lead [3,4] (Figure 1a) and 12-lead ECG signals [5,6,7,8,9] (Figure 1b). Coronary artery disease (CAD) pertains to constriction or blocking of the coronary arteries caused by plaque formation. There are few literature studies related to CAD due to the lack of data and its complexity [10]. CAD is commonly identified and diagnosed based on different tests, such as ECG, treadmill ECG, echocardiogram (ECHO), and angiography. The intelligent systems use different neural architectures, such as the convolutional neural network CNN [11], recurrent neural network (RNN) [12], CNN with RNN [13,14], deep belief network (DBN) [3,15], and the fully-connected neural network (FC) [11] to predict electrocardiogram (ECG)-related issues, such as arrhythmia [16,17,18,19,20], atrial fibrillation (AF) [21,22,23], myocardial infarction (MI) [24,25], ST elevation [21], CAD [10,26,27,28], etc. Tan, J.H.; Hagiwara, Y. et al. [10] implemented a long short-term memory (LSTM) network with the convolutional neural network (CNN) to automatically diagnose CAD based on ECG signals. Babaoğlu, İsmail, and Findik et al. [26] compared various feature selection models utilizing binary particle swarm optimization and a genetic algorithm using a support vector machine classifier. Kumar, Mohit, and Pachori et al. [27] worked on limited repository data using the wavelet transform method for a CAD-related diagnosis. Kurt, I., Ture, M. et al. [28] carried out a comparative study on various types of classifiers related to CAD.
In view of the shortcomings related to the nature of data, the size of the data, and the lack of clinical data, which were encountered in earlier works, in the present study, we aimed to develop a reliable artificial intelligence-based prediction system for CAD. The neural model is unique in terms of exhaustive datasets of live patients, a higher frequency of sampling of feature data, and a unique combination of activation functions across layers of the neural networks. Such a system will assist the healthcare expert in accurately predicting the presence or absence of CAD among the patients during periodic tests.
The majority of ECG research use data from publicly accessible archives [29,30,31]. Archived datasets from the repository are readily available with noise cancellation and features extracted; moreover, they are in proper data formats, unlike clinical lab data. However, in the present case, a large dataset of 550 patients was considered, with a high sampling rate of 815 pixel points/sec, which is far higher than any other work reported thus far. No researcher has attempted to apply different activation functions across different layers. In the present study, different activation functions were adopted for different layers of the CNN model, optimally, resulting in highly accurate prediction capabilities for the model.

1.1. Digitization and Feature Extraction

A modular feature extraction procedure will dispense with the access rights issues, which are likely to be encountered while using ECG machines with digitally recorded ECG data. It also enhances the utility value of ECG machines, which otherwise just generate ECG graphs by supplementing with a high sampling data extraction rate. Most of the ECG machines available in developing or underdeveloped countries do not allow sharing digital forms of ECG data. In the voltage versus time graph obtained from the electrocardiography, the automated analysis allows for the identification of ECG findings and the assessment of pathological anomalies without the need for human involvement. Digitization through image processing is one of the methods used to store ECG and TMT-ECG data [32]. The pre-processing of an image is primarily done based on pixel information. The pixel dimension of the image is determined by the size of the pixel array. The height and width of an image are determined by the number of rows (N) and columns (M) of the array. M X N is the size of the pixel array. The fundamentals of image processing for digitization are: image segmentation, color correction, point, line, and edge detection, aid in the region-dependent threshold system, the removal of paper noise with a filter, morphological image processing operations for image dilation, erosion, and pixel indexing to store the data.
The ECG signal has to be interpreted in terms of specific quantitative features, i.e., P—the arterial systole contraction pulse, R—the peak of the ventricular contraction, S—the downward deflection immediately after the ventricular contraction, Q—the downward deflection immediately preceding the ventricular contraction, and T—the recovery of the ventricles. The method is defined in terms of locating the P, Q, R, S, and T waves in electrocardiograms, which then measure the R-peak [18,33], PR, and R–R segments [21].
The scanned image with optical character recognition (OCR) is another digitization technique. It uses the threshold method to eliminate gridlines [34] and the median filter to remove noise before converting the data to a 1D vector. The Tompkins algorithm [35] was created in 1985–1986 to find features, such as the QRS complex using the low pass and high pass filters, squaring signal, integration, and adaptive thresholding with an accuracy of 95%. The common approach adopted to obtain features of these ECG signals is the principal component analysis (PCA) [36], while the wavelet packet decomposition (WPD) method combined with statistical methods can yield better outcomes [37]. The digitization tool [32,38] is used to digitize ECG graphs and measure features such as heart rate, QRS distance, R–R peak variance, and PQRS complex with 90% accuracy.
Since interpreting variations of ECG or TMT-ECG manually is difficult, a computer-aided diagnostic system assisting in cardiac health monitoring is a better alternative. The nonlinear extraction approach (because of its nonlinear nature) is ideally suited for extracting information from the ECG signal [2]. The ECG processing system [21,39] is capable of reading a wide range of pathological situations, including P, Q, R, S, T wave directions, a T wave greater than the R wave, and the absence of the Q wave in amplitude. Based on the wavelet transformation method [31], the QRS complex and QRS-T segments (30 ms before 240 ms after QRS position) are detected automatically. Thus, the selection of the best method delivers effective digitized ECG signal data by implementing the state-of-the-art technique.

1.2. Neural Network

The neural network model receives digitized data of ECG and TMT-ECG signals and generates proper recommendations as output. The basic features (age, QRS complex, ST segment drop, etc.) in addition to input data lead to the improved performance of the neural network [40,41,42]. The deep neural network is an automatic learning process consisting of multiple layers and activation functions from the lower level to higher-level representation data. The automated convolutional neural network is a version of the deep neural network finding application in predicting medical disease. CNN models have been developed to analyze ECG signals to detect arrhythmia conditions [17,20], intervals of the ECG segment [43], atrial fibrillation (AF) [23], and classes of ECG signals [44] using 4-layer architecture [45,46], 11-layer architecture [43], 16-layer architecture [44], and 34-layer [5] architecture, respectively.
The performance of any convolution neural network is assessed by the data behavior. CNNs find wide applications in the area of image processing [47], object recognition [48], and handwriting data classification [49]. In an ECG-related analysis for medication, CNNs are mostly designed for arrhythmia, AF, and MI diseases under a MIT-BIH [17,35,40] dataset. Thus far, no major work has been reported (as per the literature surveyed) regarding the application of the CNN model for the prediction of CAD.
The highlight of the present study for CAD detection involved the incorporation of activation functions for different layers based on detailed analyses of various combinations (for optimum performance). This study proposes the best CNN combinatorial model with end-to-end architecture (from data extraction to effective disease prediction) (Figure 2), focused on ethically approved fresh ECG and TMT-ECG datasets (IRB approved), which were collected from a reputed hospital in a printed image file format. Data extraction was conducted with a hybrid image processing technique and an optimized CNN model was developed thereafter, which was more accurate.

2. Methodology

The development of an effective computer-aided diagnostic system requires an accurate prediction algorithm. In most medical applications, the convolutional neural network has been identified as the best prediction algorithm.
The study proposes a one-dimensional convolutional network (1D-CNN) with multiple layers and different activation functions for different layers. The datasets extracted using ECG and TMT-ECG signal image processing for single-lead and 12-lead data were used as input in the CNN model. Since the data type is a one-dimensional vector format, the prediction was conducted effectively with the help of a one-dimensional convolutional neural network. The one-dimensional CNN is excellent at reading the best feature set, which is a self-distinguishing method from signal data [50]. The development of a one-dimensional data prediction system involves the following steps.

2.1. Dataset

The study mainly focused on a clinical dataset of 550 patients (collected from a reputed hospital) with the intention of developing a predictive model to support ECG machines installed in rural health centers. The non-availability of cardiac experts in rural health centers will have variability in ECG data interpretation. The supervised method was adopted to build a model, i.e., data used as input labeled by cardiac experts. ECG signal data were collected during two phases, one was called the normal ECG and the other was TMT-ECG signals (stressed ECG), collected according to the Bruce Protocol. It is a universal technique adopted in all diagnostic centers. According to that, there are 4 stages. Stage one involves resting, stages 2 and 3 involve exercising at incremental speeds; stage 4 involves recovering. The angiography-confirmed ECG is considered (as CAD ECG signals—and others—are considered normal when identifying the data reliability). These observations were carried out with an almost equal number of male and female participants between the ages of 25 and 70. The participants for those ECG and TMT-ECG data were recommended for TMT by healthcare experts (based on ECG results). These age-related and other health-related variables were not considered during the development of the model. These data were extracted from ECG and TMT- ECG images using the signal processing methodology. These signals were considered during peak conditions with one-second durations. The data extraction was adopted on these signal images to obtain one-dimensional data with a sampling rate of 815. A detailed explanation of the data extraction is provided as follows.

2.2. Data Extraction

The nonlinear dynamic behavior of the electrocardiogram (ECG) signal is well known, and it was a key feature that is used in this study. Since the CNN system needs feedback in the form of digitized signals, the digitization process was implemented, wherein the data were extracted from ECG and TMT-ECG graphs. The proposed method of digitization was also recommended to overcome various paper degradation problems, in addition to the reasons cited in the introduction.
According to a previous analysis, the digitization of ECG graphs was applied only for single-lead ECGs, and the majority of cases were treated with only resting condition ECGs. However, TMT-ECG was measured while the patient was running on the treadmill, based on the Bruce protocol. This plays a key role in predicting arrhythmia, CAD, and other heart-related conditions. The proposed approach was designed to digitize both the resting and TMT-ECG conditions (TMT-ECG). This novel approach will include digitized ECG data and features for each of the 12 leads individually.
The electrical signal of the heart was printed as a waveform (TMT report), which was collected through 10 electrodes and printed as 12-lead heart signals. The ECG and TMT-ECG reports used for data extraction were of an exercised (TMT-ECG) condition, as shown in Figure 3. The p-value, QRS complex, ST segments, and T value were all parts of the single-lead ECG and 12-lead ECG signals. The digitization of the TMT report, as shown in Figure 4, which involved both the resting (ECG) and TMT-ECG, aided in the study of the entire pattern of heart disease activity. Different stages of data extraction in the study are discussed below.

2.2.1. Image Scanning

The combined ECG and TMT-ECG report was taken from the GE healthcare diagnostic ECG MAC 5500 HD machine at the hospital. The thermal paper-printed ECG data were scanned using a flatbed HP A4/A5 scanner with a 600 dpi scanner resolution [51] (Figure 4). Any errors in inclination while placing the report on the scanning bed can be nullified by the following mathematical operation (Equation (1)).
The coordinates of a point ( X 1 , y 1 ) when shifted by an angle ( θ ) around ( X 0 , y 0 ) becomes ( X 2 , y 2 ) and is defined as
X 2 = c o s ( θ ) × ( X 1 X 0 ) + s i n ( θ ) × ( y 1   y 0 ) y 2 = s i n ( θ ) × ( X 1 X 0 ) + c o s ( θ ) × ( y 1   y 0 )

2.2.2. Image Masking

The scanned report contains string values pertaining to electrode locations and general information about the patient. These string values needed to be removed from the image as redundant data. The image masking helped to remove such redundancies from the images.

2.2.3. Defining a Threshold Value

The background in the graph image should be removed in order to extract the signal image from the scanned one. When it comes to removing the backgrounds from graph images, a color histogram comes into account. The color distribution over an image is represented by a histogram. In the ECG graph, the intensity of the red pixel is shown in Figure 5a. The histogram (Figure 5a) was generated with the help of a MATLAB R2020b module, namely “Color Threshold GUI”. Ten different ECG/TMT-ECG scanned images were selected randomly to achieve proper red pixel erosion. In the above color threshold module, the threshold value for the red pixel intensity was determined to be 145–255 by the trial-and-error method. Once the threshold was identified, the system automatically removed the lesser range of red pixels from the image. Finally, a black line ECG graph was retained at the end of red pixel intensity filtering.

2.2.4. Binarization

To convert an image to black-and-white, the luminosity method described in the GIMP image tool of MATLAB R2020b [52] was used (Figure 5b).
The luminosity method is given by:
Luminosity = 0.21R + 0.72G + 0.07B
Equation (2) shows the luminosity formula, where R refers to red, G refers to green, and B represents the blue pixel values. This method is more advanced [53] than other methods. It also uses a weighted average method to average the values for human experiences.

2.2.5. Open Area Deletion

The use of a binarization Gaussian filter can reduce the clarity of the image. To prevent this, the open areas of the image were deleted by a process that combined the removal of noise and image dilation. Such an open area deletion feature eliminates the pixel cluster of fewer than fifty pixels for binary images and leads to better clarity of the image (Figure 5c).

2.2.6. Morphological Operation

The ECG signal after the elimination of open areas is represented by a thick line. A morphological operation was used to retrieve the typical data segment out of this. The morphological operation algorithm chooses the averaged pixels in a row of pixels. Consequently, the morphological operation’s output will be a thin binarized image, resulting in a clean, thin graph (Figure 5d). Mathematically, it is written as (Equation (3)) [54]:
t h i n ( X ,   Y ) = X ( X Y )
where the thinning of a set X by structuring elements (SE) Y is denoted by XY. The thinning by a sequence of SEs is as in (Equation (4))
( X Y ) = [ X ( ( X Y 1 )   ( X C Y 2 ) ) ]

2.2.7. Pixel Indexing

With the pixel indexing technique [55], the heart signal (ECG) graph is converted into an array sequence that corresponds to the amplitude and time series on the ECG graph. Results of all non-zero elements of the column and row are represented in the 2D array. The first column of the array stores the row value (time series) of the pixel. Similarly, the second column of the array stores the column value (amplitude) of the corresponding row pixel. If there are more than one number of white pixels present in a single column for the defined time series, the white pixel in the middle will provide good results. Hence, in such a situation, the middle pixel (maximum pixel intensity value) will be retained. The flow chart of the corresponding algorithm is shown below (Figure 6). A lot of the redundancy (in the form of the uneven thickness of the ECG graph) is eliminated by this procedure.

2.2.8. Data Storage

The data obtained by pixel indexing were stored in a readable file format (.dat and .excel) and translated from dots per inch to millimeters for further applications using the equation below (Equation (5)).
L = ld × 25.4/600
where l is the length in millimeters and ld is the length in dots per inch (1 inch equals 25.4 mm) at 600 dots per inch (dpi), and each 1 dot corresponds to 0.0423 mm.
It should be noted that, in the ECG/TMT-ECG graph, the grid unit along the amplitude axis corresponds to 0.1 mV and along the time series axis corresponds to 0.02 s [56]. The extracted data of the entire 12-lead plots are compared with the ECG graph of the original 12-lead images, as shown in Figure 7.

2.2.9. Feature Extraction

The literature studies have highlighted several algorithms developed to extract ECG features. In the majority of cases, the data used in these algorithms were QRS complex and ST sections of the ECG graph. In this work, an intelligent system was developed based on a novel approach. The Pan–Tompkins method [57,58], with the combination of a statistical method [37], was used in the feature extraction analysis. The Tompkins extraction method is ideally suited for extracting from the QRS complex.
The accuracy of an intelligent system is determined by key features extracted from ECG graph data. The data from the QRS complex and the ST section were inadequate to create an efficient framework. Additional segmentation of lead data resolved this problem. The segments were extracted using a statistical procedure that selected the lead maximum and minimum values of the data. This was achieved by fixing the QRS complex position. Once the QRS complex (QRS segment) position was fixed, the maximum values of the neighboring signals provided the P and T amplitudes (Figure 8). Using these amplitude values, the other segments (PQ, QT, ST) could easily be determined.

2.3. Prediction System Architecture

The feature data extracted from the ECG and TMT-ECG signals were used to develop the prediction system for the CAD, using convolution neural network (CNN) modeling. This prediction system was developed on two considerations. The first one was based on single-lead signals and the other on 12-lead signals (I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6). In the design of the CNN model, the data obtained through the data extraction procedure array of the time series voltage datasets, including the ECG feature data, were used as input. The amplitude values of the signal, QRS complex, ST segment, P, Q, R, S, and T values, were included.
Initially, in the single-lead CNN model, a total of 815 time-series data extracted from individual ECG graphs were normalized and fed into the input layer to obtain an output during the training cycles. Iterations were repeated for the designated number of training data in a similar way. For the 12-lead ECG, a similar approach was adopted but, in this case, the number of time series data extracted from a single multi-lead (12-lead) ECG graph was 9792. These data were obtained as a one-dimensional dataset and were used in the development of the CNN model. Considering various CNN architectures, each with different layer numbers and combinations of activation functions, an optimal CNN network was arrived at. Three subcategories were made based on the number of layers used for the optimization procedure, i.e., (1) a one-layer CNN architecture, (2) two-layer CNN architecture, and (3) three-layer CNN architecture [40].

2.4. Single-Lead ECG/TMT-ECG-Based CNN Architecture

Here, the mathematical representation of the generalized convolution operation is given by:
x n = k = 0 n 1 y k f n k
where the variable y corresponds to the input signal, f denotes the filter, and n represents the number of data/feature elements in y, respectively. The variable ‘x’ represents the output vector. These layers were convoluted with a kernel size of 1 and a stride of 1 using Equation (6) [59]. Four activation functions adopted in the CNN model across the different layers were: ReLU, SoftMax, LeakyReLU, and linear.
The following approach was adopted to arrive at a proper CNN architecture for effective prediction. Initially, four independent single-layer CNN models (N-1 to N-4), each with different activation functions, were developed, as shown in Table 1. All of the developed CNN models have inputs of sequential models [60] (Figure 9a). As shown in Figure 9a, the output of the independent CNN architecture passes through a flattened layer and a fully-connected dense layer with sixteen filters. The sigmoid activation function was used in the output layer to classify the CAD and normal data. By this stage, the effective activation functions for the next step were identified.
Table 1 shows the layer-wise details of the output shape with the number of filters under one-dimensional data conditions. For example, the output shape of Conv1D + ReLU (814, 64) implies 814 numbers of the one-dimensional data flow from a particular layer and 64 channel filters analyze these data to generate the corresponding output. The system was trained with 5304 (out of 6630) patients’ data—a single-lead dataset, i.e., 80%—over an interval of time, and the data had 815 elements recorded, with respect to time. The dataset included all of the features (P, Q, R, S, T, QRS complex, and ST segment_ for training and testing purposes. The convolutional neural network model, which is trained for a standard ratio of 80% and 20% for training and testing, was validated based on CNN methodology.
Out of the four activation functions, the best two (ReLU and Leaky ReLU) were identified in the previous step. The two-layer CNN architecture with different combinations of these activation functions was developed (ReLU–ReLU, Leaky ReLU–Leaky ReLU, Leaky ReLU–ReLU) as shown in Figure 9b to obtain the best result. In the next step, the three-layer CNN architecture (Figure 9c) was developed from the knowledge of these results, leading to better results. The overfitting problem was observed with a higher number of layers and, hence, the three-layer CNN architecture (Figure 10a) was finalized as the best one.

2.5. Multi (12)-Lead ECG/TMT-ECG with CNN Architecture

ECG machines in general will provide 12-lead ECG/TMT-ECG signals as output, i.e., I, II, III, aVR, aVF, aVL, V1, V2, V3, V4, V5, and V6, which correlate to the entire behavior of the heart, and each lead has different amplitude curves. The study of 12-lead ECG signals consists of all 12-lead ECG signal data, which are collected by the same procedure as with the single-lead ECG. These are in the form of a one-dimensional dataset. The resulting combined 12-lead one-dimensional dataset was used in the development of CNN architecture.
Since CNNs perform more effectively on nonlinear datasets [43], similar architectures that are used in single-lead ECG datasets are applied to 12-lead ECGs. The defined CNN architecture worked with the input of data gathered from 552 patients. Here, each sample had 9792 parameters instead of 815 as was the case in single-lead architecture, which was recorded over time intervals. Based on a standard protocol, 80% of the data were used for training and 20% for testing conditions.
As mentioned in Table 2, four different independent single-layer convolutional networks were developed, each using different activation functions (ReLU, leaky ReLU, SoftMax, and linear, respectively) having a kernel size of 1 and stride of 1. The output in each of the CNN models (with a shape of (9791, 64)) was flattened and flowed to the output layer through a fully-connected dense layer as illustrated in Figure 10a. The output function defined with a dense layer consisted of the sigmoid activation function [17]. The sequential model is considered as input for all of the CNN models and the output classifications of these models were conducted through the binary classification process. Hence, all of the models were compared using the binary cross-entropy loss function [46] with the Adam optimizer [61]. This process was most suitable to classify the data for ‘CAD’ or ‘normal data’.
The same procedure was extended to the two-layer CNN architecture, i.e., the sequential model followed by two CNN layers. The first-layer CNN architecture output shape of (9791, 64) was the input to the second-layer CNN. This two-layer CNN architecture was developed using the best two of the effective activation function combinations (Table 2). Its output shape (9790, 32) was flattened (313280) and flowed to the final dense layer (through a fully-connected layer) with a sigmoid activation function, as illustrated in Figure 10b.
In the next step, the three-layer CNN architecture was designed based on the knowledge gained from the development of the two-layer CNN architecture. The three-layer CNN architecture has a sequential model of three CNN layers with output shapes of (9791, 64), (9790, 32), and (9789, 16), respectively, and with the best combination of two activation functions. The flattened output of the last CNN layer was fed to the fully-connected layer. The final output function consists of a dense layer with a sigmoid activation function, with an output of ‘0’ or ‘1’. A value of ‘0’ indicates ‘normal health’ with respect to the ECG and a value of ‘1’ indicates the presence of ‘CAD’ (Figure 10b). Since it is a binary classification, the predefined binary cross-entropy loss function and Adam optimizer were used to analyze the 12-lead ECG data. To avoid the overfitting error and to obtain the best-optimized classification model, all convolutional neural network models (10 networks) were analyzed using a constant number of epoch values (25 epochs). The results of these combinational models will help to derive an effective and suitable CNN system that is valid over both types of datasets (single-lead and multi-lead datasets).

3. Results and Discussion

3.1. Correlation Study of Signal Data

In the CNN model developed, using digitized data of the ECG/TMT-ECG signal as input, 6630 data were considered in the single-lead case; in the case of 12-leads, 552 data were considered for a period of 1 s. Out of these, a set of 100 sample data were randomly selected for the data validation process [11,32]. A least-square fit analysis was conducted for the randomly selected 100 leads (considering both CAD and normal data). The table showing the summary of test results, i.e., Mean∆ and Median∆, indicates the mean and median of the sample-by-sample difference (derived ECG minus manual (original) ECG) of every single lead. Results show a good fit (Table 3). The results showed a good degree of concurrency, as illustrated in Figure 11. Moreover, Pearson’s correlation coefficient [62] was also adopted to find the similarity between normalized original and extracted data for the selected leads. These were one-dimensional datasets, such as in the earlier case. The result of the averaged correlation was found to be 96%. Thus, the developed prediction model for CAD incorporated a better approach for feature extraction in terms of PQRST (Figure 11) and data extraction from the ECG signals (Figure 12).

3.2. Performance Metrics Evaluation

The CNN model was developed on a system that was configured with the AMD Ryzen processor consisting of SSD and 24 GB RAM with a 2GB graphics card [10]. The training algorithm ran with TensorFlow and Keras backend [62,63]. Each epoch approximately took an average of 5 to 10 s. Table 4 and Table 5 show the results of the single-lead and multi-lead ECG/TMT-ECG for the single-, two-, and three-layer convolutional neural networks, respectively (precision, recall, F1-score, accuracy, and validation loss), depending on the classification of CAD and normal ECG segments based on the single-lead ECG and 12-lead ECG. In Table 4 and Table 5, one could see that very high diagnostic accuracy was obtained with a defined number of training samples.
The data were of two types (i) single-lead signal and (ii) 12-lead signal data. These data were used for system training; the detailed evaluation [64] of the model was performed based on testing and validation data using a standard protocol. The commonly used performance metrics were accuracy (Equation (7)), sensitivity (Equation (8)), f1 score (Equation (9)), specificity (Equation (10)), and precision (Equation (11)). [7,8,56].
Accuracy = T P + T N T P + F P + T N + F N
Sensitivity = T P T P + F N
F 1   Score = 2 × T P 2 × T P + F P + F N
Specificity = T N F P + T N
Precision = T P T P + F P
These are related to the true positive (TP), true negative (TN), false positive (FP), and false negative (FN) rates of the confusion matrix (Figure 13 and Figure 14).

3.3. Identification of the Optimal Model

The CNN system learns from the empirical set of data features automatically with multiple levels of abstraction. Hence, it allows learning the complex functions of the input data with features accessed automatically. The results of the different CNN layers and activation function scenarios, which were used for experimentations, are compared in Table 4 and Table 5, considering accuracy, precision, validation loss, F1 score, and recall. Network-8 exhibited good accuracy during the training and testing phases (99% and 100%), with less validation loss (0.00022 and 0.00075) for both single-lead and 12-lead ECGs. The results are acceptable, owing to the good precision and recall rates. The model by Tan, J.H.; Hagiwara, Y. et al. [10], of the long short-term memory (LSTM) network with a convolutional neural network (CNN), provided good results in automatically diagnosing CAD ECG signals with the inclusion of lead II and ECG segments. This limitation was easily overcome with the application of the present method by retaining the same accuracy. The prediction method of single-lead and twelve-lead includes data extraction and data classification. Since it is a complex methodology, the processing time might be higher compared to a normal repository dataset analysis. This model can further be tested for patients located in geographically-far locations, so that generality can be ensured for a wider diaspora. A technically experienced person can effectively deal with these types of prediction systems. The three-layer CNN network model (Network-8) (Figure 15) is preferred for the classification of CAD due to its superiority in performance.
The results of Table 4 and Table 5 indicate that a three-layered network with ReLU, ReLu, and LeakyReLU activation functions assigned to the first, second, and third hidden layers, was the best-suited architecture for the model, which was not attempted earlier. The developed three-layer CNN model worked equally well for both the single-lead and 12-lead ECG signal data, exhibiting generality. The performances of the developed model in terms of training and validation accuracies are plotted in Figure 16a,b for the single-lead. Figure 17a,b show good convergence of validation loss; it is an ideal fit for twelve-lead ECG/TMT-ECG data, which were extracted from the ECG/TMT-ECG graph. The model achieved an accuracy of 99% with a very small validation loss of less than 0.0008% on the 25th epoch.

3.4. k-Fold Cross Validation

This is a standardized method of estimating the performance of the evaluation of the prediction model. This is usually applied during a smaller number of data samples that are present as input. The k-fold cross-validation process contains a single parameter, k, which designates how many groups should be created from a given data sample. Here, the k-fold parameters were considered as 5, i.e., k = 5, which indicates that splitting the given data samples into 5 groups is known as the 5-fold cross-validation, as explained in Figure 18.
Each split contains five-fold values, out of that, four are used for training and the remaining one is used for validation.
Table 6 shows the detailed information about accuracy and standard deviation scores obtained during each split for the single-lead ECG data and twelve-lead ECG data. Results show the validation scores of Network-8, considering single-lead and 12-lead data. The average accuracies were obtained as 99.5% and 99.1%, respectively, for single-lead and 12-lead data. Hence, this is one of the best methods to deal with clinical lab datasets. The model shows good accuracy (of about 98.6%) during the validation phase for both single and 12-lead ECG data. The development of a graphical user interface (GUI) incorporating the current model for both types of data can be the main scope for future work (for better accessibility for healthcare experts).

4. Conclusions

Thus, the CNN model was developed for both single-lead and 12-lead ECG datasets compiled from clinical data. While 6630 datasets were used for the single-lead prediction model, 552 datasets were used for the 12-lead model. The clinical ECG signal data were gathered from a reputed hospital with additional features extracted through a unique feature extraction procedure. A hybrid method combining Pan–Tompkins and a statistical method involving feature extraction was implemented, which resulted in extracting all of the features related to the ECG. During the modeling, the CNN model with a single layer, two layers, and three layers experimented with different activation functions in different layers. Later, the three-layer CNN model was found to be the best architecture, with ReLU, ReLU, and LeakyReLU activation functions in the first, second, and third layers, respectively. This model showed an accuracy of 99% during the training phase, while it exhibited an accuracy of 98.6% in the validation trials. Thus, the three-layer CNN model, with ReLU, ReLU, and LeakyReLU activation functions works well for single-lead as well as 12-lead ECG datasets and is able to predict the CAD much more reliably than any other model. Hence, the present model proved to be the best fit for the classification of CAD. The same model can be implemented as an assisting tool for doctors in clinical applications.

Author Contributions

Conceptualization, S.T.V., S.S.R., N.K.P., A.K.S. and M.P.G.C.; methodology, S.T.V., S.S.R., N.K.P., C.M., P.K. and M.P.G.C.; software, A.K.S., M.P.G.C., S.T.V. and E.L.; validation, S.S.R., N.K.P., A.K.S., C.M. and P.K.; investigation, A.K.S., C.M., M.P.G.C., S.T.V. and E.L.; writing—original draft preparation, S.T.V., S.S.R., N.K.P., A.K.S., C.M., P.K. and M.P.G.C.; writing—review and editing, S.T.V., S.S.R., N.K.P., A.K.S., E.L. and M.P.G.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by a grant from the Romanian Ministry of Research, Innovation, and Digitalization, project number PFE 26/30.12.2021, PERFORM-CDI@UPT100—the increasing of the performance of the Polytechnic University of Timișoara by strengthening the research, development, and technological transfer capacity in the field of “Energy, Environment and Climate Change” at the beginning of the second century of its existence, within program 1—development of the national system of research and development, subprogram 1.2—institutional performance—institutional development projects—excellence funding projects in RDI, PNCDI III.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors wish to acknowledge the help (via technical support and data collection) from the healthcare staff in the cardiography department of Kasturba Medical College, Mangalore.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sharma, A.; Christodorescu, R.; Agbariah, A.; Duda-Seiman, D.; Dahdal, D.; Man, D.; Kundnani, N.R.; Cretu, O.M.; Dragan, S. Cardiovascular Risk Prediction Parameters for Better Management in Rheumatic Diseases. Healthcare 2022, 10, 312. [Google Scholar] [CrossRef] [PubMed]
  2. El-Khafif, S.H.; El-Brawany, M.A. Artificial Neural Network-Based Automated ECG Signal Classifier. ISRN Biomed. Eng. 2013, 2013, 261917. [Google Scholar] [CrossRef]
  3. Mathews, S.M.; Kambhamettu, C.; Barner, K.E. A novel application of deep learning for single-lead ECG classification. Comput. Biol. Med. 2018, 99, 53–62. [Google Scholar] [CrossRef]
  4. Rubin, J.; Parvaneh, S.; Rahman, A.; Conroy, B.; Babaeizadeh, S. Densely connected convolutional networks for detection of atrial fibrillation from short single-lead ECG recordings. J. Electrocardiol. 2018, 51, S18–S21. [Google Scholar] [CrossRef]
  5. Fan, X.; Hu, Z.; Wang, R.; Yin, L.; Li, Y.; Cai, Y. A novel hybrid network of fusing rhythmic and morphological features for atrial fibrillation detection on mobile ECG signals. Neural Comput. Appl. 2020, 32, 8101–8113. [Google Scholar] [CrossRef]
  6. Chen, T.M.; Huang, C.H.; Shih, E.S.C.; Hu, Y.F.; Hwang, M.J. Detection and Classification of Cardiac Arrhythmias by a Challenge-Best Deep Learning Neural Network Model. iScience 2020, 23, 100886. [Google Scholar] [CrossRef] [Green Version]
  7. Liang, Y.; Yin, S.; Tang, Q.; Zheng, Z.; Elgendi, M.; Chen, Z. Deep Learning Algorithm Classifies Heartbeat Events Based on Electrocardiogram Signals. Front. Physiol. 2020, 11, 569050. [Google Scholar] [CrossRef]
  8. Ribeiro, A.H.; Ribeiro, M.H.; Paixão, G.M.M.; Oliveira, D.M.; Gomes, P.R.; Canazart, J.A.; Ferreira, M.P.S.; Andersson, C.R.; Macfarlane, P.W.; Wagner, M.; et al. Automatic diagnosis of the 12-lead ECG using a deep neural network. Nat. Commun. 2020, 11, 1760. [Google Scholar] [CrossRef] [Green Version]
  9. Sassi, R.; Bond, R.R.; Cairns, A.; Finlay, D.D.; Guldenring, D.; Libretti, G.; Isola, L.; Vaglio, M.; Poeta, R.; Campana, M.; et al. PDF–ECG in clinical practice: A model for long–term preservation of digital 12–lead ECG data. J. Electrocardiol. 2017, 50, 776–780. [Google Scholar] [CrossRef] [PubMed]
  10. 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]
  11. Schmidhuber, J. Deep Learning in neural networks: An overview. Neural Netw. 2015, 61, 85–117. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  12. Swapna, G.; Soman, K.P.; Vinayakumar, R. Automated detection of cardiac arrhythmia using deep learning techniques. Procedia Comput. Sci. 2018, 132, 1192–1201. [Google Scholar] [CrossRef]
  13. Hong, S.; Zhou, Y.; Shang, J.; Xiao, C.; Sun, J. Opportunities and challenges of deep learning methods for electrocardiogram data: A systematic review. Comput. Biol. Med. 2020, 122, 103801. [Google Scholar] [CrossRef] [PubMed]
  14. Chuang, C.C.; Lee, C.C.; Yeng, C.H.; So, E.C.; Chen, Y.J. Attention mechanism-based convolutional long short-term memory neural networks to electrocardiogram-based blood pressure estimation. Appl. Sci. 2021, 11, 12019. [Google Scholar] [CrossRef]
  15. Ebrahimi, Z.; Loni, M.; Daneshtalab, M.; Gharehbaghi, A. A review on deep learning methods for ECG arrhythmia classification. Expert Syst. Appl. X 2020, 7, 100033. [Google Scholar] [CrossRef]
  16. Jiang, W.; Kong, S.G. Block-based neural networks for personalized ECG signal classification. IEEE Trans. Neural Netw. 2007, 18, 1750–1761. [Google Scholar] [CrossRef]
  17. Rahhal, M.M.A.; Bazi, Y.; Alhichri, H.; Alajlan, N.; Melgani, F.; Yager, R.R. Deep learning approach for active classification of electrocardiogram signals. Inf. Sci. 2016, 345, 340–354. [Google Scholar] [CrossRef]
  18. Wu, L.; Xie, X.; Wang, Y. ECG enhancement and r-peak detection based on window variability. Healthcare 2021, 9, 227. [Google Scholar] [CrossRef]
  19. Marston, H.R.; Hadley, R.; Banks, D.; Duro, M.D.C.M. Mobile self-monitoring ECG devices to diagnose arrhythmia that coincide with palpitations: A scoping review. Healthcare 2019, 7, 96. [Google Scholar] [CrossRef] [Green Version]
  20. 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]
  21. Akula, R.; Mohamed, H. Automation algorithm to detect and quantify electrocardiogram waves and intervals. Procedia Comput. Sci. 2019, 151, 941–946. [Google Scholar] [CrossRef]
  22. Wang, L.H.; Yan, Z.H.; Yang, Y.T.; Chen, J.Y.; Yang, T.; Kuo, I.C.; Abu, P.A.R.; Huang, P.C.; Chen, C.A.; Chen, S.L. A classification and prediction hybrid model construction with the iqpso-svm algorithm for atrial fibrillation arrhythmia. Sensors 2021, 21, 5222. [Google Scholar] [CrossRef] [PubMed]
  23. Wang, J.; Wang, P.; Wang, S. Automated detection of atrial fibrillation in ECG signals based on wavelet packet transform and correlation function of random process. Biomed. Signal Process. Control 2020, 55, 101662. [Google Scholar] [CrossRef]
  24. Hao, P.; Gao, X.; Li, Z.; Zhang, J.; Wu, F.; Bai, C. Multi-branch fusion network for Myocardial infarction screening from 12-lead ECG images. Comput. Methods Programs Biomed. 2020, 184, 105286. [Google Scholar] [CrossRef] [PubMed]
  25. Mirza, A.H.; Nurmaini, S.; Partan, R.U. Automatic Classification of 15 Leads ECG Signal of Myorcadial Infarction Using Convolutional Neural Network. Appl. Sci. 2022, 12, 5603. [Google Scholar] [CrossRef]
  26. Babaoglu, I.; Findik, O.; Ülker, E. A comparison of feature selection models utilizing binary particle swarm optimization and genetic algorithm in determining coronary artery disease using support vector machine. Expert Syst. Appl. 2010, 37, 3177–3183. [Google Scholar] [CrossRef]
  27. Kumar, M.; Pachori, R.B.; Acharya, U.R. Characterization of coronary artery disease using flexible analytic wavelet transform applied on ECG signals. Biomed. Signal Process. Control 2017, 31, 301–308. [Google Scholar] [CrossRef]
  28. Kurt, I.; Ture, M.; Kurum, A.T. Comparing performances of logistic regression, classification and regression tree, and neural networks for predicting coronary artery disease. Expert Syst. Appl. 2008, 34, 366–374. [Google Scholar] [CrossRef]
  29. Kruger, G.H.; Latchamsetty, R.; Langhals, N.B.; Yokokawa, M.; Chugh, A.; Morady, F.; Oral, H.; Berenfeld, O. Bimodal classification algorithm for atrial fibrillation detection from m-health ECG recordings. Comput. Biol. Med. 2019, 104, 310–318. [Google Scholar] [CrossRef] [PubMed]
  30. Polat, K.; Güneş, S. A new feature selection method on classification of medical datasets: Kernel F-score feature selection. Expert Syst. Appl. 2009, 36, 10367–10373. [Google Scholar] [CrossRef]
  31. Wen, J.; Xuan, S.; Li, Y.; Gao, Q.; Peng, Q. Image-segmentation algorithm based on wavelet and data-driven neutrosophic fuzzy clustering. Imaging Sci. J. 2019, 67, 63–75. [Google Scholar] [CrossRef]
  32. Badilini, F.; Erdem, T.; Zareba, W.; Moss, A.J. ECGScan: A method for conversion of paper electrocardiographic printouts to digital electrocardiographic files. J. Electrocardiol. 2005, 38, 310–318. [Google Scholar] [CrossRef] [PubMed]
  33. Śmigiel, S.; Pałczyński, K.; Ledziński, D. Deep learning techniques in the classification of ecg signals using r-peak detection based on the ptb-xl dataset. Sensors 2021, 21, 8174. [Google Scholar] [CrossRef] [PubMed]
  34. Ravichandran, L.; Harless, C.; Member, S. Novel Tool for Complete Digitization of Paper Electrocardiography Data. IEEE J. Transl. Eng. Health Med. 2013, 1, 1800107. [Google Scholar] [CrossRef]
  35. Jambukia, S.H.; Dabhi, V.K.; Prajapati, H.B. Classification of ECG signals using machine learning techniques: A survey. In Proceedings of the 2015 International Conference on Advances in Computer Engineering and Applications, Ghaziabad, India, 19–20 March 2015; pp. 714–721. [Google Scholar] [CrossRef]
  36. Luukka, P.; Lampinen, J. A Classification Method Based on Principal Component Analysis and Differential Evolution Algorithm Applied for Prediction Diagnosis from Clinical EMR Heart Data Sets. In Computational Intelligence in Optimization; Springer: Berlin/Heidelberg, Germany, 2010; pp. 263–283. [Google Scholar] [CrossRef]
  37. Li, H.; Yuan, D.; Ma, X.; Cui, D.; Cao, L. Genetic algorithm for the optimization of features and neural networks in ECG signals classification. Sci. Rep. 2017, 7, 41011. [Google Scholar] [CrossRef] [PubMed]
  38. Garg, D.K. ECG Paper Records Digitization through Image Processing Techniques. Int. J. Comput. Appl. 2012, 48, 35–38. [Google Scholar]
  39. Yoo, H.; Han, S.; Chung, K. A frequency pattern mining model based on deep neural network for real-time classification of heart conditions. Healthcare 2020, 8, 234. [Google Scholar] [CrossRef]
  40. Sannino, G.; De Pietro, G. A deep learning approach for ECG-based heartbeat classification for arrhythmia detection. Futur. Gener. Comput. Syst. 2018, 86, 446–455. [Google Scholar] [CrossRef]
  41. 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. 2019, 23, 1574–1584. [Google Scholar] [CrossRef]
  42. Maniruzzaman, M.; Rahman, M.J.; Ahammed, B.; Abedin, M.M. Classification and prediction of diabetes disease using machine learning paradigm. Health Inf. Sci. Syst. 2020, 8, 7. [Google Scholar] [CrossRef]
  43. Acharya, U.R.; Fujita, H.; Lih, O.S.; Hagiwara, Y.; Tan, J.H.; Adam, M. Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Inf. Sci. 2017, 405, 81–90. [Google Scholar] [CrossRef]
  44. Yildirim, O.; Tan, R.S.; Acharya, U.R. An efficient compression of ECG signals using deep convolutional autoencoders. Cogn. Syst. Res. 2018, 52, 198–211. [Google Scholar] [CrossRef]
  45. Murat, F.; Yildirim, O.; Talo, M.; Baloglu, U.B.; Demir, Y.; Acharya, U.R. Application of deep learning techniques for heartbeats detection using ECG signals-analysis and review. Comput. Biol. Med. 2020, 120, 103726. [Google Scholar] [CrossRef] [PubMed]
  46. Rajeswari, K.; Vaithiyanathan, V.; Neelakantan, T.R. Feature Selection in Ischemic Heart Disease identification using feed forward neural networks. Procedia Eng. 2012, 41, 1818–1823. [Google Scholar] [CrossRef] [Green Version]
  47. Al-Ani, M.; Rawi, A.A. A rule-based expert system for automated ecg diagnosis. Int. J. Adv. Eng. Technol. 2014, 6, 1480–1492. [Google Scholar]
  48. Oquab, M.; Bottou, L.; Laptev, I.; Sivic, J. Is object localization for free?—Weakly-supervised learning with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 685–694. [Google Scholar] [CrossRef] [Green Version]
  49. Cireşan, D.C.; Meier, U.; Gambardella, L.M.; Schmidhuber, J. Convolutional neural network committees for handwritten character classification. In Proceedings of the 2011 International Conference on Document Analysis and Recognition, Beijing, China, 18–21 September 2011; Volume 10, pp. 1135–1139. [Google Scholar] [CrossRef] [Green Version]
  50. Yuan, Y.; Xun, G.; Suo, Q.; Jia, K.; Zhang, A. Wave2Vec: Deep representation learning for clinical temporal data. Neurocomputing 2019, 324, 31–42. [Google Scholar] [CrossRef]
  51. Jayaraman, S.; Swamy, P.; Damodaran, V.; Venkatesh, N. A Novel Technique for ECG Morphology Interpretation and Arrhythmia Detection Based on Time Series Signal Extracted from Scanned ECG Record. Adv. Electrocardiograms-Methods Anal. 2012, 10, 21785. [Google Scholar] [CrossRef] [Green Version]
  52. Carolina Sparavigna, A. An Image Processing Approach Based on Gnu Image Manipulation Program Gimp to the Panoramic Radiography. Int. J. Sci. 2015, 1, 57–67. [Google Scholar] [CrossRef]
  53. Biswas, D. Novel Gray Scale Conversion Techniques Based on Pixel Dept. J. Glob. Res. Comput. Sci. 2011, 2, 79–82. [Google Scholar]
  54. Pratt, W.K. Morphological Image Processing. In Digital Image Processing, 3rd ed.; John Wiley & Sons, Inc.: New York, NY, USA, 2003; pp. 401–441. [Google Scholar] [CrossRef] [Green Version]
  55. Naam, J.; Suharinto, C.; Sumijan, S. Digitalisasi Grafik Elektrokardiogram dengan Teknik Pixel Indexing. Pros. SISFOTEK 2017, 1, 172–176. [Google Scholar]
  56. Tabassum, T.; Ahmad, M. Numerical data extraction from ECG paper recording using image processing technique. In Proceedings of the 2020 11th International Conference on Electrical and Computer Engineering (ICECE), Dhaka, Bangladesh, 17–19 December 2020; pp. 355–358. [Google Scholar] [CrossRef]
  57. Pan, J.; Tompkins, W.J. A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. 1985, BME-32, 230–236. [Google Scholar] [CrossRef] [PubMed]
  58. Sedghamiz, H. Matlab Implementation of Pan Tompkins ECG QRS. 2014, Code Available at the File Exchange Site of MathWorks. 2014. Available online: https://fr.mathworks.com/matlabcentral/fileexchange/45840-complete-pan-tompkins-implementationecg-qrs-detector (accessed on 15 June 2022).
  59. 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]
  60. Zhang, Q.; Zhang, M.; Chen, T.; Sun, Z.; Ma, Y.; Yu, B. Recent advances in convolutional neural network acceleration. Neurocomputing 2019, 323, 37–51. [Google Scholar] [CrossRef] [Green Version]
  61. Kingma, D.P.; Ba, J.L. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, 7–9 May 2015; pp. 1–15. [Google Scholar]
  62. Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. arXiv 2016, arXiv:1603.04467. [Google Scholar]
  63. The Theano Development Team; Al-Rfou, R.; Alain, G.; Almahairi, A.; Angermueller, C.; Bahdanau, D.; Ballas, N.; Bastien, F.; Bayer, J.; Belikov, A.; et al. Theano: A Python framework for fast computation of mathematical expressions. arXiv 2016, arXiv:1605.02688. [Google Scholar]
  64. Duraj, K.; Piaseczna, N.; Kostka, P.; Tkacz, E. Semantic Segmentation of 12-Lead ECG Using 1D Residual U-Net with Squeeze-Excitation Blocks. Appl. Sci. 2022, 12, 3332. [Google Scholar] [CrossRef]
Figure 1. (a) Single-lead ECG with segmentation; (b) 12-lead TMT-ECG.
Figure 1. (a) Single-lead ECG with segmentation; (b) 12-lead TMT-ECG.
Applsci 12 07711 g001
Figure 2. The 12-lead TMT-ECG end-to-end architecture for ECG prediction.
Figure 2. The 12-lead TMT-ECG end-to-end architecture for ECG prediction.
Applsci 12 07711 g002
Figure 3. Twelve-lead TMT-ECG digitization methodology.
Figure 3. Twelve-lead TMT-ECG digitization methodology.
Applsci 12 07711 g003
Figure 4. Twelve-lead TMT-ECG ECG report.
Figure 4. Twelve-lead TMT-ECG ECG report.
Applsci 12 07711 g004
Figure 5. (a) Intensity of RGB distribution, (b) binary image of ECG, (c) clean binary image of ECG, (d) after a morphological operation.
Figure 5. (a) Intensity of RGB distribution, (b) binary image of ECG, (c) clean binary image of ECG, (d) after a morphological operation.
Applsci 12 07711 g005
Figure 6. Flow chart for pixel indexing.
Figure 6. Flow chart for pixel indexing.
Applsci 12 07711 g006
Figure 7. Twelve-lead ECG data comparison between the original data and extracted data.
Figure 7. Twelve-lead ECG data comparison between the original data and extracted data.
Applsci 12 07711 g007
Figure 8. Extracted feature data of the ECG.
Figure 8. Extracted feature data of the ECG.
Applsci 12 07711 g008
Figure 9. (a) Single CNN layer, (b) double CNN layer, and (c) triple CNN layer for the single-lead ECG/TMT-ECG.
Figure 9. (a) Single CNN layer, (b) double CNN layer, and (c) triple CNN layer for the single-lead ECG/TMT-ECG.
Applsci 12 07711 g009aApplsci 12 07711 g009b
Figure 10. (a) The proposed CNN architecture for single-lead, (b) the proposed CNN architecture for multi-lead.
Figure 10. (a) The proposed CNN architecture for single-lead, (b) the proposed CNN architecture for multi-lead.
Applsci 12 07711 g010
Figure 11. Comparison of features of the ECG sample and digitized ECG for the sample data.
Figure 11. Comparison of features of the ECG sample and digitized ECG for the sample data.
Applsci 12 07711 g011
Figure 12. Data flow of the single-lead with the comparison of derived (extracted) data and manual (original) data: (a) data flow and (b) data correlation.
Figure 12. Data flow of the single-lead with the comparison of derived (extracted) data and manual (original) data: (a) data flow and (b) data correlation.
Applsci 12 07711 g012
Figure 13. Confusion matrix for the single-lead ECG.
Figure 13. Confusion matrix for the single-lead ECG.
Applsci 12 07711 g013
Figure 14. Confusion matrix for the 12-lead ECG.
Figure 14. Confusion matrix for the 12-lead ECG.
Applsci 12 07711 g014
Figure 15. The best CNN model for the single-lead ECG and the multi (12)-lead ECG.
Figure 15. The best CNN model for the single-lead ECG and the multi (12)-lead ECG.
Applsci 12 07711 g015
Figure 16. (a) Accuracy and (b) validation loss for single-lead.
Figure 16. (a) Accuracy and (b) validation loss for single-lead.
Applsci 12 07711 g016
Figure 17. (a) Accuracy and (b) validation loss for multi (12)-lead.
Figure 17. (a) Accuracy and (b) validation loss for multi (12)-lead.
Applsci 12 07711 g017
Figure 18. Five-fold cross-validation technique.
Figure 18. Five-fold cross-validation technique.
Applsci 12 07711 g018
Table 1. Detailed CNN architecture for a single-lead ECG with one-convolutional, two-convolutional, and three-convolutional layers, respectively.
Table 1. Detailed CNN architecture for a single-lead ECG with one-convolutional, two-convolutional, and three-convolutional layers, respectively.
Single-Layer CNNTwo-Layer CNNThree-Layer CNN
Network (N)
N-1N-2N-3N-4N-5N-6N-7N-8N-9N-10
Input(815, 1)(815, 1)(815, 1)(815, 1)(815, 1)(815, 1)(815, 1)(815, 1)(815, 1)(815, 1)
Hidden_1 LayerConv1D + ReLU (814, 64)Conv1D + LeakyReLU (814, 64)Conv1D + SoftMax (814, 64)Conv1D + Linear (814, 64)Conv1D + ReLU (814, 64)Conv1D + LeakyReLU (814, 64)Conv1D + LeakyReLU (814, 64)Conv1D + ReLU (814, 64)Conv1D + LeakyReLU (814, 64)Conv1D + ReLU (814, 64)
Hidden_2 LayerNoneNoneNoneNoneConv1D + ReLU (813, 32)Conv1D + LeakyReLU (813, 32)Conv1D + ReLU (813, 32)Conv1D + ReLU (813, 32)Conv1D + ReLU (813, 32)Conv1D + LeakyReLU (813, 32)
Hidden_3 LayerNoneNoneNoneNoneNoneNoneNoneConv1D + LeakyReLU (812, 16)Conv1D + ReLU (812, 16)Conv1D + ReLU (812, 16)
Flatten[52096][52096][52096][52096][26016][26016][26016][156624][156624][156624]
Fully-ConnectedDense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)
OutputDense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)
Table 2. Detailed CNN architecture for multi (12)-lead ECG with 1-convolutional, 2-convolutional, and 3-convolutional layers, respectively.
Table 2. Detailed CNN architecture for multi (12)-lead ECG with 1-convolutional, 2-convolutional, and 3-convolutional layers, respectively.
Single-Layer CNNTwo-Layer CNNThree-Layer CNN
Network (N)
N-1N-2N-3N-4N-5N-6N-7N-8N-9N-10
Input(9792, 1)(9792, 1)(9792, 1)(9792, 1)(9792, 1)(9792, 1)(9792, 1)(9792, 1)(9792, 1)(9792, 1)
Hidden_1 LayerConv1D + ReLU (9791, 64)Conv1D + LeakyReLU (9791, 64)Conv1D + SoftMax (9791, 64)Conv1D + Linear (9791, 64)Conv1D + ReLU (9791, 64)Conv1D + LeakyReLU (9791, 64)Conv1D + LeakyReLU (9791, 64)Conv1D + ReLU (9791, 64)Conv1D + LeakyReLU (9791, 64)Conv1D + ReLU (9791, 64)
Hidden_2 LayerNoneNoneNoneNoneConv1D + ReLU (9790, 32)Conv1D + LeakyReLU (9790, 32)Conv1D + ReLU (9790, 32)Conv1D + ReLU (9790, 32)Conv1D + ReLU (9790, 32)Conv1D + LeakyReLU (9790, 32)
Hidden_3 LayerNoneNoneNoneNoneNoneNoneNoneConv1D + LeakyReLU (9789, 16)Conv1D + ReLU (9789, 16)Conv1D + ReLU (9789, 16)
Flatten[626624][626624][626624][626624][313280][313280][313280][156624][156624][156624]
Fully-ConnectedDense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)Dense + ReLU (16)
OutputDense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)Dense + Sigmoid (1)
Table 3. Study of the correlation of 100 randomly selected samples.
Table 3. Study of the correlation of 100 randomly selected samples.
Extracted Data vs. Original DataMean (Δ)Median (Δ)Correlation (Δ)
Mean−0.03110.021020.98
Standard Deviation0.024230.035410.9
Minimum−0.063780.067840.89
Maximum0.027850.025160.97
Table 4. Results of the single-lead ECG for the single-, two-, and three-convolutional layer networks.
Table 4. Results of the single-lead ECG for the single-, two-, and three-convolutional layer networks.
Single-Layer CNNTwo-Layer CNNThree-Layer CNN
Network (N)
N-1N-2N-3N-4N-5N-6N-7N-8N-9N-10
Precision72.50%84%32%97%97.50%98%99%100%96.50%99%
Recall74.50%81.50%50%95.50%98%98%99%99%98%99%
F1-Score72.50%82%39%96%97.50%97.50%98%100%97.50%99%
Accuracy73%84%64%96%98%98%99%100%97%100%
Validation Loss.0.48250.370.650.12690.07730.0690.0220.000750.00980.00412
Table 5. Results of the multi (12)-lead ECG for the single-, two-, and three-convolutional layer networks.
Table 5. Results of the multi (12)-lead ECG for the single-, two-, and three-convolutional layer networks.
Single-Layer CNNTwo-Layer CNNThree-Layer CNN
Network (N)
N-1N-2N-3N-4N-5N-6N-7N-8N-9N-10
Precision29.50%98%29.50%97%29.50%97.00%98%99%99%99%
Recall50.00%97.50%50.00%96.50%50.00%97.50%97%99%99%99%
F1-Score37.00%96.50%37.00%97%37.00%96.50%97%100%100%100%
Accuracy59%98%59%97%59%97%98.30%99%99%99%
Validation Loss 0.680.0540.68780.0790.680.0520.0250.000220.000170.00028
Table 6. Accuracies of the k-fold cross validation.
Table 6. Accuracies of the k-fold cross validation.
Single-Lead ECG DataTwelve-Lead ECG Data
Accuracy (%)Standard
Deviation
Accuracy (%)Standard
Deviation
Split-199.80.00698.70.021
Split-299.50.01199.40.013
Split-399.30.0199.30.011
Split-499.30.01298.80.019
Split-599.70.00899.10.017
Average99.5%0.00999.1%0.016
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Vasudeva, S.T.; Rao, S.S.; Panambur, N.K.; Shettigar, A.K.; Mahabala, C.; Kamath, P.; Gowdru Chandrashekarappa, M.P.; Linul, E. Development of a Convolutional Neural Network Model to Predict Coronary Artery Disease Based on Single-Lead and Twelve-Lead ECG Signals. Appl. Sci. 2022, 12, 7711. https://doi.org/10.3390/app12157711

AMA Style

Vasudeva ST, Rao SS, Panambur NK, Shettigar AK, Mahabala C, Kamath P, Gowdru Chandrashekarappa MP, Linul E. Development of a Convolutional Neural Network Model to Predict Coronary Artery Disease Based on Single-Lead and Twelve-Lead ECG Signals. Applied Sciences. 2022; 12(15):7711. https://doi.org/10.3390/app12157711

Chicago/Turabian Style

Vasudeva, Shrivathsa Thokur, Shrikantha Sasihithlu Rao, Navin Karanth Panambur, Arun Kumar Shettigar, Chakrapani Mahabala, Padmanabh Kamath, Manjunath Patel Gowdru Chandrashekarappa, and Emanoil Linul. 2022. "Development of a Convolutional Neural Network Model to Predict Coronary Artery Disease Based on Single-Lead and Twelve-Lead ECG Signals" Applied Sciences 12, no. 15: 7711. https://doi.org/10.3390/app12157711

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop