View of A Multilevel Deep Learning Model for earlier diagnosis of Covid-19 using CNN-LSTM

Download (0)

Full text


A Multilevel Deep Learning Model for earlier diagnosis of Covid-19 using CNN-LSTM

A.Raihana 1*, M.Jayanthi 2, R.Deepika 3 ,C.Vinothini 4

1 Sri Krishna College of Engineering and Technology, Tamilnadu, India

2 PSNA College of Engineering and Technology, Tamilnadu, India

3 Bannari Amman Institute of Engineering and Technology,Tamilnadu,India

4 Dr.N.G.P Institute of Technology, Tamilnadu, India

[email protected], [email protected],[email protected], [email protected],


These days, automatic recognition of disease has turned into a significant problem in clinical science because of fast populace development. An automatic infection recognition system helps specialists in the analysis of illness and gives accurate, reliable, and quick outcomes and diminishes the passing rate.Coronavirus (COVID-19) is one of such severe disease which spreads more fasteraround the world in recent times. Therefore, an automated disease recognition system, as the quickest analytic choice, ought to be executed to block the spreading of COVID-19. Through the medium of this paper, a deep learning model, both hybrid and novel in nature which uses a parallel union of a long short-term memory (LSTM) and convolutional neural network (CNN) is suggested for automatically detecting COVID-19from scanned images of chest X-ray. LSTM alongwith CNNcan extract the features in parallel, which can possibly gain more robust aspects that can be used for diagnosing Covid-19. Images of both the covid-19 patients and normal patients are included in the data set of the model. The experimental results show how accurately the proposed technique identifies the Covid-19 images from the normal based on the available data set. Our proposed architecture can help to detect the COVID-19 patients at ease without waiting for blood sample results to start with the treatment

Keywords: Covid-19, CNN, LSTM, X-Ray image


Covid-19 is a widespread disease that started to spread across the world made every level of industry and people on lockdown. The disease - Coronavirus (COVID-19) is a highly irresistible infection brought about by the spread of novel coronavirus. The majority of COVID-19 infected peoplewill have gentle to direct respiratory affliction and are recovered without special treatment.

But few of the people who are older, and those who suffer fromsevere medical conditions relating to weak respiratory organs, cardiovascular problems, and cancer are in the high risk of being affected by serious illness. To create awareness among the people is the best way to limit the virus from its spreading. COVID-19 spreads mostly through beads of salivation or discharge of the nose from the person infected while coughing or sneezing. As indicated by the World Health Organization's most recent evaluations based on February 18, 2021, more than 100 million individuals have been contaminated with close to 2 413 912 deaths [1].

The coronavirus term is introduced during the occurence of a respiratory disease called SARS (severe acute respiratory syndrome) in the year of 2003 [2]. Both COVID-19 and SARS are caused by coronaviruses. Compared to SARS ,COVID-19 appears to transmit more faster and easier. According to the some reports and results researchers imply that this virus can even spread by people who do not have any early symptoms. Usually, a fever with dry cough and tiredness are Most common symptoms. The other more uncommon indications are:Head aches, Loss of smell, Loss of taste, Body ache and Sore throat, pains, diarrhea, discoloration of fingers or toes or rashes on skin. The SARS epidemic affected mostly the workers of health care sector and they were at high risk of infection. Although the reason why most of the health care workers have


been infected with SARS is not clear. The improvements in infection control mechanisms made after the outbreak of SARS has given a significant difference in the spread of the infection. By this , the infection control measures of Saudi Arabia seems to be more effective [3]. In contrast to SARS, the coronovirus infections affect the respiratory passage, kidneys and liver [4].

Coronovirus identification at earlier assumes an imperative part to control COVID-19 because of its highly contagious. The conclusion of Covid-19 by gene sequencing for blood or respiratory tests ought to be affirmed as the principle indicator for reverse transcription- polymerase chain reaction (RT-PCR), as indicated by the rules of the Government of China[5].

The interaction of RT-PCR requires 4 – 6 hours to get results, which takes quite a while contrasted with the fast spreading rate of COVID-19. This test packs result in gigantic lack, notwithstanding being wasteful [6]. Therefore, many patients infected by coronavirus can't be recognized as expected and will in general unconsciously spread to others. But by earlier identification, the predominance of COVID-19 infection will diminish.

A huge effort is put into search for other methods of testing that my give the results earlier has been studied. To manage with the not so efficient and insufficiency of the present tests, a greater number of efforts are being put to discover alternative methods to test. One such is to identify COVID-19 using radio- logical images like computed tomography (CT) or X-rays.

Earlier systems have shown that COVID-19 patients will experience the state of ground-glass opacities in chest CT scans [10]. The researchers agreed that a framework dependent on chest CT outputs can be one of the significant ways for identifying of COVID-19 cases [8-9]. Numerous scientists have also started to diagnose COVID-19 using chest X-ray images. Recently, visualization [10], machine learning [11–13], and deep learning [14,15] are the most common research work areas for automatically detecting various healthcare issues [16,17]. These models are used for extracting the features and categorize the disease based on the extracted features [18].

The proposed work aims at a novel model that joins the LSTM and CNN networks for detecting automatically COVID-19 from chest X-ray images. In this architecture, CNN and LSTM work in parallel to bring out the features and identifies the presence of the virus on the basis of these findings. To detect COVID-19 we used chest X-rays images dataset. The experimental study is done in detail terms of precision, accuracy, recall, specificity and F1-score to gauge the exhibition of the proposed framework.

The paper is arranged as follows: Data acquisition and pre-processing is mentioned in section 2. The proposed system architecture and working is elaborated in the third section. The results of the experiment are explained in Section 4. The discussion is given in Section 5. Section 6 is the conclusion of the paper

Data acquisition and pre-processing

To implement the system, the data of various patients infected from COVID-19 are acquired from (COVID-19 Chest X-ray Database) and provided dataset is used for earlier diagnostic purpose. The entire dataset is partitioned into training data (80%) and testing data (20%). Dataset is pre-processed for Extraction of features and resizing of images

Building Deep Neural Network

Achieving accurate and earlier detection of covid-19 at minimum cost is one of main goal in the


in controlling the spread of Covid-19.This paper proposes methodology for earlier and accurate detection by using deep learning to extract features that determines COVID-19.

Deep Neural Network model composed of multiple layers like one layer of input, various hidden layers and one layer of output. In this paper CNN-LSTM based novel detection system is proposed.

The proposed DL architecture involves two modules (i) CNN (ii) LSTM

Convolution Neural Network:

Convolution neural network solves the complex image classification problem in efficient manner and includes number of layers like convolution layer (Feature Extraction), pooling layer (Dimension reduction) and a fully connected layer for Detection.

Convolution layer performs the convolution operation by adding the products between the input and filter also called as convolution kernel. The output of convolution layer is called Feature map. Assume the dimension of input is Ih*Iw where h is height and w is width and convolution Filter shape is Fh*Fw and the output of convolution layer is determined by


Stride (sliding window) is number of rows and columns traversed by slide used for computational efficiency and reducing the resolution of output.

Max (1, 2, 4, 5) =5 Max (2, 3, 5, 6) =6 Max (4, 5, 7, 8) =8 Max (5, 6, 8, 9) =9

Average pooling:

It computes the average value of the input in window

Fully Connected Layer

Several layers of this type is used at the last to transform the output to number of categories [Covid Affected/Not Affected]. Fully connected Layer takes neuron from the layer before to each unit in layer.


Adding more number of FC layers results in better understanding between features and target thereby resulting in increased capacity of the network. Processed feature Map is fed as input to LSTM-Long short term memory (a unique type of RNN)


It is a unique type of Recurrent Neural Network that addresses the diminishing gradient problem and exploding gradient issue. LSTM enables learning about long-term dependencies. LSTM proposes memory blocks with three gates, input gate, the gate for output and forget gate to remember and joinpreviously processed information to current data. The memory cell is the building block of LSTM. Forget gate controls what information to pass from memory. Input Gate involves what information should be added to current input. Output Gate controls what to output from memory. LSTM works based on Weights and Gates. LSTM is to explore the temporal features

Figure 1: Proposed architecture of Covid-19 Detection System


Experimental Results

In this experiment, the model dataset was divided as 80% for training and 20% for testing. This network is executed in TensorFlow2 and the proposed hybrid model of CNN-LSTM networks were implemented TensorFlow2. The proposed CNN-LSTM network is implemented by 15 convolutional layers with 0.0001 as learning rate and with the maximum epoch 150, as determined experimentally. The performance of CNN is evaluated for accuracy in the training as well as the validation stage. The accuracy for training stage is 97.3 % whereas the accuracy for the validation stage is 95.4 %. at epoch 150. Similarly, the validation and training loss is 0.08 and 0.23, respectively, in the model. Next the performance of the hybrid model is evaluating with accuracy for both the stages. The results show the accuracy of 99.1% and 98.0%, at epoch 150 for training and validation stages respectively. Similarly, the loss for training and validation stages is 0.04 and 0.07, respectively, for the proposed hybrid model. The training and validation accuracy are better using the architecture of CNN-LSTM than compared to the architecture of CNN architecture

Table-1 Performance of the CNN network

Figure 3: Performance of CNN


The accuracy overall, precision,specificity, recall, and F1-score in everycase of CNN architecture is shown in Table-1. The CNN networkachieved 98.5% Accuracy, 99.0% recall, and 97.7% F1- score for thecases of COVID-19. In the normal cases, it obtained 99.8%specificity,100%

sensitivity, and 99.8% F1-score as shown in Table1 and Figure 3.

Table-2 Performance of the CNN-LSTM

Figure 4: Performance of CNN-LSTM

The performance overall of hybrid CNN-LSTM network is shown in Table-2 and figure.4.

Compared with CNN, COVID-19 class was categorizedwith good precision, recall, and F1-score (99.7%, 99.2%, and 98.9%).


To evaluate the performance, novel hybrid proposed method is compared with traditional CNN.

The network is trained with variety of hyper parameters like epochs and learning rate. Novel hybrid prediction system using CNN-LSTM is evaluated using various evaluation metrics like Accuracy, precision, Recall, F1-Score,it is noticed that gradual increase in the accuracy results in


system tends to perform better compare to that of CNN and resulting Detection accuracy is promising. The proposed system acquired 99.4% accuracy, precision 99.9%, specificity 99.7%, recall 99.7% F1-Score 98.9%.


In this paper, hybrid CNN-LSTM model was proposed to detect the COVID-19 cases. It increases the Detection accuracy, calculated by standard Evaluation metrics. The result shows that CNN-LSTM hybrid system gives better accuracy than other models. The result indicate that hybrid models is capable of detecting disease earlier there by reducing the transmission rate. In our future work we focus to build a model based on Deep Learning for disease detectionby also considering prominent features like Symptoms that has greater impact on the detection accuracy.


[1] About worldometer COVID-19 data - Worldometer. https://www.worldometers.

info/coronavirus/. Ge, X.-Y. et al. Isolation and characterization of a bat sars-like coronavirus that uses the ace2 receptor. Nature 503, 535–538 (2013).

[2] Cauchemez, S. et al. Transmission scenarios for middle east respiratory syndrome coronavirus (mers-cov) and how to tell them apart. Eurosurveillance 18, 20503 (2013).

[3] Lambin, P. et al. Radiomics: extracting more information from medical images using advanced feature analysis. Eur. J. Cancer 48, 441–446 (2012).

[4] Litjens, G. et al. A survey on deep learning in medical image analysis. Med. Image Anal.

42, 60–88 (2017).

[5] Luz, E., Silva, P. L., Silva, R. & Moreira, G. Towards an efficient deep learning model for covid-19 patterns detection in x-ray images. arXiv preprint arXiv:2004.05717 (2020).

[6] Ozturk, T. et al. Automated detection of covid-19 cases using deep neural networks with x-ray images. Comput. Biol. Med. 121, 103792 (2020).

[7] Toğaçar, M., Ergen, B. & Cömert, Z. Detection of lung cancer on chest ct images using minimum redundancy maximum relevance feature selection method with convolutional neural networks. Biocybern. Biomed. Eng. 40, 23–39 (2020).

[8] Afzali, A., Mofrad, F. B. & Pouladian, M. Feature selection for contour-based tuberculosis detection from chest x-ray images. In 2019 26th National and 4th International Iranian Conference on Biomedical Engineering (ICBME), 194–198 (IEEE, 2019).

[9] Khan AI, Shah JL, Bhat M. CoroNet: a deep neural network for detection and diagnosis of covid-19 from chest X-ray images.; 2020.


[10] Islam MM, Iqbal H, Haque MR, Hasan MK. Prediction of breast cancer using support vector machine and K-Nearest neighbors. In: 2017 IEEE Reg. 10 Humanit.

Technol. Conf. IEEE; 2017. p. 226–9. HTC.2017.8288944

[11] Haque MR, Islam MM, Iqbal H, Reza MS, Hasan MK. Performance evaluation of random forests and artificial neural networks for the classification of liver disorder.

[12] In: 2018 Int. Conf. Comput. Commun. Chem. Mater. Electron. Eng. IEEE; 2018.

p. 1–5.

[13] Jibril SIAML, Islam Md M, Sharif US. Predictive data mining models for novel

[14] Coronavirus (COVID-19) infected patients recovery. SN Comput Sci 2020;1:206.

[15] Cohen JP, Morrison P, Dao L. COVID-19 image data collection.; 2020.

[16] COVID-19 chest X-ray.

[17] Covid-19. [Accessed 19 June 2020].

[18] Welcome to the cancer imaging archive - the cancer imaging archive (TCIA).

[19] COVID-19 database | SIRM. database/.

[20] Mendeley data - augmented COVID-19 X-ray images dataset. https://data.mendele

[21] NIH chest X-rays | Kaggle. t=Data_Entry_2017.csv.

[22] Kaggle chest x-ray repository. xray-pneumonia.

[23] Khan AI, Shah JL, Bhat M. CoroNet: a deep neural network for detection and diagnosis of covid-19 from chest X-ray images.; 2020

[24] Kutlu Avcı. A novel method for classifying liver and brain tumors using convolutional neural networks, discrete wavelet transform and long short-term memory networks. Sensors 2019;19:1992.




Related subjects :