key: cord-0948998-1ocp72ze authors: Sri Kavya, Nallamothu; shilpa, Thotapalli; Veeranjaneyulu, N.; Divya Priya, D. title: Detecting Covid19 and Pneumonia from chest X-Ray images using Deep Convolutional Neural Networks date: 2022-05-19 journal: Mater Today Proc DOI: 10.1016/j.matpr.2022.05.199 sha: 1476062f47ac9f1879030ead69ced4dc0088811b doc_id: 948998 cord_uid: 1ocp72ze With the current COVID19 pandemic, we have to weigh human life, prosperity, and value, while implicitly acknowledging that controlling case spread and mortality is a challenge. Identifying COVID19-infected patients and disconnecting them to avoid COVID transmission is one of the most difficult tasks for clinicians. As a result, figuring out who infected with covid19 is crucial. COVID19 is identified using a 4-6-hour reverse transcription-polymerase chain reaction (RT-PCR). Another way to detect Coronavirus early in the disease process is by using chest X-rays (CXR).We extracted characteristics from chest X-ray images using VGG16 and ResNet50 deep learning algorithms, then classified them into three groups: viral pneumonia, normal, and COVID19. We ran 15153 images through the models to see how accurate they were in real-world situations. For detecting COVID19 cases, the VGG16 model has an average accuracy of 89.34 %, whereas ResNet50 has an accuracy of 91.39 %. When utilizing deep learning to identify COVID19, however, a larger dataset is necessary. It has the desired effect of detecting situations accurately. Severe Acute Respiratory Syndrome Coronavirus 2 (SARS CoV-2) is responsible for Covid19 disease [1] . Zoonotic microorganisms are covid19 diseases that make severe pollutions to the organs of breath and started spoiling animals then conveyed from animals to people [2] . The first case of COVID is detected in the Wuhan city of China back in 2019 [3] .Because of this deadly virus the global pandemic was declared by the World Health Organization (WHO) [3] . Fever, dry cough, and exhaustion are the most common symptoms of COVID19. Now the virus has been spread all over the world. As of 28 February 2022, 446,511,318 people is effected by the COVID19 with deaths 6,004,421.To identify the disease in humans COVID19 reverse transcription-polymerase chain reaction(RT-PCR) is used which is time consuming and has a high positive false rate [1, 2, 4] . As of now the significant learning techniques on clinical imaging are the incredible strategy for dealing with the medical diagnosis systems. Computer-Aided Diagnosis methods such as chest X-ray and Computed Tomography techniques can be used as a complement for RT-PCR [5] . For the diagnosis of lung infections, CT and chest X-ray images are commonly used. The cost and radiation exposure are important issues for the COVID19 diagnosis, though CT images are commonly used. It is preferable to use CXR images over CT images since they are less radiation-exposed and more widely accessible [5] . Therefore, we used the chest x-ray images in the current study to identify COVID19 infected patients using deep learning techniques. Our dataset consists of total of 15153 images in which 3616 COVID19 images, 1345 are viral Pneumonia images and 10192 are Normal images. Lungs are the most effected organs in the human body due to corona virus [6] . This not only effects the respiratory system, it also effects the other organs like kidneys and liver. CXR images of COVID19 infected patients have hazy lungs compared to normal healthy people lungs. These features may aid in the detection of COVID19.In recent years deep learning is using to detect many different diseases. Some examples are detection of tumor types in head, brain, lungs, etc. [7] . Many researchers have used deep learning methods and obtained good results. With the development of the pandemic machine learning and deep learning have been used in the detection of COVID19 patients. Coronaviruses are structurally analyzed in order to detect the disease. The use of convolutional neural networks has been widely adopted as a method of detecting and classifying COVID19 [8] . Generally, CNN has a high ability to categorize patients at risk for developing diseases. CNN systems are used across a wide spectrum of classification tasks, from binary classification to multiclass classification. In highdimensional datasets with multilayer functionalities, CNN has already demonstrated impressive results for discovering convoluted structures. For 2D image processing, CNN uses 2D convolutional layers. A CNN consists of an input layer, an output layer, and hidden layers. The hidden layers include convolution layers, pooling layers, fully connected layers, and regression layer. In this paper, we look at deep learning models VGG16 and ResNet50 that are suitable for classification of images. There are several layers defined in the defined model, and each layer receives the information it needs from all previous layers. On the COVID19 Radiography Dataset, our model is evaluated. Our considered model groups the dataset into three types and produces accurate results. In this paper, various deep learning models have been applied to diagnose COVID19 and pneumonia in chest Xray images, some of which are described below. Li et al. [9] used transfer learning architectures such as CheXNet, DenseNet, VGG19, MobileNet, InceptionV3, ResNet18, ResNet101, and squeezeNet and divides the data into three classes. The accuracy of a model created utilising chest X-rays from 423 images of COVID-19, 1,485 images of viral pneumonia, and 1,575 normal images was 97.94%. Li et al. [10] presented CovXNet as a network architecture for diagnosing bacterial pneumonia, viral pneumonia, and COVID19. There are 1,583 images of normal people in the dataset, 1,493 images of viral pneumonia X-rays, 2980 images of pneumonia X-rays, and 305 images of COVID19 X-rays from various patients. Their model was 89.1% accurate. COVID-Net was developed by Gunraj [11] et al. to help doctors differentiate between COVID19 related and non COVID19 pneumonia. Researchers showed a new dataset of 13,975 chest X-ray scans from 13,870 patients and discovered that their algorithm was 93.3 percent accurate. The 3-class categorization, on the other hand, was simply judged on accuracy in the article. AD3D-MIL, a deep 3D multiple instance learning technique based on attention, was used by Han et al. [12] to distinguish COVID19 pneumonia from other types of viral pneumonia. An analysis of 230 CT scans was performed using data from 79 patients, 100 pneumonia patients, and 130 healthy individuals. Their system, according to their assessment, was 97.9% accurate overall. Rajaraman et al. [13] discovered COVID19 in chest Xray images by using an iteratively pruned deep learning ensemble. In their investigation, they used two models. By applying the transfer learning approach to the first model, it was trained to classify normal and abnormal chest X-rays, while the second model was taught to classify COVID19 and pneumonia cases using the first model's learning weights. They employed an ensemble strategy to improve their model's overall prediction performance and achieved a 99.01 percent accuracy rate. Hammoudi et al. [14] developed personalised models for locating COVID19 aspiratory side effects in the early stages of the drug's development. The dataset that contains two types of Pneumonia i.e, bacterial ,viral and standard chest X-ray images was used to train their models. A 2D profound learning system known as the primary track COVID19 characterisation organization (FCONet) was proposed by Ko et al. [15] to analyze COVID19 pneumonia in a chest computed tomography (CT) examination image. For the preparation of the FCONet model, they used an exchange learning technique with best-in-class profound learning models as the spine. ResNet50 FCONet had the best exhibition outcomes for true positive rate, true negative rate, and accuracy on the validation dataset of 99.8 percent, 100 percent, and 99.87 percent, respectively, in all the trained FCONet models. [16] described an algorithm for detecting COVID-19 pneumonia based on CXR pictures. [17] demonstrated a model for estimating COVID-19 disorders using deep learning and laboratory data.A total of 600 patients gave laboratory results for the model to be tested.An optimization approach was utilised to diagnose COVID19 with a hybrid CNN given in [18] .To detect COVID-19 infections, researchers used the Xception architecture to construct CorNet, an image-based deep convolutional neural network [19, 29] . Deep learning was used to diagnose COVID19 [20] presented this method.There were several CNN models utilised. Deep learning was used to detect COVID19 on CXR [21] .There were three stages. Initially, pneumonia was discovered, then COVID19 and pneumonia were discovered, and finally, the condition was diagnosed.They employed 6523 CXR images and achieved a 97 percent accuracy rate.The authors [22] reported using a patch-based CNN to diagnose COVID19 in CXR pictures with state-of-the-art accuracy.In [23] , the authors described a method for identifying diseases from COVID19 images that used COVID19 CXR image descriptors, feed-forward neural networks, and CNNs.CXR and CT images were employed in this study to detect illnesses linked to COVID19 [24] [25] [26] [27] [28] . The strategy for the Identification framework was completed in this work, and it will accurately analyse radiographic images accurately for COVID19 and viral pneumonia.Using chest x-rays to construct a robust system for COVID19 characterisation. Using proposed CNN pre-trained models, classify chest x-ray pictures. Examine and contrast the models' displays with performance indicators. In kaggle, a set of chest X-Ray images was gathered from the COVID19 Radiography database. A total of 15153 images are included in the dataset, with 3616 COVID19 images, 1345 viral Pneumonia images, and 10192 Normal images. As a result, data imbalance can be found in the collected data, potentially leading to inaccurate categorization findings. Finally, 1345 photos were chosen for our studies from each category. The key contributions of the study are as follows:  To analyse and distinguish covid19 and pneumonia patients, the structure of VGG16 and ResNet50 has been evaluated.  To show the training of CNN models with unbalanced data, random sampling with image augmentation is performed.  A convolutional neural network model was used to identify COVID19.  Performance metrics were used to address the imbalance issue. Figure 1 depicts the COVID19 and Pneumonia screening structures. VGG16 and ResNet50 are the models under consideration. CNN was used in the background (Convolutional Neural Networks). Multiple procedures, including as convolutional, max-pooling, dense, and softmax, are performed on CNN in multiple layers.The model's accuracy is entirely dependent on the dataset and its size. Large datasets with more epochs can sometimes result in improved training and validation accuracy. Large datasets with fewer epochs might sometimes produce higher training results but less accuracy in validation. To design the recommended system, the following steps must be taken: 1. An X-ray dataset with pneumonia, COVID19, and normal X-ray pictures has been created for research purposes. Training and validation parts of the dataset were created. 2. Preprocessing is required before resampling, scaling, and enhancing images. 3. We are employing a developed CNN structure to calculate the output of our considered model using chest X-Ray images of pneumonia, covid-19, and normal patients. 4. Output classification. 5. The loss function is calculated by comparing the current output to the desired output. 6. Using the loss function and the training process, adjust the CNN parameters. 7. Steps 3-6 should be repeated for all datasets and epochs. Models Used : Using numerous deep learning networks, COVID-19 was successfully detected. The CNN technique is primarily used for COVID-19 categorization, segmentation, and prediction. We provide a deep learning-based COVID-19 screening in this study, in which the programme employs deep learning algorithms to predict if the imaging of the patient's suspected lungs is normal, if bacterial pneumonia has occurred, or if COVID-19 has occurred. We employed VGG16 and ResNet50 models to conduct multi-class classification on X-Ray pictures, and we applied deep learning approaches to train them. In 2014, VGG16 was created. It is one of CNN's finest image categorization models. VGG16 has a total of 16 layers, 13 of which are convolutional and 3 of which are fully connected. The VGG16's overall architecture is depicted in Figure 3 . Between the convolutional layers are 2 x 2 max-pooling layers and 13 convolutional layers with 3 x 3 filters. The ReLu activation function is applied between these layers. Finally, the probabilities of each classification are calculated using a softmax function. ResNet50: An input layer, four subsequent layers, and an output layer make up a ResNet Architecture. Each stage symbolizes a step in the process that we are going through in order. A CNN step is run depending on the inputs from previous stages, and a result is returned. ResNet is broken into five stages, with Stage 0 serving as an input preprocessing stage and Stages 2-4 serving as bottleneck stages. With 64 output channels and a stride of 2, input stems that execute 7-7 convolutions have 64 output channels. We have three to three max pooling layers with a stride of two in the following. This layer essentially reduces the width and height by four times, while increasing the channel width and height by 64. We have a down sampling block and residual blocks in stage 2 and all following stages. In general, residual blocks work similarly to down-sampling blocks, with the distinction that the stride of the convolutions is 1.We get different models when we modify the count of residual blocks, so we'll only say how many convolutional layers we have in ResNet50 and ResNet152. The ResNet50 architecture is depicted in Figure 4 . Many assessment criteria are used to evaluate the performance of various models in relation to the problem at hand. Some assessment metrics are more appropriate for assessing regression model performance, whereas others are more appropriate for assessing classification model performance. As previously stated, a variety of evaluation measures are available, however the accuracy, recall, precision, and F1 score were used to evaluate the models' performance in this study. Three typical CNN results are displayed for each model: Precision =TP / (TP+FP) F1 Score: The F1 score is a metric for how accurate models are on a given dataset. It's used to assess binary classification systems that divide the world into positive and negative categories. F1 score = (2 x precision x recall)/(precision + recall) Here we have divided the dataset into two parts one is 80% and the other is 20%.80% is used for training and 20% is for validation or testing in both the models. In VGG16 we got an accuracy of 89.34%, Recall is of 89%, Precision is of 89% and F1-Score is of 89%.Table2 represents the confusion matrix for VGG16 . The VGG16 model got an accuracy of 89.34% and loss of 24.42%.Figure6 represents the VGG16 model training and validation accuracy and loss curves. The main goal of this study is to use a variety of deep learning methods to diagnose COVID-19. For multi-class classification, we used the X-Ray dataset. VGG16 and ReNet50 models for COVID-19 classification have been validated. After the model was deployed, the accuracy, recall precision, and F1-score for COVID19 and Pneumonia diagnosis were 89.34 %, 89 %, 89 %, and 89 % for VGG16 and 91.39 %, 90 %, 91.3 %, 91% for ResNet50. ResNet50 has been shown to be effective in diagnosing COVID19 and Pneumonia patients in the two models proposed. Detection and analysis of COVID-19 in medical images using deep learning techniques An Innovative Approach To Covid-19 Diagnosis And Prediction Using Machine Learning Mechanisms COVID-19 detection in X-ray images using convolutional neural networks Attention-based VGG-16 model for COVID-19 chest X-ray image classification Detection of COVID-19 from chest x-ray images using transfer learning COVID-19 and Pneumonia Diagnosis in X-Ray Images Using Convolutional Neural Networks Automated Detection of COVID-19 through Convolutional Neural Network using Chest x-ray images" medRxiv 2021.02.06.21251271; Now published in PLOS ONE Transfer Learning to Detect COVID-19 Automatically from X-Ray Images Using Convolutional Neural Networks Early transmission dynamics in Wuhan, China, of novel coronavirus-infected pneumonia Using artificial intelligence to detect COVID-19 and community-acquired pneumonia based on pulmonary CT: evaluation of the diagnostic accuracy COVIDNet-CT: a tailored deep convolutional neural network design for detection of COVID-19 cases from chest CT images Accurate screening of COVID-19 using attention-based deep 3D multiple instance learning Iteratively pruned deep learning ensembles for COVID-19 detection in chest X-Rays Deep learning on chest X-ray images to detect and evaluate pneumonia cases at the era of COVID-19 COVID-19 pneumonia diagnosis using a simple 2d deep learning framework with a single chest CT image: model development and validation COVID-19 pneumonia accurately detected on chest radiographs with artificial intelligence Comparison of deep learning approaches to predict COVID-19 infection An optimized deep learning architecture for the diagnosis of COVID-19 disease based on gravitational search optimization CoroNet: a deep neural network for detection and diagnosis of covid-19 from chest X-ray images Application of deep learning techniques for detection of COVID-19 cases using chest X-ray images: a comprehensive study Transfer learning and semisupervised adversarial detection and classification of COVID-19 in CT images Deep learning COVID-19 features on CXR using limited training data sets A new approach for classifying coronavirus COVID-19 based on its manifestation on chest X-rays using texture features and neural networks A deep learning and grad-CAM based color visualization approach for fast detection of COVID-19 cases using chest X-ray and CT-Scan images Facial emotion recognition using deep CNN based features FERNet: A Deep CNN Architecture for Facial Expression Recognition in the Wild Feature extraction and classification using deep convolutional neural networks Abnormal network traffic detection using support vector data description An Approach to Detect COVID-19 Disease from CT Scan Images using CNN -VGG16 Model Title: Detecting Covid19 and Pneumonia from chest X-Ray images using Deep Convolutional Neural Networks Materials Today: Proceedings Nallamothu Sri Kavya -Writing the papers and responsible for Implementation Thotapalli We are happy to submit my paper into SI-ICAMIS 2022 conferences. I am assured that this paper is not submitted to anywhere else.