key: cord-0558758-i1ojceif authors: Al-Bawi, Ali; Al-Kaabi, Karrar Ali; Jeryo, Mohammed; Al-Fatlawi, Ahmad title: CCBlock: An Effective Use of Deep Learning for Automatic Diagnosis of COVID-19 Using X-Ray Images date: 2020-09-21 journal: nan DOI: nan sha: e2e0d1abbbf612c3616d2d1829a2b6307890e81a doc_id: 558758 cord_uid: i1ojceif Propose: Troubling countries one after another, the COVID-19 pandemic has dramatically affected the health and well-being of the world's population. The disease may continue to persist more extensively due to the increasing number of new cases daily, the rapid spread of the virus, and delay in the PCR analysis results. Therefore, it is necessary to consider developing assistive methods for detecting and diagnosing the COVID-19 to eradicate the spread of the novel coronavirus among people. Based on convolutional neural networks (CNNs), automated detection systems have shown promising results of diagnosing patients with the COVID-19 through radiography; thus, they are introduced as a workable solution to the COVID-19 diagnosis. Materials and Methods: Based on the enhancement of the classical visual geometry group (VGG) network with the convolutional COVID block (CCBlock), an efficient screening model was proposed in this study to diagnose and distinguish patients with the COVID-19 from those with pneumonia and the healthy people through radiography. The model testing dataset included 1,828 x-ray images available on public platforms. 310 images were showing confirmed COVID-19 cases, 864 images indicating pneumonia cases, and 654 images showing healthy people. Results: According to the test results, enhancing the classical VGG network with radiography provided the highest diagnosis performance and overall accuracy of 98.52% for two classes as well as accuracy of 95.34% for three classes. Conclusions: According to the results, using the enhanced VGG deep neural network can help radiologists automatically diagnose the COVID-19 through radiography. In December 2019, the COVID-19 pandemic appeared in Wuhan, China [1] [2] [3] [4] . It has adversely been affecting the health and welfare of the world's population and killing many people. It has also impacted the economy of nations where the disease has spread. The novel coronavirus belongs to an outsized group of dangerous viruses [5] , which can cause the cold, such as the SARS coronavirus (SARS-CoV). The COVID-19 is also classified as such a diseases. The World Health Organization (WHO) named the infectious disease caused by this type of virus the COVID-19 on Feb 11, 2020 [6] . It has so far been impossible to utterly know this strange virus because its behavior is entirely different. The novel coronavirus is a zoonotic virus because it can be transmitted from animals to humans [7] . This virus is believed to have been passed from bats to humans [8] . The respiratory transmission of the disease among people causes the rapid spread of the pandemic. The common symptoms of COVID-19 are cough, fever, dyspnea, muscle pain, and fatigue [9] . Causing severe respiratory symptoms, the COVID-19 has increased the intensive care unit (ICU) admission rates. In severer cases, the infection can cause pneumonia, severe acute respiratory syndrome, septic shock, multi-organ failure, and death [7, 9] . The primary method of diagnosing the COVID-19 is to conduct a polymerase chain reaction (PCR) procedure [10] , which can detect the SARS-CoV-2 RNA from respiratory specimens (collected from the pharyngeal or pharyngeal tracts). In other words, the COVID-19 diagnosis should be confirmed through gene sequencing for respiratory or blood specimens as a critical indicator for the reverse transcription-polymerase chain reaction (RT-PCR) or hospitalization. The PCR test is an essential but susceptible standard; however, it is time-consuming and stressful and can be applied to a limited number of samples. Due to the huge number of infected patients and the abovementioned factors, medical imaging procedures such as the chest X-ray (CXR) and the computerized tomography (CT) scan can play a key role in diagnosing patients with the COVID-19. In fact, radiography examination is fast and easily accessible due to the availability of chest radiology imaging systems in modern healthcare systems. The main disadvantage of using a CT scan includes the high radiation doses and the costs of scanning. In contrast, conventional radiography or CXR machines are available in hospitals and clinics to produce 2-dimensional (2D) projection images of a patient's thorax. Therefore, it is recommended to use the chest radiography test as a diagnostic method for the COVID-19 [12] . Hence, this study proposes an X-ray imaging technique for potential COVID-19 cases. The technology of digital image processing has widely been used for medical purposes such as organ segmentation as well as image enhancement and repair to provide the initial support for any subsequent diagnosis [13, 14] . With the rapid development of artificial intelligence (AI), deep learning techniques of automated medical diagnoses have become widely popular with specialists. Deep learning techniques have been used for many medical purposes such as the breast cancer diagnosis [15] , classification of brain diseases [16] , and diagnosis of pneumonia [17] . With the outbreak of the COVID-19 pandemic and the disproportionate number of patients to the preparation of diagnostic medical staff, artificial intelligence researchers must employ their competencies to detect this disease and mitigate its spread. There are also many other studies of the COVID-19 diagnosis based on deep neural networks with CT scan images [25] [26] [27] [28] [29] . However, deep learning techniques are still used rarely to diagnose the COVID-19 in X-rays, although they produce reasonable accuracy. Due to the need for the quicker interpretation of radiography images, this study proposes an automated technique for distinguishing the COVID-19 cases from patients with pneumonia and the healthy people by enhancing the classical VGG network with radiography. The next section discusses the methodology for developing the proposed network through transfer learning and the general clarification of deep convolutional neural networks used in the VGG network enhancement architecture. Experiments and Results give a general review of the dataset used in experiments and present the results of experiments conducted to evaluate the efficacy of the proposed VGG network in comparison with the previous related works. The discussion addresses the experiment results and research limitations. Finally, the conclusion draws the main conclusions and states the research rationale. Dataset Sufficient data must be available to develop and improve a diagnostic tool. To overcome the paucity of X-rays related to the COVID-19 cases, three different open sources were employed to collect a sufficient number of X-rays to train and test the proposed network. The research dataset includes the human chest X-rays taken by a widely available radiography machine. A challenge to network training is the imbalance of data; therefore, the dataset preparation was balanced. For this purpose, 1828 chest X-rays were selected. The first of the three sources used in the study came from Dr. Cohen, who collected data from public sources that did not violate patient privacy. Then 241 chest X-rays of the COVID-19 patients were extracted from Dr. Cohen's dataset [30] . The images showed different angles including the posteroanterior (PA), anteroposterior (AP), laying down (AP supine), and lateral (L) views. Moreover, some images showed the same patient from different angles but at different offset days of the disease, whereas other images indicated different patients. The benefits and impacts of this method will be discussed in the discussion. The second source used in this study came from the Kaggle platform. It consisted of 79 chest X-rays of COVID-19 patients [31] . There are ten similar images between the two sources; thus, they were deleted to avoid duplication. As a result, there were 310 chest X-rays of the COVID-19 patients in total. The third source also came from the Kaggle platform. It contained a broad set of chest X-rays for patients with pneumonia and healthy people [32] . There were 864 chest X-rays of the patients with pneumonia: 467 images of bacterial pneumonia and 397 images of viral pneumonia. There were also 654 chest X-rays of the healthy people in the same dataset, which was divided into two sections, i.e. the training set (27%) and the testing set (73%) as shown in Fig.1 and Table 1 . Transfer learning is a strategy for transferring the knowledge extracted by a neural network from specific data to solve a problem. However, it is applied to a new task including new and usually insufficient data to train neural networks from the beginning [33] . In deep learning, it is necessary to access large and sufficient amounts of data for the proper training of neural networks, as data availability for initial training is an essential factor for the successful implementation of the CNN training process in extracting the distinct features images. Regarding the insufficient amount of training data as in medical images, there is no choice but to resort to the ability of neural networks trained in a sufficient dataset to extract the essential features of images. This process is called the transfer of learning. There are two strategies for transferring learning. The first strategy is to use neural networks to extract important features from data while retaining the trained network architecture where the trained network outputs are the data features given to the classifier network [34] . In the second strategy, the network architecture is adjusted to use its pre-trained weights attached to a parallel architecture containing untrained weights that were trained through the available data used in this study. The most popular neural networks that employ transfer learning for medical purposes are ImageNet-trained networks used in the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) [35] . The networks trained in this dataset for medical purposes include VGG-16, VGG-19, and Res-Net. This section describes deep classification networks used in experiments. VGG-Net: This network was developed by K. Simonyan and A. Zisserman in 2014 [36] for ILSVRC-2014. It performed well in the ImageNet data classification. There are two versions of this network architecture differing in depth. The first is called VGG-16, which contains 13 convolution layers, three fully connected layers, and five pooling layers. The second is called VGG-19, which contains 16 convolution layers, three fully connected layers, and five pooling layers. Deep learning has brought about a breakthrough in different areas of artificial intelligence such as detection and identification of images, people, and sounds. The word "deep" indicates an increase in the number of layers. A model that uses one or more hidden layers is called a deep model. These are called CNN models, i.e. a convolutional neural network, in which the word "convolutional" denotes the presence of convolutional layers that contain a set of weighted filters trained through learning data. An advantage of CNN is to extract the input features. Another important layer is the fully connected layer located at the end of the network. This layer contains a set of weights trained through training data in the training phase. There are also other layers called activity layers that include the non-linear activity layer (ReLu) aiming to delete negative values. Neural networks are trained by using a set of enhancers, the most important of which is the stochastic gradient descent (SGD), which operates at the expense of the error derivative, for use in the process of updating the weights in the layers of a deep model as in the convolutional layers and fully connected layers. The training process includes updating weights with a dependent error derivative and a small learning rate. Training a convolutional neural network requires large amounts of data, which are not usually available in medical diagnostic tasks. Despite the rapid and widespread prevalence and a large number of patients with the COVID-19 that, it is impossible to collect enough data to train neural networks from the beginning due to the harsh conditions of the pandemic. Therefore, there is no choice but to resort to the scant data existing on different platforms. It is unnecessary to build a deep model from the beginning because pre-built models (VGG-16, VGG-19, and ResNet) can be modified and used. VGG-16 is a network with low computational complexity due to the small dimensions of its filters. This network contains 16 learnable layers that have 9-pixel filters; thus, it runs fast due to the smallness of its filters. A transfer learning method is to add learnable layers at the end of the network to train it in the current data. This will improve network learning in terms of accurate classification. Therefore, three learnable convolutional layers were added and trained by using the previously introduced data to improve the network performance and obtain the expected results. In this study, VGG-16 was selected and modified by adding three convolutional layers, each of which was followed by the ReLu-Batch normalization layer. This modification will improve the classification process due to the presence of several untrained filters that will be trained by using the training data. The added convolutional layers have different numbers of filters (512,256,128). This model resembles VGG-19 in the number of learnable layers. In fact, VGG-19 has 19 learnable layers containing the weights that are trained by using training data. The original model (VGG-16) contains 16 learnable layers. In this study, one of the fully connected layers was deleted from the basic model; therefore, 15 layers remained. The proposed model is similar to VGG-19 in terms of the number of convolutional layers. These three added layers were named the Convolutional COVID Block (CCBlock). As discussed earlier, it is possible to use pre-trained networks in different strategies. In this study, the second proposed strategy allowed the use of pre-trained networks as a part of the deep model in which the part added to the model was trained through the training data. Table 2 shows the layers used for the proposed model with all relevant features, whereas Fig. 2 shows the procedure for the proposed model CCBlock (training and testing phases) In this study, different tests were conducted to diagnose and classify COVID-19 cases through chest radiography. The tests were conducted on two types of databases, the first of which included two categories (COVID-19, Normal), whereas the second included three categories (COVID-19, Normal, and Pneumonia). The dataset was divided into two sections (27% for training data and 73% for test data). To evaluate the efficiency and stability of the proposed model, the tests were repeated five times on both types of data. The optimizer (SGD) was used at a 0.001 learning rate, batch size of 32, the momentum of 0.9, and 30 epochs. This study was conducted through Python and Keras packages with TensorFlow on an Intel (R) Core (TM) i7-5700 HQ CPU running at 2.70GHz (8 CPUs) . Moreover, the experiments were carried out on a computer running on the NVIDIA GTX 970M with 8 GB of GDDR and16 GB of RAM. The code runtime (disease diagnosis time) was less than one second. Fig. 3 shows the graph of classification loss as well as the accuracy rates of training and testing phases. The graph of classification loss and accuracy of the proposed model According to Fig. 3 , training loss decreases rapidly, as the results show an approximate rate of loss of 0.1 during the first five epochs. The rate of loss continued downward until it reached nearly zero after 25 epochs. As for the rate of test losses, its descent was less steep, and this is normal because the data that tested the proposed model were new. Regarding the accuracy scheme, it is clear that the proposed model is generalizable, as there is a slight difference in training accuracy and testing accuracy. This shows the good efficiency of the proposed model CCBlock. To evaluate the proposed model CCBlock, a confusion matrix was calculated for each implementation phase ( Fig. 4 and Fig. 5) . The results showed that the proposed model was characterized by stability and efficiency in diagnosing the COVID-19 for different categories (Normal and Pneumonia). A rate of 98.52% accuracy was reported for the two categories, whereas a rate of 95.34% accuracy was documented for the three categories. Table 3 presents the values of sensitivity, specificity, and accuracy for three categories and five implementation times. Table 4 shows the same values for two categories. Table 3 , the proposed model was proven to be efficient in diagnosing and differentiating the COVID-19 cases from the other classes (Normal, Pneumonia). The highest rate of accuracy was reported at 95.51%. However, the average of five implementation times was obtained, and a rate of 95.34% was recorded. To evaluate the efficacy of the proposed model on the diagnosis and classification of the COVID-19, CCBlock was tested on the second dataset including the x-rays of patients with the COVID-19 as well as the images of the uninfected people. The highest accuracy was recorded 98.86% for the proposed model; however, the average of five executions was calculated and considered the accuracy of the proposed model. The average accuracy was reported at 95.34%. Regarding machine learning and classification, in particular, a confusion matrix is an instrument that allows more precise visualization of the algorithm performance, as it shows errors of a classification algorithm for each category in comparison with other categories. The primary diameter of the array represents the classes that were correctly categorized, whereas the other elements represent the data that were incorrectly classified as other categories. Fig.4 shows the confusion matrix for each implementation on the first dataset including three categories (COVID-19, Normal, and Pneumonia). Accordingly, the proposed model is highly capable of diagnosing and distinguishing the COVID-19 from other categories. The highest rate of accuracy was reported by 98% for the COVID-19. The Train Run-1 matrix shows the COVID-19 classification for the first implementation by applying the proposed model on the training data for three categories. Fig. 5 indicates the confusion matrix of a series of tests conducted on the second dataset including two categories Normal) . This study focused on the COVID-19; therefore, it is preferable to evaluate the efficiency of the proposed model CCBlock in diagnosing and distinguishing the COVID-19 cases from those who are not infected. According to the confusion matrix, the proposed model managed to record a diagnostic accuracy of 99.55% for the COVID-19. The Train Run-1 matrix showed the COVID-19 classification for the first implementation by using the proposed model on the training data for two categories. The previous studies showed that deep neural networks were efficient in diagnosing and distinguishing the COVID-19 cases properly from other categories. However, the proposed model CCBlock proved outperformed the previous methods in both cases of two categories and three categories. In fact, it yielded higher accuracy than the previous techniques, as shown in Table 5 . A critical problem that researchers face in the use of deep learning for diagnosis and treatment through medical images is the lack of available data on such tasks. Therefore, researchers tend to use deep learning along with the transfer learning strategy to solve this problem. It is necessary to access sufficient numbers of images or data to train a deep model. This study proposed the VGG-16 + CCBlock model in two parts, the first of which (VGG-16) used a transfer learning strategy, whereas the second (CCBlock) was trained from the beginning by using the available training data introduced in the Database. Due to the harsh conditions of the COVID-19 pandemic, it is impossible to collect sufficient data. Thus, most researchers relied on the COVID-19 dataset available on the Kaggle platform. The efficiency of the proposed model was evaluated by using two datasets, the first of which included a category of the infected and uninfected people. The accuracy of this dataset was reported at 98.86%. This shows the ability of the proposed model to diagnose the people with the Covid-19 accurately. To increase the complexity of the issue and test the efficiency of the proposed model incorrect diagnosis, a third category (Pneumonia) was added to the dataset. In fact, pneumonia is a medical condition that affects the respiratory system and lungs in particular. Therefore, the model faces difficulty in distinguishing between these two similar categories (COVID-19, Pneumonia). As mentioned earlier, the proposed model showed high efficiency in distinguishing between these two categories with high accuracy (95.51%). The efficiency of the proposed model was also tested in distinguishing between the two categories (COVID-19, Pneumonia) by conducting several tests on the dataset. The accuracy was reported by 98.95%. Fig. 4 and Fig. 5 show the confusion matrices for the two datasets of two and three classes, in which (FP, FN, TP, TN) were calculated for the two groups. Table 5 displays the results. The error rates were close and very small for the three classes, a finding which indicates the efficiency of the proposed model in differentiating the three classes perfectly. The proposed model proved its efficiency in diagnosing the research categories, as an accuracy of 98.86% was recorded for the two-category dataset. This finding exceeds the most similar study (mentioned in Table 6 ) which recorded accuracy of 98.08% on a two-category dataset. However, the number of images used in our study exceeded the number of pictures in [19] as shown in Table 6 . Regarding the three-category dataset, the proposed model also proved its efficiency in distinguishing these categories, especially the COVID-19 and pneumonia. The distinction between these two categories is important because they affect the respiratory system and cause similar phenotypic changes. An accuracy of 95.51% was recorded for this dataset. It exceeds the findings of similar studies mentioned in Table 6 . Deep neural networks have proven to be efficient in diagnosing respiratory diseases through the chest radiography. This study proposed a model for diagnosing the COVID-19 through a transfer learning strategy. The CCBlock and VGG-16 were trained by ImageNet. Excellent results were obtained, showing the definitive diagnosis of the COVID-19. The experiments indicated that that the proposed model was highly efficient in diagnosing the COVID-19 with an accuracy of 98.86% for two categories (COVID-19, Normal) and an accuracy of 95.51% for three categories (COVID-19, Normal, Pneumonia). The results point out that the proposed model can help radiologists make better diagnosis decisions. Despite the high accuracy of computer-aided diagnosis, laboratory tests such as PCR cannot be dispensed with. However, these results can be employed to assist and support laboratory results. In the future, if sufficient data are available, deep neural networks can be trained from the beginning and can yield better results without any need for a transfer learning strategy. A Novel Coronavirus from Patients with Pneumonia in China Early Transmission Dynamics in Wuhan, China, of Novel Coronavirus-Infected Pneumonia New SARS-like virus in China triggers alarm Detection of 2019 novel coronavirus (2019-nCoV) by real-time RT-PCR Coronavirus Infections-More Than Just the Common Cold World Health Organization declares global emergency: A review of the 2019 novel coronavirus (COVID-19) Clinical features of patients infected with 2019 novel coronavirus in Wuhan Coronavirus: covid-19 has killed more people than SARS and MERS combined, despite lower case fatality rate Detection of SARS-CoV-2 in Different Types of Clinical Specimens Imaging Profile of the COVID-19 Infection: Radiologic Findings and Literature Review Correlation of Chest CT and RT-PCR Testing in Coronavirus Disease 2019 (COVID-19) in China: A Report of 1014 Cases Contour-aware multi-label chest X-ray organ segmentation Medical Image Enhancement Using Histogram Processing and Feature Extraction for Cancer Classification Automated invasive ductal carcinoma detection based using deep transfer learning with whole-slide images Convolutional neural networks for multi-class brain disease detection using MRI images Covid-19: automatic detection from X-ray images utilizing transfer learning with convolutional neural networks Automated detection of COVID-19 cases using deep neural networks with X-ray images COVID-Net: A Tailored Deep Convolutional Neural Network Design for Detection of COVID-19 Cases from Chest X-Ray Images Mohamed Esmail Karar. COVIDX-Net: A Framework of Deep Learning Classifiers to Diagnose COVID-19 in X-Ray Images Automatic Detection of Coronavirus Disease (COVID-19) Using Xray Images and Deep Convolutional Neural Networks Detection of coronavirus disease (covid-19) based on deep features and support vector machine A Deep Convolutional Neural Network for COVID-19 Detection Using Chest X-Rays Deep Learning-based Detection for COVID-19 from Chest CT using Weak Label A deep learning algorithm using CT images to screen for Corona Virus Disease (COVID-19) Deep Learning System to Screen Coronavirus Disease Deep learning Enables Accurate Diagnosis of Novel Coronavirus (COVID-19) with CT images COVID-19 image data COVID-19 X rays A survey of transfer learning What makes ImageNet good for transfer learning ImageNet Large Scale Visual Recognition Challenge Very Deep Convolutional Networks for Large-Scale Image Recognition It was impossible to complete this work of research without the participation and assistance of so many people whose names may not all be mentioned. Their contributions are sincerely appreciated and gratefully acknowledged. However, the group would like to express their deepest appreciation and indebtedness particularly to Dr. Reza Monsefi, Dr. Abedin Vahedian, Dr. Kamaledin Ghiasi-Shirazi, and Dr. Ahad Harati for their endless support, kindness, and understanding spirits during our case presentation. Our utmost gratitude goes to all relatives, friends, and all of those who shared their support either morally and physically. Above all, to God Almighty, the author of knowledge and wisdom, for his countless love. Thank you. The authors declare that they have no conflict of interest.