Convolutional neural network for diagnosis of viral pneumonia and COVID-19 alike diseases

From statwiki
Jump to: navigation, search

Presented by

Kun Wang


In this paper, the authors utilized Pre-trained (through transfer learning) AlexNet model for detection of pneumonia in CT Scan images. Then they carried out 10 k cross validation to estimate the model will perform on unseen dataset. And finally they 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.

Previous Work

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.

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 TensorFlow 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.

The use of AI and CT scans for detection of COVID-19 is provided by Wang, Kang, et al. (2020). 453 CT scan images of confirmed COVID-19 cases of patient diagnosed with viral pneumonia are utilized as dataset. The images are classified into training, testing and validation. The model achieved validation accuracy of 82.9%, sensitivity of 84% and specificity of 80.5% while the external testing result has shown an accuracy of 73.1%, sensitivity of 74% and specificity of 67%.


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.The use of CNN to classify and characterize X-ray images has shown a better accuracy and precision than manual classification by some radiologist.

Model Architecture


Training of models using AlexNet model. AlexNet model contain 5 convolution (CONV) blocks or layers. The first 2 CONV layers are made up of 3 operations which include convolution, max pooling and normalization. Third and fourth layer are made up of only convolution while fifth layer is made up of convolution and max pooling. The last 3 layers are 2 fully connected layers (FCL) and output layer with SoftMax activation function for classification.


The authors trained the models with the entire dataset without cross validation. They 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.


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, The authors utilized a method based on DL and transfer learning approach. They 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, their 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.


Bakator, M., & Radosav, D. (2018). Deep learning and medical diagnosis: A review of literature. Multimodal Technologies and Interaction, 2(3), 47.

Rajaraman, S., Candemir, S., Kim, I., Thoma, G., & Antani, S. (2018). Visualization and interpretation of convolutional neural network predictions in detecting pneumonia in pediatric chest radiographs. Applied Sciences, 8(10), 1715.