key: cord-0500374-fxwjww5a authors: Dalvi, Jash; Bohra, Aziz title: COVID-19 Detection through Deep Feature Extraction date: 2021-11-21 journal: nan DOI: nan sha: a950cff27a5b33c77c97f63475ed970a45b5da0b doc_id: 500374 cord_uid: fxwjww5a The SARS-CoV2 virus has caused a lot of tribulation to the human population. Predictive modeling that can accurately determine whether a person is infected with COVID-19 is imperative. The study proposes a novel approach that utilizes deep feature extraction technique, pre-trained ResNet50 acting as the backbone of the network, combined with Logistic Regression as the head model. The proposed model has been trained on Kaggle COVID-19 Radiography Dataset. The proposed model achieves a cross-validation accuracy of 100% on the COVID-19 and Normal X-Ray image classes. Similarly, when tested on combined three classes, the proposed model achieves 98.84% accuracy. Coronavirus illnesses which are caused by the virus SARS-CoV2 have rapidly spread around the world. Although no particular theories or vaccinations exist for COVID-19, there are a number of clinical trials that are exploring a remedy to this problem. A lot of precautions have been suggested that can help in reducing the spread of the virus. In this study, we provide a novel approach to detecting COVID-19 in X-Ray images. The model in the paper essentially consists of two stages: 1. Feature Extraction through Pretrained ResNet50 Currently, a lot of deep learning models thrive on copious amounts of data. But due to the paucity of X-Ray image data related to COVID-19 we have suggested a novel approach in this paper. The model shown in the paper helps to overcome the problem of relatively low quantity of data. The paper is organized as follows. Section 2 presents a Literature Survey of the models developed till now to tackle the same problem. Section 3 presents the methodology associated with the model. Section 4 presents results and findings. Section 5 concludes the paper. Various deep learning architectures have been employed as a tool to automate the detection of COVID-19 [1, 2] . Covid-Net from [3] is trained on the COVIDx dataset and yields an accuracy of 93.30% with an F1 score of 98.90% and a Sensitivity of 91.00%. Researchers in [4] developed a Deep Learning model using InceptionV3, ResNet50, ResNet101, ResNet152, Inception-ResNetV2 which has an accuracy (mean) of 98%. This model is trained on the ChestX-ray8 dataset which constituted 96% Sensitivity, 98% F1 score, 100% Specificity, and 100% Precision. [5] has incorporated CNN with Transfer Learning where two models have been trained namely VGG19 and Mobile-Net. Mobile Net outperformed VGG19 and proved to be one of the best models in the detection of COVID-19 from X-Ray images with an accuracy of 98.28%. It was trained on a dataset that was gathered from various sources. The above two models from [5] were compared with other CNN models like Inception, Xception, and Inception ResNet v2, and yet they performed better with Sensitivity around 98.66 and a Specificity of 96.46. Authors of [6] have used the GitHub repository of Dr. Joseph Cohen and Kaggle X-Ray images of pneumonia. [6] uses CNN models with SVM at the end. The results revealed that ResNet50 + SVM proved to be the best model with aziz.bohra@somaiya.edu (Aziz Bohra) Figure 1 . Proposed Architecture-ResNet50 + Logistic Regression an accuracy of 95.33% and the same Sensitivity, 95.34% was the Specificity. Researchers of [7] have concluded that VGG19 and Dense-Net showed good results and they were evaluated on the 80-20% training and validation proportions. Results illustrated an accuracy of 90% and an F1 score of 91% along with 100% Precision and Sensitivity. The Confidence-Aware Anomaly Detection (CAAD) model [8] bags an accuracy of 96%, trained on X-Viral and X-Covid datasets (X-Ray images). Covid-ResNet from [9] is developed using pre-trained weights from ImageNet incorporating them with the 50 layers of the Residual Network (ResNet). This model is also trained on the COVIDx dataset and has an accuracy of 96.23% along with a 100% F1 score and Precision. The proposed study has used the COVID-19 Radiography database [10, 11] which is available on Kaggle. A team of researchers from Qatar University, Doha, and the University of Dhaka, Bangladesh along with their collaborators from Pakistan and Malaysia in collaboration with medical doctors have created a database of chest X-ray images for COVID-19 positive cases along with Normal and Viral Pneumonia images. The dataset includes approximately 1200 images of each class -COVID-19, Normal and Viral Pneumonia. Researchers can find this dataset at the following link: https://www.kaggle.com/tawsifurrahman/ covid19-radiography-database To increase the depth of the Neural Network (NN) [12] , directly stacking layers one after the other will not work out. The deeper the network, the more difficult it gets to train it. This difficulty is caused by the diminishing gradient -as it is propagated backwards to the prior Skip Connection, a concept introduced by the Residual Networks mainly known as ResNets [13] . In backpropagation, this concept provides an alternative path for the gradient. Experiments have evaluated that such additional paths benefit the model to converge. Skipping layers in the NN and feeding the output as an input to the further layers (excluding the immediate next layer) assists the whole NN with performance and obviously minimizes the situation of vanishing gradients. One of the variants of the ResNet is ResNet-50 which constitutes single Max-Pool and Average-Pool layers along with 48 Convolution layers. In addition, it has 3.8x10 9 Floating point operations. A logistic regression model processes a weighted sum of the independent variables (input features) along with the bias term and outputs the log of the result, unlike linear regression. The logistic (sigma) is a sigmoid function (S-shaped) that outputs a number between 0 and 1. When the target (dependent variable) is categorical, logistic regression proves beneficial. If the output probability is greater than 0.5 then the model predicts that the instance belongs to the particular class and it is considered as 1, otherwise 0. Thus, it is a binary classifier. In this paper, the feature extraction technique is proposed. Feature extraction with respect to deep learning consists of using a CNN as a Base model and Machine learning model as a head model. The Convolutional Neural Network [14] used in this case is ResNet-50, pretrained on the ImageNet Dataset. The Fully Connected Layers of the ResNet-50 Model are removed. The whole dataset is passed through ResNet-50, which has its Fully Connected layers removed. Each image gets transformed into a vector of shape, 7 * 7 * 2048. We flatten this output vector into a one-dimensional vector of shape 100352, and save the combined vector of the whole dataset. The second part comprises using these vectors as input to the Machine learning model. The model used in this case is logistic regression. As Vanilla Neural Networks thrive on larger data, there is a limitation with respect to generalization. The proposed model utilizes a hybrid approach, CNN + ML base model, which helps in generalization. The dataset on which the model was tested consists of three classes, Normal, COVID, and Pneumonia. The Normal class has 1341 images, the COVID class has 1200 images, and the Pneumonia class has 1345 images. The Resnet50 + logistic regression model with different hyperparameters and considering different classes was compared. The hyperparameter 'C' was considered, which stands for the inverse of regularization strength. Regularization generally refers to the concept that there should be a complexity penalty for more extreme parameters. The idea is that just looking at the training data and not paying attention to how extreme one's parameters are leads to overfitting. A high value of 'C' tells the model to give high weight to the training data, and a lower weight to the complexity penalty. A low value tells the model to give more weight to this complexity penalty at the expense of fitting to the training data. The different values of 'C' considered were 0.001,0.01,0.1,1. The same model was trained and tested considering different classes. In one case, all the three classes were considered, Normal, COVID, and Pneumonia, while in the other case only the Normal and COVID class was taken into consideration. The data was split into training and testing data. The training data comprised 80% of the total data, while the testing data comprised 20% of the whole data. The dataset was split equally into three classes in order to avoid the bias that can generate from unequal splitting. The best accuracy was obtained with ResNet50 + logistic regression with hyperparameter C equal to 0.1. Different evaluation metrics are used to analyze the COVID-19 model's performance. Among them, the most used metrics for the detection of COVID-19 are Accuracy, Sensitivity, F1 score, Specificity, and Precision. The performance of the proposed method in this study is evaluated with these metrics. The test accuracy when three classes, Normal, COVID, and Pneumonia, were considered was 98.84%. Similarly, the test accuracy when two classes, Normal and COVID, were considered was 100%. For different values of hyperparameter C, 0.001 ,0.01,1, the testing accuracy considering three classes was 98.45%, 98.71%, and 98.84% respectively. For similar values, the testing accuracy considering three classes was 98.80%, 100%, and 100% respectively. From the accuracy values, it is evident that the proposed model performs efficiently as well as generalizes better than any other previous models. In this study, model detecting COVID-19 constitutes a deep learning model along with Logistic Re- Due to the limitation of the size of the dataset, the model is developed using approximately 1200 X-Ray images per class. This model can be utilized and tested on a subset of the population before generalizing on a larger part of the population. The performance and reliability of this model can be enhanced using a larger dataset. In conclusion, it is evident that such techniques can be very useful in the detection of COVID-19 and Pneumonia. The test results prove that the proposed model may be a helping aid to the whole medical staff allround the globe and also paves way for other such medical aids. A light cnn for detecting covid-19 from ct scans of the chest Robust screening of covid-19 from chest x-ray via discriminative costsensitive learning Covid-net: A tailored deep convolutional neural network design for detection of covid-19 cases from chest x-ray images Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks Transfer learning to detect covid-19 automatically from x-ray images using convolutional neural networks Detection of coronavirus disease (covid-19) based on deep features Covidx-net: A framework of deep learning classifiers to diagnose covid-19 in x-ray images Viral pneumonia screening on chest x-rays using confidence-aware anomaly detection Covid-resnet: A deep learning framework for screening of covid19 from radiographs Exploring the effect of image enhancement techniques on covid-19 detection using chest x-ray images Can ai help in screening viral and covid-19 pneumonia? Artificial neural network, in: Interdisciplinary computing in java programming Deep residual learning for image recognition Recent advances in convolutional neural networks The authors declare that there is no conflict of interest in this paper.