| Literature DB >> 36262134 |
AbdAlRahman Odeh1, Ayah Alomar1, Shadi Aljawarneh1.
Abstract
COVID-19 is a widespread deadly virus that directly affects the human lungs. The spread of COVID-19 did not stop at humans but also reached animals, so it was necessary to limit it is spread and diagnose cases quickly by applying a quarantine to the infected people. Recently x-ray lung images are used to determine the infection and from here the idea of this research came to use deep learning techniques to analyze x-ray lung images publicly available on Kaggle to possibly detect COVID-19 infection. In this article, we have proposed a method to possibly detect the COVID-19 by analyzing the X-ray images and applying a number of deep learning pre-trained models such as InceptionV3, DenseNet121, ResNet50, and VGG16, and the results are compared to determine the best performance model and accuracy with the least loss for our dataset. Our evaluation results showed that the best performing model for our dataset is ResNet50 with accuracies of 99.99%, 99.50%, and 99.44% for training, validation, and testing respectively followed by DenseNet121, InceptionV3, and finally VGG16.Entities:
Keywords: COVID-19; Classification; Deep learning; Supervised learning; Transfer learning
Year: 2022 PMID: 36262134 PMCID: PMC9575860 DOI: 10.7717/peerj-cs.1082
Source DB: PubMed Journal: PeerJ Comput Sci ISSN: 2376-5992
Figure 1Countries with the most COVID-19 cases as of February 8, 2021.
Figure 2Methodology overview.
Original dataset distribution.
| Class | Dataset 1 | Dataset 2 |
|---|---|---|
| Normal | 10,192 | 711 |
| Lung opacity | 6,012 | – |
| Pneumonia | 1,345 | 711 |
| COVID | 3,616 | 711 |
| Total | 21,178 | 2,133 |
Distribution of data after filtering.
| Class | Dataset 1 | Dataset 2 | Full dataset |
|---|---|---|---|
| Normal | 10,192 | 711 | 10,903 |
| COVID | 3,616 | 711 | 4,327 |
| Total | 13,808 | 1,422 | 15,230 |
Distribution of data after splitting.
| Class | Dataset 1 | Dataset 2 | Full dataset |
|---|---|---|---|
| Normal | 10,192 | 711 | 10,903 |
| Class | Training | Validation | Testing |
| Normal | 5,000 | 200 | 626 |
| COVID | 3,500 | 200 | 626 |
| Total | 8,500 | 400 | 1,252 |
Expirement settings.
| Parameter | Value |
|---|---|
| Learning rate | 0.001/0.0001 |
| Decay | Yes/No |
| Dropout percentage | 0.5/0.2 |
| Batch size | 128/64/32 |
Figure 3Environment configurations.
VGG resutls.
| Model | Training accuracy (%) | Training loss | Validation accuracy (%) | Validation loss | Testing accuracy (%) | Testing loss |
|---|---|---|---|---|---|---|
| VGG16_0.001_WD_0.5_64 | 98.93 | 0.03 | 98 | 0.05 | 97.28 | 0.09 |
| VGG16_0.001_WD_0.2_64 | 98.28 | 0.05 | 98.75 | 0.05 | 96.88 | 0.1 |
| VGG16_0.001_ND_0.5_64 | 97.27 | 0.09 | 97.25 | 0.09 | 96.65 | 0.1 |
| VGG16_0.001_WD_0.5_64 | 98.66 | 0.04 | 98.00 | 0.04 | 97.60 | 0.09 |
| VGG16_0.0001_ND_0.2_64 | 99.05 | 0.04 | 97.75 | 0.08 | 97.28 | 0.09 |
| VGG16_0.0001_WD_0.2_64 | 99.16 | 0.04 | 97.50 | 0.07 | 97.04 | 0.11 |
| VGG16_0.0001_ND_0.5_64 | 99.75 | 0.01 | 97.50 | 0.08 | 97.52 | 0.09 |
| VGG16_0.0001_WD_0.5_64 | 99.06 | 0.03 | 97.25 | 0.06 | 98.00 | 0.07 |
| VGG16_0.0001_WD_0.5_32 | 98.21 | 0.06 | 97.75 | 0.09 | 97.20 | 0.09 |
ResNet50 results.
| Model | Training accuracy (%) | Training loss | Validation accuracy (%) | Validation loss | Testing accuracy (%) | Testing loss |
|---|---|---|---|---|---|---|
| ResNet_0.001_ND_0.2_64 | 99.62 | 0.01 | 99 | 0.04 | 98.16 | 0.11 |
| ResNet_0.001_WD_0.2_64 | 99.16 | 0.02 | 99.25 | 0.03 | 98.40 | 0.09 |
| ResNet_0.001_ND_0.5_64 | 99.42 | 0.02 | 98.75 | 0.03 | 98.80 | 0.08 |
| ResNet_0.001_WD_0.5_64 | 99.99 | 0 | 99.50 | 0.01 | 98.88 | 0.06 |
| ResNet_0.0001_ND_0.2_64 | 99.76 | 0.01 | 100 | 0.01 | 98.88 | 0.03 |
| ResNet_0.0001_WD_0.2_64 | 99.80 | 0.01 | 99.50 | 0.02 | 99.12 | 0.03 |
| ResNet_0.0001_ND_0.5_64 | 99.56 | 0.01 | 99.00 | 0.03 | 99.12 | 0.03 |
| ResNet_0.0001_WD_0.5_64 | 99.95 | 0 | 99.75 | 0.01 | 98.96 | 0.04 |
| ResNet_0.0001_WD_0.2_32 | 99.99 | 0 | 99.50 | 0.02 | 99.44 | 0.02 |
InceptionV3 results.
| Model | Training accuracy (%) | Training loss | Validation accuracy (%) | Validation loss | Testing accuracy (%) | Testing loss |
|---|---|---|---|---|---|---|
| InceptionV3_0.001_ND_0.2_64 | 99.34 | 0.02 | 99 | 0.05 | 98.56 | 0.04 |
| InceptionV3_0.001_WD_0.2_64 | 99.12 | 0.02 | 99.25 | 0.03 | 98.16 | 0.07 |
| InceptionV3_0.001_ND_0.5_64 | 98.81 | 0.04 | 97.50 | 0.08 | 94.33 | 0.2 |
| InceptionV3_0.001_WD_0.5_64 | 99.59 | 0.01 | 98 | 0.05 | 98.40 | 0.05 |
| InceptionV3_0.0001_ND_0.2_64 | 99.96 | 0 | 99.25 | 0.03 | 98.16 | 0.06 |
| InceptionV3_0.0001_WD_0.2_64 | 99.86 | 0 | 99 | 0.03 | 98.24 | 0.06 |
| InceptionV3_0.0001_ND_0.5_64 | 99.86 | 0.01 | 98.50 | 0.03 | 98 | 0.06 |
| InceptionV3_0.0001_WD_0.5_64 | 99.89 | 0.01 | 99.25 | 0.03 | 98.56 | 0.05 |
| InceptionV3_0.0001_WD_0.5_32 | 99.34 | 0.02 | 99.50 | 0.02 | 98.96 | 0.04 |
DenseNet121 results.
| Model | Training accuracy (%) | Training loss | Validation accuracy (%) | Validation loss | Testing accuracy (%) | Testing loss |
|---|---|---|---|---|---|---|
| DenseNet_0.001_ND_0.2_64 | 99.92 | 0 | 99.50 | 0.01 | 99.12 | 0.03 |
| DenseNet_0.001_WD_0.2_64 | 99.54 | 0.01 | 99.50 | 0.04 | 98.24 | 0.05 |
| DenseNet_0.001_ND_0.5_64 | 99.99 | 0 | 99.50 | 0.02 | 99.44 | 0.02 |
| DenseNet_0.001_WD_0.5_64 | 99.22 | 0.02 | 99.25 | 0.04 | 98.80 | 0.05 |
| DenseNet_0.001_ND_0.5_32 | 99.24 | 0.02 | 99.50 | 0.01 | 98.56 | 0.09 |
| DenseNet_0.001_ND_0.5_128 | 99.69 | 0.01 | 99.50 | 0.02 | 98.72 | 0.1 |
| DenseNet_0.0001_ND_0.2_64 | 99.94 | 0 | 99.75 | 0 | 99.28 | 0.03 |
| DenseNet_0.0001_WD_0.2_64 | 99.93 | 0 | 99.50 | 0.01 | 99.36 | 0.02 |
Best set of hyper parameters.
| Model | Learning rate | Decay (W/N) | Dropout | Batch size |
|---|---|---|---|---|
| VGG16 | 0.0001 | W | 0.5 | 64 |
| ResNet50 | 0.0001 | W | 0.5 | 32 |
| InceptionV3 | 0.0001 | W | 0.5 | 32 |
| DenseNet121 | 0.0001 | W | 0.2 | 64 |
Comparison of best performance models.
| Model | Training accuracy (%) | Training loss | Validation accuracy (%) | Validation loss | Testing accuracy (%) | Testing loss |
|---|---|---|---|---|---|---|
| VGG16_0.0001_WD_0.5_64 | 99.06 | 0.03 | 97.25 | 0.06 | 98.00 | 0.07 |
| ResNet_0.0001_WD_0.2_32 | 99.99 | 0 | 99.50 | 0.02 | 99.44 | 0.02 |
| InceptionV3_0.0001_WD_0.5_32 | 99.34 | 0.02 | 99.50 | 0.02 | 98.96 | 0.04 |
| DenseNet_0.0001_WD_0.2_64 | 99.93 | 0 | 99.50 | 0.01 | 99.36 | 0.02 |
Figure 4VGG16 results where sub-figure (A) represents the learning curve of the model, while sub-figure (B) illustrates the confusion matrix on the testing data.
Figure 5ResNet50 results where sub-figure (A) represents the learning curve of the model, while sub-figure (B) illustrates the confusion matrix on the testing data.
Figure 7DenseNet121 results where sub-figure (A) represents the learning curve of the model, while sub-figure (B) illustrates the confusion matrix on the testing data.
Comparison with previous work.
| Paper | Dataset | Models | Best result (Accuracy) |
|---|---|---|---|
|
| COVID-19 and Pneumonia x-rays | ResNet18 | DenseNet (96.43%) |
| AlexNet | |||
| DenseNet | |||
| VGG16 | |||
|
| COVID19-CT | VGG16 | VGG16 (89%) |
| ResNet50 | |||
| InceptionV3 | |||
|
| COVID chest Xray | 2D CNN | Training ACC: 99% |
| Validation ACC: 98.3% | |||
|
| BIMCV- COVID19+ | EfficientNetB1 | EfficientNetB1 (96.3%) |
| NasNetMobile | |||
| MobileNetV2 | |||
|
| Two datasets | MobileNetV2 | |
| Xception | |||
| ResNet50V2 | Dataset 1: | ||
| DenseNet121 | DenseNet121 (97%) | ||
| inceptionResNetV2 | Dataset 2: | ||
| VGG19 | MobileNetV2 (85%) | ||
| NASNetMobile | |||
| Inceptionv3 | |||
|
| COVID-19 patients x-rays | Logistic Regression | SVM (96%) |
| SVM | |||
| Present study | COVID-19 radiography database | VGG16 | ResNet50 |
| ResNet50 | Training ACC: 99.99% | ||
| InceptionV3 | Validation ACC: 99.50% | ||
| DenseNet121 | Testing ACC: 99.44% |
Figure 8Resource exhausted error.