Advertisement
Full Length Article| Volume 27, ISSUE 1, P63-75, February 2022

Download started.

Ok

COVID-19 detection using chest X-ray images based on a developed deep neural network

Open AccessPublished:October 13, 2021DOI:https://doi.org/10.1016/j.slast.2021.10.011

      Abstract

      Aim

      Currently, a new coronavirus called COVID-19 is the biggest challenge of the human at 21st century. Now, the spread of this virus is such that mortality has risen strongly in all cities of countries. Therefore, it is necessary to think of a solution to handle the disease by fast and timely diagnosis. This paper proposes a method that uses chest X-ray imagery to divide 2-4 classes into 7 different Scenarios, including Bacterial, Viral, Healthy, and COVID-19 classes. The aim of this study is to propose a method that uses chest X-ray imagery to divide 2-4 classes into 7 different Scenarios, including Bacterial, Viral, Healthy, and COVID-19 classes.

      Methods

      6 different databases from chest X-ray imagery that have been widely used in recent studies have been gathered for this aim. A Convolutional Neural Network-Long Short Time Memory model is designed and developed to extract features from raw data hierarchically. In order to make more realistic assumptions and use the Proposed Method in the practical field, white Gaussian noise is added to the raw chest X-ray imagery. Additionally, the proposed network is tested and investigated not only on 6 expressed databases but also on two additional databases.

      Results

      On the test set, the proposed network achieved an accuracy of more than 90% for all Scenarios excluding Scenario V, i.e. Healthy against the COVID-19 against the Viral, and also achieved 99% accuracy for separating the COVID-19 from the Healthy group. The results showed that the proposed network is robust to noise up to 1 dB. It is worth noting that the proposed network for two additional databases, which were only used as test databases, also achieved more than 90% accuracy. In addition, in comparison to the state-of-the-art pneumonia detection approaches, the final results obtained from the proposed network is so promising.

      Conclusions

      The proposed network is effective in detecting COVID-19 and other lung infectious diseases using chest X-ray imagery and can thus assist radiologists in making rapid and accurate detections.

      Introduction

      The root of the coronavirus word is Greek (κορώνη), i.e. crown or halo, which refers to the virus appearance, means Viral infection, under an electron microscope which is similar to a royal crown. That's why coronavirus is also referred to as the crowned virus [
      • Roosa K.
      • Lee Y.
      • Luo R.
      • et al.
      Real-time forecasts of the COVID-19 epidemic in China from February 5th to February 24th, 2020.
      ]. The COVID-19 emerged as an epidemic disease in China, Wuhan City, in December 2019. Today, this has altered to a pandemic as a dangerous public health problem all around the world [

      Yan, L.; Zhang, H.-T.; Xiao, Y.; et al. Prediction of criticality in patients with severe Covid-19 infection using three clinical features: a machine learning-based prognostic model with clinical data in Wuhan. MedRxiv.2020.

      ]. The COVID-19 also has other names, e.g. SARS-COV-2 virus [
      • Stoecklin S.B.
      • Rolland P.
      • Silue Y.
      • et al.
      First cases of coronavirus disease 2019 (COVID-19) in France: surveillance, investigations and control measures, January 2020.
      ]. This virus is a type of large-family viruses divided into four types including α-coronavirus, β-coronavirus, δ-coronavirus, and γ-coronavirus [
      • Corman V.M.
      • Muth D.
      • Niemeyer D.
      • et al.
      Hosts and sources of endemic human coronaviruses.
      ]. To date, seven of the 40 different species in the coronavirus family have been found to be transmitted to humans due to common diseases such as cold [
      • Huang C.
      • Wang Y.
      • Li X.
      • et al.
      Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China.
      ]. Previous studies have presented that some viruses such as SARS and MERS are transmitted from cats or camels to humans. It is thought that the COVID-19 has been transmitted from anteaters and bats to humans for the first time [
      • Huang C.
      • Wang Y.
      • Li X.
      • et al.
      Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China.
      ]. Common symptoms of this virus are dry cough, fever, and breath shortness. Also, muscle pain, sputum production, and sore throats are mild symptoms of the COVID-19 [

      Sarkar, B.; Ullah, M. A.; Johora, F. T.; et al. The essential facts of Wuhan novel coronavirus outbreak in China and epitope-based vaccine designing against 2019-nCoV. BioRxiv.2020.

      ]. In more serious cases, the virus can cause pneumonia, acute respiratory disorders, septic shock, multi-organ failure, and death [
      • Waters E.
      • Doyle J.
      Systematic reviews of public health in developing countries are in train.
      ]. The virus is spread mainly through the tiny droplets of the carrier during coughing. It takes between 2 and 14 days for the virus to develop [
      • Waters E.
      • Doyle J.
      Systematic reviews of public health in developing countries are in train.
      ]. The structure of this virus consists of two outer and inner layers. The internal structure of COVID-19 includes the nucleus of the virus that contains genetic material. The outer layer of the virus is made of protein crowns [
      • Hurdiss D.L.
      • Drulyte I.
      • Lang Y.
      • et al.
      Cryo-EM structure of coronavirus-HKU1 haemagglutinin esterase reveals architectural changes arising from prolonged circulation in humans.
      ]. The virus genome enters the cytoplasm after entering the host cell. According to studies, the incidence of coronavirus in men is higher than in women. Also, children are less likely to get the virus than adults [
      • Conti P.
      • Younes A.
      Coronavirus COV-19/SARS-CoV-2 affects women less than men: clinical response to viral infection.
      ]. The mortality rate of COVID-19 is estimated to be between 1% and 5% for children [
      • Shen K.
      • Yang Y.
      • Wang T.
      • et al.
      Diagnosis, treatment, and prevention of 2019 novel coronavirus infection in children: experts’ consensus statement.
      ]. According to the instructions of hospitalization published by the World Health Organization (WHO) recently, the essence of coronavirus must be verified by Reverse Transcription Polymerase Chain Reaction (RT-PCR) or a gene sequence as a key indicator for respiratory or blood specimen symptoms [
      • Corman V.
      • Bleicker T.
      • Brünink S.
      • et al.
      Diagnostic detection of 2019-nCoV by real-time RT-PCR.
      ]. But, because of the sample collection, transportation limitations, and kit results, the overall positive RT-PCR rating for throat swab samples stated at the initial presentation is around 30-60% [
      • Ai T.
      • Yang Z.
      • Hou H.
      • et al.
      Correlation of chest CT and RT-PCR testing for coronavirus disease 2019 (COVID-19) in China: a report of 1014 cases.
      ]. Furthermore, the long diagnosis time based on the RT-PCR kits causes many patients to not be quickly identified with COVID-19 as well as not receive appropriate treatment. Just because the RT-PCR kits are limited for the diagnosis of COVID-19. So, the patient may die due to a lack of necessary treatment to be hospitalized, the highly contagious nature of the virus, the low sensitivity as well as the duration for diagnosis based on RT-PCR Kits until the outcome of the diagnosis is known [
      • Hani C.
      • Trieu N.H.
      • Saab I.
      • et al.
      COVID-19 pneumonia: a review of typical CT findings and differential diagnosis.
      ]. In addition, considering the extremely infectious nature of this virus, the patient carries a risk of infection to more people. Thus, the fast diagnosis of COVID-19 is essential for controlling and treating this disease [

      Esposito, A.; Palmisano, A.; Scotti, G. M.; et al. Why is chest CT important for early diagnosis of COVID-19? Prevalence matters. medRxiv.2020.

      ]. Also, a scan of the chest compared to RT-PCR kits makes nurses less likely to be infected with the virus.
      Among the chest imaging methods, Computerized Tomography (CT) and X-ray scans are prevalent. X-ray is a scan of the body for the symptoms of lung infections, fractures, tumors, and pneumonia. CT scan is a developed X-ray machine for providing clearer images from bones, tissue, and organs. The X-ray method is easier, quicker, and more economical than CT, but it is a more harmful method than that [
      • Brisard S.
      • Serdar M.
      • Monteiro P.J.
      Multiscale X-ray tomography of cementitious materials: A review.
      ]. By taking X-ray images from the chest, doctors can visually diagnose Viral, Bacterial, COVID-19 infections, and so on. Visual diagnosis is usually a displeasing, time-consuming, and incorrect process. Because it needs expert human resources and can lead to low accuracy. Moreover, this type of image has certain weaknesses, such as overlapped organs, blurred barriers, and less contrast, which may not lead to a correct diagnosis of pneumonia [
      • Malekzadeh M.
      • Meshgini S.
      • Afrouzian R.
      • Farzamnia A.
      • Sheykhivand S.
      Removing mixture of Gaussian and Impulse noise of images using sparse coding.
      ]. So, according to these facts, recently the automatic detection of virus types including coronavirus on the basis of chest scanning imagery has attracted more attention. The automatic analysis of the COVID-19 causes the workload of hospital staff to decrease by a rapid diagnosis. This analysis is very effective for preventing mortality and treating timely. To date, different computational methods on the basis of chest scanning have been developed to observe, analyze and detect the COVID-19 automatically, which will be discussed below.
      Fie et al. [

      Shan, F.; Gao, Y.; Wang, J.; et al. Lung infection quantification of COVID-19 in CT images with deep learning. arXiv preprint.2020.

      ] presented an automatic algorithm with a Deep Learning (DL) approach for the detection of contagious points in the lungs. Xiawi et al. [
      • Xu X.
      • Jiang X.
      • Ma C.
      • et al.
      A deep learning system to screen novel coronavirus disease 2019 pneumonia.
      ] created a primary screening model using CT imaging based on DL method to separate COVID-19 from Viral pneumonia. Narin et al. [
      • Narin A.
      • Kaya C.
      • Pamuk Z.
      Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks.
      ] detected pneumonia from X-ray images by three Deep Transfer Learning (DTL) networks – i.e. Inception v3, Inception-ResNet v2, and ResNet 50. In this research, the ResNet 50 model is the most considerable network among the others. In this network, the precision of the 2-stage classification algorithm is 98%. Loannis et al. [
      • Apostolopoulos I.D.
      • Mpesiana T.A.
      Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks.
      ] employed 1427 X-ray imagery for automatic classification of Bacterial, Viral, and COVID-19 pneumonia. They utilized five DTL networks including MobileNet v2, VGG, ResNet v2, Inception, and Xception to classify three pneumonia diseases. This study depicts that the VGG network is the best amongst others. The precision of 2-class classification – i.e. Healthy and covid19 – and 3-class classification – i.e. Viral, Bacterial, and COVID-19 – has been recorded 98.75% and 93.48%, respectively. Loannis et al. [
      • Apostolopoulos I.D.
      • Aznaouridis S.I.
      • Tzani M.A.
      Extracting possibly representative COVID-19 biomarkers from X-ray images with deep learning approach and image data related to pulmonary diseases.
      ] also utilized deep Convolutional Neural Networks (CNNs) to separate pulmonary viruses from X-ray imagery, automatically. The precision of that for 2-class and 7-class classification on the basis of MobileNet is 99.18% and 87.66%, respectively. Pabira et al. [

      Sethy, P. K.; Behera, S. K.; Ratha, P. K.; et al. Detection of coronavirus disease (COVID-19) based on deep features and support vector machine. arXiv preprint. 2020.

      ] have utilized a Deep Neural Network (DNN) approach to detect COVID-19, MERS, and SARS infections from X-ray imagery, automatically. Using ResNet 50 as well as Support Vector Machine (SVM), this model reached 95% accuracy in disease classification. Also, the Generative Adversarial Networks (GANs) have been used along with fine-tuned DTL infections for automatic pneumonia detection from chest X-ray images [

      Khalifa, N. E. M.; Taha, M. H. N.; Hassanien, A. E.; et al. Detection of coronavirus (covid-19) associated pneumonia based on generative adversarial networks and a fine-tuned deep transfer learning model using chest x-ray dataset. arXiv preprint.2020.

      ]. Another research [
      • Chouhan V.
      • Singh S.K.
      • Khamparia A.
      • et al.
      A novel transfer learning based approach for pneumonia detection in chest X-ray images.
      ] has shown that automatic pneumonia detection is practical with X-ray images, five DTL networks – i.e. DenseNET, AlexNet, Inception v3, GoogLeNet, and ResNet 18 – and Data Augmentation (DA) methods. The precision of the 2-class pneumonia classification in this model is 96%. Stephen et al. [
      • Stephen O.
      • Sain M.
      • Maduh U.J.
      • Jeong D.-U.
      An efficient deep learning approach to pneumonia classification in healthcare.
      ] have proposed an effective DL model for pneumonia classification by chest X-ray imagery. The architecture of the network includes 4 convolutional layers and 2 dense. These researchers achieved 93.7% accuracy in the 2-class classification of Healthy and pneumonia. In the following, a Transfer Learning (TL) method along with a deep residual network has been introduced for the automatic classification of 2-class pneumonia. This network includes 49-convolutional layers and 2-dense. Ultimately, they found 96.70% accuracy with 92.7% f1 score [
      • Liang G.
      • Zheng L.
      A transfer learning method with deep residual network for pediatric pneumonia diagnosis.
      ]. DL networks have also been used for automatic detection of 3-class pneumonia such as Viral, COVID-19, and normal by chest X-ray imagery [
      • Nour M.
      • Cömert Z.
      • Polat K.
      A novel medical diagnosis model for COVID-19 infection detection based on deep features and Bayesian optimization.
      ]. This network has 5 convolutional layers for feature extraction. The SVM, decision tree, and K-Nearest Neighbors (KNN) have also been used for the network classification section. Here, the best performance – i.e. accuracy, sensitivity, specificity and precision on the basis of SVM classifier is 98.97%, 89.39%, as well as 99.75%, and 96.72, respectively. The X-ray images for automatic COVID-19 detection have been used in many papers. Brunese et al. [
      • Brunese L.
      • Mercaldo F.
      • Reginelli A.
      • et al.
      Explainable deep learning for pulmonary disease and coronavirus COVID-19 detection from X-rays.
      ] have utilized a developed VGG16-TL network to detect two COVID-19 and Healthy classes. The precision of this report is about 98% and the detection time is about 2.49 sec. On the basis of CT scan images, Ardakani et al. [
      • Ardakani A.A.
      • Kanafi A.R.
      • Acharya U.R.
      • et al.
      Application of deep learning technique to manage COVID-19 in routine clinical practice using CT images: Results of 10 convolutional neural networks.
      ] used DTL networks to recognize 2-class (non) COVID-19. Here, ten DTL networks including Xception, ResNet-50, VGG-16, ResNet-18, SqueezeNet, ResNet-101, AlexNet, MobileNet-V2, GoogleNet, and VGG-19 were used, and the Xception network reached hopeful results. The accuracy of this network reported about 99%. Jaiswal et al. [
      • Jaiswal A.
      • Gianchandani N.
      • Singh D.
      • et al.
      Classification of the COVID-19 infected patients using DenseNet201 based deep transfer learning.
      ] used the chest CT images using a combination of a DenseNet TL with convolutional networks for automatic diagnose of 2-class (non) COVID-19. In this study, the precision for separating reported approximately 96%. Horri et al. [
      • Horry M.J.
      • Chakraborty S.
      • Paul M.
      • et al.
      COVID-19 detection through transfer learning using multimodal imaging data.
      ] have used three types of medical imagery– i.e. Ultrasound, CT, and X-ray – to identify 2-class Healthy and COVID-19 automatically. In this research, an enhanced VGG TL network has been used. The classification accuracy for Ultrasound, CT, and X-ray modes has been reported 100%, 84%, and 86%, respectively. Sharma et al. [
      • Sharma N.
      • Mangla M.
      • Mohanty S.N.
      • et al.
      A smart ontology-based IoT framework for remote patient monitoring.
      ] presented a smart ontology-based IoT method for remote patient monitoring and early detection of COVID-19 using biomedical signals. This method provided the most up-to-date information on corona patients as well as identifiable data for remote monitoring. For detection, the aforementioned method achieved an accuracy of 96.33%. Le et al. [
      • Le D.-N.
      • Parvathy V.S.
      • Gupta D.
      • et al.
      IoT enabled depthwise separable convolution neural network with deep support vector machine for COVID-19 diagnosis and classification.
      ] proposed a novel IoT enabled Depthwise separable Convolution Neural Network (DWS-CNN) with a Deep Support Vector Machine (DSVM) for COVID-19 detection. The DWS-CNN model was designed to detect both binary and multiple classes of COVID-19. This model's accuracy on binary and multiclass was reported to be 98.54% and 99.06%, respectively. Dansana et al. [
      • Dansana D.
      • Kumar R.
      • Bhattacharjee A.
      • et al.
      Early diagnosis of COVID-19-affected patients based on X-ray and computed tomography images using deep learning algorithm.
      ] used an X-ray and CT scan image dataset to train a CNN model-based VGG-19, Inception V2 and decision tree model for binary classification pneumonia. The validation accuracy of the fine-tuned version VGG-19, Inception V2, and decision tree model was found to be 91%, 78%, and 60%, respectively. Oh et al. [
      • Oh Y.
      • Park S.
      • Ye J.C.
      Deep learning covid-19 features on cxr using limited training data sets.
      ] presented a patch-based CNN approach with a relatively small number of trainable parameters for COVID-19 diagnosis. The mentioned method was inspired by statistical analysis of the potential imaging biomarkers of the CXR radiographs. Experimental results showed that this method achieves state-of-the-art performance and provides clinically interpretable saliency maps, which are useful for COVID-19 diagnosis and patient triage. Nayak et al. [
      • Nayak S.R.
      • Nayak D.R.
      • Sinha U.
      • et al.
      Application of deep learning techniques for detection of COVID-19 cases using chest X-ray images: A comprehensive study.
      ] proposed a DL automated method for early detection of COVID-19 infection using X-ray images. They compared the performance of eight pre-trained CNN models, including AlexNet, VGG-16, GoogleNet, MobileNet-V2, SqueezeNet, ResNet-34, ResNet-50, and Inception-V3, in distinguishing COVID-19 from normal cases. The models were validated using publicly available chest X-ray images, and the best performance was obtained by ResNet-34, which had an accuracy of 98.33%. Wang et al. [
      • Wang S.-H.
      • Nayak D.R.
      • Guttery D.S.
      • et al.
      COVID-19 classification by CCSHNet with deep fusion using transfer learning and discriminant correlation analysis.
      ] suggested a novel DTL algorithm based on Pre-Trained Models (PTMs) to extract features. A selection algorithm of a pre-trained network for fusion to determine the best two models was designed in this method. Furthermore, deep chest CT fusion using discriminant correlation analysis was proposed to aid in the fusion of the two features from the two models. In four classes, this method achieved sensitivities of 95.61%, 96.25%, 98.30%, and 97.86%, respectively.
      Review of pneumonia detection studies shows that, although many studies have been performed in this regard so far, there are limitations in these studies. In most of these studies, traditional methods or DNN approaches have been used for pneumonia detection. Traditional methods for extracting and selecting optimal features require specialized knowledge, whereas DNN approaches extract features hierarchically and can produce end-to-end learning. In most studies that are based on DNN approaches, the TL models are generally used to train them, which often have a high computational time in the training process. Furthermore, most of these studies have emphasized only on separation of 2-class Healthy and pneumonia. It means that the number of 2-class research done for pneumonia detection is higher than multi-class research conducted for that. As a result, it is essential to investigate more comprehensive Scenarios for the classification of various pneumonia types. According to these different issues, in the current study attempts have been made to overcome the related issues. From this standpoint, the current study presents a novel deep Convolutional Neural Network-Long Short Time Memory (CNN-LSTM) model with the proposed architecture that has been trained by scratch, not TL models, for extracting features hierarchically from raw data in order to detection of various pneumonia types. For this aim, X-ray imagery (based on different categories) from different databases that have been widely used in recent studies has been collected. The current research has examined 7 various Scenarios of Bacterial, Viral, COVID-19, and Healthy from the chest X-ray imagery in 4 classes to provide high accuracy to separate classes from each other. The fusion of the CNN and Long Short Time Memory (LSTM) networks can reduce feature dimensions, increase stability, improve the training process, increase the speed of convergence, and detection accuracy. The proposed model is an end-to-end classifier and it does not need any feature extraction as well as feature selection. Therefore, the optimal features of every class are learned with the deep CNN-LSTM model, automatically. Since noise is an evitable problem, in order to make more realistic assumptions and use the Proposed Method (P-M) in the practical field, white Gaussian noise is added to the raw chest X-ray imagery. In addition, the proposed network is tested and investigated based on two databases that were not used in the network training process. Finally, DTL networks commonly used for pneumonia detection, such as ResNet 50, Inception, Xception, and VGG 19, are used as comparisons. The main contributions of the present study are summarized as follows:
      • Designing a CNN-LSTM model to detect both binary and multiple classes of pneumonia.
      • Designing a network that is an end-to-end system and does not require any feature extraction or selection.
      • Fusion of the CNN and LSTM networks to reduce feature dimensions, increase stability, improve the training process, increase the speed of convergence, and detection accuracy.
      • Evaluating the proposed network in the presence of environmental noises.
      • Testing and evaluating the proposed network by using two databases that were not used in the network training process.
      The rest of this paper is organized as follows. First of all, section 2 is about the database collected (on the basis of the chest X-ray imagery) and the mathematical background of CNN and LSTM networks. Section 3 presents the P-M. Section 4 exhibits the simulation results and compares the P-M with the common methods. In the end, the conclusion is presented in section 5.

      Materials and methods

      In this section, the dataset of chest X-ray imagery is examined first. Afterward, the mathematical backgrounds of CNN and LSTM are provided.

      Datasets of chest X-ray images

      This study has used chest X-ray imagery from 6 different databases that have been widely used in recent studies [

      Mooney P. Chest X-Ray Images (pneumonia). </Dataset> https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.

      , ,

      Yijie Xu A. Detecting COVID-19 induced Pneumonia from Chest X-rays with Transfer Learning: An implementation in Tensorflow and Keras. https://towardsdatascience.com/detecting-covid-19-induced-pneumonia-from-chest-x-rays-with-transfer-learning-an-implementation-311484e6afc1 . </Dataset>

      , , , ]. The dataset consists of the posterior/anterior chest image of cases with pneumonia. This dataset is divided into four categories. The following categories include 2923 images of Healthy people, 2840 images of people with Viral pneumonia, 2778 images of people with Bacterial pneumonia, and 371 images of people with COVID-19 pneumonia. Fig. 1. shows these four different categories. As you see, it does not exist any noticeable difference between COVID-19 and Viral groups. So, this disease is not recognized visually. In this study, 7 various Scenarios for chest X-ray imagery have been employed that are very useful in the medical field. These Scenarios are shown in Table 1.
      Fig. 1
      Fig. 1The X-ray images of Chest for four groups (from left to right) including healthy, Bacterial, Viral, and COVID19, respectively.
      Table 1Various Scenarios are considered for this study.
      CaseAccount
      IHealthy against of COVID-19
      IIHealthy against of Pneumonia (Bacterial, COVID19, and Viral)
      IIIHealthy against of COVID-19 against of Bacterial and Viral
      IVHealthy against of COVID-19 against of Bacterial
      VHealthy against of Covid-19 against of Viral
      VICOVID-19 against of Bacterial against of Viral
      VIIHealthy against of COVID-19 against of Bacterial against of Viral
      In addition to the 6 databases considered in this study, Datasets 1 (Scenario III) [

      Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.

      ] and 2 (Scenario V) [] with more COVID-19 samples were used separately as test sets to evaluate the proposed algorithm. Datasets 1 and 2 are divided into three categories. Categories in Dataset 1 include 317 Healthy images, 855 Bacterial and Viral pneumonia images, and 116 COVID-19 pneumonia images, while categories in Dataset 2 include 939 Healthy images, 942 Viral pneumonia images, and 800 COVID-19 pneumonia images.
      In total, data from 8 benchmark databases have been used to evaluate the proposed algorithm. Of these 8 databases, 6 were used together to assign training, validation and test sets. Also, 2 databases separately are only intended for the allocation of test sets (considering 6 datasets as training sets).

      Convolutional neural network

      CNN is considered as a stronger substitute for the conventional Neural Network (NN). It is very efficient to develop classification techniques based on machine vision [
      • Mousavi Z.
      • Ettefagh M.M.
      • Sadeghi M.H.
      • et al.
      Developing deep neural network for damage detection of beam-like structures using dynamic response based on FE model and real healthy state.
      ]. CNN has two phases including feed-forward and BackPropagation (BP) phases [
      • Hung S.-L.
      • Adeli H.
      Parallel backpropagation learning algorithms on Cray Y-MP8/864 supercomputer.
      ]. It has three essential layers including Fully Connected (FC), convolution, and pooling layers [
      • Sheykhivand S.
      • Rezaii T.Y.
      • Farzamnia A.
      • et al.
      Sleep stage scoring of single-channel EEG signal based on RUSBoost classifier.
      ]. The convolution layer output is known as the feature mapping. This work uses the max-pooling layer to choose the maximal values for feature map. Then, the dropout method is utilized to prevent overfitting; thus, every neuron is thrown out from this network at every training stage to decrease network. Then, for normalizing data in this network, the Batch Normalization (BN) layer is employed as follows [
      • Mousavi Z.
      • Rezaii T.Y.
      • Sheykhivand S.
      • et al.
      Deep convolutional neural network for classification of sleep stages from single-channel EEG signals.
      ]:
      x^(L1)=x*(L1)μB(σB2+εy*(L)=γ(L)x^(L1)+β(L)
      (1)


      where, in this BN layer, x*(L1) is an input vector. The y*(L) is an output response accociated with a neuron at layer L. The μB=E[x*(L1)], σB2=var[x*(L1)], and ε presents a little constant for numerical stability. The γ(L) and β(L) are the scale and shift parameters, respectively, which are obtained by learning. After every layer, an activation function is used. In this study, two types of activation functions were used: Softmax and LeakyRelu. LeakyRelu (see Equation 2) is employed for the convolution layers due to being nonlinearity and sparseness.
      Q(f)={ff>0bff0b=0.3
      (2)


      The Softmax activation function computes the likely distribution of output classes. So, it is employed in the last FC layer as follows:
      S(d)i=edij=1kedjfori=1,...kandd=(d1,...,dk)Rk
      (3)


      where S is the input vector. The output values, S(d), are between 0 and 1, and their summation is equal to 1 [
      • Mousavi Z.
      • Varahram S.
      • Ettefagh
      • et al.
      Deep neural networks–based damage detection using vibration signals of finite element model and real intact state: An evaluation via a lab-scale offshore jacket structure.
      ].

      Long short-term memory network

      A Recurrent Neural Network (RNN) is widely utilized for dealing with variable-length sequence inputs. A recurrent hidden vector is responsible for storing the long-distance history and it has dependency upon on before hidden vector [
      • Hochreiter S.
      • Schmidhuber J.
      Long short-term memory.
      ]. The LSTM is commonly used in the RNN [
      • Sheykhivand S.
      • Mousavi Z.
      • Rezaii T.Y.
      • et al.
      Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.
      ]. The duty of LSTM is to solve the RNN instability and gradient vanish problems. This network is used to compute a balanced summation of input signals. Next, by passing as an activation function ht, every LSTM unit utilizes memory Ct at time t. So, we have ht=Γo.tanh(Ct), where Γo is the output gate for monitoring the amount of content resulted in memory. The calculation of the output gate is done by Equation 4 [
      • Sheykhivand S.
      • Rezaii T.Y.
      • Mousavi Z.
      • et al.
      Automatic identification of epileptic seizures from EEG signals using sparse representation-based classification.
      ].
      Γo=σ(Wo·[ht1,Xt+b0])
      (4)


      where σ,Wo and b0 are the activation function, initial weight matrix and initial bias vector, respectively. Equation 5 is used to update the memory cell, Ct, where C^t is the content of the new memory obtained by Equation 6 as follows [
      • Sheykhivand S.
      • Mousavi Z.
      • Mojtahedi S.
      • et al.
      Developing an efficient deep neural network for automatic detection of COVID-19 using chest X-ray images.
      ]:
      Ct=Γf·Ct1+Γu·C^t
      (5)


      C^t=tanh(WC·[ht1,Xt]+bC)
      (6)


      The current memory is not handled by forgetfulness gate,Γf, and that of new memory content must be added up to the memory cell to be controlled by updating entrance gate, Γu. This work is done by Equations 7-8 [
      • Sheykhivand S.
      • Mousavi Z.
      • Rezaii T.Y.
      • et al.
      Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.
      ].
      Γf=σ(Wf·[ht1,Xt]+bf)
      (7)


      Γf=σ(Wu·[ht1,Xt]+bu)
      (8)


      Proposed method

      In this section, the P-M is presented based on DNNs to automatic detection of pneumonia (Bacterial, Viral, COVID-19, and Healthy) from the chest X-ray imagery. The block diagram of the P-M has been depicted in Fig. 2.
      Fig. 2
      Fig. 2The block-diagram of the P-M for automatic detection of pneumonia (Bacterial, COVID-19, Viral and Healthy).

      Preprocessing

      The preprocessing operations on chest X-ray imagery have three various steps that this section describes them. All images are first converted to RGB format. They are then resized to 224 × 224 × 3, due to the fact that databases have different colors and formats. Afterward, they are normalized between 0 and 1. Because the COVID-19 cases are limited, the number of chest X-ray images for each group is not balanced, as shown in Section 2.1. As a result, it can lead to poor classification performance as well as overfitting issues; thus, the DA method is used to dominate these issues. As a result, in the third step, the number of imagery of the COVID-19 group is artificially increased. This process improves the generalization ability of the model during training. The rotation range refers to the range of randomly rotated images during training, which is considered to be 40 degrees in the P-M. Also, both the width shift – i.e. the horizontal translation of the imagery – and height shift – i.e. the vertical translation of the images – are 0.2%. The number of COVID-19 samples before and after DA is 371 and 2842, which is nearly equal to the other groups.

      Proposed network

      The proposed deep model is designed by fusing CNN and LSTM networks. The benefits of both networks can be used simultaneously by fusing these networks. The fusion of LSTM networks with CNN networks has been used in many studies to reduce feature dimensions, increase stability, improve the training process, increase the speed of convergence, and detection accuracy [
      • Sheykhivand S.
      • Mousavi Z.
      • Rezaii T.Y.
      • et al.
      Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.
      ]. According to this, in the proposed network's architecture, the fusion of 5-convolution 2-D layers and 3-LSTM layers has been used to detect automatically pneumonia (Bacterial, Viral, COVID-19, and Healthy) from chest X-ray imagery. To implement the proposed CNN-LSTM model, a cross-library is used by the Python programming language. Here, the selection of the proposed architecture is done by 1) a dropout layer. 2) a convolution layer with nonlinear Leaky-Relu function, next a max-pooling layer followed by a BN layer, 3) before step is rehearsed 4 times, 4) the output of the before step is connected to a 2D matrix, 5) also, the output of before step connects to 3 layers of LSTM with Leaky-Relu nonlinear functions in series, then these layers are followed by a BN layer, and 6) two FC layers are employed to access the output layer. In the following, Table 2 depicts the number of filters, the size of the strides, and the architectural details of the proposed network. As you see in Table 2, the dimensionality decrease of hidden layers continues from 224 × 224 × 3 to 50. In the end, the selected feature vector is connected to the FC layer with the nonlinear Softmax function. The architectural details of the proposed algorithm are shown in Fig. 3. Here, two main interferences have an effect on the proposed CNN-LSTM model, the wide kernel in the first convolution layer and small kernels in the remaining convolution layers. The first interference enables to removal high frequency noises in contrast to small kernels, and the second interference can present input features well; so, these interferences enhance the overall network performance.
      Table 2The size of filters and steps recommended for the proposed model.
      LLayer TypeActivation FunctionNumber of FiltersPaddingOutput FormSize of Filter and PoolingStrides
      0-1Convolution2-DLeaky ReLU16yes(None, 16, 38,38)128 × 1286
      1-2Max-Pooling2-D--no(None, 16, 19,19)2 × 22
      2-3Convolution2-DLeaky ReLU32yes(None, 32,19,19)3 × 31
      3-4Max-Pooling2-D--no(None, 32, 9, 9)2 × 22
      4-5Convolution2-DLeaky ReLU64yes(None, 64, 9, 9)3 × 31
      5-6Max-Pooling2-D--no(None, 64, 4, 4)2 × 22
      6-7Convolution2-DLeaky ReLU64yes(None, 64, 4, 4)3 × 31
      7-8Max-Pooling2-D--no(None, 64, 2, 2)2 × 22
      8-9Convolution2-DLeaky ReLU64yes(None, 64, 2, 2)3 × 31
      9-10Max-Pooling2-D--no(None, 64, 1, 1)2 × 22
      10-11LSTMLeaky ReLU-(None, 60)--
      11-12LSTMLeaky ReLU-(None, 60)--
      12-13LSTMLeaky ReLU-(None, 60)--
      13-14FCLeaky ReLU-(None, 50)--
      14-15FCSoftmax-(None, 2-3-4)--
      Fig. 3
      Fig. 3The proposed network architecture for automatic detection of pneumonia based on CNN-LSTM model.
      All parameters of the proposed CNN-LSTM model are carefully modified using the trial and error method in order to achieve the best rate of convergence. Different types of optimizers and different numbers and sizes of filters were used in the design of the proposed network architecture. At last, the training process is accomplished by the cost function, Mean Squared Error (MSE) [
      • Sheykhivand S.
      • Mousavi Z.
      • Rezaii T.Y.
      • et al.
      Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.
      ], and RMSProp optimizer [
      • Sheykhivand S.
      • Mousavi Z.
      • Rezaii T.Y.
      • et al.
      Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.
      ] with a batch size 10 and learning rate of 0.001. The selected optimal parameters are shown in Table 3.
      Table 3Optimal parameters selected for the proposed network architecture.
      ParameterSearch SpaceOptimal Value
      OptimizerRMSProp, Adam, Sgd, Adamax, AdadeltaRMSProp
      Cost functionMSE, Cross-entropyMSE
      No. of Convolution layers3, 5, 10, 155
      No. of LSTM layers2, 3, 5, 103
      No. of FC layers2, 4, 62
      No. of Filters in the first Convolution layer16, 32, 64, 12816
      No. of Filters in the second Convolution layer16, 32, 64, 12832
      No. of Filters in the third Convolution layer16, 32, 64, 12864
      No. of Filters in the fourth Convolution layer16, 32, 64, 12864
      No. of Filters in the fifth Convolution layer16, 32, 64, 12864
      No. of neurons in LSTM layers30, 60, 12060
      No. of neurons in the first FC layer10, 30, 50, 8050
      The size of filter in the first convolution layer(3,3), (16,16), (32,32), (64,64), (128,128)(128,128)
      The size of filter in another Convolution layers(3,3), (16,16), (32,32), (64,64), (128,128)(3, 3)
      Dropout rate0, 0.2, 0.3, 0.4, 0.50.3
      Batch size4, 8, 10, 16, 32, 6410
      The overall number of samples and their allocation for training, validation, and testing sets for every Scenario are shown in Table 4. As it is shown in Table 4, 70% of samples are randomly chosen for the training process, 10% of samples chosen for the validation process, and the remaining 20% are chosen for the testing process.
      Table 4The number of samples and their allocation in the proposed model.
      ScenariosSample No.No. of Cases No. of Testing (20%)Sample No. of Training (70%)Sample No. of Validation (10%)
      I576511534035576
      II584511694092584
      III868717386081868
      IV854317095980854
      V854317095980854
      VI846016925922846
      VII11383227779681138

      Results

      In this section, the P-M results for the pneumonia automatic detection from the chest X-ray imagery based on the CNN-LSTM model are presented and discussed. All of simulations were carried out on the Google Collaborator system with 14 GB of RAM plus Tesla K80 GPU graphics card.
      To investigate the performance of the P-M, the proposed CNN-LSTM model error and accuracy (based on validation data) for Scenarios I and VII, as well as the confusion matrix, t-SNE charts, and bar chart diagram of precision, sensitivity, accuracy, and specificity (based on testing data) for all Scenarios (I-VII) are provided in Fig. 4. According to Fig. 4(a), the network error for Scenario I decreases with the number of iterations, and after 40 iterations, it reaches its steady-state value, and the network error eventually decreases from 0.1929 to 0.0024. Furthermore, in Fig. 4(a), the steady-state value of Scenario VII is on its 130th iteration, and the network error eventually decreases from 0.1186 to 0.0426. Furthermore, the network's accuracy for 2-class (Scenario I) and 4-class (Scenario VII) pneumonia classification is 99.42% and 91.70%, respectively. As you see in Fig. 4(b), the network's accuracy for all Scenarios is above 90% except Scenario V (i.e. Healthy against of Covid-19 against of Viral). This could be because the viral and Covid-19 images look so similar and are more difficult to distinguish than in other cases. In the Scenario I associated with the 2-class classification of Healthy and COVID-19, 563 COVID-19 samples from the testing set are well identified, while only 2 samples are misdiagnosed. Also, the final accuracy of the COVID-19 class separation from the Healthy class is approximately 99%, which is very promising. The visualization of the feature representations of all the testing samples extracted from the last FC layer via t-SNE method is given in Fig. 4(c). The feature representations are depicted as a scatter diagram with distinct colors, which express different classes. According to Fig. 4(c), as can be seen from the visualization of the last FC layer, almost all samples are separated from each other for Scenarios I and VII, and this indicates that the proposed model is able to extract high-level features from raw data and relatively has a good performance in discriminating of different classes. Fig. 4(d) shows that the values of all classification Scenarios are very promising. The results of precision, specificity, accuracy and sensitivity separation of the Healthy group from COVID-19 (Scenario I) are about 99%.
      Fig. 4
      Fig. 4The proposed CNN-LSTM model error and classification accuracy (based on validation data) for Scenarios I and VII, as well as the confusion matrix, t-SNE charts, and bar chart diagram of precision, sensitivity, accuracy, and specificity (based on testing data) for all Scenarios (I-VII); (a) Error and accuracy, (b) Confusion matrix, (c) t-SNE charts, (d) Bar chart diagram.
      Fig. 4
      Fig. 4The proposed CNN-LSTM model error and classification accuracy (based on validation data) for Scenarios I and VII, as well as the confusion matrix, t-SNE charts, and bar chart diagram of precision, sensitivity, accuracy, and specificity (based on testing data) for all Scenarios (I-VII); (a) Error and accuracy, (b) Confusion matrix, (c) t-SNE charts, (d) Bar chart diagram.
      Fig. 4
      Fig. 4The proposed CNN-LSTM model error and classification accuracy (based on validation data) for Scenarios I and VII, as well as the confusion matrix, t-SNE charts, and bar chart diagram of precision, sensitivity, accuracy, and specificity (based on testing data) for all Scenarios (I-VII); (a) Error and accuracy, (b) Confusion matrix, (c) t-SNE charts, (d) Bar chart diagram.
      To more investigate the performance of the P-M based on the CNN-LSTM model, Scenario VII – i.e. Healthy against of COVID-19 against of Bacterial against of Viral – is simulated using four DTL networks. ResNet 50 [
      • Ren H.
      • El-Khamy M.
      • Lee J.Dn
      Resnet: Efficient deep residual network for image denoising.
      ], VGG 19 [
      • Mateen M.
      • Wen J.
      • Song S.
      • et al.
      Fundus image classification using VGG-19 architecture with PCA and SVD.
      ], Inception v3 [
      • Szegedy C.
      • Ioffe S.
      • Vanhoucke V.
      • et al.
      Inception-v4, inception-resnet and the impact of residual connections on learning.
      ], and Xception [
      • Chollet F.
      Xception: Deep learning with depthwise separable convolutions.
      ] are four comparative DTL networks that have been extensively used in recent studies. Fig. 5 shows the proposed model's accuracy in comparison to DTL networks for various iterations (See Fig. 5(a)), as well as the bar chart diagram of each DTL network's sensitivity, specificity, accuracy, and precision (See Fig. 5(b)). From Fig. 5(a), after 150 iterations, the accuracy of the proposed CNN-LSTM model, Inception, ResNet 50, Xception, and VGG 19 reaches 91%, 86%, 84%, 83%, and 80%, respectively. Comparing performance of the proposed model and DTL models shows that proposed model, provides better results than DTL models. Also, the proposed model converges to the desired value faster of DTL models (See Fig. 5(a)). These results are highly related to the proposed CNN-LSTM model's unique architecture, which can automatically extract useful features from raw images layer by layer and achieve higher accuracy at a faster rate. The running time of testing and training phases is given for the classification of all Scenarios in Table 5. As shown in Table 5, the running time of the testing and training phases for Scenario VII is longer than for the other Scenarios. In addition, the running time of the Scenario VII based on the proposed CNN-LSTM model comparing the ResNet 50, VGG 19, Xception, and Inception v3 in 150 iterations is depicted in Table 6. As can be seen from Table 6, the running time of the proposed model for both phases is less than other comparative methods. This is due to the fact that DTL networks frequently have a high computational time.
      Fig. 5
      Fig. 5The performance of the proposed model in comparison to DTL networks, as well as the bar chart diagram of the sensitivity, specificity, accuracy, and precision of each DTL network; (a) Accuracy of the proposed network comparing with DTL networks, (b) Bar chart diagrams.
      Table 5The running time of the proposed network for classification of all Scenarios in 150 iterations.
      ScenariosTest(for all of the data)Train(for each iteration)
      I1.5 s15 s
      II2.7 s17 s
      III3 s23 s
      IV3 s22 s
      V3 s21 s
      VI3 s20 s
      VII8 s31 s
      Table 6Running time of the P-M comparison with Resnet 50, VGG 19, Inception v3, and Xception for 4-class pneumonia classification in 150 iterations.
      ScenarioXceptionP-MResNet 50InceptionVGG 19
      TrainTestTrainTestTrainTestTrainTestTrainTest
      VII5900 s10 s4650 s8 s5300 s9 s9000 s19 s5550 s16 s
      To make more realistic assumptions, white Gaussian noise with varying Signal-to-Noise Ratios (SNRs) is added to the raw chest X-ray imagery in testing phase which is depicted in Fig. 6. Also, the classification accuracy of each model (P-M, ResNet 50, VGG 19, Inception, and Xception) for every SNR has been reported in this Figure. As shown in Fig. 6(b), the testing accuracy of the proposed model, ResNet 50, VGG 19, Inception, and Xception is robust to observation noise up to 0 dB, 10 dB, 20 dB, 10 and 20 dB, respectively, such that their accuracy is still approximately 90%, 80%, 78%, 80%, and 80%. As a result, the proposed model, in addition to being more accurate than comparable models, is more resistant to observation noise. It is due to using the wide kernel at the first convolution layer which enables to removal high frequency noises in contrast to small kernels.
      Fig. 6
      Fig. 6The chest X-ray imagery along with white Gaussian noise in the various ranges of SNR and also the classification accuracy of each network (P-M, ResNet 50, VGG 19, Inception, and Xception) for every SNR; (a) Chest X-ray imagery along with white Gaussian noise, (b) The classification accuracy of each network.
      In previous literature, the training set and testing set have been selected from one or more common datasets. However, in order to use the proposed model in the practical field, the proposed model should be evaluated with the benchmark databases which are not used as the training data. To this end, by considering the 6 training databases, the performance of the proposed model has been assessed [

      Mooney P. Chest X-Ray Images (pneumonia). </Dataset> https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.

      , ,

      Yijie Xu A. Detecting COVID-19 induced Pneumonia from Chest X-rays with Transfer Learning: An implementation in Tensorflow and Keras. https://towardsdatascience.com/detecting-covid-19-induced-pneumonia-from-chest-x-rays-with-transfer-learning-an-implementation-311484e6afc1 . </Dataset>

      , , , ] with 2 testing databases [

      Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.

      , ] – i.e. Database 1 [

      Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.

      ] and Database 2 []. It should be noted that no information from Databases 1 and 2 have been used to train the proposed model. In fact, the chest X-ray imagery from 6 different databases is used simultaneously to train the proposed model, and Datasets 1 and 2 are used separately to evaluate this model. The t-SNE chart, confusion matrix of the last FC layer and the bar chart diagram of sensitivity, specificity, accuracy, and precision of the proposed model, for Datasets 1 and 2 (which only have been used as the testing set) are shown in Fig. 7. According to this Figure, the testing accuracy of the proposed model based on Dataset 1 and Dataset 2 is nearly 95% and 92%. From this standpoint, it can be stated that the proposed model can provide good performance for Datasets 1 and 2 even when it is trained with other 6 different databases. In fact, using 6 different databases as a training set causes the proposed model almost to be generalized. According to this, it can be said that the proposed model can perform very well when tested with different databases which are not used in the training phase.
      Fig. 7
      Fig. 7The t-SNE chart, confusion matrix and and the bar chart diagram of sensitivity, specificity, accuracy, and precision of the proposed network for Datasets 1 and 2; (a) The t-SNE chart and confusion matrix for Datasets 1, (b) The t-SNE chart and confusion matrix for Datasets 1, (c) The bar chart diagram.
      Lastly, the performance of the proposed model compared with the recent researches is given in Table 7. This table demonstrates that the proposed approach outperforms recent approaches in terms of the number of classes classified and the Scenarios studied. However, due to the difference between datasets, methods, categories, and various simulation environments, a one-to-one comparison usually is not achievable.
      Table 7Comparing the performance of the P-M with recent studies.
      TechniquesDatasetsAccuracy (%)No. of classesSpecificity (%)Sensitivity (%)
      Chouhan et al.
      • Chouhan V.
      • Singh S.K.
      • Khamparia A.
      • et al.
      A novel transfer learning based approach for pneumonia detection in chest X-ray images.
      Public96.393
      Khalifa et al.

      Khalifa, N. E. M.; Taha, M. H. N.; Hassanien, A. E.; et al. Detection of coronavirus (covid-19) associated pneumonia based on generative adversarial networks and a fine-tuned deep transfer learning model using chest x-ray dataset. arXiv preprint.2020.

      Private992
      Stephen et al.
      • Stephen O.
      • Sain M.
      • Maduh U.J.
      • Jeong D.-U.
      An efficient deep learning approach to pneumonia classification in healthcare.
      Public952
      Liang et al.
      • Liang G.
      • Zheng L.
      A transfer learning method with deep residual network for pediatric pneumonia diagnosis.
      Public902
      Nour et al.
      • Nour M.
      • Cömert Z.
      • Polat K.
      A novel medical diagnosis model for COVID-19 infection detection based on deep features and Bayesian optimization.
      Public98.97399.7589.39
      Brunese et al.
      • Brunese L.
      • Mercaldo F.
      • Reginelli A.
      • et al.
      Explainable deep learning for pulmonary disease and coronavirus COVID-19 detection from X-rays.
      Public9629896
      Loannis et al.
      • Apostolopoulos I.D.
      • Mpesiana T.A.
      Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks.
      Public93.48398.7592.85
      Ucar et al.
      • Ucar F.
      • Korkmaz D.
      COVIDiagnosis-Net: Deep Bayes-SqueezeNet based diagnosis of the coronavirus disease 2019 (COVID-19) from X-ray images.
      Public98.26399.13
      Narin et al.
      • Narin A.
      • Kaya C.
      • Pamuk Z.
      Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks.
      Public982
      Ardakani et al.
      • Ardakani A.A.
      • Kanafi A.R.
      • Acharya U.R.
      • et al.
      Application of deep learning technique to manage COVID-19 in routine clinical practice using CT images: Results of 10 convolutional neural networks.
      Private99.02210098.04
      Jaiswal et al.
      • Jaiswal A.
      • Gianchandani N.
      • Singh D.
      • et al.
      Classification of the COVID-19 infected patients using DenseNet201 based deep transfer learning.
      Public96.25296.219629
      P-MPublic99.44 class/7 Scenarios99.499.4
      It should be highlighted that although the databases used for this study are reliable, the data related to COVID-19 is limited. However, the above-mentioned findings and results of the paper should be considered in line with the limitation of the study. This study has some limitations with respect to databases. A notable difficulty and challenge is related to the COVID-19 data that researchers should use a number of data sets in combination with together to remove this defect. However, a shortage of COVID-19 samples is still evident. Here, to overcome the shortage of COVID-19 samples and in order to balance data, DA technique has been utilized. In this study, classical DA was used to increase data of COVID-19, and it is necessary to perform DA using GANs and compare the results with classic DA results. Another limitation and challenge is the number of database categories. In this study, there were a total of four detection categories: Healthy, Viral, Bacterial, and COVID-19. In order to use the proposed model in the practical fields, it must be evaluated using larger datasets and more categories of other lung infectious diseases, such as SARS, MERS, FLU, and so on.

      Conclusion

      Due to the COVID-19, all humans' daily lives have recently been confronted with new challenges. The number of infectious people with this virus continues to increase, significantly. So, rapid detection of this virus, as well as timely treatment, is very crucial. In this paper, using a fusion of LSTM and CNN networks, a novel method for the automatic detection of pneumonia is presented. In this method, chest X-ray imagery is utilized to separate 2-4 classes based on 7 various Scenarios. In the proposed method, in all Scenarios except Scenario V, i.e. Healthy versus Covid-19 versus Viral, above 90% accuracy is achieved, which is very promising in contrast with the newest pneumonia detection approaches. Furthermore, the proposed CNN-LSTM model is compared with four DTL models – ResNet 50, VGG 19, Xception, and Inception – that have been widely used for pneumonia detection. The results revealed that the proposed model outperformed the comparative models in terms of speed and accuracy. To evaluate the proposed model versus observation noises, white Gaussian noise is added to the raw chest X-ray imagery. The proposed model is resistant to observation noise up to 0 dB. It is also expected that using this technique will decrease medical cost, the incidence of nurses/doctors to COVID-19 during swab sampling, and future fatality.

      References

        • Roosa K.
        • Lee Y.
        • Luo R.
        • et al.
        Real-time forecasts of the COVID-19 epidemic in China from February 5th to February 24th, 2020.
        J Infect Dis Model. 2020; 5: 256-263
      1. Yan, L.; Zhang, H.-T.; Xiao, Y.; et al. Prediction of criticality in patients with severe Covid-19 infection using three clinical features: a machine learning-based prognostic model with clinical data in Wuhan. MedRxiv.2020.

        • Stoecklin S.B.
        • Rolland P.
        • Silue Y.
        • et al.
        First cases of coronavirus disease 2019 (COVID-19) in France: surveillance, investigations and control measures, January 2020.
        J Eurosurveillance. 2020; 252000094
        • Corman V.M.
        • Muth D.
        • Niemeyer D.
        • et al.
        Hosts and sources of endemic human coronaviruses.
        J Adv Virus Res. 2018; 100: 163-188
        • Huang C.
        • Wang Y.
        • Li X.
        • et al.
        Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China.
        J Lancet. 2020; 395: 497-506
      2. Sarkar, B.; Ullah, M. A.; Johora, F. T.; et al. The essential facts of Wuhan novel coronavirus outbreak in China and epitope-based vaccine designing against 2019-nCoV. BioRxiv.2020.

        • Waters E.
        • Doyle J.
        Systematic reviews of public health in developing countries are in train.
        J Bmj. 2004; 328: 585
        • Hurdiss D.L.
        • Drulyte I.
        • Lang Y.
        • et al.
        Cryo-EM structure of coronavirus-HKU1 haemagglutinin esterase reveals architectural changes arising from prolonged circulation in humans.
        J Nat Commun. 2020; 11: 1-10
        • Conti P.
        • Younes A.
        Coronavirus COV-19/SARS-CoV-2 affects women less than men: clinical response to viral infection.
        J Biol Regul Homeost Agents. 2020; 34: 339-343
        • Shen K.
        • Yang Y.
        • Wang T.
        • et al.
        Diagnosis, treatment, and prevention of 2019 novel coronavirus infection in children: experts’ consensus statement.
        J World J Pediatr. 2020; 16: 223-231
        • Corman V.
        • Bleicker T.
        • Brünink S.
        • et al.
        Diagnostic detection of 2019-nCoV by real-time RT-PCR.
        J WHO. 2020; 17
        • Ai T.
        • Yang Z.
        • Hou H.
        • et al.
        Correlation of chest CT and RT-PCR testing for coronavirus disease 2019 (COVID-19) in China: a report of 1014 cases.
        J Radiology. 2020; 296: E32-E40
        • Hani C.
        • Trieu N.H.
        • Saab I.
        • et al.
        COVID-19 pneumonia: a review of typical CT findings and differential diagnosis.
        J Diagn Interv Imaging. 2020; 101: 263-268
      3. Esposito, A.; Palmisano, A.; Scotti, G. M.; et al. Why is chest CT important for early diagnosis of COVID-19? Prevalence matters. medRxiv.2020.

        • Brisard S.
        • Serdar M.
        • Monteiro P.J.
        Multiscale X-ray tomography of cementitious materials: A review.
        J Cem Concr Res. 2020; 128105824
        • Malekzadeh M.
        • Meshgini S.
        • Afrouzian R.
        • Farzamnia A.
        • Sheykhivand S.
        Removing mixture of Gaussian and Impulse noise of images using sparse coding.
        in: 2020 IEEE International Conference on Machine Vision and Image Processing (MVIP). IEEE, 2020: 1-4
      4. Shan, F.; Gao, Y.; Wang, J.; et al. Lung infection quantification of COVID-19 in CT images with deep learning. arXiv preprint.2020.

        • Xu X.
        • Jiang X.
        • Ma C.
        • et al.
        A deep learning system to screen novel coronavirus disease 2019 pneumonia.
        J Engineering. 2020; 6: 1122-1129
        • Narin A.
        • Kaya C.
        • Pamuk Z.
        Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks.
        J Pattern Anal Appl. 2021; : 1-14
        • Apostolopoulos I.D.
        • Mpesiana T.A.
        Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks.
        J Phys Eng Sci Med. 2020; 43: 635-640
        • Apostolopoulos I.D.
        • Aznaouridis S.I.
        • Tzani M.A.
        Extracting possibly representative COVID-19 biomarkers from X-ray images with deep learning approach and image data related to pulmonary diseases.
        J Med Biol Eng. 2020; 40: 462-469
      5. Sethy, P. K.; Behera, S. K.; Ratha, P. K.; et al. Detection of coronavirus disease (COVID-19) based on deep features and support vector machine. arXiv preprint. 2020.

      6. Khalifa, N. E. M.; Taha, M. H. N.; Hassanien, A. E.; et al. Detection of coronavirus (covid-19) associated pneumonia based on generative adversarial networks and a fine-tuned deep transfer learning model using chest x-ray dataset. arXiv preprint.2020.

        • Chouhan V.
        • Singh S.K.
        • Khamparia A.
        • et al.
        A novel transfer learning based approach for pneumonia detection in chest X-ray images.
        J Appl Sci. 2020; 10: 559
        • Stephen O.
        • Sain M.
        • Maduh U.J.
        • Jeong D.-U.
        An efficient deep learning approach to pneumonia classification in healthcare.
        J Healthc Eng. 2019;
        • Liang G.
        • Zheng L.
        A transfer learning method with deep residual network for pediatric pneumonia diagnosis.
        Comput Methods Programs Biomed. 2020; 187104964
        • Nour M.
        • Cömert Z.
        • Polat K.
        A novel medical diagnosis model for COVID-19 infection detection based on deep features and Bayesian optimization.
        J Appl Soft Comput. 2020; 97106580
        • Brunese L.
        • Mercaldo F.
        • Reginelli A.
        • et al.
        Explainable deep learning for pulmonary disease and coronavirus COVID-19 detection from X-rays.
        Comput Methods Programs Biomed. 2020; 196105608
        • Ardakani A.A.
        • Kanafi A.R.
        • Acharya U.R.
        • et al.
        Application of deep learning technique to manage COVID-19 in routine clinical practice using CT images: Results of 10 convolutional neural networks.
        J Comput Biol Med. 2020; 121103795
        • Jaiswal A.
        • Gianchandani N.
        • Singh D.
        • et al.
        Classification of the COVID-19 infected patients using DenseNet201 based deep transfer learning.
        J Biomol Struct Dyn. 2020; : 1-8
        • Horry M.J.
        • Chakraborty S.
        • Paul M.
        • et al.
        COVID-19 detection through transfer learning using multimodal imaging data.
        J IEEE Access. 2020; 8: 149808-149824
        • Sharma N.
        • Mangla M.
        • Mohanty S.N.
        • et al.
        A smart ontology-based IoT framework for remote patient monitoring.
        Biomed Signal Process Control. 2021; 68102717
        • Le D.-N.
        • Parvathy V.S.
        • Gupta D.
        • et al.
        IoT enabled depthwise separable convolution neural network with deep support vector machine for COVID-19 diagnosis and classification.
        Int J Mach Learn Cybern. 2021; : 1-14
        • Dansana D.
        • Kumar R.
        • Bhattacharjee A.
        • et al.
        Early diagnosis of COVID-19-affected patients based on X-ray and computed tomography images using deep learning algorithm.
        J Soft Comput. 2020; : 1-9
        • Oh Y.
        • Park S.
        • Ye J.C.
        Deep learning covid-19 features on cxr using limited training data sets.
        J IEEE Trans Med Imaging. 2020; 39: 2688-2700
        • Nayak S.R.
        • Nayak D.R.
        • Sinha U.
        • et al.
        Application of deep learning techniques for detection of COVID-19 cases using chest X-ray images: A comprehensive study.
        J Biomed Signal Process Control. 2021; 64102365
        • Wang S.-H.
        • Nayak D.R.
        • Guttery D.S.
        • et al.
        COVID-19 classification by CCSHNet with deep fusion using transfer learning and discriminant correlation analysis.
        J Inf Fusion. 2021; 68: 131-148
      7. Mooney P. Chest X-Ray Images (pneumonia). </Dataset> https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.

      8. Chest X-rays Images. https://www.kaggle.com/andrewmvd/convid19-x-rays. </Dataset>

      9. Yijie Xu A. Detecting COVID-19 induced Pneumonia from Chest X-rays with Transfer Learning: An implementation in Tensorflow and Keras. https://towardsdatascience.com/detecting-covid-19-induced-pneumonia-from-chest-x-rays-with-transfer-learning-an-implementation-311484e6afc1 . </Dataset>

      10. Chest X-rays Images. https://www.kaggle.com/tawsifurrahman/covid19-radiography-database . </Dataset>

      11. Covid-Chestxray-Dataset. https://github.com/ieee8023/covid-chestxray-dataset. </Dataset>

      12. Chest X-rays Images. https://www.pyimagesearch.com/2020/03/16/detecting-covid-19-in-x-ray-images-with-keras-tensorflow-and-deep-learning/. </Dataset>

      13. Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.

      14. Rahman T. COVID-19_Radiography_Dataset. </Dataset> https://www.kaggle.com/tawsifurrahman/covid19-radiography-database.

        • Mousavi Z.
        • Ettefagh M.M.
        • Sadeghi M.H.
        • et al.
        Developing deep neural network for damage detection of beam-like structures using dynamic response based on FE model and real healthy state.
        J Appl Acoust. 2020; 168107402
        • Hung S.-L.
        • Adeli H.
        Parallel backpropagation learning algorithms on Cray Y-MP8/864 supercomputer.
        J Neurocomputing. 1993; 5: 287-302
        • Sheykhivand S.
        • Rezaii T.Y.
        • Farzamnia A.
        • et al.
        Sleep stage scoring of single-channel EEG signal based on RUSBoost classifier.
        in: IEEE International Conference on Artificial Intelligence in Engineering and Technology (IICAIET). IEEE, 2018: 1-6
        • Mousavi Z.
        • Rezaii T.Y.
        • Sheykhivand S.
        • et al.
        Deep convolutional neural network for classification of sleep stages from single-channel EEG signals.
        J Neurosci Methods. 2019; 324108312
        • Mousavi Z.
        • Varahram S.
        • Ettefagh
        • et al.
        Deep neural networks–based damage detection using vibration signals of finite element model and real intact state: An evaluation via a lab-scale offshore jacket structure.
        J Struct Health Monit. 2020; 1475921720932614
        • Hochreiter S.
        • Schmidhuber J.
        Long short-term memory.
        J Neural Comput. 1997; 9: 1735-1780
        • Sheykhivand S.
        • Mousavi Z.
        • Rezaii T.Y.
        • et al.
        Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.
        J IEEE Access. 2020; 8: 139332-139345
        • Sheykhivand S.
        • Rezaii T.Y.
        • Mousavi Z.
        • et al.
        Automatic identification of epileptic seizures from EEG signals using sparse representation-based classification.
        J IEEE Access. 2020; 8: 138834-138845
        • Sheykhivand S.
        • Mousavi Z.
        • Mojtahedi S.
        • et al.
        Developing an efficient deep neural network for automatic detection of COVID-19 using chest X-ray images.
        J Alex Eng. 2021; 60: 2885-2903
        • Ren H.
        • El-Khamy M.
        • Lee J.Dn
        Resnet: Efficient deep residual network for image denoising.
        in: Asian Conference on Computer Vision. Springer, 2018: 215-230
        • Mateen M.
        • Wen J.
        • Song S.
        • et al.
        Fundus image classification using VGG-19 architecture with PCA and SVD.
        J Symmetry. 2019; 11: 1
        • Szegedy C.
        • Ioffe S.
        • Vanhoucke V.
        • et al.
        Inception-v4, inception-resnet and the impact of residual connections on learning.
        in: Proceedings of the AAAI Conference on Artificial Intelligence, California, USAFeb 12, 2017
        • Chollet F.
        Xception: Deep learning with depthwise separable convolutions.
        in: Proceedings of the IEEE conference on computer vision and pattern recognition, Honolulu, HI, USAJuly 21-26, 2017
        • Ucar F.
        • Korkmaz D.
        COVIDiagnosis-Net: Deep Bayes-SqueezeNet based diagnosis of the coronavirus disease 2019 (COVID-19) from X-ray images.
        J Med Hypotheses. 2020; 140109761