| Literature DB >> 33866253 |
Maram Mahmoud A Monshi1, Josiah Poon2, Vera Chung2, Fahad Mahmoud Monshi3.
Abstract
To mitigate the spread of the current coronavirus disease 2019 (COVID-19) pandemic, it is crucial to have an effective screening of infected patients to be isolated and treated. Chest X-Ray (CXR) radiological imaging coupled with Artificial Intelligence (AI) applications, in particular Convolutional Neural Network (CNN), can speed the COVID-19 diagnostic process. In this paper, we optimize the data augmentation and the CNN hyperparameters for detecting COVID-19 from CXRs in terms of validation accuracy. This optimization increases the accuracy of the popular CNN architectures such as the Visual Geometry Group network (VGG-19) and the Residual Neural Network (ResNet-50), by 11.93% and 4.97%, respectively. We then proposed CovidXrayNet model that is based on EfficientNet-B0 and our optimization results. We evaluated CovidXrayNet on two datasets, including our generated balanced COVIDcxr dataset (960 CXRs) and the benchmark COVIDx dataset (15,496 CXRs). With only 30 epochs of training, CovidXrayNet achieves state-of-the-art accuracy of 95.82% on the COVIDx dataset in the three-class classification task (COVID-19, normal or pneumonia). The CovidXRayNet model, the COVIDcxr dataset, and several optimization experiments are publicly available at https://github.com/MaramMonshi/CovidXrayNet.Entities:
Keywords: COVID-19; Chest X-Ray; Convolutional neural network; Data augmentation; Hyperparameters
Mesh:
Year: 2021 PMID: 33866253 PMCID: PMC8048393 DOI: 10.1016/j.compbiomed.2021.104375
Source DB: PubMed Journal: Comput Biol Med ISSN: 0010-4825 Impact factor: 6.698
Dataset of COVID-19 CXR.
| Dataset | Description |
|---|---|
| Figure 1 COVID-19 Chest X-Ray Dataset Initiative | 56 CXR, metadata & clinical notes |
| ActualMed COVID-19 Chest X-Ray Dataset Initiative | 239 CXR, metadata & clinical notes |
| covid-19-ct-cxr | 263 CXR and relevant text |
| COVID-19 image data collection | 654 CXR, metadata & clinical notes |
| COVID-19 radiography database | 219 COVID-19, 1341 normal & 1345 Pneumonia CXR |
| COVIDx | 13917 CXR for training & 1579 CXR for testing |
https://github.com/agchung/Figure1-COVID-chestxray-dataset.
https://github.com/agchung/Actualmed-COVID-chestxray-dataset.
https://github.com/ncbi-nlp/COVID-19-CT-CXR.
https://github.com/ieee8023/covid-chestxray-dataset.
https://www.kaggle.com/tawsifurrahman/covid19-radiography-database.
https://github.com/lindawangg/COVID-Net.
Models for detecting COVID-19 from CXR.
| Classification | Model | Acc(%) | Repositories/Datasets | COVID-19 | Pneumonia | Normal |
|---|---|---|---|---|---|---|
| Binary | COVIDX-Net [ | 90.00 | COVID-19 image data collection | 25 | _ | 25 |
| CovXNet [ | 97.40 | Guangzhou Medical Center in China & Sylhet Medical College in Bangladesh | 305 | _ | 305 | |
| ResNet-50 [ | 98.00 | COVID-19 image data collection & Kaggle | 50 | _ | 50 | |
| DarkCovidNet [ | 98.08 | COVID-19 image data collection & ChestXray-14 | 125 | _ | 500 | |
| Multi-class | VGG-16 [ | 83.68 | COVID-19 image data collection & Radiological Society of North America (RSNA) | 215 | 533 | 500 |
| DarkCovidNet [ | 87.02 | COVID-19 image data collection & ChestXray-14 | 125 | 500 | 500 | |
| CovXNet [ | 90.30 | Guangzhou Medical Center in China & Sylhet Medical College in Bangladesh | 305 | 305-Viral 305-Bacterial | 305 | |
| COVID-Net [ | 93.30 | COVIDx | 53 | 5526 | 8066 | |
| MobileNet-v2 [ | 94.72 | COVID-19 image data collection, Radiological Society of North America (RSNA), Radiopaedia, Italian Society of Medical & Interventional Radiology (SIRM) & Kermany dataset | 224 | 700 | 504 | |
| CNN-SVM [ | 95.33 | COVID-19 image data collection, COVID-19 radiography database & Kermany dataset | 127 | 127 | 127 |
Data augmentation for detecting COVID-19 from CXR.
| Model | Software | Norm. | Size | Flip | Rotate | Zoom | Light | Extra |
|---|---|---|---|---|---|---|---|---|
| VGG-16 [ | Keras, Tenserflow | _ | 220*220 | HORIZ | 15 | 85- | _ | shear transformation |
| 115% | mixup: 0.1 | |||||||
| DarkCovidNet [ | fastai v1, Pytorch | yes | 256*256 | _ | _ | _ | _ | defult values of fastai |
| CovXNet [ | Keras, Tenserflow | yes | uniform | _ | 30 | 0.2 | _ | rescale: 1/255 |
| shift: 0.1 | ||||||||
| COVID-Net [ | Keras, Tenserflow | yes | 480*480 | HORIZ | yes | yes | _ | intensity shift |
| MobileNet-v2 [ | _ | _ | 200*266 | _ | _ | _ | _ | blackground: 1:1.5 |
CNN hyperparameters for detecting COVID-19 from CXR.
| Model | CNN | Pretrained | Optimizer | Learning Rate | Loss Function | Epoch | Batch |
|---|---|---|---|---|---|---|---|
| VGG-16 [ | VGG-16 | yes | Adam | 1e-4 | cross entropy | 100 | 8 |
| DarkCovidNet [ | YOLO DarkNet-19 | 3e-3 | 100 | 32 | |||
| CovXNet [ | CovXNet | 1e-3 | 70 | 128 | |||
| COVID-Net [ | COVID-Net | 2e-4 & lr policy | _ | 22 | 64 | ||
| MobileNet v2 [ | MobileNet v2 | _ | _ | 10 | 64 |
Fig. 1Dataset distribution.
Fig. 2CovidXrayNet structure.
Pipeline for Data Augmentation on CXR. For each independent parameter, we trained ResNet-18 on COVIDcxr for 30 epochs to examine the effects of various transformers on COVID-19 CXR classification.
| Independent Parameter | Resize | Rotate | Zoom | Wrap | Light | Extra | (%) | |||
|---|---|---|---|---|---|---|---|---|---|---|
| Size | Method | Acc | AUC | F1 | ||||||
| 224*224 | crop | 0 | 0 | 0 | 0 | none | 78.12 | 90.84 | 78.04 | |
| pad | 79.68 | 90.66 | 79.39 | |||||||
| squish | 74.47 | 88.63 | 74.47 | |||||||
| 256*256 | crop | 79.16 | 92.12 | 79.12 | ||||||
| pad | 76.04 | 90.62 | 75.55 | |||||||
| squish | 78.12 | 90.15 | 78.22 | |||||||
| crop | 80.72 | 94.42 | 80.65 | |||||||
| pad | 82.81 | 82.86 | ||||||||
| 94.14 | ||||||||||
| 512*512 | crop | 80.72 | 93.35 | 80.78 | ||||||
| pad | 78.64 | 93.22 | 78.62 | |||||||
| squish | 77.08 | 92.67 | 77.22 | |||||||
| 480*480 | squish | 0 | 0 | 0 | 0 | none | 83.85 | 94.14 | 83.95 | |
| 10 | 85.93 | 95.73 | 85.95 | |||||||
| 86.56 | ||||||||||
| 30 | 86.45 | 95.97 | ||||||||
| 50 | 84.89 | 95.72 | 85.03 | |||||||
| 480*480 | squish | 0 | 1 | 0 | 0 | none | 83.85 | 94.14 | 83.95 | |
| 1.3 | 82.29 | 95.77 | 82.37 | |||||||
| 1.4 | 84.37 | 95.60 | 84.45 | |||||||
| 1.5 | 81.25 | 95.29 | 81.21 | |||||||
| 480*480 | squish | 0 | 0 | 0 | 0 | none | 83.85 | 94.14 | 83.95 | |
| 0.1 | 84.37 | 95.36 | 84.42 | |||||||
| 96.33 | ||||||||||
| 0.3 | 84.89 | 84.94 | ||||||||
| 480*480 | squish | 0 | 0 | 0 | 0 | none | 83.85 | 94.14 | 83.95 | |
| 0.1 | 81.77 | 93.12 | 81.93 | |||||||
| 0.2 | 83.85 | 94.34 | 83.91 | |||||||
| 95.10 | ||||||||||
| 0.4 | 82.81 | 95.34 | 82.97 | |||||||
| 0.5 | 84.37 | 84.46 | ||||||||
| 480*480 | squish | 0 | 0 | 0 | 0 | flip | 83.85 | 83.81 | ||
| mixup | 83.33 | 94.88 | 83.29 | |||||||
| erase | 80.72 | 94.11 | 80.91 | |||||||
| 94.14 | ||||||||||
| 480*480 | squish | 20 | 1.2 | 0.2 | 0.3 | flip | 81.77 | 95.70 | 81.69 | |
| 480*480 | squish | 20 | 1.2 | 0.2 | 0.3 | mixup | 82.81 | 95.86 | 82.48 | |
| 480*480 | squish | 20 | 1.2 | 0.2 | 0.3 | flip, norm | 81.77 | 95.70 | 81.69 | |
Fig. 3Visualizing Data Augmentation Effects on CXR. The CXR is for a 25-year-old COVID-19-positive female taken from the COVID-19 image data collection.
Fig. 4Resizing Method. We propose to squish a 480*480 pixel CXR rather than cropping it to maintain important CXR details from the edges of the image.
CNN Architectures on COVIDx and COVIDcxr. We trained the popular CNN architectures on both datasets for 30 epochs using the optimized data augmentation pipeline.
| CNN | Dataset | Acc (%) | AUC (%) | MCC (%) | Precision (%) | Recall (%) | F1 (%) |
|---|---|---|---|---|---|---|---|
| VGG-16 | COVIDcxr | 80.73 | 94.68 | 72.29 | 82.03 | 81.35 | 80.53 |
| VGG-19 | 84.90 | 95.67 | 77.74 | 85.31 | 85.26 | 84.92 | |
| ResNet-18 | 85.94 | 96.72 | 79.40 | 86.84 | 86.31 | 86.14 | |
| ResNet-34 | 79.69 | 94.91 | 70.02 | 80.26 | 80.03 | 79.70 | |
| ResNet-50 | 82.81 | 95.90 | 75.31 | 84.90 | 83.29 | 83.12 | |
| _ | |||||||
| VGG-16 | COVIDx | 93.41 | 98.70 | 87.74 | 94.40 | 89.41 | 91.61 |
| VGG-19 | 93.60 | 98.55 | 88.06 | 95.29 | 85.53 | 89.24 | |
| ResNet-18 | 93.29 | 98.86 | 87.48 | 95.03 | 86.73 | 90.05 | |
| ResNet-34 | 94.74 | 99.10 | 90.19 | 95.85 | 89.95 | 92.53 | |
| ResNet50 | 95.12 | 99.22 | 90.92 | 96.08 | 91.76 | 93.72 | |
| _ |
Optimizing CNN hyperparameters using COVIDcxr. For each independent parameter, we trained several architectures on COVIDcxr to examine the effects of various hyperparameters on the accuracy of COVID-19 CXR classification.
| CNN | Epoch | Batch Size | Loss Function | Acc (%) | MCC (%) | F1 (%) |
|---|---|---|---|---|---|---|
| 10 | 32 | 77.08 | 68.15 | 76.26 | ||
| 20 | 77.60 | 66.71 | 77.43 | |||
| 30 | 80.73 | 72.29 | 80.53 | |||
| 40 | 83.33 | 75.51 | 83.31 | |||
| 16 | 84.38 | 76.61 | 84.27 | |||
| 32 | Label Smoothing | 79.17 | 69.62 | 78.91 | ||
| 10 | 32 | Cross Entropy | 78.65 | 68.38 | 78.89 | |
| 20 | 82.81 | 74.25 | 82.96 | |||
| 30 | 84.90 | 77.74 | 84.92 | |||
| 40 | 84.38 | 76.66 | 84.35 | |||
| 8 | 84.90 | 78.36 | 84.96 | |||
| 16 | 82.81 | 74.90 | 82.74 | |||
| 10 | 81.25 | 73.69 | 81.25 | |||
| 20 | 82.29 | 74.21 | 82.45 | |||
| 40 | 85.42 | 78.16 | 85.37 | |||
| 30 | 8 | 81.25 | 73.56 | 81.39 | ||
| 16 | 82.29 | 74.20 | 82.37 | |||
| 32 | Label Smoothing | 84.38 | 76.95 | 84.46 | ||
| 10 | 32 | 81.25 | 72.10 | 81.20 | ||
| 20 | 81.25 | 71.93 | 80.91 | |||
| 30 | 79.69 | 70.02 | 79.70 | |||
| 40 | 81.25 | 71.94 | 81.23 | |||
| 16 | 85.94 | 79.00 | 85.87 | |||
| 32 | Label Smoothing | 83.85 | 76.08 | 83.85 | ||
| 10 | 32 | 81.77 | 73.18 | 82.09 | ||
| 20 | 84.90 | 77.32 | 84.93 | |||
| 30 | 82.81 | 75.31 | 83.12 | |||
| 40 | 85.42 | 78.12 | 85.45 | |||
| 8 | 86.46 | 80.49 | 86.52 | |||
| 32 | Label Smoothing | 83.85 | 76.21 | 84.05 | ||
| 10 | 32 | Cross Entropy | 83.33 | 75.36 | 83.65 | |
| 20 | 84.38 | 76.67 | 84.41 | |||
| 30 | 88.02 | 82.01 | 88.00 | |||
| 40 | 85.42 | 78.10 | 85.42 | |||
| 8 | 88.02 | 82.06 | 87.89 | |||
| 16 | 86.98 | 80.45 | 86.99 | |||
Optimizing CNN hyperparameters using COVIDx. For each independent parameter, we trained several architectures on COVIDx to examine the effects of various hyperparameters on the accuracy of COVID-19 CXR classification.
| CNN | Epoch | Batch Size | Loss Function | Acc (%) | MCC (%) | F1 (%) |
|---|---|---|---|---|---|---|
| 10 | 32 | 92.08 | 85.20 | 86.99 | ||
| 20 | 93.35 | 87.56 | 90.10 | |||
| 30 | 93.41 | 87.74 | 91.61 | |||
| 40 | 94.24 | 89.25 | 91.99 | |||
| 8 | 93.86 | 88.56 | 91.03 | |||
| 32 | Label Smoothing | 94.05 | 88.88 | 91.35 | ||
| 10 | 32 | 92.53 | 86.04 | 87.29 | ||
| 20 | 93.98 | 88.77 | 91.57 | |||
| 30 | 93.60 | 88.06 | 89.24 | |||
| 40 | 93.29 | 87.46 | 88.72 | |||
| 8 | 94.49 | 89.73 | 92.14 | |||
| 32 | Label Smoothing | 93.79 | 88.40 | 90.10 | ||
| 10 | 32 | 93.10 | 87.08 | 88.43 | ||
| 20 | 93.60 | 88.06 | 90.07 | |||
| 30 | 93.29 | 87.48 | 90.05 | |||
| 40 | 93.86 | 88.53 | 90.87 | |||
| 8 | 94.17 | 89.11 | 91.17 | |||
| 32 | Label Smoothing | 94.30 | 89.35 | 91.58 | ||
| 10 | 32 | 94.05 | 88.89 | 91.41 | ||
| 20 | 94.62 | 89.97 | 93.32 | |||
| 30 | 94.74 | 90.19 | 92.53 | |||
| 40 | 94.43 | 89.63 | 93.38 | |||
| 8 | 94.87 | 90.44 | 92.43 | |||
| 32 | Label Smoothing | 94.62 | 89.96 | 92.50 | ||
| 10 | 32 | 94.93 | 90.55 | 92.62 | ||
| 20 | 94.81 | 90.34 | 93.37 | |||
| 30 | 95.12 | 90.92 | 93.72 | |||
| 40 | 94.81 | 90.35 | 93.14 | |||
| 8 | 93.03 | 87.01 | 91.99 | |||
| 32 | Label Smoothing | 95.12 | 90.91 | 93.36 | ||
| 10 | 32 | Cross Entropy | 95.69 | 91.99 | 94.52 | |
| 20 | 95.19 | 91.02 | 93.38 | |||
| 30 | 95.69 | 92.01 | 95.48 | |||
| 40 | 95.00 | 90.72 | 95.00 | |||
| 8 | 94.68 | 90.16 | 93.25 | |||
| 16 | 95.38 | 91.40 | 94.88 | |||
Comparing our Optimised Data Augmentation Pipeline and CNN Hyperparameters with Benchmark. Both papers used VGG19 and ResNet50 on the COVIDx dataset but with different transformers and hyperparameters.
| CNN | Paper | Parameters (M) | Acc (%) | AUC (%) | MCC (%) | F1 (%) |
|---|---|---|---|---|---|---|
| VGG-19 | COVID-Net [ | 20 | 83.00 | _ | _ | _ |
| ResNet-50 | COVID-Net [ | 25 | 90.60 | _ | _ | _ |
Comparing CovidXrayNet with Benchmark. All models are based on three-class COVID-19 classification. COVID-Net and CovidXrayNet employed the COVIDx dataset.
| Model | Acc (%) | MCC (%) | Precision (%) | Recall (%) | F1 (%) |
|---|---|---|---|---|---|
| DarkCovidNet [ | 87.02 | _ | 89.96 | _ | 87.37 |
| COVID-Net [ | 93.30 | _ | _ | _ | _ |
| MobileNet v2 [ | 93.48 | _ | _ | _ | _ |
Fig. 5Top prediction errors generated by CovidXrayNet on COVIDx test dataset.
Fig. 6Randomly generated results for CovidXrayNet on COVIDx test dataset.
Fig. 7Confusion matrix for CovidXrayNet on COVIDx test dataset.
Fig. 8Data Loader from COVIDcxr that Combines both Tabular Data and CXR.