key: cord-0693127-em0jsbcd authors: Umar Ibrahim, Abdullahi; Ozsoz, Mehmet; Serte, Sertan; Al‐Turjman, Fadi; Habeeb Kolapo, Salahudeen title: Convolutional neural network for diagnosis of viral pneumonia and COVID‐19 alike diseases date: 2021-04-26 journal: Expert Syst DOI: 10.1111/exsy.12705 sha: 0fbba4e81a6c51a83ca25d59c8e0302b337bc141 doc_id: 693127 cord_uid: em0jsbcd Reverse‐Transcription Polymerase Chain Reaction (RT‐PCR) method is currently the gold standard method for detection of viral strains in human samples, but this technique is very expensive, take time and often leads to misdiagnosis. The recent outbreak of COVID‐19 has led scientists to explore other options such as the use of artificial intelligence driven tools as an alternative or a confirmatory approach for detection of viral pneumonia. In this paper, we utilized a Convolutional Neural Network (CNN) approach to detect viral pneumonia in x‐ray images using a pretrained AlexNet model thereby adopting a transfer learning approach. The dataset used for the study was obtained in the form of optical Coherence Tomography and chest X‐ray images made available by Kermany et al. (2018, https://doi.org/10.17632/rscbjbr9sj.3) with a total number of 5853 pneumonia (positive) and normal (negative) images. To evaluate the average efficiency of the model, the dataset was split into on 50:50, 60:40, 70:30, 80:20 and 90:10 for training and testing respectively. To evaluate the performance of the model, 10 K Cross‐validation was carried out. The performance of the model using overall dataset was compared with the means of cross‐validation and the currents state of arts. The classification model has shown high performance in terms of accuracy, sensitivity and specificity. 70:30 split performed better compare to other splits with accuracy of 98.73%, sensitivity of 98.59% and specificity of 99.84%. annually and the disease is more prevalence in children less than 5 years of age. Globally, pneumonia is among the top diseases that affect children and account for 15% of mortality of infants and children below 5 years leading to over 1.4 million death in 2018 and 2.56 million in 2017. Even though the prevalence of the disease is common between children, it can also affect all age range. The cases of pneumonia are predominant in underdeveloped countries with poor healthcare sectors, lack of medical personnel and resources for diagnosis and treatment (Gilani et al., 2012; Stephen et al., 2019) . COVID-19 is among diseases cause by virus from the Coronaviridae family. Several strains of this family have caused global concerns in the past such as Middle East respiratory syndrome coronavirus (MERS-CoV) in 2012 and severe acute respiratory syndrome coronavirus (SARS-CoV) in 2002 (Dowel et al., 2004 Oboho et al., 2015) . COVID-19 was declared pandemic by the World Health Organization (WHO) in mid-March 2020 as a result of outbreak of a new viral strain, which was first recorded on the eve of January, 2020 in Wuhan China. COVID-19 has spread to almost every country infecting more than 30 million with over 800 thousand deaths globally as of 08 October, 2020 (WHO, 2020). The major symptoms of COVID-19 include fever, cough, difficulty in breathing and in severe cases, it can lead to pneumonia, kidney failure and eventually death (Banerjee et al., 2019; Chen et al., 2020) . The disease is more severe to patients suffering from other diseases such as impaired immune system disorders, patients placed on a ventilator machine, people who smoke and patients suffering from asthma and other chronic diseases (Kolhar et al., 2020; Rahman et al., 2020; Srivastava et al., 2020) . The use of artificial intelligence and machine learning in healthcare systems is growing exponentially due to its ability in detecting diseases, diagnosing clinical issues, discovering drugs, etc. The use of specific machine learning models has even outperformed both microbiologists and pathologists in diagnosis of specific cases due to their pattern recognition ability (Bakator & Radosav, 2018; Hu et al., 2020; Paules et al., 2020; Wang, Casalino, et al., 2019) . Clinicians employ different approaches to diagnose viral pneumonia such as the use of blood test, chest x-ray, sputum test and pulse oximetry. The gold standard technique is the use of RT-PCR for detection of the viral strain and the use of Computerized Tomography (CT) scan images which are interpreted by radiologist. Even though many studies have reported the efficiency of using artificial intelligence models for detection of viral pneumonia, these approaches are limited to the use of CT scan images acquired from patients who visited clinics or in a health care setting. Different strains of viruses are associated with viral pneumonia such as Influenza virus, Respiratory syncytial virus, Human metapneumovirus, adenoviruses, coronaviruses with COVID-19 as the recent viral strain on the list (Chowdhury et al., 2020; Ruuskanen et al., 2011) . The unavailability of test kit and lockdown of cities as a result of the COVID-19 pandemic are other major challenges. In order to solve these challenges, we utilized pretrained AlexNet Model to classify viral pneumonia and normal (i.e., healthy) CT scan. The integration of IoT, artificial intelligence and biosensors contributed to the advancement of smart systems that can be used to detect, manage and control diseases. The use of smart sensing tools and monitoring devices designed using chips and sensors improved various aspect of healthcare systems in terms of detection of pathogens that causes disease, monitoring of medication, storage and analysis of vital signals, medical records management and rehabilitation of diseases. The potential of IoT in detection of diseases revolve around the use of AI driven biosensor which collects physiological and other form of data from patient's smartphones and wearable devices and applies AI or ML techniques to detect changes in patient's vital signal patterns (Kanaparthi et al., 2019; Kavakiotis et al., 2017; Paiva et al., 2018) . Machine learning is a subset of AI that often uses statistical methods to give computer the ability to learn patterns from data without being explicitly programmed. ML algorithms are categorized into supervised, unsupervised, semi-supervised (hybrid of supervised and unsupervised) and reinforcement. Supervised ML is the most common approach employ in healthcare system which utilize labelled data for models to learn features for prediction and classification (base on patterns). Supervised ML algorithms include neural networks (NNs), support vector machine (SVM), Decision Tree, Random Forests etc. (Paiva et al., 2018) . Unsupervised ML utilize unlabelled data to enable model to learn and predict output based on patterns learn from input data. Clustering and rule mining are the most common algorithms use in unsupervised ML However, reinforcements learning relies on the use of experience acquired by performing a given task (Catthoor & Van Hoof, 2018; Wang, Casalino et al., 2019) . The use of DL as a sub-branch of artificial intelligence comprises of deeper neural networks that can identify more complex non-linear patterns in data acquired from medical devices (such as microscope, MRI) and IoT ecosystems (such as sensors, devices implants and monitors) and provide meaningful output for decision making. There are various neural networks architectures that have been developed. Some of the architectures have performed better than others in terms of regression, classification and denoising images. The current architectures based on CNN include AlexNet with eight layers, VGGNet with 19 and 16 layers, Inception module also known as GoogleNet with 22 layers and 9 modules and Residual or ResNet with 152 layers (Russakovsky et al., 2015; Yu et al., 2020) . The principle behind the application of CNN in classification or regression revolves around series of dot products of weight matrices and input matrix. These processes are categorized into two stages known as feature learning and classification (Wang, Sun, et al., 2020) . Feature learning is based on the use of convolutional blocks with operations such as convolution, a process of computing input matrix and feature matrix to obtain a convolve map or feature map. Activation operation is the use of activation function such as tanh, sigmoid and Rectified Linear Unit (ReLu) to squash output into zero or within ranges of 0 and 1 or from À1 to 1. The main function of pooling operation is to reduce computation by taking the most important part of the convolve map by either max pooling or average (mean) pooling Wang, Muhammad, et al., 2020) . The output is obtained after these operations in all the layers (including fully connected layers or global average pooling layers) and the use of classifier such as SoftMax based on probabilities to categorized output. Artificial intelligence has been applied in different field of medicine for detection of diseases associated with cancer, tuberculosis, diabetic retinopathy, pneumonia such as bacterial pneumonia and viral pneumonia (influenza virus and recently, SAR-CoV-2). The most common type of dataset used by medical expert includes microscopic slide images and radiographic images (such as CT and CXR). These diseases are classified using different DL models such as ImageNet models (AlexNet, VGGNet, GoogleNet and ResNet). However, these diseases can also be classified using models designed from scratch or using hybrid models (Bakator & Radosav, 2018; Chowdhury et al., 2020; Kallianos et al., 2019; Wang, Casalino, et al., 2019) . As the number of people suffering from pneumonia (especially the ones caused by Influenza virus and SAR-CoV-2) continue to grow rapidly. There is high need for testing kits that can enable massive detection and provide result in a short period of time. Detection of viral pneumonia such as COVID-19 and non-COVID-19 viral pneumonia is very critical for prevention and control. Health expert required sophisticated technology to accurately detect these pathogens. Moreover, detection of individual pathogens using molecular testing is still not up to standard of point of care diagnostics, instead specimens are sent out to specialized or equipped laboratories for RT-PCR sequencing and diagnosis. Pneumonia as one of the symptoms of COVID-19 and other Bacterial pneumonia have been a major challenge for medical and healthcare sectors in many underdeveloped countries and remote communities with limited diagnosis tools and treatment approach. Other approach utilized by medical experts is the use of chest X-ray images which are cheaper, reliable and fast. However, interpretation of the images can sometimes be tedious to qualified radiologists. Therefore, the development of fast, cheap, simple and accurate detection approach for diagnosis and predictions of these diseases are highly required. Accordingly, our contributions can be summarized as follows. 1. We utilized Pre-trained (through transfer learning) AlexNet model for detection of pneumonia in CT Scan images. 2. We carried out 10 k cross validation to estimate the model will perform on unseen dataset. 3. We evaluated the performance of the models based on accuracy, sensitivity and specificity for general dataset and mean average of the parameters for 10 K cross validation. The remaining parts of this article are organized as follows. Section 2 overviews related work on the use of AI for the detection of pneumonia. In Section 3, we introduced the adopted model with dataset description, model training and cross validation. In Section 4, we discuss about the result obtained from training and testing of the model, comparison of general dataset with cross validation and comparison of our models with the state of art. Finally, we include concluding remarks in Section 5. Throughout the last decade, scientists have been trying to integrate the application of AI, ML, DL in healthcare system. Researchers have utilized CNN to solve challenges in medicine such as disease detection using classification and segmentation approaches in skin disorders, brain and breast cancer, and in diabetes (retinopathy) diseases. In the field of microbiology, microbiologists, radiologists and computer scientists have been working together to detect microbial diseases such as tuberculosis, malaria and pneumonia using computer aided diagnosis (Kallianos et al., 2019) . X-ray images are the basic data used for detection of pneumonia using ML approach. This idea is adopted by Stephen et al. (2019) . The authors utilized DL approach to classify X-ray images samples. The research employed a CNN that is built from scratch using Keras open source with Ten-sorFlow to extract distinctive features from positive and negative images. The dataset contains 5856 X-ray images of normal and pneumonia images collected from pediatric patients between 1 to 5 years old. The dataset was further augmented to yield a greater number of training dataset. The model was tested on different data size (100-300) and the model achieved average accuracy of 94.81%, 93.01% training and validation respectively. In this section, we detailed the proposed approach procedures and its main assumptions. The work flow of the study design is schematically shown in Figure 1 . In this study, a pretrained AlexNet model is used for classification of pneumonia from normal Chest X-ray images. Apart from AlexNet, there are other high performing CNN models such as VGGNet, GoogleNet and ResNet, but due its simplicity, a smaller number of layers, minimum error and computational time restraints, it was utilized, nonetheless. We obtained X-ray images made available by Kermany, Zhang et al. (2018) . The dataset contains three folders (training, validation and testing with a total number of 5856 positive and negative cases. In each folder there is a subfolder with names pneumonia and Normal folders. The dataset description is based on X-ray images collected from retrospective pediatric patients between the age of 1 to 5 as shown in Figure 2 and describe in Table 3 . For training of datasets, we employed Matlab installed on personal computer with window-64-bit, 8GB random access memory (RAM), with an intel ® Core i7-3537U and graphical Processing unit (GPU). 30% of the dataset split as testing dataset are used to evaluate the model performance. Pretrained AlexNet model is employed due to its high accuracy in carrying out feature extraction and image classification. Figure 3 shows the AlexNet architecture employed to classify X-ray images. AlexNet model contain 5 convolution (CONV) blocks or layer with convolutional filters size of 3Â3 without padding and 2Â2 window size for max pooling operation. The last 3 layers are 2 fully connected layers (FCL) and output layer. Other terms include Batch Normalization (BN) and Feature Map (FM). SoftMax activation function is utilized in the output layer for classification. Minibatch optimization is a gradient descent that is used to optimize the model. The training is carried out using 20 epochs with 0.0001 as learning rate. According to literature, scientist recommended the use of 80% for training and 20% for testing. In order to check the performance of different split ratios, we trained the model based on 50:50, 60:40, 70:30, 80:20 and 90:10 for training and testing respectively. The data split for each ratio is presented in Table 4 . Cross validation is a vital method used in machine learning for parameter selection and evaluation of learning performance and prediction. In this study, we utilized K-fold cross validation approach where the datasets are split into K sets of equal size (i.e., K = 10). In each K sets KÀ1 is used as training dataset and 1 set is used as validation dataset. Training of the dataset is repeated for K number of times (i.e., n = k) (Fan & Hauser, 2018) . The average performance of the training and testing dataset is computed as the evaluation index for the models. This approach is very efficient especially when there are limited number of samples as it takes advantage of the whole dataset. Hence, cross validation dataset classifications are presented in Supplimentary Data S1. To evaluate the performance of the trained models, three parameters are employed; accuracy, sensitivity and specificity. Accuracy is termed as the ratio of correctly classified images over total number of images, it is also termed as the sum of sensitivity and specificity. For evaluating the accuracy and loss of a model the following formulas are utilized as shown in Equations (1) and (2). Accuracy where N is the overall number of images during training and testing, and n is the number of images and PC is the probability of the correctly classi- Table 5 . True Positive rate (Sensitivity) is the proportion of positive image samples that are correctly identified as positive sample (i.e., it shows the percentage of positive samples that are correctly identified as positives). The formula of sensitivity is shown in Equation (3). False positive rate (FPR) also known as Specificity is the proportion of positive samples that are incorrectly identified as positive samples (i.e., it shows the percentage of negative samples that are incorrectly identified as positives). The formula of sensitivity is shown in Equation (4) We trained the models with the entire dataset without cross validation. We utilized 5856 total images which are partition into 50:50, 60:40, 70:30, 80:20 and 90:10 for training and testing. The models were trained in Matlab with 5740 number of iterations, 20 epochs and 0.0001 learning rate. In terms of 50:50 split, the model achieved training accuracy of 97.98%, testing accuracy of 97.94%, sensitivity of 96.21% and specificity of 99.00%. By increasing the number of training dataset to 60% and reducing testing dataset to 40%, the model achieved training accuracy of 98.94%, testing accuracy of 98.95%, sensitivity of 99.09% and specificity of 98.81%. The difference between training accuracy and testing accuracy achieved by the models (trained on 50:50 and 60:40) are less compare to models trained on 70, 80 and 90%. This is as a result of using same amount or close amount of training and testing splits. Training the model using 70% and testing using 30% (i.e., 70:30) result in training accuracy of 99.19%, testing accuracy of 98.73%, sensitivity of 98.59% and specificity of 99.84%. In terms of data 80:20 split, the model achieved training accuracy of 99.36%, testing accuracy of 100%, sensitivity of 99.11% and specificity of 99.65%. By increasing the number of training dataset to 90% and reducing testing dataset to 10%, the model achieved training accuracy of 99.86%, testing accuracy of 100%, sensitivity of 99.70% and specificity of 100%. These higher performances are achieved as a result of training the models with large number of datasets and testing using fewer number of datasets (Table 6 ). The results have shown that training accuracy is greater than testing accuracy in all the k-folds except 4-fold where testing accuracy is higher than training accuracy. However, the average result of training accuracy (i.e., 97.70%) is greater than average result of testing accuracy (i.e., 96.04%). The result of sensitivity and specificity varies in the 10-folds. The average result of sensitivity (97.34%) and specificity (97.79%) indicated that the model has successfully classified both negative and positive images. The result of cross validation is presented in Table 7 . As shown in Table 8 , for general dataset we obtained different performance parameters based on training accuracy, testing accuracy, sensitivity and specificity for all the dataset split, while for cross validation we obtained an average performance of 97.70% training accuracy, 96.04% testing accuracy, 97.35% sensitivity and 97.78% specificity. This shows that the average performance of cross validation achieved lower training accuracy, testing accuracy and specificity than general dataset. Radiologist have been relying on radiological images for interpreting pneumonia based on the presence of infiltrates (white spots in the patient's lungs) to identify or interpret the presence of the infection and other complications such as pleural effusions or abscesses. This approach can be very tedious for large images and thus, can lead to misinterpretation. The use of computer aided diagnosis (CAD) which was introduced in 1990s offer a simple, reliable, precise and fast approach of interpreting results related to medical images. CAD approach assist pathologist and radiologist in identifying disease and healthy images while preventing misinterpretation (Matsugu et al., 2003) . The use of CNN to classify and characterize X-ray images has shown a better accuracy and precision than manual classification by some radiologist. Since the development of deep neural network, scientist have been utilizing different CNN models such as AlexNet, VGGNet 16 and 17, GoogleNet, ResNet and other networks built from scratch to detect pneumonia in x-ray images. These computer models are developed based on mathematical algorithms to solve problems such as predictions and image classification using probability score. The results presented in Table 6 has shown that increasing the number of dataset lead to increase in training accuracy. However, our results are in line with the study carried out by Prashanth et al. (2020) based on data splits from 50%-90%. Moreover, 70:30 split is chosen as the best performing model which is "fit" compare to 80:20 and 90:10 which are relatively "overfit" due to testing on small number of datasets. The result obtained from training and testing the performance of the models are presented in Table 6 and Figure 4 . AlexNet models. The result presented in Table 9 has shown that using transfer learning yield higher accuracy than building network from scratch as well as using large amount of dataset. The recent outbreak of COVID-19 has caused a global concern leading to over 30 million confirmed cases and more than 800 thousand death. Pneumonia is among the symptoms associated with COVID-19. However, other pathogens are known to cause pneumonia such as viral pneumonia (caused by Influenza virus) and bacterial pneumonia (caused by Streptococcus pneumoniae). These viruses are mostly diagnosed using bench diagnosis assays which utilize chemical reagent, trained pathologist and radiologist, with longer procedure and heavy workload. To solve these challenges, we utilized a method based on DL and transfer learning approach. We trained our models using 5865 CT scan images based on different splits (50:50, 60:40…90:10) and CV to distinguish between viral pneumonia and healthy patients. For classification of pneumonia using X-ray images based on 70:30 split, our model achieved testing accuracy of 98.73%, sensitivity of 98.59% and specificity of 99.84% and 96.04% testing accuracy, 97.35% sensitivity and 97.78% specificity using cross validation means. Our result is in line with the notion that CNN models can be used for classifying medical images with higher accuracy and precision. These models can now serve as a confirmation system for diagnosis of viral pneumonia by maximizing miss diagnosis and offer an alternative to relieve the heavy and tedious workload experiencing by radiologist and pathologist in Near East University Hospital. Some of the limitations of our study include the use of frontal radiographs without augmentation. Normally, frontal images are the types interpreted by radiologist without the need of rotation or colour shift. Another challenge is the lack of sufficient amount of dataset. Thus, with large amount of dataset we can utilize different pretrained architectures such as VGGNet, GoogleNet and ResNet. In the future, this model can be used for classification of COVID-19 as well as the use of IoT-enabled system integrated with artificial intelligence for prediction of viral pneumonia. Different image processing techniques can also be applied on the datasets such as annotations and image segmentations. The performance of the models can also be improved by using hybrid models such as combining SVM with pretrained models or models designed from scratch. The authors declare no conflicts of interest. Abdullahi Umar Ibrahim https://orcid.org/0000-0003-3850-9921 Sertan Serte https://orcid.org/0000-0001-7130-0172 Fadi Al-Turjman https://orcid.org/0000-0001-6375-4123 Deep learning and medical diagnosis: A review of literature Bats and coronaviruses Unsupervised heart-rate estimation in wearables with Liquid states and a probabilistic readout Emerging coronaviruses: Genome structure, replication, and pathogenesis A novel transfer learning based approach for pneumonia detection in chest X-ray images Can AI help in screening viral and COVID-19 pneumonia Severe acute respiratory syndrome coronavirus on hospital surfaces Fast and accurate cnn-based brushing in scatterplots A literature review and survey of childhood pneumonia etiology studies Artificial intelligence forecasting of Covid-19 in China How far have we come? Artificial intelligence for chest radiograph interpretation Smart, portable, and noninvasive diagnostic biosensors for healthcare A heuristic neural network structure relying on fuzzy logic for images scoring Machine learning and data mining methods in diabetes research Large dataset of labeled optical coherence tomography (oct) and chest x-ray images. Mendeley Data, v3 A three layered decentralized IoT biometric architecture for City lockdown during COVID-19 outbreak Subject independent facial expression recognition with robust face detection using a convolutional neural network 2014 MERS-CoV outbreak in Jeddah-A link to health care facilities Supervised learning methods for pathological arterial pulse wave differentiation: A SVM and neural networks approach Coronavirus infections-More than just the common cold Classification of Handwritten Devanagari Number-An analysis of Pattern Recognition Tool using Neural Network and CNN Data-driven dynamic clustering framework for mitigating the adverse economic impact of Covid-19 lockdown practices Visualization and interpretation of convolutional neural network predictions in detecting pneumonia in pediatric chest radiographs Chexnet: Radiologist-level pneumonia detection on chest x-rays with deep learning Imagenet large scale visual recognition challenge Classification of images of childhood pneumonia using convolutional neural networks A systematic approach for the COVID-19 prediction and parameters estimation. Personal and Ubiquitous Computing An efficient deep learning approach to pneumonia classification in healthcare Alcoholism identification via convolutional neural network based on parametric ReLU, dropout, and batch normalization Deep learning in medicine-Promise, progress, and challenges A deep learning algorithm using CT images to screen for Corona Virus Disease (COVID-19). medRxiv Cerebral micro-bleeding identification based on a nine-layer convolutional neural network with stochastic pooling Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weaklysupervised classification and localization of common thorax diseases Household Air Pollution and Health WHO Coronavirus Disease (COVID-19) Dashboard High expression of ACE2 receptor of 2019-nCoV on the epithelial cells of oral mucosa ResNet-SCDA-50 for breast abnormality classification Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: A cross-sectional study He studied at Nigerian Institute of Science and leather technology Zaria to obtain both OND and HND in Laboratory Science technology. He served at General Hospital Mina Niger state for 1 year. He studied MSc in Bioengineering at Cyprus International university and worked as Student Assistant at the university's information center He did postdoctoral work on Electrochemical Biosensors in the United States of America for 2 years. He has 150 scientific articles and 46 h factor and has contributed to more than 50 invited speakers and conferences. He has articles in journals with high impact factor such as ACSLangmiur He completed his master's degree in the fields of Multimedia, Signal Processing, and Communication at the University of Surrey. He completed his PhD in Electronics in Queen Mary He was a recipient of several recognitions and best papers' awards at top international conferences. He also received the prestigious Best Research Paper Award from Elsevier COMCOM Journal for the last three years prior to 2018, in addition to the Top Researcher Award for 2018 at Antalya Bilim University, Turkey. He led a number of international symposia and workshops in flag-ship IEEE ComSoc conferences. He is serving as the Lead Guest Editor in several journals, including the IET Wireless Sensor Systems Salahudeen Habeeb Kolapo Habeeb is a PhD student at Cyprus International University In Computer Engineering. He obtained Hid MSC from the same university and is also working as a Research Assistant Convolutional neural network for diagnosis of viral pneumonia and COVID-19 alike diseases