Adv Syst Sci Appl 2021; 03:31–39 Published online at https://ijassa.ipu.ru. Convolution Neural Network Based COVID-19 Screening Model Ashish Nainwal*, Gorav Kumar Malik, Amrish Jangra Dept. of Electronics and Communication Engineering, FET Gurukul Kangri (Deemed to be) University, Haridwar, Uttarkhand, India Abstract: Coronavirus Disease 2019 (COVID-19) is a high death rate respiratory condition that requires easy-to-reach markers for prediction. The electrocardiograph (ECG) alterations that may occur after COVID-19 hospitalization have not been fully studied yet. COVID-19 also affects heart function, which can be seen on an ECG. As a result, ECG can be used to detect virus- infected individuals. The database consists of ECG images. In this scenario, a convolution neural network (CNN) is utilized to classify COVID-19 ECG. The model is made up of eight layers, including a convolution layer, a max-pooling layer and a dense layer. The ECG image is fed into a CNN model, which classifies the COVID-19 ECG. The model provides us with 98.11% accuracy, 98.6% sensitivity and 96.40% specificity. Although 100.00% of the categorization of normal images and COVID-19 ECGs were not accurately determined by the proposed CNN model, this is the first CNN model to categorize ECG images into normal and COVID-19 classes from the ECG database and provide additional diagnostic to medical experts. Keywords: ECG, convolution neural network, COVID-19 1. INTRODUCTION Coronavirus Disease 2019 (COVID-19) is the clinical sign of contamination with the Severe Acute Respiratory Syndrome Coronavirus-2 (SARS-CoV-2). More than 170,000,000 persons in more than 180 nations or regions worldwide suffered as a result of the 2019 Coronavirus Disease (CoVID-19) global pandemic [1]. The infection’s clinical course is characterized by respiratory symptoms (fever, cough, and tiredness), which can progress to pneumonia, acute respiratory distress syndrome (ARDS) and shock [2]. The modern world is in the midst of a never-before-seen health disaster. The COVID-19 outbreak is wreaking havoc on hospitals and medical professionals worldwide. According to epidemiological statistics, Coronavirus patients with prior cardiovascular irregularities are at a higher danger of pre and post COVID- 19 related issues and mortality [3]. COVID-19 has the potential to affect the heart and lungs. According to several articles, COVID-19 has been related to myocarditis, acute coronary syndromes and decompensated heart failure [4] [5] [6]. The pandemic also emphasizes the importance of preparing cardiac healthcare for COVID-19 as well as acute and chronic cardiac therapy in individuals where patient and medical delays could be hazardous. LeCun et al. introduced CNN in 1990 and in recent years, it has become one of the most potent methods of machine learning [7]. CNN offers benefits both in accuracy and performance in imaging recognition, sound classification and semantic identification with the support of fast-growing graphics process unit (GPU) technology [8] [9] [10]. In addition, recent research has demonstrated the considerable promise of CNN with biological applications including categorization of animal behavior, the prediction of protein structures ∗Corresponding author: ashishnainwal86@gmail.com 32 A. NAINWAL, G K MALIK, AMRISH and pattern recognition (EMG) [11] [12]. Recent research has also identified intriguing uses of CNN in bio-signals such as ECG for time series [13]. The CNN Framework benefits from using the huge training data set to overall improvements of classification parameters. Degerli et al. have developed a unique methodology to the composite location, gradation and detection of COVID-19 from 15495 CXR images with the creation of the ”infection mappings” capable of precisely detecting and grading COVID-19 seriousness with a precision of 98.69% [14]. Kesim et al. suggested a new CNN model for chest radiography data (X- ray images) categorization [15]. Several in-depth learning models, including chest X-ray pictures and Computer CT scans have been proposed in recent research to detect anomalies of COVID-19 in patient healthcare [16]. In this article, the COVID-19 patient ECG and normal ECG images were put to the proposed Convolution Neural Network. The proposed CNN model has eight layers, comprising three convolution layers, three pooling layers and two dense layers. The approaches yielded good results for classifying COVID-19 patients based on their ECG. 2. METHOD AND MATERIAL 2.1. Database The collection of data is in image data form [17]. Ch. Pervaiz Elahi Institute of Cardiology, Nishtar Medical University and Punjab Institute of Cardiology are the data sources, all of which are situated in Pakistan. This image data collection is collected with 12 lead-based EDAN series equipment. The rate of sampling is 500Hz. Several medical professionals have marked all ECG images. Figure 2.1 and 2.2 shows the image of normal ECG and COVID-19 patient ECG respectively. S. No Type of ECG No of Images sampling rate 1 COVID-19 250 500 2 Normal 859 500 Table 2.1. Data set details All ECG devices used to collect data have been set up as ”ON” for important warnings. ECG technicians are taught to respond to all forms of EDAN ECG device alerts so that ECG technicians are able to carry out all precautionary actions during ECG operations. This step is crucial to more precisely capture ECG images, the data created by highly qualified professionals actively involved for many years, collected ECG images were manually reviewed by medical experts and supervised by senior physicians with ECG interpretation expertise. 2.2. Preprocessing The ECG interpretation is done by image, so we need to improve image quality; we used a non-linear method gamma correction for enhancement of images its improve the interpretability or view of data and give ’better’ contribution to input preparation for image processing techniques. For normalization of images several operations are performed like scalar multiplication, addition and subtraction Gamma correction alludes to the image enhancement on contrast by changing the unique range of pixel intensity distribution and conveys a non-linear technique on the source image pixels and can cause immersion of the picture is changed. Moreover, if the gamma value is too large or small shows a low contrast image, From the outset, gamma revision appears to either obscure or light up a picture, however, this is a gross misrepresentation. Figure 2.3 shows gamma-corrected image on two different gamma values 0.47 and 1.83. We would already be able to change the normal brightness of a picture by some adjusted standardization calculation, the easiest of which Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) CONVOLUTION NEURAL NETWORK BASED COVID-19 SCREENING MODEL 33 Fig. 2.1. Normal ECG Fig. 2.2. ECG of COVID-19 patient would be basically enhancing every pixel force esteem, viably ”moving” the mean pixel power esteems across the whole picture. Pixel (P ) of the image defined in a range between 0-255, δ is a representation of angle value, grayscale image of ECG signal represented by K of the pixel (KεP ) Choose a midpoint Km of the range [0, 255]. The linear map from pixel group P to group δ represents as: Φ : P → δ = {ω|ω = Φ(K)},Φ(K) = πK/2Km (2.1) The δ is mapped to Γ (gamma value symbol) h : δ → Γ,Γ = {γ|γ = h(K)} (2.2) h(K) = 1 + f1(K) (2.3) f1(K) = a cos(Φ(K)) (2.4) Where a lies between 0 to 1 as a weighted factor and h is the histogram intensity level. According to map, group P and gamma group pixel values are interrelated. Gamma number helps to find the arbitrary pixel value. Let γ(K) = h(K), and gamma correction function is defined as: T (K) = 255 ( K 255 )1/γ(x) (2.5) Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) 34 A. NAINWAL, G K MALIK, AMRISH Fig. 2.3. : Input image: (i)ECG trace image original (ii)Gamma corrected image when γ=.47 (iii) Gamma corrected image when γ=1.83 Where the output pixel correction value is represented by T(K) in grayscale. After gamma correction, the dataset is treated so that the ECG images scale to meet the CNN network input picture size needs. The Z-score normalization was performed with the average and standard deviation of images. 2.3. Convolution Neural Network CNN is the popular sort of neural artificial network that includes algorithms for supervised learning tasks. It is also an essential tool for deep learning with many hidden layers and parameters. In several areas like image processing, design recognition and other cognitive tasks, the CNN was widely used. A standard CNN is made up of three-layer types: the convolutions layer, the fully connected layer and the pooling layer. The convolution layer conducts overlapping operations throughout the entire image spatially to create characteristics. For downsampling maps, the pooling layer is responsible. The fully connected layer classifies depending on the characteristics learned. One-dimensional signal evolution is referred to as 1D convolution or simply convolution. If the convolution occurs between two signals covering two perpendicular dimensions, the convolution shall be called a 2D convolution. Figure 2.4 shows the 2D convolution operation. This notion may be expanded to include multi-dimensional signals via which multi-dimensional convergence is possible. Polling is used to simplifying or reducing the information acquired from feature maps spatial dimensions. The most frequent usage of pooling is the maximum of pooling because of its speed and increased convergence. This is what makes a filter (usually the size 2X2) and a step The length is the same. Figure 2.5 shows the polling operation. Each input is connected to each output and hence has the phrase ”fully connected. ”It is the last layer, usually following CNN’s last pooling layer. Fully linked layers act like a typical neural network and contain around 90% of CNN parameters. This Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) CONVOLUTION NEURAL NETWORK BASED COVID-19 SCREENING MODEL 35 Fig. 2.4. 2D convolution operation Fig. 2.5. Operation of Max polling layer essentially enters the last pooling layer output and produces a N-dimensional vector where N is the number of classes to pick from. As the function for neuron activation, non-linear transfer functions are employed in ANN. For example, the most frequent activation functions are sigmoid f(x) = 1/(1 + exp(−x)) and hyperbolic tangent f(x) = tanh(x). Sigmoid and Hyperbolic Tangents are both non-linear saturating functions, which with an increasing input decrease to almost zero. A recent study has shown the growth in CNN applications’ rate of speed and rating performance, as well as the classification performance of such a linear rectified function f(x) = maximal(0,x)(ReLU). The activation function ReLU is in the dense layer of our CNN model. The suggested 2-dimensional (2D) CNN model is shown in Figure 2.6. The eight layers of the proposed model consist of three convolution layers, three max-pooling layers, and two dense layers(fully connected). The layers are converged to the corresponding kernel size for each convolution layer (64, 32 and 64). The max-pooling layer also called a downsample layer, should be utilized to the features maps after every two convolution layers. It was used to Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) 36 A. NAINWAL, G K MALIK, AMRISH Fig. 2.6. CNN Model decrease computer complexity and override controls. The stride is set to 1 and 2, respectively, for the convolution and the max-pooling layer. Two activation functions ReLU and softmax are used in dense layer to improve the performance of the model. 3. RESULT AND DISCUSSION This section discusses the performance of the ECG image classification network. We suggested an efficient approach to extract and detect characteristics from each ECG image to examine the performance of the proposed system. The CNN model is built in Python by using the Keras library in colab.research (Open source) Google platform. The filtered image is sent into the CNN model, which classifies it. The image is filtered during preprocessing to increase system accuracy. Different measures have been used to evaluate the system’s performance. Three key indexes are used to assess the classifier’s performance, namely accuracy(Acc), sensitivity(Se) and specificity(Sp). Se = (TP/TP + FN))× 100 Sp = (TN/(TN + FP )× 100 Acc = ((TP + TN)/(TP + TN + FP + FN))× 100 Predicted Normal COVID-19 Accuracy Sensitivity Specificity Original Normal 847 12 98.11 98.60 96.40 COVID-19 9 241 98.11 96.40 98.60 Table 3.2. Confusion Matrix for Complete data set Predicted Normal COVID-19 Accuracy Sensitivity Specificity Original Normal 243 7 97 97.2 96.8 COVID-19 8 242 97 96.8 97.2 Table 3.3. Confusion Matrix for balanced data set Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) CONVOLUTION NEURAL NETWORK BASED COVID-19 SCREENING MODEL 37 Fig. 3.7. Training and Validation Accuracy and Loss plot for complete data set and balanced data set Where the number of impostor acceptations is False Positive (FP), True Negative (TN) is an impostor refusal number; False Negative (FN) is a valid denial number and True Positive (TP) is a valid acceptance. Table 3.2 shows the confusion matrix for complete data set with 859 samples of normal ECG and 250 samples of COVID-19 patient ECG.proposed convolution neural network used 60% of data for training and 40% data for testing purposes. It demonstrates that 98.60% of normal ECG segments are accurately classified in the normal class, while 96.40% of COVID- 19 images are accurately classified in the COVID-19 class. Only 1.40% and 3.6%of ECG images are misclassified as COVID-19 and normal class, respectively. The model incorrectly detects 12 normal ECG images as COVID-19 ECG and correctly detects 847 images. Out of 250 COVID -19 ECG images, the network incorrectly classifies 9 of them, while the rest are correctly identified. With the entire data set, the accuracy is 98.11%. Table 3.3 illustrates the confusion matrix for a balanced data set with 250 samples of each class. Out of 250 images, 7 normal ECG images and 8 COVID-19 ECG images are classified Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) 38 A. NAINWAL, G K MALIK, AMRISH wrong. In this data set 2.8 % of normal ECG images are incorrectly labeled as COVID-19. Furthermore, the misclassification rate of the COVID-19 ECG image is approximately 3.2 %. The accuracy of this scenario is 97%. Figure 3.7 shows the graph between accuracy and loss versus No of epochs. The first two graphs show the training and validation accuracy vs. epochs and loss vs. epochs, respectively for the complete data set. The following two plots are for a balanced data set. It can also be shown that after a few epochs, the networks achieve and stable with the highest accuracy and lowest loss. 4. CONCLUSION This article presents an approach for the screening of COVID-19 based on the Convolution Neural Networks using data-set features. The suggested approach provides links between multiple layers of the original CNN architecture using convolution blocks, which produce dynamic layer combinations of different layers. The suggested approach is used to examine two scenarios of the classification task. The accuracy, sensitivity and specificity are used to analyze outcomes. The model gives 98.11% accuracy for complete data set and 97% accuracy for balanced data set. Since the suggested approach leverages the ECG trace image that smartphone acquired and widely accessible facilities in low resource nations, this study helps to diagnose COVID-19 and other heart defects as a second opinion by computer-aided methods. REFERENCES 1. Dong, E., Du, H., & Gardner, L. (2020) An interactive web-based dashboard to track covid-19 in real time. The Lancet infectious diseases, 20, 533–534. 2. Grasselli, G., et al. (2020) Baseline characteristics and outcomes of 1591 patients infected with sars-cov-2 admitted to icus of the lombardy region, italy. Jama, 323, 1574– 1581. 3. Bergamaschi, L., et al. (2021) The value of ecg changes in risk stratification of covid-19 patients. Annals of Noninvasive Electrocardiology, p. e12815. 4. Doyen, D., Moceri, P., Ducreux, D., & Dellamonica, J. (2020) Myocarditis in a patient with covid-19: a cause of raised troponin and ecg changes. The Lancet, 395, 1516. 5. Zheng, Y.-Y., Ma, Y.-T., Zhang, J.-Y., & Xie, X. (2020) Covid-19 and the cardiovascular system. Nature Reviews Cardiology, 17, 259–260. 6. Angeli, F., Spanevello, A., De Ponti, R., Visca, D., Marazzato, J., Palmiotto, G., Feci, D., Reboldi, G., Fabbri, L. M., & Verdecchia, P. (2020) Electrocardiographic features of patients with covid-19 pneumonia. European journal of internal medicine, 78, 101–106. 7. LeCun, Y., Bottou, L., Bengio, Y., & Haffner, P. (1998) Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86, 2278–2324. 8. Lee, H. & Kwon, H. (2017) Going deeper with contextual cnn for hyperspectral image classification. IEEE Transactions on Image Processing, 26, 4843–4855. 9. Hershey, S., et al. (2017) Cnn architectures for large-scale audio classification. In 2017 ieee international conference on acoustics, speech and signal processing (icassp), 131– 135, IEEE. 10. Pei, Z., Li, C., Qin, X., Chen, X., & Wei, G. (2019) Iteration time prediction for cnn in multi-gpu platform: modeling and analysis. IEEE Access, 7, 64788–64797. 11. Zhai, X., Jelfs, B., Chan, R. H., & Tin, C. (2017) Self-recalibrating surface emg pattern recognition for neuroprosthesis control based on convolutional neural network. Frontiers in neuroscience, 11, 379. 12. Cheng, J., Liu, Y., & Ma, Y. (2020) Protein secondary structure prediction based on integration of cnn and lstm model. Journal of Visual Communication and Image Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) CONVOLUTION NEURAL NETWORK BASED COVID-19 SCREENING MODEL 39 Representation, 71, 102844. 13. Li, Y., Pang, Y., Wang, J., & Li, X. (2018) Patient-specific ecg classification by deeper cnn from generic to dedicated. Neurocomputing, 314, 336–346. 14. Degerli, A., Ahishali, M., Yamac, M., Kiranyaz, S., Chowdhury, M. E., Hameed, K., Hamid, T., Mazhar, R., & Gabbouj, M. (2021) Covid-19 infection map generation and detection from chest x-ray images. Health Information Science and Systems, 9, 1–16. 15. Kesim, E., Dokur, Z., & Olmez, T. (2019) X-ray chest image classification by a small- sized convolutional neural network. In 2019 scientific meeting on electrical-electronics & biomedical engineering and computer science (EBBT), 1–5, IEEE. 16. Qiblawey, Y., et al. (2021) Detection and severity classification of covid-19 in ct images using deep learning. Diagnostics, 11, 893. 17. Khan, A. H., Hussain, M., & Malik, M. K. (2021) Ecg images dataset of cardiac and covid-19 patients. Data in Brief , 34, 106762. Copyright © 2021 ASSA. Adv Syst Sci Appl (2021) Introduction Method and Material Database Preprocessing Convolution Neural Network Result and Discussion Conclusion