Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset
The COVID-19 outbreak began in December 2019 and has dreadfully affected our lives since then. More than three million lives have been engulfed by this newest member of the corona virus family. With the emergence of continuously mutating variants of this virus, it is still indispensable to successfu...
Main Authors: | , , , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2021-08-01
|
Series: | Sensors |
Subjects: | |
Online Access: | https://www.mdpi.com/1424-8220/21/17/5813 |
_version_ | 1797520789744910336 |
---|---|
author | Muhammad Umair Muhammad Shahbaz Khan Fawad Ahmed Fatmah Baothman Fehaid Alqahtani Muhammad Alian Jawad Ahmad |
author_facet | Muhammad Umair Muhammad Shahbaz Khan Fawad Ahmed Fatmah Baothman Fehaid Alqahtani Muhammad Alian Jawad Ahmad |
author_sort | Muhammad Umair |
collection | DOAJ |
description | The COVID-19 outbreak began in December 2019 and has dreadfully affected our lives since then. More than three million lives have been engulfed by this newest member of the corona virus family. With the emergence of continuously mutating variants of this virus, it is still indispensable to successfully diagnose the virus at early stages. Although the primary technique for the diagnosis is the PCR test, the non-contact methods utilizing the chest radiographs and CT scans are always preferred. Artificial intelligence, in this regard, plays an essential role in the early and accurate detection of COVID-19 using pulmonary images. In this research, a transfer learning technique with fine tuning was utilized for the detection and classification of COVID-19. Four pre-trained models i.e., VGG16, DenseNet-121, ResNet-50, and MobileNet were used. The aforementioned deep neural networks were trained using the dataset (available on Kaggle) of 7232 (COVID-19 and normal) chest X-ray images. An indigenous dataset of 450 chest X-ray images of Pakistani patients was collected and used for testing and prediction purposes. Various important parameters, e.g., recall, specificity, F1-score, precision, loss graphs, and confusion matrices were calculated to validate the accuracy of the models. The achieved accuracies of VGG16, ResNet-50, DenseNet-121, and MobileNet are 83.27%, 92.48%, 96.49%, and 96.48%, respectively. In order to display feature maps that depict the decomposition process of an input image into various filters, a visualization of the intermediate activations is performed. Finally, the Grad-CAM technique was applied to create class-specific heatmap images in order to highlight the features extracted in the X-ray images. Various optimizers were used for error minimization purposes. DenseNet-121 outperformed the other three models in terms of both accuracy and prediction. |
first_indexed | 2024-03-10T08:03:35Z |
format | Article |
id | doaj.art-04bab246230d4e5897fa8eac081ad89e |
institution | Directory Open Access Journal |
issn | 1424-8220 |
language | English |
last_indexed | 2024-03-10T08:03:35Z |
publishDate | 2021-08-01 |
publisher | MDPI AG |
record_format | Article |
series | Sensors |
spelling | doaj.art-04bab246230d4e5897fa8eac081ad89e2023-11-22T11:12:47ZengMDPI AGSensors1424-82202021-08-012117581310.3390/s21175813Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray DatasetMuhammad Umair0Muhammad Shahbaz Khan1Fawad Ahmed2Fatmah Baothman3Fehaid Alqahtani4Muhammad Alian5Jawad Ahmad6Department of Electrical Engineering, HITEC University, Taxila 47080, PakistanDepartment of Electrical Engineering, HITEC University, Taxila 47080, PakistanDepartment of Biomedical Engineering, HITEC University, Taxila 47080, PakistanFaculty of Computing and Information Technology, King Abdul Aziz University, Jeddah 21431, Saudi ArabiaDepartment of Computer Science, King Fahad Naval Academy, Al Jubail 35512, Saudi ArabiaDepartment of Electrical Engineering, HITEC University, Taxila 47080, PakistanSchool of Computing, Edinburgh Napier University, Edinburgh EH10 5DT, UKThe COVID-19 outbreak began in December 2019 and has dreadfully affected our lives since then. More than three million lives have been engulfed by this newest member of the corona virus family. With the emergence of continuously mutating variants of this virus, it is still indispensable to successfully diagnose the virus at early stages. Although the primary technique for the diagnosis is the PCR test, the non-contact methods utilizing the chest radiographs and CT scans are always preferred. Artificial intelligence, in this regard, plays an essential role in the early and accurate detection of COVID-19 using pulmonary images. In this research, a transfer learning technique with fine tuning was utilized for the detection and classification of COVID-19. Four pre-trained models i.e., VGG16, DenseNet-121, ResNet-50, and MobileNet were used. The aforementioned deep neural networks were trained using the dataset (available on Kaggle) of 7232 (COVID-19 and normal) chest X-ray images. An indigenous dataset of 450 chest X-ray images of Pakistani patients was collected and used for testing and prediction purposes. Various important parameters, e.g., recall, specificity, F1-score, precision, loss graphs, and confusion matrices were calculated to validate the accuracy of the models. The achieved accuracies of VGG16, ResNet-50, DenseNet-121, and MobileNet are 83.27%, 92.48%, 96.49%, and 96.48%, respectively. In order to display feature maps that depict the decomposition process of an input image into various filters, a visualization of the intermediate activations is performed. Finally, the Grad-CAM technique was applied to create class-specific heatmap images in order to highlight the features extracted in the X-ray images. Various optimizers were used for error minimization purposes. DenseNet-121 outperformed the other three models in terms of both accuracy and prediction.https://www.mdpi.com/1424-8220/21/17/5813COVID-19artificial intelligencetransfer learningCNNX-ray images |
spellingShingle | Muhammad Umair Muhammad Shahbaz Khan Fawad Ahmed Fatmah Baothman Fehaid Alqahtani Muhammad Alian Jawad Ahmad Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset Sensors COVID-19 artificial intelligence transfer learning CNN X-ray images |
title | Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset |
title_full | Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset |
title_fullStr | Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset |
title_full_unstemmed | Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset |
title_short | Detection of COVID-19 Using Transfer Learning and Grad-CAM Visualization on Indigenously Collected X-ray Dataset |
title_sort | detection of covid 19 using transfer learning and grad cam visualization on indigenously collected x ray dataset |
topic | COVID-19 artificial intelligence transfer learning CNN X-ray images |
url | https://www.mdpi.com/1424-8220/21/17/5813 |
work_keys_str_mv | AT muhammadumair detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset AT muhammadshahbazkhan detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset AT fawadahmed detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset AT fatmahbaothman detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset AT fehaidalqahtani detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset AT muhammadalian detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset AT jawadahmad detectionofcovid19usingtransferlearningandgradcamvisualizationonindigenouslycollectedxraydataset |