Abstract
Aim
Methods
Results
Conclusions
Introduction
- •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.
Materials and methods
Datasets of chest X-ray images
Mooney P. Chest X-Ray Images (pneumonia). </Dataset> https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.
Chest X-rays Images. https://www.kaggle.com/andrewmvd/convid19-x-rays. </Dataset>
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>
Chest X-rays Images. https://www.kaggle.com/tawsifurrahman/covid19-radiography-database . </Dataset>
Covid-Chestxray-Dataset. https://github.com/ieee8023/covid-chestxray-dataset. </Dataset>
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>

Case | Account |
---|---|
I | Healthy against of COVID-19 |
II | Healthy against of Pneumonia (Bacterial, COVID19, and Viral) |
III | Healthy against of COVID-19 against of Bacterial and Viral |
IV | Healthy against of COVID-19 against of Bacterial |
V | Healthy against of Covid-19 against of Viral |
VI | COVID-19 against of Bacterial against of Viral |
VII | Healthy against of COVID-19 against of Bacterial against of Viral |
Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.
Rahman T. COVID-19_Radiography_Dataset. </Dataset> https://www.kaggle.com/tawsifurrahman/covid19-radiography-database.
Convolutional neural network
where, in this BN layer, is an input vector. The is an output response accociated with a neuron at layer L. The , , and presents a little constant for numerical stability. The and 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.
where is the input vector. The output values, , are between 0 and 1, and their summation is equal to 1 [
Long short-term memory network
where and are the activation function, initial weight matrix and initial bias vector, respectively. Equation 5 is used to update the memory cell, , where is the content of the new memory obtained by Equation 6 as follows [
Proposed method

Preprocessing
Proposed network
L | Layer Type | Activation Function | Number of Filters | Padding | Output Form | Size of Filter and Pooling | Strides |
---|---|---|---|---|---|---|---|
0-1 | Convolution2-D | Leaky ReLU | 16 | yes | (None, 16, 38,38) | 128 × 128 | 6 |
1-2 | Max-Pooling2-D | - | - | no | (None, 16, 19,19) | 2 × 2 | 2 |
2-3 | Convolution2-D | Leaky ReLU | 32 | yes | (None, 32,19,19) | 3 × 3 | 1 |
3-4 | Max-Pooling2-D | - | - | no | (None, 32, 9, 9) | 2 × 2 | 2 |
4-5 | Convolution2-D | Leaky ReLU | 64 | yes | (None, 64, 9, 9) | 3 × 3 | 1 |
5-6 | Max-Pooling2-D | - | - | no | (None, 64, 4, 4) | 2 × 2 | 2 |
6-7 | Convolution2-D | Leaky ReLU | 64 | yes | (None, 64, 4, 4) | 3 × 3 | 1 |
7-8 | Max-Pooling2-D | - | - | no | (None, 64, 2, 2) | 2 × 2 | 2 |
8-9 | Convolution2-D | Leaky ReLU | 64 | yes | (None, 64, 2, 2) | 3 × 3 | 1 |
9-10 | Max-Pooling2-D | - | - | no | (None, 64, 1, 1) | 2 × 2 | 2 |
10-11 | LSTM | Leaky ReLU | - | (None, 60) | - | - | |
11-12 | LSTM | Leaky ReLU | - | (None, 60) | - | - | |
12-13 | LSTM | Leaky ReLU | - | (None, 60) | - | - | |
13-14 | FC | Leaky ReLU | - | (None, 50) | - | - | |
14-15 | FC | Softmax | - | (None, 2-3-4) | - | - |

Parameter | Search Space | Optimal Value |
---|---|---|
Optimizer | RMSProp, Adam, Sgd, Adamax, Adadelta | RMSProp |
Cost function | MSE, Cross-entropy | MSE |
No. of Convolution layers | 3, 5, 10, 15 | 5 |
No. of LSTM layers | 2, 3, 5, 10 | 3 |
No. of FC layers | 2, 4, 6 | 2 |
No. of Filters in the first Convolution layer | 16, 32, 64, 128 | 16 |
No. of Filters in the second Convolution layer | 16, 32, 64, 128 | 32 |
No. of Filters in the third Convolution layer | 16, 32, 64, 128 | 64 |
No. of Filters in the fourth Convolution layer | 16, 32, 64, 128 | 64 |
No. of Filters in the fifth Convolution layer | 16, 32, 64, 128 | 64 |
No. of neurons in LSTM layers | 30, 60, 120 | 60 |
No. of neurons in the first FC layer | 10, 30, 50, 80 | 50 |
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 rate | 0, 0.2, 0.3, 0.4, 0.5 | 0.3 |
Batch size | 4, 8, 10, 16, 32, 64 | 10 |
Scenarios | Sample No. | No. of Cases No. of Testing (20%) | Sample No. of Training (70%) | Sample No. of Validation (10%) |
---|---|---|---|---|
I | 5765 | 1153 | 4035 | 576 |
II | 5845 | 1169 | 4092 | 584 |
III | 8687 | 1738 | 6081 | 868 |
IV | 8543 | 1709 | 5980 | 854 |
V | 8543 | 1709 | 5980 | 854 |
VI | 8460 | 1692 | 5922 | 846 |
VII | 11383 | 2277 | 7968 | 1138 |
Results




Scenarios | Test(for all of the data) | Train(for each iteration) |
---|---|---|
I | 1.5 s | 15 s |
II | 2.7 s | 17 s |
III | 3 s | 23 s |
IV | 3 s | 22 s |
V | 3 s | 21 s |
VI | 3 s | 20 s |
VII | 8 s | 31 s |
Scenario | Xception | P-M | ResNet 50 | Inception | VGG 19 | |||||
---|---|---|---|---|---|---|---|---|---|---|
Train | Test | Train | Test | Train | Test | Train | Test | Train | Test | |
VII | 5900 s | 10 s | 4650 s | 8 s | 5300 s | 9 s | 9000 s | 19 s | 5550 s | 16 s |

Mooney P. Chest X-Ray Images (pneumonia). </Dataset> https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.
Chest X-rays Images. https://www.kaggle.com/andrewmvd/convid19-x-rays. </Dataset>
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>
Chest X-rays Images. https://www.kaggle.com/tawsifurrahman/covid19-radiography-database . </Dataset>
Covid-Chestxray-Dataset. https://github.com/ieee8023/covid-chestxray-dataset. </Dataset>
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>
Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.
Rahman T. COVID-19_Radiography_Dataset. </Dataset> https://www.kaggle.com/tawsifurrahman/covid19-radiography-database.
Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.
Rahman T. COVID-19_Radiography_Dataset. </Dataset> https://www.kaggle.com/tawsifurrahman/covid19-radiography-database.

Techniques | Datasets | Accuracy (%) | No. of classes | Specificity (%) | Sensitivity (%) |
---|---|---|---|---|---|
Chouhan et al. [24] | Public | 96.39 | 3 | – | – |
Khalifa et al. [23] | Private | 99 | 2 | – | – |
Stephen et al. [25] | Public | 95 | 2 | – | – |
Liang et al. [26] | Public | 90 | 2 | – | – |
Nour et al. [27] | Public | 98.97 | 3 | 99.75 | 89.39 |
Brunese et al. [28] | Public | 96 | 2 | 98 | 96 |
Loannis et al. [20] | Public | 93.48 | 3 | 98.75 | 92.85 |
Ucar et al. [59] | Public | 98.26 | 3 | – | 99.13 |
Narin et al. [19] | Public | 98 | 2 | – | – |
Ardakani et al. [29] | Private | 99.02 | 2 | 100 | 98.04 |
Jaiswal et al. [30] | Public | 96.25 | 2 | 96.21 | 9629 |
P-M | Public | 99.4 | 4 class/7 Scenarios | 99.4 | 99.4 |
Conclusion
References
- 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
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.
- First cases of coronavirus disease 2019 (COVID-19) in France: surveillance, investigations and control measures, January 2020.J Eurosurveillance. 2020; 252000094
- Hosts and sources of endemic human coronaviruses.J Adv Virus Res. 2018; 100: 163-188
- Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China.J Lancet. 2020; 395: 497-506
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.
- Systematic reviews of public health in developing countries are in train.J Bmj. 2004; 328: 585
- Cryo-EM structure of coronavirus-HKU1 haemagglutinin esterase reveals architectural changes arising from prolonged circulation in humans.J Nat Commun. 2020; 11: 1-10
- 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
- Diagnosis, treatment, and prevention of 2019 novel coronavirus infection in children: experts’ consensus statement.J World J Pediatr. 2020; 16: 223-231
- Diagnostic detection of 2019-nCoV by real-time RT-PCR.J WHO. 2020; 17
- 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
- COVID-19 pneumonia: a review of typical CT findings and differential diagnosis.J Diagn Interv Imaging. 2020; 101: 263-268
Esposito, A.; Palmisano, A.; Scotti, G. M.; et al. Why is chest CT important for early diagnosis of COVID-19? Prevalence matters. medRxiv.2020.
- Multiscale X-ray tomography of cementitious materials: A review.J Cem Concr Res. 2020; 128105824
- 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
Shan, F.; Gao, Y.; Wang, J.; et al. Lung infection quantification of COVID-19 in CT images with deep learning. arXiv preprint.2020.
- A deep learning system to screen novel coronavirus disease 2019 pneumonia.J Engineering. 2020; 6: 1122-1129
- Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks.J Pattern Anal Appl. 2021; : 1-14
- Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks.J Phys Eng Sci Med. 2020; 43: 635-640
- 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
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.
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.
- A novel transfer learning based approach for pneumonia detection in chest X-ray images.J Appl Sci. 2020; 10: 559
- An efficient deep learning approach to pneumonia classification in healthcare.J Healthc Eng. 2019;
- A transfer learning method with deep residual network for pediatric pneumonia diagnosis.Comput Methods Programs Biomed. 2020; 187104964
- A novel medical diagnosis model for COVID-19 infection detection based on deep features and Bayesian optimization.J Appl Soft Comput. 2020; 97106580
- Explainable deep learning for pulmonary disease and coronavirus COVID-19 detection from X-rays.Comput Methods Programs Biomed. 2020; 196105608
- 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
- Classification of the COVID-19 infected patients using DenseNet201 based deep transfer learning.J Biomol Struct Dyn. 2020; : 1-8
- COVID-19 detection through transfer learning using multimodal imaging data.J IEEE Access. 2020; 8: 149808-149824
- A smart ontology-based IoT framework for remote patient monitoring.Biomed Signal Process Control. 2021; 68102717
- 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
- 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
- Deep learning covid-19 features on cxr using limited training data sets.J IEEE Trans Med Imaging. 2020; 39: 2688-2700
- 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
- COVID-19 classification by CCSHNet with deep fusion using transfer learning and discriminant correlation analysis.J Inf Fusion. 2021; 68: 131-148
Mooney P. Chest X-Ray Images (pneumonia). </Dataset> https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.
Chest X-rays Images. https://www.kaggle.com/andrewmvd/convid19-x-rays. </Dataset>
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>
Chest X-rays Images. https://www.kaggle.com/tawsifurrahman/covid19-radiography-database . </Dataset>
Covid-Chestxray-Dataset. https://github.com/ieee8023/covid-chestxray-dataset. </Dataset>
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>
Patel P. Chest X-rays (COVID-19 and Pneumonia). </Dataset> https://www.kaggle.com/prashant268/chest-xray-covid19-pneumonia.
Rahman T. COVID-19_Radiography_Dataset. </Dataset> https://www.kaggle.com/tawsifurrahman/covid19-radiography-database.
- 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
- Parallel backpropagation learning algorithms on Cray Y-MP8/864 supercomputer.J Neurocomputing. 1993; 5: 287-302
- 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
- Deep convolutional neural network for classification of sleep stages from single-channel EEG signals.J Neurosci Methods. 2019; 324108312
- 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
- Long short-term memory.J Neural Comput. 1997; 9: 1735-1780
- Recognizing Emotions Evoked by Music Using CNN-LSTM Networks on EEG Signals.J IEEE Access. 2020; 8: 139332-139345
- Automatic identification of epileptic seizures from EEG signals using sparse representation-based classification.J IEEE Access. 2020; 8: 138834-138845
- Developing an efficient deep neural network for automatic detection of COVID-19 using chest X-ray images.J Alex Eng. 2021; 60: 2885-2903
- Resnet: Efficient deep residual network for image denoising.in: Asian Conference on Computer Vision. Springer, 2018: 215-230
- Fundus image classification using VGG-19 architecture with PCA and SVD.J Symmetry. 2019; 11: 1
- 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
- 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
- COVIDiagnosis-Net: Deep Bayes-SqueezeNet based diagnosis of the coronavirus disease 2019 (COVID-19) from X-ray images.J Med Hypotheses. 2020; 140109761
Article info
Publication history
Identification
Copyright
User license
Creative Commons Attribution (CC BY 4.0) |
Permitted
- Read, print & download
- Redistribute or republish the final article
- Text & data mine
- Translate the article
- Reuse portions or extracts from the article in other works
- Sell or re-use for commercial purposes
Elsevier's open access license policy