1. Introduction
Nowadays, medical image processing is an essential component in many medical research fields. From different types of medical images, computerized tomography (CT) is widely used in medical diagnosis and prognosis, as it provides valuable medical supplementary information with inexpensive and popular nature. It is an imaging method that uses x-rays to create cross-sectional pictures (slices) of a body organ and its structure. CT imaging has the advantage of eliminating overlapping structures and making the internal anatomy more apparent. Therefore, it can be used to identify disease or injury within various regions of the body. For example, brain CT images can be used to locate injuries, tumors, hemorrhage, and other conditions in head, while lungs CT images reveal the presence of tumors, pulmonary embolisms (blood clots), excess fluid, and other conditions such as emphysema or pneumonia in lungs.
In this paper, we do a focus on lungs CT images, with the aim to classify different diseases in them. This will be done via one of the most powerful tools in deep learning, known as convolutional neural network (CNN). Noticing the developments in CT and many other medical Imaging techniques, using convolutional neural networks for medical image classification is a very interesting research topic.
On the other hand, the 2019 novel coronavirus which was first recognized in Wuhan city of Hubei province of China and spread quickly and exponentially beyond the Chinese borders [
1], has some common symptoms such as cough, shortness of breath, chest pain, and diarrhea [
2]. Due to the vital circumstance related to the coronavirus pandemic, it is essential to recognize early differentiation between patients with and without the disease [
3]. Currently, reverse-transcription polymerase chain reaction (RT-PCR) is the standard and straightforward test for diagnosis of covid-19 infection [
4]. In practice, it may take more than 24 hours to achieve a test result [
5].
Computed tomography (CT) is a widely suggested tool to be combined as a clinical test besides PCR test [
6] for diagnosing the existence and severity of coronavirus symptoms [
7]. Although X-ray images can also be used as the second imaging tool in COVID-19 diagnosis (such as studies done in [
8,
9,
10,
11,
12]), using CT besides the RT-PCR test has many advantages. For example, peripheral areas of ground glass which are a hallmark of early COVID-19 can be detected in CT images while can easily be missed in chest X-rays [
13].
After CT scanning, the chest CT image should be interpreted by a radiologist to detect the symptoms. This might be a boring action if several patients are available and may cause unintentional mistakes. Here, machine learning systems trained based on these images can be a great help to ease medical decisions and save time. Currently, there are many successful deep models developed to perform classification and segmentation tasks on CT images and can diagnose the abnormalities in images without radiologist intervention.
As an example, [
14] designed an optimized convolutional neural network to classify patients into the infected and non-infected categories based on CT images. In another attempt, [
15] proposed a novel deep convolutional algorithm based on multi-objective differential evolution (MODE) to classify COVID-19 infected patients from non-infected ones. Also, authors of [
16] proposed an architecture based on the DenseNet model to classify lung CT images into COVID-19 and health classes where misclassification cases in the test dataset were assessed by a radiologist. Despite the excellent performance of these models in classifying lung CT images and detecting COVID-19 symptoms in patients, they give no information about other abnormalities that can be diagnosed using these images.
In a different research done in [
17], a fully automatic deep learning system with transfer learning approach was proposed for diagnosing and prognosis of COVID-19 disease. This deep model was first trained using CT images with lung cancer, then, COVID-19 patients were enrolled to re-train the network. The trained network get externally validated on 4 large multi-regional COVID-19 datasets. Although this research has achieved interesting results, its training has not done using COVID-19 CT images.
There are some successful researches that have tried to distinguish between COVID-19 and other lung diseases. The work done in [
18] used patients with positive RT-PCR tests as samples from the COVID-19 class and patients with community-acquired pneumonia (CAP) as samples of the other class and proposed a 3D convolutional model to classify these two classes. Also, Xu et al. [
19] proposed a deep learning system to screen CT images in three steps. First, abnormal regions were segmented using a 3D deep learning model, then, the segmented images were categorized into the three COVID-19, Influenza-A viral pneumonia, and healthy classes by the ResNet model. Finally, the infection type and total confidence score of each CT image were calculated with Noisy-or Bayesian function.
In a more general and interesting research, Abbasian et al. in [
20] used ten different deep CNNs to classify chest CT slides of patients into three classes.Their research aimed to compare the capabilities of different deep networks in confronting pulmonary infections. Their study showed that the ResNet-101 and Xception networks achieved the best performance; both had an AUC of
with a sensitivity of
and
, respectively, while the performance of radiologists was moderate with an AUC of
and sensitivity of
. The authors concluded that deep CNNs can be considered a high-performance technique in diagnosing lung infections and can be used as a collaborator in hospitals. This was an expected conclusion as deep networks have proved their proficiency in many learning areas, and our proposed network in this research is a step towards this direction.
Here, it worth mentioning that although the diagnosis of COVID-19 is very critical, the importance of identifying other lung diseases such as lung cancer should not be ignored. Based on the WHO reporting, lung cancer was the prominent reason of death worldwide in recent years [
21]. Even though the risk of other infections in patients who have lung cancer is still to be determined [
22], due to inherent characteristics and care needs, these patients are more vulnerable to other infections than others. In addition, ground-glass opacities or patchy consolidations, which are the most frequent indications of COVID-19 in chest CT images [
23] may also appear in the early stages of radiotherapy pneumonitis (RP) of patients with lung cancer and are not easily distinguishable from each other.
The research done in [
24] was the first study that used multi-classification deep learning model for diagnosing COVID-19, pneumonia, and lung cancer diseases. In this research, the authors had no access to a dataset that included images from these classes, and CT images of different classes were collected from different public sources. They considered five deep architectures to classify these public chest X-ray and CT datasets, and based on their experiments; the VGG19+CNN model achieved the best result. Although their work was a pioneer and valuable one, it is doubtful whether images collected from different sources and imaging devices can form a compatible and reliable dataset together. In other words, images collected from each medical imaging device comprise some characteristics related to that device that might interfere with learning algorithms. Due to the experiments done in [
25], even a single-source dataset seems to have a solid build-in bias. Also, based on the research done in [
26], in case there is any bias in the collected images such as corner labels and typical characteristics of a medical device, the classification model might easily learn to recognize these biases in different classes rather than focusing on the main features separating the different classes.
Therefore, based on all mentioned above, in this paper, we aim to tackle the worldwide challenge of classifying chest CT images using a lightweight and fast deep CNN-based architecture trained on an unbiased dataset. The proposed CNN architecture is an adaptive version of the one developed in [
27] for classifying CT brain images. To the best of our knowledge, our proposed method (shown generally in
Figure 1) is the second supervised deep learning model in the area of multi-class CT chest images classification (after the work done in [
24]) where COVID-19, lung cancer, and normal images are included (see samples in
Figure 2). However, one of the important points about our work is that all the 10715 chest CT images were collected from one imaging device with same device configuration to limit the risk of bias in images and achieve a reliable dataset.
In short, the main contributions of this work are as follows
A novel lightweight CNN-based model with Adaptive Feature EXtraction layers (AFEX-Net) is suggested for the classification of chest CT images into three classes.
The proposed network has an adaptive pooling strategy with adaptive activation functions, increasing model robustness.
The proposed network has few parameters compared to other CNN models used in this area (e.g. ResNet50 and VGG16) with faster training while preserving the accuracy. The low computational time of the proposed model makes it highly attractive in the clinic.
The proposed model has been evaluated on collected chest CT images from one origin to limit the learning risk of bias.
Hence, three significant properties of the proposed network (low number of parameters, adaptivity, and robustness) make it an easy to train and efficient network to be used with clinical data.
The rest of this article is organized as follows: In
Section 2, we have explained a) the preprocessing step used to make an unbiased dataset (Sub
Section 2.1), and b) the proposed deep CNN network in details (Sub
Section 2.2).
Section 3 provides the obtained results from the proposed network and discusses its performance compared to other efficient networks. Finally, conclusion is presented in
Section 4.
Figure 1.
Overview of the framework of the proposed method. It has been investigated on two different datasets, the first one (which is a collected dataset by authors) has three COVID-19, Cancer and Normal classes while the the second one has only two COVID-19 and Normal classes.
Figure 1.
Overview of the framework of the proposed method. It has been investigated on two different datasets, the first one (which is a collected dataset by authors) has three COVID-19, Cancer and Normal classes while the the second one has only two COVID-19 and Normal classes.
Figure 2.
The example of CT chest images from subjects showing cov COVID-19, can Cancer and no Normal images.
Figure 2.
The example of CT chest images from subjects showing cov COVID-19, can Cancer and no Normal images.
Figure 3.
Preprocessing steps done on CT images.
Figure 3.
Preprocessing steps done on CT images.
Figure 4.
Framework of AFEX-Net for classification between COVID-19, Cancer and Normal CT lung images (BN:Batch Normalization, Conv:Convolution layer, A-Pool:Adaptive Pooling layer, AAF:Adaptive Activation Function, D:dropout, F:flatten, FC:Fully Connected layer, S:Softmax classifier).
Figure 4.
Framework of AFEX-Net for classification between COVID-19, Cancer and Normal CT lung images (BN:Batch Normalization, Conv:Convolution layer, A-Pool:Adaptive Pooling layer, AAF:Adaptive Activation Function, D:dropout, F:flatten, FC:Fully Connected layer, S:Softmax classifier).
Figure 5.
The training accuracy (left) and training loss (right) comparison in the four utilized models on the CCs dataset. The horizontal axis shows the number of epochs while the vertical axis shows the model accuracy and loss in left and right plots, respectively.
Figure 5.
The training accuracy (left) and training loss (right) comparison in the four utilized models on the CCs dataset. The horizontal axis shows the number of epochs while the vertical axis shows the model accuracy and loss in left and right plots, respectively.
Figure 6.
Visual comparison among the average performance of four models on the test set of CCs dataset.
Figure 6.
Visual comparison among the average performance of four models on the test set of CCs dataset.
Figure 7.
The training accuracy (left) and training loss (right) comparison of AFEX-Net and AFEX-Net* on the COVID-CTset dataset. The horizontal axis shows the number of epochs while the vertical axis shows the model accuracy and loss in left and right plots, respectively.
Figure 7.
The training accuracy (left) and training loss (right) comparison of AFEX-Net and AFEX-Net* on the COVID-CTset dataset. The horizontal axis shows the number of epochs while the vertical axis shows the model accuracy and loss in left and right plots, respectively.
Figure 8.
Visual comparison among the average performance of six models on the test set of COVID-CTset dataset.
Figure 8.
Visual comparison among the average performance of six models on the test set of COVID-CTset dataset.
Figure 9.
Confusion matrices for the four trained networks on the CCs dataset.
Figure 9.
Confusion matrices for the four trained networks on the CCs dataset.
Figure 10.
Confusion matrices for the two trained networks on the COVID-CTset dataset.
Figure 10.
Confusion matrices for the two trained networks on the COVID-CTset dataset.
Table 1.
CNN Architecture Used in AFEX-Net (BN: Batch Normalization, Conv: Convolution layer, A-Pool: Adaptive Pooling layer, AAF: Adaptive Activation Function, FC: Fully Connected layer).
Table 1.
CNN Architecture Used in AFEX-Net (BN: Batch Normalization, Conv: Convolution layer, A-Pool: Adaptive Pooling layer, AAF: Adaptive Activation Function, FC: Fully Connected layer).
Layer |
Type |
Filter-size |
Strides |
Filter |
Output Shape |
Parameters |
1 |
BN |
- |
- |
- |
( 200, 200, 1) |
4 |
2 |
Conv |
|
(4,4) |
6 |
( 48, 48, 96) |
11712 |
3 |
AAF |
- |
- |
- |
( 48,48, 96) |
221184 |
4 |
A-pool |
|
(3,3) |
- |
( 16,16, 96) |
24576 |
5 |
BN |
- |
- |
- |
( 16,16, 96) |
384 |
6 |
Conv |
|
(2,2) |
256 |
(8,8, 256) |
614656 |
7 |
AAF |
- |
- |
- |
( 8, 8, 256) |
16384 |
8 |
A-pool |
|
(3,3) |
- |
( 8, 8, 256) |
2304 |
9 |
BN |
- |
- |
- |
( 4, 4, 256) |
1024 |
10 |
Conv. |
|
(3,3) |
384 |
( 4, 4, 384) |
885120 |
11 |
Conv |
|
(2,2) |
256 |
(2, 2, 256) |
884992 |
12 |
AAF |
- |
- |
- |
( 2,2, 256) |
1024 |
13 |
A-pool |
|
(3,3) |
- |
(1, 1, 256) |
256 |
14 |
BN |
- |
- |
- |
( 1, 1, 256) |
1024 |
15 |
Conv |
|
(2,2) |
192 |
(1, 1, 192) |
1769664 |
16 |
dropout |
|
|
|
1, 1, 192 |
0 |
17 |
Conv |
|
(2,2) |
96 |
(1, 1, 96) |
18528 |
18 |
dropout |
|
|
|
(1, 1, 96) |
0 |
19 |
Flatten |
|
|
|
(96) |
0 |
20 |
FC |
- |
- |
- |
(3) |
291 |
21 |
Softmax |
- |
- |
- |
(3) |
0 |
Total params: 4,453,127; Trainable params:4,451,909; Non-trainable params: 1,218. |
Table 2.
Comparing the three AFEX-Net, ResNet50 and VGG16 convolutional networks based on the number of parameters and training time.
Table 2.
Comparing the three AFEX-Net, ResNet50 and VGG16 convolutional networks based on the number of parameters and training time.
Model |
trainable |
non-trainable |
Total |
Training Time |
Epochs |
AFEX-Net |
4,451,909 |
1,218 |
4,453,127 |
45m |
100 |
ResNet50 |
23,534,467 |
53,120 |
23,587,587 |
1h:47m |
100 |
VGG16 |
107,008,707 |
0 |
107,008,707 |
2h:16m |
100 |
Table 3.
Models’ training parameters for CC dataset.
Table 3.
Models’ training parameters for CC dataset.
Model |
Optimizer |
Learning rate |
Epochs |
AFEX-Net |
Adam |
|
100 |
ResNet50 |
Adam |
|
100 |
VGG16 |
Adam |
|
100 |
Table 4.
Average of the obtained results from the four models on test data of CCs dataset.
Table 4.
Average of the obtained results from the four models on test data of CCs dataset.
Model |
Class |
Sensitivity |
Specificity |
Precision |
Overall loss |
Overall Accuracy |
AFEX-Net |
COVID-19 |
99.89 |
99.80 |
99.79 |
1.04 ± 0.18 |
99.71 ± 0.05 |
|
Cancer |
99.53 |
99.93 |
99.81 |
|
|
|
Normal |
100 |
99.96 |
99.96 |
|
|
|
Cancer |
98.78 |
99.76 |
99.34 |
|
|
|
Normal |
99.89 |
100 |
100 |
|
|
ResNet50 |
COVID-19 |
88.65 |
97.45 |
97.59 |
24.31 ± 2.62 |
92.81 ± 0.75 |
|
Cancer |
94.2 |
91.39 |
74.6 |
|
|
|
Normal |
96 |
99.49 |
98.46 |
|
|
VGG16 |
COVID-19 |
99.74 |
99.65 |
99.64 |
2.6 ± 0.18 |
99.50 ± 0.05 |
|
Cancer |
99.25 |
100 |
100 |
|
|
|
Normal |
99.89 |
99.76 |
99.28 |
|
|
Table 5.
Average of the obtained results from the six models on test data of COVID-CTset dataset.
Table 5.
Average of the obtained results from the six models on test data of COVID-CTset dataset.
Model |
Overall Accuracy |
Sensitivity |
Specificity |
Precision |
AFEX-Net |
99.25 |
97.69 |
99.79 |
98.83 |
AFEX-Net* |
98.95 |
96.50 |
99.43 |
96.78 |
ResNet50V2 |
97.52 |
69.44 |
99.87 |
97.98 |
Xception |
96.55 |
61.71 |
99.88 |
98.02 |
[42] |
98.49 |
80.91 |
99.69 |
94.77 |
[47] |
85.4 |
86.49 |
84.36 |
83.9 |