key: cord-0827378-zzqjsw30 authors: Gilanie, Ghulam; Bajwa, Usama Ijaz; Waraich, Mustansar Mahmood; Asghar, Mutyyba; Kousar, Rehana; Kashif, Adnan; Aslam, Rabab Shereen; Qasim, Muhammad Mohsin; Rafique, Hamza title: Coronavirus (COVID-19) Detection from Chest Radiology Images using Convolutional Neural Networks date: 2021-02-10 journal: Biomed Signal Process Control DOI: 10.1016/j.bspc.2021.102490 sha: 791daba2de7f7ae427c0503ef2eb85c10738aee8 doc_id: 827378 cord_uid: zzqjsw30 Coronavirus disease (Covid-19) has been spreading all over the world and its diagnosis is attracting more research every moment. It is need of the hour to develop automated methods, which could detect this disease at its early stage, in a non-invasive way and within lesser time. Currently, medical specialists are analyzing Computed Tomography (CT), X-Ray, and Ultrasound (US) images or conducting Polymerase Chain Reaction (PCR) for its confirmation on manual basis. In Pakistan, CT scanners are available in most hospitals at district level, while X-Ray machines are available in all tehsil (large urban towns) level hospitals. Being widely used imaging modalities to analyze chest related diseases, produce large volume of medical data each moment clinical environments. Since automatic, time efficient and reliable methods for Covid-19 detection are required as alternate methods, therefore an automatic method of Covid-19 detection using Convolutional Neural Networks (CNN) has been proposed. Three publically available and a locally developed dataset, obtained from Department of Radiology (Diagnostics), Bahawal Victoria Hospital, Bahawalpur (BVHB), Pakistan have been used. The proposed method achieved on average accuracy (96.68%), specificity (95.65%), and sensitivity (96.24%). Proposed model is trained on a large dataset and is being used at the Radiology Department, (BVHB), Pakistan. Email addresses: gilanie@cuilahore.edu.pk, usamabajwa@cuilahore.edu.pk, mustansarwaraich@gmail.com, mutyybaa@gmail.com, kousar.rehana92@gmail.com, kashif67@hotmail.com, rababgull14@gmail.com, mohsinqasim99@gmail.com, humza.rafeeq7220@gmail.com The novel coronavirus (COVID-19) is a new virus that has not been previously identified or diagnosed in human beings. Severe Acute Respiratory Syndrome (SARS) and Middle Eastern Respiratory Syndrome (MERS) are also caused by coronavirus [1] . Coronaviruses are a large family of viruses [1] , transferred to humans from animals. This outbreak started in December 2019, from Wuhan, China, and has spread over the entire globe. Now it has affected almost all countries of the world. It has since been declared as major outbreak by World Health Organization (WHO). According to recent reports of WHO, there are almost 22,874,533 confirmed cases of coronavirus reported globally. As a result of this pandemic, almost 797,271 patients died across the world due to coronavirus. To diagnose Covid-19 disease, Polymerase Chain Reaction (PCR) test is mostly being used. Although, PCR is a gold standard method, it also has some key limitations. It is too sensitive and any sort of sample contamination, even DNA trace amounts can generate false result. In order to design its primers, prior sequence information is also needed. Resultantly, it can identify the presence or absence of known genes or pathogens [2] . The concept of Computer Aided Diagnostics (CAD) has clinically proved itself a trustworthy tool for assisting the medical practitioners. It is helping in almost every department of medical healthcare units, and its demand is increasing day by day due to its time efficiency, non-invasiveness, accuracy, and ease of use. In this study, we focused on the global problem of coronavirus disease detection from chest radiology images. Early investments in characterizing this viral infection can handsomely help in improving the epidemic response, in terms of quick & continuous monitoring, and evaluation of the subjects. Computer Tomography (CT), X-Ray and Ultrasound (US) techniques are being applied to scan the patient to determine the presence and severity of Covid-19 [3, 4] . Therefore, in the proposed research activity, normal, pneumonia, and Covid-19 chest images have been used and shown in figure 1. In a research [5] , the authors introduced deep convolutional neural network based model for the detection of Covid-19 from chest radiography images. In their proposed model, human machine collaborative design strategy has been adopted, where human driven network design prototyping is combined with machine driven design exploration to produce a network architecture tailored for the identification of Covid-19, yielding 83.5% accuracy. In another study [6] , the authors detected Covid-19 using 150 CT images. Different feature extraction techniques, including grey level co-occurrence matrix, local directional patterns, grey level run length matrix, grey level size zone matrix, and discrete wavelet transform have been applied to extract features. During this process, they used 2-fold, 5-fold, and 10-fold cross validation. After feature extraction, they used SVM as a classifier. Their reported method obtained 99.68% classification accuracy. In a study [7] , authors used a neural network based model (COVNet) for Covid-19 detection using CT images and they also classified pneumonia and other lung related diseases. This model is able to extract 2D local and 3D global features. The COVNet is based on RestNet50, which takes a series of CT images as input and generates features for those images and then all extracted features are combined by max poling operation. Finally, features are mapped to connected layers and SoftMax activation function, which distinguishes between Covid-19, pneumonia and other lung diseases. The dataset includes 4536 3D volumetric CT images and the results achieved were, sensitivity as 90% and specificity as 96%. In another study [8] , authors proposed a deep learning based models for detection and quantification of Covid-19. The proposed model comprises of CT images analyses at two levels, i.e., 3D images used for the analysis of nodules and focal opacities and 2D images used to localized and detected large size opacities clinically representative of Covid-19. In 3D images, they used off-the-shelf software that detected nodules, small opacities and also detected lung pathology and provide quantitative measurements. In 2D images, firstly region of interest has been extracted using lung segmentation module. In next step, they used RestNet50, 2D deep CNN to detected Covid-19. They used a total of 270 slices, 150 normal and 120 Covid-19 suspected and achieved 98.2% sensitivity and 92.2% specificity. In a research [9] , the authors proposed a model to automatically detect Covid-19 using deep convolutional neural network from chest X-Ray images. They used pre-trained models, i.e., ResNet50, InceptionV3, and Inception-ResNetV2 but these models provided high detection accuracy for small datasets only. Their dataset was of 100 images comprising of 50 images of confirm Covid-19 patients, and the rest of 50 images were of normal patients. They concluded that ResNet50 achieved highest accuracy as 98% on 5-fold cross validation. In the study [10] , the authors have been proposed a CNN based model namely CoroNet, which uses Xception architecture for automatically detection of Covid-19 from chest X-Ray images. The J o u r n a l P r e -p r o o f proposed model classifies three classes, i.e., bacterial pneumonia, viral pneumonia, and Covid-19. Further, it identifies how Covid-19 is different from other pneumonia. They implemented their proposed model for two and three class classification on two publically available databases. The model is trained and tested on a small dataset, which contains normal (310), bacterial pneumonia (330), viral pneumonia (327), and Covid-19 (284) images. The overall accuracy of their proposed model is 89.6%. Another method of Covid-19 detection from chest X-Ray images has been proposed in a research [11] , in which Covid-19, normal and pneumonia have been classified. DarkCovidNet, a deep learning model is used with 17 convolutional layers. They used a total of 1125 images out of that 125 images of Covid-19, 500 images of normal and 500 pneumonia images for experiments. Accuracy of their reported model for binary class classification is 98.08%, while 87.02% for multiclass classification. However, their dataset is also, which is unable to deal with multiformility and variability present in chest X-Ray images. Above literature reveals that most of the work has been performed either on CT images or X-Ray images. Moreover, they trained their models on small datasets. Considering this motivation, CNNs were employed for Covid-19 detection using both CT and X-Ray images for the proposed study. The main contribution of this study is as follows: 1. Considering the mentioned limitations of PCR method, CNN architectures were studied to address this problem and a model for Covid-19 detection was proposed which avoids tedious feature extraction process and learns features from images automatically. 2. The proposed model achieved reasonable accuracy and hence is suitable for the detection of Convid-19 at early stage. Nowadays, majority of researchers are using machine learning methods for diagnosis. Most of them use traditional approaches for detection, classification and grading different abnormalities, which include feature selection, extraction, reduction, and classification through these features. The main issue with these methods is the time consumption for feature engineering. Further to this, these traditional methods have low performance measures. To cope with such issues, deep learning architectures were explored. The potential of deep features motivated us towards the investigation of CNNs architectures. Chest images have been obtained from three publicly available datasets and a locally developed dataset from the Department of Radiology (Diagnostics), Bahawal Victoria Hospital, Bahawalpur (BVHB), Pakistan. It is radiologically documented that there is difference in medical traits of locals [12] , so, this serves the reason, why a locally developed dataset has been used? The detail of these datasets have been shown in Table 1 . The datasets under experiment consist of 7021 images of both normal, and pneumonia, while 1066 images of Covid-19 infection. It is radiologically documented that the intensity distribution of a tissue type varies even if image of the same subject is acquired using same scanner in different time frames. Therefore, to have the intensity ranges and contrast similar across acquisitions and subjects, intensity normalization proposed by [16] has been applied on each image. Resultantly, histogram of each image is similar across subjects. In this research, in order to classify images into normal, pneumonia, and Covid-19, CNN has been used, because CNN is a state-of-the-art area of machine learning inspired by human brain. CNN works like a human visual system and is designed based upon the assumption that raw data consists of two dimensional images, which enables certain properties to be encoded. So, CNN has been used, which works by convolving images with kernels to get feature maps. In a feature map, units are connected to previous layers through kernel weights and these weights are tweaked during training through a backpropagation process. Because same kernels have been used by all units, so, fewer weights have been trained by convolutional layer. Following are the apartments used with CNN to achieve the target of chest image classification. The activation function used is rectifier linear unit(ReLU), and is represented by equation (1). 2) Pooling: This layer has been used to combine spatially neighbor features present in feature maps. Average-pooling or max-pooling is used to join features, however, in this work, maxpooling has been used. 3) Architecture: Since, the visual clues of pneumonia have much similarity with the visual clues of Covid-19, which makes classification a challenging task in such case. This complexity has been reduced by tuning the proposed CNN based model on intensity normalization transformation of each image. Invariance was achieved and irrelevant detail was eliminated using pooling. However, pooling has also eliminated some important details, therefore, overlapped pooling with 3x3 receptive fields and 2x2 stride has been applied to keep information of a location. In convolutional layers, represented by the equation 2, feature maps have been padded before convolution. Use of padding ensured feature maps of same dimensions. The proposed CNN architecture has been depicted in figure 2 . where I is an 2D array containing segmented brain tumor and K is a kernel convolution function. The details of the proposed architecture for normal, pneumonia, and Covid-19 classification has been presented in Table 2 . Hyper-parameters of the proposed architecture and their values have been listed in Table 3 and were tuned empirically. There are three classes (normal, pneumonia and covid-19) to classify. The CNNs were developed using MATLAB 2018b. Classification of images containing normal, Pneumonia, and Covid-19 required several steps from preprocessing to recognition. Dataset has been divided into 60%, 20%, and 20% splits for training, cross validation, and testing sets, respectively. The results obtained with the proposed method have also been compared with state-of-the-art methods. As shown in the confusion matrix represented as Table 4 , the accuracy achieved for normal is 97.42%. Similarly, the accuracies for Pneumonia, and Covid-19 are 95.61%, and 97.02%, respectively. Overall, average accuracy achieved through the proposed model is 96.68%. Performance plot representing accuracy and loss is shown in figure 3 . J o u r n a l P r e -p r o o f Comparison of the results obtained through the proposed method with the results obtained from the state-of-the-art methods has been presented in Table 5 . The research activity [5] has classified the images into normal, bacterial pneumonia, non Covid-19 viral pneumonia and Covid-19 images. Their proposed model has attained the accuracy of 92.4%, which is low. In another study [8] Covid-19 and non-Covid-19 images of Chinese and USA patients have been classified. Similarly, the study [6] has also classified Covid-19 and non-Covid-19 images with overall achieved accuracy of 99.68%, which is the highest reported so far. In another study [9] , normal and Covid-19 images have been classified, with reported highest accuracy as 98% (using RestNet50 pretrained model). However, the last three studies (above) have conducted their experiments on considerably lesser number of images, which possibly could not have enough variability and multiformity. Another study [7] classified Covid-19, non-pneumonia images with overall accuracy of 96%, but their dataset was small. Similarly, the study [10] , consisting of small dataset, i.e., normal (310), bacterial pneumonia (330), viral pneumonia (327), and Covid-19 (284) achieved overall accuracy of 89.6%, which is lower than other so far conducted studies. In another study [11] , X-Ray images have been used for Covid-19, pneumonia, and normal images classification with two class accuracy = 98.08% and three class accuracy = 87.02% on very small dataset, i.e., Covid-19 (127), pneumonia (500), and normal (500). Hence, this study may also suffer with variability and multiformity issues. Last row of Table 5 shows no. images for each of normal, pneumonia, and Covid-19 images used for experiments, and the accuracies obtained from the proposed system. The proposed model has achieved 96.68%, 96.24%, and 95.65%, accuracy, sensitivity and specificity respectively. The proposed model has been trained and tested on a large number of images for each category as compared to the existing state-of-the-art methods. The average accuracy of our proposed model is 96.68%. The proposed model has been trained on a large dataset consisting of both CT and X-Ray images. Three publicly available and one locally developed dataset has been used for research and experiments. Locally developed dataset has been used to enable the proposed model to deal with medical traits of locals. The, Printed Circuit Board (PCB) is also designed as a protocol to integrated with exiting X-Ray and CT scanners. Currently, the proposed model is helping in the Radiology Department, Bahawal Victoria Hospital, Bahawalpur, Pakistan in decision-making. Research techniques made simple: polymerase chain reaction (PCR). The Journal of investigative dermatology novel coronavirus disease-19 pnemoniae: a case report and potential applications during COVID-19 outbreak The unusual origin of the polymerase chain reaction COVID-Net: A Tailored Deep Convolutional Neural Network Design for Detection of COVID-19 Cases from Chest Radiography Images Coronavirus (COVID-19) Classification using CT Images by Machine Learning Methods Rapid ai development cycle for the coronavirus (covid-19) pandemic: Initial results for automated detection & patient monitoring using deep learning ct image analysis Automatic Detection of Coronavirus Disease (COVID-19) Using Xray Images and Deep Convolutional Neural Networks Coronet: A deep neural network for detection and diagnosis of COVID-19 from chest x-ray images Automated detection of COVID-19 cases using deep neural networks with X-ray images Abnormal respiratory patterns classifier may contribute to large-scale screening of people infected with COVID-19 in an accurate and unobtrusive manner COVID-19 image data collection RSNA pneumonia detection challenge New variants of a method of MRI scale standardization