Deep Convolutional Neural Networks (CNN) for COVID-19
classification in chest X-ray images with Explainable
Artificial Intelligence (XAI)
Lessage Xavier 1, Mahmoudi Saïd 1, Mahmoudi Sidi Ahmed 1, Sohaib Laraba 1, Olivier
Debauche 1, Mohammed Amin Belarbi 1
1 University of Mons, Computer Sciences, Mons, Belgium
Keywords: x-ray analysis, classification, convolutional neural networks, covid-19.
The latest advances in machine learning and in particular with convolutional neurons (CNN)
have proven more than once their great accuracy in the detection of diseases.
In this paper, we present a new approach for COVID-19 detection from chest X-ray images
using Deep Learning algorithms. An efficient process consisting of techniques of transfer
learning and a fine-tuning from pre-trained CNN models (InceptionV3, VGG16, MobileNet,
EfficientNet, etc.) is proposed. A comparison of different architectures shows that VGG16 and
MobileNet provide the highest scores: 97.5% and 99.3% of accuracy.
Experimentations have been conducted using an anonymized database from an Italian hospital
thanks to a retrospective study. It is composed of three classes (normal, COVID-19, other
pathologies) with a total number of 2905 images.
The goal of the proposed method consists of the separation of X-ray images into two or three
categories by selecting and adapting the best CNN architecture. The classifier should be able to
identify two (normal, COVID-19) or three classes (normal, COVID-19, other pathologies).
The dataset used was randomly splitted into three parts (70% for training, 20% for validation,
and 10% for test). We used data augmentation techniques to artificially increase the dataset and
so significantly improve results accuracy.
We implemented a pre-trained architecture on ImageNet with several modifications such as :
reduction of the number of classes in the last layer from 1000 to 3, integration of 5 dense layers
to fine-tune the weights in a progressive way. During the training process, we used the training
and validation datasets. Afterwards, we achieved our model test on an independant test dataset
whose images were not seen by the neural network.
We evaluated six architectures (VGG16, MobileNet, Xception, InceptionV3, EfficientNetB0,
DenseNet169) with the best parameters possible and we constated that the VGG16 and
MobileNet architectures were more efficient.
In order to be able to explain the decision taken by the CNN, we used a technique to visualise
the pixels responsible for the classification. We opted for the GradCAM method which is
frequently used in the domain of Explainable Artificial Intelligence (XAI) but there are many
Experiments were executed on a Linux cluster node with 32 CPU cores using a single NVIDIA
GeForce GTX 980 with 4GB memory. Keras 2 with Tensorflow 1.8 backend was used as a deep
The analysis of Table 1 shows that MobileNet and VGG16 are the best models in terms of
accuracy with the highest scores: 99.3% and 98.7% of accuracy respectively, 98.7% and 96.3%
of sensitivity respectively, and 98.7% of specificity for both models.
Table 1: Comparison of models
For other architectures, the scores are acceptable but it is important to note that the number of
false negatives is much higher.
In Figure 1 below, shown pixels responsible for the classification thanks to this temperature
curve on the x-ray image and in particular in this case of COVID-19 suspicion.
Figure 1: VGG16 explanation with GradCAM method
Our approach based on in-depth learning is very promising for detecting pathologies, based on
chest X-ray images. We recommend VGG16 and MobileNet that have achieved the best results
in terms of precision, sensitivity and specificity.
Further investigations will be done using other datasets (and more specifically with CT images)
in combination with various visualization methods.
 Hemdan, E. E. D., Shouman, M. A., Karar, M. E. : Covidx-net: A framework of deep learning
classifiers to diagnose covid-19 in x-ray images (2020) Available via ArXiv.
https://arxiv.org/abs/2003.11055. Cited 12 Aug 2020.
 Apostolopoulos, I. D., Mpesiana, T. A. : Covid-19: automatic detection from x-ray images
utilizing transfer learning with convolutional neural networks. Physical and Engineering Sciences
in Medicine 43 635—640 (2020), doi: 10.1007/s13246-020-00865-4.