Research Article | | Peer-Reviewed

Deep Learning Model for COVID-19 Classification Using Fine Tuned ResNet50 on Chest X-Ray Images

Received: 10 April 2024    Accepted: 27 April 2024    Published: 10 May 2024
Views:       Downloads:
Abstract

Amid the COVID-19 pandemic, extensive research has focused on deep learning methodologies for accurately diagnosing the virus from chest X-ray images. Various models, including Convolutional Neural Networks (CNNs) and pre-trained models, have achieved accuracies ranging from 85.20% to 99.66%. However, the proposed Fine-Tuned ResNet50 model consistently outperforms others with an impressive accuracy of 98.20%. By leveraging on transfer learning and careful architectural design the proposed model demonstrates superior performance compared to previous studies using DarkNet, ResNet50, and pre-trained models. Graphical comparisons highlight its competitive edge, emphasizing its effectiveness in COVID-19 classification tasks. The ResNet50 architecture, known for its deep residual layers and skip connections, facilitates robust feature extraction and classification, especially in medical imaging. Data pre-processing techniques, like noise reduction and contrast enhancement, ensure input data quality and reliability, enhancing the model's predictive abilities. Training results reveal the model's steady accuracy improvement and loss reduction over 20 epochs, aligning closely with validation metrics. Evaluation on a test set of COVID-19 chest X-ray images confirms exceptional accuracy (98.20%), precision (99.00%), recall (98.82%), and F1-score (98.91%), highlighting its proficiency in identifying COVID-19 cases while minimizing false positives and negatives. Comparative analyses against prior studies further validate its superior performance, establishing the Fine-Tuned ResNet50 model as a reliable tool for COVID-19 diagnosis. Future research should focus on exploring ensemble learning techniques, interpretability methods, and stakeholder collaboration to ensure safe AI deployment in clinical settings. Moreover, larger and diverse datasets are crucial for validating model performance and improving generalization, ultimately enhancing patient care and public health outcomes in the mitigating COVID-19 and future pandemics.

Published in Machine Learning Research (Volume 9, Issue 1)
DOI 10.11648/j.mlr.20240901.12
Page(s) 10-25
Creative Commons

This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited.

Copyright

Copyright © The Author(s), 2024. Published by Science Publishing Group

Keywords

Transfer Learning, Deep Learning, COVID-19, Chest X-Ray, ResNet50, Classification

1. Introduction
The COVID-19 pandemic is distinguished as one of the most significant global occurrences in recent memory, causing millions of casualties worldwide. The identification of the SARS-CoV-2 virus in December 2019 in Wuhan, China, marked the onset of this crisis, rapidly spreading across the globe and resulting in widespread illness, fatalities, and societal disruption. The virus primarily spreads through contact with infected surfaces and respiratory droplets . Symptoms of COVID-19 range from mild to severe and can include fever, coughing, and breathing difficulties, with older adults and individuals with underlying medical conditions being at higher risk of severe illness . Governments and public health organizations worldwide have implemented various measures, such as travel restrictions, social distancing guidelines, lockdowns, and vaccination campaigns, in an effort to curb the spread of the virus .
Since the pandemic's onset, extensive research efforts have been dedicated to understanding the virus's biology, developing safe and effective vaccines, and identifying viable treatments . However, this research has faced challenges such as the need for rapid development and the emergence of new virus variants . The economic impact of the pandemic has been profound, with numerous businesses closing down and unemployment rates soaring to unprecedented levels . Moreover, the pandemic has underscored disparities in access to healthcare and education, disproportionately affecting underserved populations .
Globally, COVID-19 has caused extraordinary illness and mortality rates, posing a significant public health emergency. The World Health Organization (WHO) estimates that by May 2023, there were over 400 million confirmed cases of COVID-19 worldwide, resulting in more than 6 million fatalities . The constant emergence of new variants and mutations has made curtailing the pandemic increasingly challenging . Hence, emphasizing the urgent need for reliable COVID-19 prediction models to aid in rapid diagnosis, treatment, and control . Severe symptoms of COVID-19 include fever, dry cough, fatigue, headache, sore throat, sneezing, vomiting, shortness of breath, muscle pain, nasal congestion, and runny nose . Severe cases can lead to complications such as acute kidney injury, cardiac damage, pulmonary edema, septic shock, and other serious effects .
Laboratory testing procedures for COVID-19 include the nasopharyngeal swab test, Rapid Antigen Test (RAnT), and Reverse Transcription-Polymerase Chain Reaction (RT-PCR) . The RT-PCR is considered the gold standard for COVID-19 detection, involves a complex series of biochemical reactions to detect the virus's genetic material .
Figure 1. Picture of B.1.351 (South African Variant) .
Figure 2. Picture of a PCR Machine .
However, it is expensive, time-consuming, and requires specialized infrastructure and skilled personnel, limiting its widespread use as a confirmatory test . Expanding clinical facilities is crucial, as diagnosing these infections with existing medical services can be challenging . While efforts continue to provide accurate diagnosis, social isolation, mask-wearing, hand hygiene, and self-quarantine remain essential measures to prevent COVID-19 transmission.
Artificial intelligence (AI) and Machine Learning (ML) techniques have shown promise in developing effective COVID-19 prediction models . Deep learning (DL) algorithms, in particular, have demonstrated high accuracy in predicting COVID-19 spread and identifying high-risk patients . Recent studies have explored deep learning algorithms for COVID-19 classification using chest CT images . For instance, a deep neural network model was proposed for COVID-19 prediction based on chest CT images .
2. Related Works
Numerous studies have explored the efficacy of various deep learning models in diagnosing COVID-19 from medical imaging such as Chest X-ray (CXR).
Table 1 provides a comprehensive overview of recent studies concerning the classification of COVID-19 using CXR images. These studies are categorized based on the techniques applied: ML, DL, or a fusion of both referred to as Hybrid. The DL category encompasses various deep learning architectures such as Convolutional Neural Networks (CNN), Inception V3, ResNet50, and DarkNet, which have been widely utilized between 2020 and 2023. This reflects the predominant use of DL in detecting COVID-19 from CXR images, with models like CNN and ResNet50 achieving impressive accuracy rates ranging from 94.70% to 98.18%. Additionally, the "Hybrid" category signifies the integration of DL with traditional ML methods, suggesting an emerging trend in leveraging both techniques for improved classification performance. On the other hand, the lone entry in the "ML" category, representing a study from 2022, exclusively employed traditional ML algorithms like Support Vector Machine (SVM), Decision Trees (DT), Random Forests (RF), and Artificial Neural Networks (ANN). Despite achieving a respectable accuracy of 96%, this study highlights the ongoing relevance of ML approaches, particularly when clinical data is involved. Overall, Table 1 underscores the diverse methodologies utilized in recent research, with DL methods leading the forefront, followed by Hybrid approaches and traditional ML techniques, all contributing significantly to COVID-19 classification from CXR images.
Table 1. Summary of previous works.

Techniques Used

Year

DL

ML

Hybrid Technique

Dataset

Accuracy

Hybrid Deep Transfer Learning

2023

X

CXR

Not provided

CNN

2020

X

X

CXR

98.07%

Inception V3

2020

X

X

CXR

97.97%

ResNet50

2021

X

X

CXR

98%

CNN

2023

X

X

CXR

96.66%

CNN

2022

X

X

CXR

95%

CNN

2020

X

X

CXR

98.15%

CNN

2020

X

X

CXR

96.78%

DarkNet

2020

X

X

CXR

98.08%

CNN

2020

X

X

CXR

94.70%

Deep Learning Model

2022

X

X

CXR

97.60%

ResNet50

2020

X

X

CXR

98.18%

ResNet50

2021

X

X

CXR

84.35%

EfficientnetB4

2022

X

X

CXR

97%

GAN + Deep Transfer Learning

2020

X

X

CXR

85.20%

Modified DarkCovidNet (CNN)

2022

X

X

CXR

94.18%

Optimized VGG19 CNN

2020

X

X

CXR

86%

VGG-CapsNet

2021

X

X

CXR

97%

Mask R-CNN

2021

X

X

CXR

96.98%

Improved Deep Learning

2021

X

X

CXR

95.63%

nCOVnet

2020

X

X

CXR

97.97%

SVM, DT, RF, ANN

2022

X

X

Clinical

96%

3. Materials and Methods
The methodology encompasses data gathering, pre-processing, architectural design, algorithm selection, and experimentation. It involves collecting relevant data, cleaning and transforming it for analysis, designing the model architecture, selecting appropriate algorithms, and conducting experiments using suitable tools and platforms to address research questions or solve real-world problems effectively.

3.1. Data Collection

Data collection is a crucial step in this research process. It involves gathering of different datasets with respect to COVID-19 for analysis and interpretation. The effectiveness of data collection directly influences the validity and reliability of research findings.

3.1.1. Type, Sources and Description of Dataset Utilized

This research exclusively employed secondary source data obtained from an online research community platform known as kaggle.com. The COVID-19 CXR datasets is described below.

3.1.2. Chest X-Ray Images Dataset

The COVID-19 CXR images dataset comprises CXR images specifically associated with cases of COVID-19. The CXR is a diagnostic imaging tools used to visualize the structures within the chest, including the lungs and surrounding tissues. This dataset provides a collection of radiographic images that can aid in the identification and analysis of pulmonary abnormalities indicative of COVID-19 infection.
Key details about the COVID-19 CXR images dataset may include information on image resolution, any annotations or labels indicating areas of interest such as lung abnormalities, anonymized patient details.
Figure 3 displays typical CXR images categorized as normal. These images serve as representative examples of healthy CXR scans. They are sourced from Kaggle.com, a platform known for hosting datasets and resources relevant to data science and machine learning.
Figure 4 showcasing sample positive COVID-19 chest CXR images. This indicates that the images displayed in the figure are representative examples of CXR scans depicting cases of COVID-19 infection, obtained from the Kaggle platform, which hosts datasets and resources for data science and machine learning projects.
Figure 3. Sample Normal CXR images (Kaggle.com).
Figure 4. Sample Positive COVID-19 Chest X-ray images (Kaggle.com).
Table 2 provides information on the source and description of the COVID-19 CXR dataset used in the study. The dataset, named COVID-19 Radiography Database, is an open-access repository containing CXR images depicting both COVID-19 positive and negative cases. With a file size of 816MB, the dataset is accessible for research purposes and is sourced from Kaggle at the following link: https://www.kaggle.com/tawsifurrahman/covid19-radiography-database. The dataset comprises 10,192 data points of normal images and 3,616 data points of positive COVID-19 cases images. It is worth noting that this dataset is imbalanced, with a greater number of normal images compared to positive COVID-19 cases images. This imbalance should be taken into consideration during model training and evaluation to ensure accurate performance assessment and avoid biases in the results.
Table 2. Source and description of COVID-19 Chest X-ray dataset.

Dataset name

COVID-19 Radiography Database

Brief description

An open-access dataset with CXR images of COVID-19 positive and negative cases.

File Size

816MB

Source

https://www.kaggle.com/tawsifurrahman/covid19-radiography-database

Normal images

10,192 data points

Positive cases images

3,616 data points

Remark

Imbalanced dataset

3.2. Data Pre-processing

This section focuses on data pre-processing for COVID-19 CXR datasets, aiming to enhance image quality. Tasks include noise reduction, contrast enhancement, and artifact removal to improve clarity. These steps are vital for accurate analysis and classification by machine learning algorithms, ensuring reliable detection of COVID-19 cases from CXR images.
Resolving Image Quality Issues
The examination of image datasets revealed the presence of blurred images, which could significantly impact the accuracy and reliability of subsequent analysis and predictions. Table 3 provides a comprehensive overview of the steps taken to address image quality issues, particularly blurriness, in the CXR datasets. Initially, the datasets comprised 13,808 CXR images, but 450 instances of blurriness were identified, posing a challenge. To ensure the integrity of subsequent analyses and machine learning model training, these blurred images underwent meticulous removal. After this intervention, the dataset sizes were adjusted, resulting in 13,358 CXR images free of identified image quality issues. This meticulous approach to handling image quality challenges highlights the importance of pre-processing steps in improving the reliability and effectiveness of subsequent analyses, especially in medical imaging datasets.
Table 3. Handling image quality issues.

Dataset

CXR

Total collected

13,808

Blurred Images

450

Balance

13,358

3.3. Data Split Strategy for CXR Dataset

Table 4 presents the split strategy utilized for the CXR dataset, detailing the distribution of data across training, validation, and testing sets. The dataset comprises 13,358 samples in total. For training purposes, 80% of the dataset, equivalent to 10,686 samples, is allocated. Additionally, 10% of the dataset, accounting for 1,336 samples, is reserved for validation. The remaining 10% of the dataset, also consisting of 1,336 samples, is designated for testing the model's performance. This split strategy ensures that the model is trained on a significant portion of the data while also validating its performance on separate subsets and assessing its generalization capabilities on unseen data.
Table 4. Split strategy for CXR dataset.

Quality dataset

Training (80%)

Validation (10%)

Testing (10%)

13,358

10,686

1,336

1,336

3.4. Proposed Model Architectural Design Considerations

The architectural considerations for a deep learning model encompass the model's name, its types of layers, and various parameters like kernel sizes, filter sizes, activation functions, and other design choices. These considerations play a crucial role in tailoring the model for specific tasks such as classifying COVID-19 CXR.

3.4.1. ResNet50 Model

The ResNet50 algorithm, short for Residual Network with 50 layers, is a deep convolutional neural network architecture primarily designed for image classification tasks. It belongs to the ResNet family of models developed by Microsoft Research, which introduced the concept of residual learning to address the challenges of training very deep neural networks.

3.4.2. Design Consideration for ResNet-50 in Classification of COVID-19 CXR Image Dataset

Table 5 presents a comprehensive outline of the model settings for a ResNet50 model tailored specifically for the classification of COVID-19 CXR images. These design considerations encompass various aspects crucial for constructing an effective and accurate classification model. The model architecture is defined as ResNet50, a deep residual network renowned for its ability to effectively handle image classification tasks. With 50 layers, ResNet50 employs skip connections to mitigate the vanishing gradient problem, facilitating the training of deeper networks. The input shape is specified as (224, 224, 3), indicating RGB images resized to 150x150 pixels to conform to the requirements of the ResNet50 architecture. Pre-processing involves data normalization to rescale pixel values to the range [0, 1], ensuring uniformity and stability during training. The model is initialized with pre-trained weights from the 'imagenet' dataset, leveraging transfer learning to benefit from the knowledge learned by the model on a large-scale image classification task. Fine-tuning of the pre-trained ResNet50 layers is optionally performed to adapt the model to the specifics of the COVID-19 CXR dataset. Other key considerations highlighted in the table include batch normalization to speed up training and improve stability, dropout regularization to prevent overfitting, selection of the loss function (Binary Cross-entropy) suitable for binary classification tasks, usage of the Adam optimizer with a learning rate of 0.0001, evaluation metrics including accuracy, precision, recall, and F1-score, batch size of 64, number of epochs set to 20, early stopping strategy to monitor validation loss and halt training if no improvement is observed, and class weighting adjustment to handle class imbalance if necessary. These considerations collectively contribute to the successful development and training of a robust ResNet50 model for COVID-19 CXR image classification.
Table 5. ResNet50 Model settings for COVID-19 CXR Image Dataset classification.

S/N

Design considerations

Details

1

Model Architecture

ResNet50 - A deep residual network with 50 layers

2

Input Shape

(224, 224, 3) - RGB images resized to 150x150 pixels

3

Pre-processing

Data normalization to rescale pixel values to the range [0,1]

4

Pre-trained Weights

'imagenet' - Initialize with weights pre-trained on ImageNet

5

Fine-tuning

Fine-tune the pre-trained ResNet50 layers or freeze all layers

6

Batch Normalization

Normalize the activations of each layer to speed up training and improve stability

7

Dropout

Apply dropout regularization after fully connected layers to prevent overfitting

8

Loss Function

Binary Cross-entropy

9

Optimizer

Adam optimizer with a learning rate of 0.0001

10

Metrics

Accuracy, Precision, Recall, F1-score

11

Batch Size

64

12

Epochs

20

13

Early Stopping

Monitor validation loss and stop training if no improvement after a certain number of epochs

14

Class Weighting

Adjust class weights to handle class imbalance if necessary

3.4.3. Training Parameters for ResNet50 on COVID-19 CXR Image Dataset

Table 6 presents the training configuration for ResNet50 applied to CXR datasets. It utilizes a batch size of 64 for processing samples during parameter updates, across 20 epochs, representing complete dataset passes. A learning rate of 0.0001 governs model weight updates. The model classifies images into 'Covid' and 'Normal' classes, reflecting the binary task nature. Input images are of dimensions (150, 150, 3), denoting height, width, and RGB color channels. A seed value of 42 ensures result reproducibility. Data is split into training, validation, and testing sets (80%, 10%, and 10%, respectively) for model evaluation and hyperparameter tuning to mitigate overfitting. Images are resized to (150, 150) during preprocessing. Class descriptions specify recognized categories, and binary class mode indicates each sample belongs to one of two classes. These parameters collectively facilitate robust deep learning model development for COVID-19 CXR classification.
Table 6. ResNet50 training parameters for CXR image datasets.

S/N

Parameter

Values

1

Batch size

64

2

Epoch

20

3

Learning rate

0.0001

4

Classes

2

5

Input shape

(150, 150, 3)

6

Seed

42

7

Target size

(150, 150)

8

Classes description

‘Covid’, ‘Normal’

9

Class mode

Binary

10

Split percentage for training

80%

11

Split percentage for validation

10%

3.4.4. Proposed System Architecture

This section discusses the proposed system's architectural design and structure, outlining how its modules, subsystems, and components are arranged and interact with one another. By outlining relationships, dependencies, and data flow, it acts as a blueprint for comprehending how the system accomplishes its objectives and functionality.
Figure 5. Proposed system architecture for COVID-19 Classification.

3.4.5. Mathematical Notation for the Proposed Model

For COVID-19 classification using the ResNet50 model on a CXR dataset, we can denote the process with mathematical symbols as follows:
Let X represents the input CXR image dataset, where each image is denoted by xi for i in the range from 1 to n, where n is the total number of images. The ResNet50 model can be represented as a function fResNet50 which takes an input image xi and produces an output vector yi representing the predicted class probabilities for COVID-19, normal, or other classes. Mathematically, we can denote this as:
yi=fResNet50(xi)(1)
The classification task involves assigning a label to each input image xi, indicating whether it belongs to the COVID-19 class (denoted as 1), or normal class (denoted as 0).

3.4.6. Algorithm Adopted

The ResNet50 algorithm is renowned for its effective feature extraction and image classification capabilities. Its architecture includes convolutional layers for pattern detection and residual blocks with shortcut connections to facilitate gradient flow during training. Global average pooling reduces feature map size before classification with fully connected layers. Pre-trained on datasets like ImageNet, ResNet50 excels in capturing intricate visual features, adapting well to deep architectures, and fine-tuning for specific tasks with minimal labeled data.

3.4.7. Experimental Platform Configuration

Experimental platform configuration entails organizing and setting up the necessary hardware, software, and infrastructure components for conducting COVID-19 experiments. This process involves arranging the experimental environment to ensure that the tools, devices, and systems involved in the research study function correctly and are compatible with each other.
Table 7 outlines the experimental platform configuration utilized in the study. It includes parameters such as the CPU, GPU, memory (RAM), and operating system (OS). The CPU employed is an Intel® Core™ i7-8700 running at a speed of 3.2 to 4.6GHz. The GPU utilized is the NVIDIA GeForce GTX 1080Ti with 16GB GDDR5X memory. The system is equipped with 64GB of DDR4 2133MHz RAM. The operating system used is MS-Windows 10. The development language is Python 3.5, Pycharm and Anaconda3 serves as the development platform. An open-source ML framework framework called TensorFlow 10.0 was employed.
Table 7. Experimental platform configuration.

Configuration

Parameters

CPU

Intel® Core ™ i7-8700, CPU@3.2 – 4.6GHz

GPU

NVIDIA GeForce GTX 1080Ti 16GB GDDR5X

Memory

64GB DDR4 2133MHz

Operating System

MS Windows 10

Programming Language

Python 3.5

Development Platform

Anaconda3 Pycharm Community Edition

Framework

Tensorflow 10.0

Figure 6. ResNet50 Algorithm on COVID-19 CXR image.

3.4.8. Evaluation Metric

Assessing the performance of the proposed deep learning model for COVID-19 classification using ResNet50 is crucial, relying on standard metrics such as accuracy, precision, recall, and F1-score. While accuracy gives an overall view, precision emphasizes the model's ability to avoid false positives, particularly important in COVID-19 diagnosis to prevent unnecessary strain on healthcare resources. Recall measures the model's capability to identify all infected individuals accurately, reducing the risk of undetected cases and further transmission. The F1-score balances precision and recall, vital in scenarios with imbalanced datasets like medical diagnoses, where achieving a balance is essential for effective disease management and resource allocation. Evaluating models through these metrics is key in enhancing diagnostic capabilities and contributing to more effective disease management strategies.
Accuracy=TP+TNTP+TN+FP+FN(2)
Precision=TPTP+FP(3)
Recall=TPTP+FN(4)
F1-score=2*(precision*recall)(precision+ recall)(5)
4. Results and Discussion
The results and discussion section discusses the outcomes of the model's training and testing, along with comparisons to prior research on COVID-19 using ML and DL models.

4.1. Model Training Results

In this section, the findings stemming from the training of the ResNet50 model on the COVID-19 CXR training image set will be presented and discussed.
Table 8 provides a comprehensive overview of the training outcomes achieved utilizing the ResNet50 architecture on the COVID-19 CXR dataset over 20 epochs. The table offers insights into the model's accuracy, validation accuracy, loss, validation loss, and the duration of each epoch. The accuracy measures depict a consistent enhancement over epochs, commencing at 0.74 in the initial epoch and steadily rising to 0.88 by the 20th epoch. Likewise, the validation accuracy exhibits a similar progression, starting at 0.80 and culminating at 0.90 by the final epoch. These trends suggest that the model effectively learns from the training data and generalizes well to unseen validation data. Furthermore, the loss measures indicate a consistent decline across epochs, signifying the model's ongoing reduction of error. Both training and validation loss decrease from 0.56 and 0.39, respectively, in the first epoch to 0.28 and 0.24, respectively, in the 20th epoch. This declining pattern in loss indicates the model's improvement in predictive performance and its increased accuracy in classifying COVID-19-related chest CXR images. Additionally, the relatively consistent duration of each epoch implies steady training efficiency throughout the training process, with each epoch completed within a reasonable timeframe, as denoted by the seconds (s) values provided in the "Time" column of the table. Overall, these findings underscore the efficacy of the ResNet50 architecture in training a robust model for COVID-19 CXR image classification.
Table 8. Training results using ResNet50 on COVID-19 CXR datasets.

Epoch

Accuracy

Val_Accuracy

Loss

Val_Loss

Time

1

0.74

0.80

0.56

0.39

1268s

2

0.77

0.75

0.45

0.44

1293s

3

0.79

0.86

0.43

0.36

1110s

4

0.81

0.87

0.40

0.33

1225s

5

0.81

0.81

0.39

0.37

1683s

6

0.83

0.87

0.37

0.31

1055s

7

0.84

0.88

0.35

0.30

849s

8

0.84

0.85

0.35

0.30

846s

9

0.84

0.88

0.34

0.29

841s

10

0.84

0.87

0.35

0.33

839s

11

0.83

0.85

0.36

0.31

836s

12

0.85

0.89

0.33

0.28

839s

13

0.86

0.85

0.32

0.32

839s

14

0.86

0.89

0.31

0.26

835s

15

0.87

0.88

0.31

0.28

841s

16

0.86

0.88

0.31

0.29

842s

17

0.87

0.90

0.29

0.25

834s

18

0.87

0.88

0.30

0.27

841s

19

0.86

0.86

0.30

0.30

840s

20

0.88

0.90

0.28

0.24

834s

Figure 7. Tradeoff between accuracy and validation accuracy on training set.
Figure 7 presents a bar graph demonstrating the trade-off between accuracy and validation accuracy in training the COVID-19 CXR image model. With a training dataset of 80% (10,686 images) and a validation dataset of 10% (1,336 images), the graph depicts fluctuations in both accuracy and validation accuracy metrics throughout the model training process. The recorded accuracy stands at 0.88, while the validation accuracy is slightly higher at 0.9. This visualization offers valuable insights into the model's performance and its ability to generalize to unseen data.
Figure 8. Tradeoff between loss and validation loss on training set.
Figure 8 illustrates a bar graph detailing the relationship between loss and validation loss during the training of the COVID-19 CXR image model. Utilizing an 80% training dataset (10,686 images) and a 10% validation dataset (1,336 images), it visually captures the fluctuations in these metrics throughout the training process. The recorded loss is 0.28, while the validation loss is slightly lower at 0.24. This visualization offers valuable insights into the model's ability to minimize loss and generalize to unseen data.
Figure 9. Visualization of training loss based on ResNet50 on COVID-19 CXR training set.
Figure 9 presents a line graph illustrating the training losses of a ResNet50 model trained on a COVID-19 CXR image dataset. The training loss metric reflects the model's performance on the training data, where lower values indicate better understanding of data patterns. The graph demonstrates a consistent decrease in training loss, indicating the model's continuous improvement in accurately classifying COVID-19 CXR images. However, the loss does not reach zero, suggesting potential for further improvement. Additionally, the graph includes validation loss, representing the model's performance on an independent dataset not used during training. While generally higher than the training loss, the validation loss also exhibits a decreasing trend over time. The concurrent decline in both training and validation losses suggests the model's ability to learn without overfitting, a phenomenon where a model excessively tailors itself to the training dataset, limiting its generalization. In summary, the ResNet50 model demonstrates promising capabilities in classifying COVID-19 CXR images, with decreasing training loss from approximately 0.60 to around 0.20 across 20 epochs, accompanied by a similar decline in validation loss. This close correlation between training and validation losses indicates the model's effectiveness in generalizing to new data. However, further evaluation on a larger dataset is essential to validate its performance and ensure adaptability to novel data patterns.
Figure 10. Visualization of training accuracy based on ResNet50 using COVID-19 CXR training set.
Figure 10 illustrates the progression of training accuracy and validation accuracy for a ResNet50 model trained on a COVID-19 CXR image dataset across 20 epochs. Initially starting around 0.75, the training accuracy consistently improves, reaching approximately 0.95 by the end of the epochs. This demonstrates the model's ongoing enhancement in correctly classifying COVID-19 CXR images throughout the training process. Concurrently, the validation accuracy, which begins slightly lower than the training accuracy, steadily increases and closely aligns with it, indicating the model's robust ability to generalize without overfitting. Notably, both training and validation accuracies experience rapid early gains, followed by stabilization as epochs progress, suggesting a swift learning phase succeeded by a period of stability with continued training. These trends suggest promising results for the ResNet50 model's performance in accurately classifying COVID-19 CXR images, demonstrating high accuracy and strong generalization capabilities on both training and validation datasets.

4.2. Model’s Test Results Based on COVID-19 CXR Image Test Sets

This section delves into the analysis and interpretation of the testing outcomes of the ResNet50 Model when applied to the test set (1,336) of COVID-19 CXR images. The emphasis is on evaluating the performance of the ResNet50 Model in accurately categorizing CXR images associated with COVID-19.
In the dataset comprising 1,336 CXR images, the analysis revealed the following: 1093 cases were correctly identified as positive (True Positives), while 219 cases were accurately recognized as negative (True Negatives). Additionally, there were 11 instances misclassified as positive when they were negative (False Positives), and 13 cases were mistakenly identified as negative when they were positive (False Negatives).
Accuracy=1093 +2191093 +219 +11 +13=98.20%
Precision=10931093 +11=99.00%
Recall=10931093 +13=98.82%
F1-score=2*(99.00 * 98.82)(99.00+ 98.82)=98.91%
Figure 11. Graphical representation of the test set results.
Figure 11 depicts a bar graph presenting the performance metrics, including accuracy, precision, recall, and F1-score, of the ResNet50 model on a 10% test set comprising 1,380 images from the COVID-19 CXR dataset sourced from Kaggle. Remarkably, the model achieved exceptional scores, with an accuracy of 98.20%, precision of 99.00%, recall of 98.82%, and a perfect F1-score of 99.91%. These outstanding results highlight the ResNet50 model's remarkable ability to accurately classify COVID-19 CXR images with high precision. Accuracy signifies the proportion of correctly classified images, while precision reflects the model's accuracy in identifying COVID-19 images among those labeled as such. Recall indicates the model's effectiveness in correctly identifying COVID-19 images within the entire pool of COVID-19 images. The perfect F1-score underscores the model's proficiency in precisely recognizing COVID-19 images while accurately discarding non-COVID-19 ones. These exemplary outcomes suggest the ResNet50 model's potential as a robust tool for diagnosing COVID-19 using CXR images. However, it is important to note that the evaluation was conducted on a single dataset, underscoring the need for assessments on larger and diverse datasets to validate its performance and ensure its adaptability to various data patterns.

4.3. Comparison Evaluation

Comparing deep learning models for COVID-19 classification involves assessing architecture, training methods, and performance. While various models show promise, Fine-Tuned ResNet50 consistently outperforms others, with its robust architecture and meticulous design. Utilizing transfer learning and careful architectural considerations, it achieves high accuracy and reliability in COVID-19 diagnosis. Future research should explore ensemble learning and interpretability methods to ensure safe AI deployment in clinical settings.
Figure 12. Comparison between selected previous studies and the proposed model.
Figure 12 presents a comparative assessment of the accuracy achieved by various methodologies, encompassing prior studies and the proposed model, in the realm of CXR image classification for COVID-19 detection. This analysis provides valuable insights into the efficacy of different techniques employed in the field. The chart delineates accuracy rates attained through diverse algorithms and architectures like CNN, Inception V3, ResNet50, DarkNet, EfficientnetB4, GAN + Deep Transfer Learning, and Mask R-CNN. Each entry in the list corresponds to a specific method or model, accompanied by its corresponding accuracy percentage. For instance, CNN achieved 98.07% accuracy, Inception V3 attained 97.97%, ResNet50 reached 98%, and DarkNet secured 98.08%. Notably, the proposed model, labeled "Proposed Model (CXR)," exhibited a commendable accuracy performance of 98.20%. This comprehensive breakdown of accuracy metrics furnishes researchers with a holistic understanding of cutting-edge techniques in CXR-based COVID-19 detection, aiding in the identification of promising methodologies for further exploration and potential integration into clinical settings. Additionally, it serves as a pivotal reference for assessing the effectiveness of new algorithms and enhancing existing models to bolster diagnostic precision and patient care.
5. Conclusion
This paper presented a comprehensive analysis of deep learning models, particularly the Fine-Tuned ResNet50, for accurately diagnosing COVID-19 from chest X-ray (CXR) images due to the COVID-19 pandemic that has posed unprecedented challenges worldwide, necessitating rapid and accurate diagnostic tools to curb its spread and manage patient care effectively. Against this backdrop, the research endeavors to leverage advanced AI techniques to develop robust prediction models capable of aiding in rapid diagnosis, treatment, and control of the virus.
In examining the comprehensive research findings on COVID-19 classification using deep learning models, it becomes evident that the study presented a significant stride towards enhancing diagnostic capabilities amidst the ongoing pandemic. The thorough investigation, encapsulated within the ResNet50 model framework, not only corroborates prior research but also extends the boundaries of knowledge in this critical domain.
Reportedly, the study underscores the urgency and complexity of combatting the COVID-19 crisis, emphasizing the dire need for accurate and efficient diagnostic tools. By meticulously evaluating the ResNet50 model's performance on CXR images, the researchers have elucidated its remarkable ability to discern COVID-19 cases with exceptional precision, achieving an accuracy rate of 98.20%. This accomplishment, when juxtaposed with prior studies, showcases the ResNet50 model's robustness and reliability in identifying COVID-19 infections, thereby positioning it as a frontrunner in the realm of medical image analysis.
However, despite the notable success, the study aptly acknowledges certain limitations and potential shortcomings. The imbalanced nature of the dataset, with a greater proportion of normal images compared to COVID-19 cases, raises concerns regarding bias and generalizability. Additionally, the evaluation's reliance on a single dataset underscores the necessity for further validation on larger and more diverse datasets to ensure the model's efficacy across varied patient demographics and imaging conditions.
Nevertheless, the integration of the ResNet50 model into the current understanding of COVID-19 diagnosis signifies a paradigm shift in medical practice. By harnessing the power of deep learning and transfer learning techniques, the study not only advances the current views on COVID-19 detection but also paves the way for innovative solutions in healthcare delivery. The ResNet50 model's exceptional performance underscores its potential as a reliable diagnostic tool, poised to augment healthcare professionals' capabilities in swiftly and accurately identifying COVID-19 cases, thereby facilitating prompt interventions and mitigating the spread of the virus.
In essence, the study's culmination heralds a new era in medical imaging and AI-driven diagnostics, where cutting-edge technologies converge to address pressing global health challenges. It underscores the imperative of interdisciplinary collaboration and continual innovation in harnessing AI for the betterment of public health, thereby fostering a future where precision medicine and data-driven approaches redefine healthcare delivery.
Abbreviations
COVID-19: Coronavirus Disease 2019
SARS-CoV-2: Severe Acute Respiratory Syndrome Coronavirus 2
ResNet50: Residual Network with 50 Layers
DL: Deep Learning
ML: Machine Learning
TL: Transfer Learning
RAnT: Rapid Antigen Test
RT-PCR: Reverse Transcription Polymerase Chain Reaction
AI: Artificial Intelligence
CT: Computed Tomography
CXR: Chest X-Ray
SVM: Support Vector Machine
DT: Decision Tree
RF: Random Forest
ANN: Artificial Neural Network
CNN: Convolutional Neural Network
R-CNN: Region-based Convolutional Neural Network
Author Contributions
Oyewole Dokun: Conceptualization, Data curation, Formal Analysis, Investigation, Methodology, Visualization
Adetokunbo MacGregor John-Otumu: Supervision, Validation, Formal Analysis, Visualization, Review & editing
Udoka Felicity Eze: Supervision, Review & editing
Charles Ikerionwu: Supervision, Review & editing
Chukwuemeka Etus: Review & editing
Emeka Matthew Nwanga: Review & editing
Ogadimma Thaddeus Okonkwo: Review & editing
Conflicts of Interest
The authors declare no conflicts of interest.
References
[1] Awwalu J., Umar N. A., Ibrahim M. S., and Ogwueleka F. N. (2020), A Multinomial Naïve Bayes Decision Support System for COVID-19 Detection, FUDMA Journal of Sciences (FJS) 4(2): 704-711.
[2] Sait U, K V GL, Shivakumar S, Kumar T, Bhaumik R, Prajapati S, Bhalla K, and Chakrapani A. (2021). A deep-learning based multimodal system for Covid-19 diagnosis using breathing sounds and chest X-ray images. Appl Soft Comput. 109: 107522.
[3] World Health Organization. (2020b). COVID-19: The race to find a vaccine. Retrieved from
[4] World Health Organization. (2021). COVID-19 vaccines. Retrieved from
[5] Pola Ö. (2021), Detection of Covid-19 from Chest CT Images Using Xception Architecture: A Deep Transfer Learning Based Approach, Sakarya University Journal of Science, 25(3), 800-810.
[6] Rani G., Oza M. G., Dhaka V. S., Pradhan N., Verma S., and Rodrigues J. P. C. (2022), Applying deep learning based multi modal for detection of coronavirus, Multimedia Systems 28: 1251-1262.
[7] Shikang L., Zhuo L., Ruiqing X., Xiaofeng Y., Jianhua L., Liang L., Yuyan S., Qiangzhong S., Tongxin L., Lanlan Q., and Ying, Z. (2021), Multimodal deep learning for predicting COVID-19 patients at high-risk for serious illness, Electronic Journal of Emerging Infectious Diseases, 6(2): 133-137.
[8] Shahanaz A. G., Niranjana S., Madhushankara M and Swathi K. S. (2022), Deep learning model for detection of COVID-19 utilizing the chest X-ray images, Cogent Engineering, 9(1), 1-18,
[9] Chauha H., and Modi K. (2022), Development of a Multi-modal Severity Prediction System for Covid-19 using Machine Learning Algorithms, International Journal of Intelligent Systems and Applications in Engineering IJISAE, 10(3), 314–321.
[10] Guo H., Zhou Y., Liu X and Tan J. (2020), The impact of the COVID-19 epidemic on the utilization of emergency dental services, Journal of Dental Sciences, 15(4): 564–567.
[11] Soumyajit P, Somnath B., and Arijit R. (2021), An efficient method of detection of COVID-19 using Mask R-CNN on chest X-Ray images, AIMS Biophysics, 8(3): 281–290.
[12] Afreen, Y. N., and Reddy, P. B. (2022). CDLX: An Efficient novel approach for COVİD detection lung xrays throw transfer learning based on State of the art deep learning image classification models. International Journal of Health Sciences, 6(S5): 8439–8463.
[13] Ghomi Z, Mirshahi R, Khameneh B. A, Fattahpour A, Mohammadiun S, Alavi Gharahbagh A, Djavadifar A, Arabalibeik H, Sadiq R, and Hewage K. (2020). Segmentation of COVID-19 pneumonia lesions: A deep learning approach. Medical Journal Islam Republic Iran, 34(174): 1–7,
[14] Subhalakshmi R. T., Balamurugan S A. A., and Sasikala S. (2022), Deep learning based fusion model for COVID-19 diagnosis and classification using computed tomography images, Concurrent Engineering: Research and Applications, 30(1): 116 – 127.
[15] Vedika et al. (2022), Improved COVID-19 detection with chest x-ray images using deep learning, Multimedia Tools and Applications, 2022(81): 37657–37680.
[16] Abbasi-Kesbi, K., Jafari, M. H., & Alizadehsani, R. (2022). A deep neural network model for COVID-19 prediction based on chest CT images. Journal of X-Ray Science and Technology, 30(1), 103-114.
[17] Kaushik, B., Chadha, A. & Sharma, R. (2023), Performance Evaluation of Learning Models for the Prognosis of COVID-19. New Gener. Comput. 41, 533–551.
[18] Purohit, K., Kesarwani, A., Kisku, D. R., & Dalui, M. (2020). COVID-19 Detection on Chest X-Ray and CT Scan Images Using Multi-image Augmented Deep Learning Model. bioRxiv.
[19] Jain, R., Gupta, M., Taneja, S., & Hemanth, D. J. (2020). Deep learning based detection and analysis of COVID-19 on chest X-ray images. Applied Intelligence (Dordrecht, Netherlands), 51, 1690-1700.
[20] Rehman, A., Sadad, T., Saba, T., Hussain, A., & Tariq, U. (2021). Real-Time Diagnosis System of COVID-19 Using X-Ray Images and Deep Learning. IT Professional, 23, 57-62.
[21] Mukri, V. M. (2023), COVID-19 Prediction using Machine Learning, International Research Journal of Modernization in Engineering Technology and Science, 5(3): 1180–1185.
[22] Muhammad et al. (2022), Deep transfer learning CNN based approach for COVID-19 detection, International Journal of Advanced and Applied Sciences, 9(4): 44-52.
[23] Sekeroglu B., and Ozsahin I. (2020), Detection of COVID-19 from Chest X-Ray Images using Convolutional Neural Networks, SLAS Technology, 25(6): 553–565.
[24] Apostolopoulos, I. D., & Mpesiana, T. A. (2020), Covid 19: automatic detection from X ray images utilizing transfer learning with convolutional neural networks, Physical and Engineering Sciences in Medicine, 43, 635-640.
[25] Ozturk, T., Talo, M., Yildirim, E. A., Baloglu, U. B., Yildirim, O., & Acharya, R. U. (2020), Automated detection of COVID-19 cases using deep neural networks with X-ray images, Computers in Biology and Medicine, 121 (103792), 1–11.
[26] Ismael, A. M., & Şengür, A. (2020). Deep learning approaches for COVID-19 detection based on chest X-ray images. Expert Systems with Applications, 164, 114054 - 114054.
[27] Bukhari, S. U., Bukhari, S. U., Syed, A., & Shah, S. S. (2020). The diagnostic evaluation of Convolutional Neural Network (CNN) for the assessment of chest X-ray of patients infected with COVID-19. medRxiv.
[28] Nandi R., and Mulimani M. (2021), Detection of COVID-19 from X-rays using hybrid deep learning models, Research on Biomedical Engineering, 37: 687–695.
[29] Khalil, M. I., Rehman, S. U., Alhajlah, M., Mahmood, A., Karamat, T., Haneef, M., & Alhajlah, A. (2022). Deep-COVID: Detection and Analysis of COVID-19 Outcomes Using Deep Learning. Electronics.
[30] Loey, M., Smarandache, F., & Khalifa, N. E. (2020). Within the Lack of Chest COVID-19 X-ray Dataset: A Novel Detection Model Based on GAN and Deep Transfer Learning. Symmetry, 12, 651.
[31] Redie, D. K., Sirko, A. E., Demissie, T. M., Teferi, S. S., Shrivastava, V. K., Verma, O. P., & Sharma, T. K. (2022). Diagnosis of COVID-19 using chest X-ray images based on modified DarkCovidNet model. Evolutionary Intelligence, 16, 729-738.
[32] Horry, M. J., Chakraborty, S., Paul, M., Ulhaq, A., Pradhan, B., Saha, M., & Shukla, N. (2020). COVID-19 Detection Through Transfer Learning Using Multimodal Imaging Data. Ieee Access, 8, 149808 - 149824.
[33] Shamik T., and Anurag J. (2021), Convolutional capsule network for COVID-19 detection using radiography images, International Journal of Imaging System Technol., 31: 525–539.
[34] Panwar, H., Gupta, P. K., Siddiqui, M. K., Morales-Menendez, R., & Singh, V. (2020), Application of deep learning for fast detection of COVID-19 in X-Rays using nCOVnet, Chaos, Solitons and Fractals, 138 (109944), 1–8.
[35] Bashar, A., Latif, G., Ben-Brahim, G., Mohammad, N., and Alghazo, J. (2021), COVID-19 Pneumonia Detection Using Optimized Deep Learning Techniques. Diagnostics, 11, 1 - 18.
Cite This Article
  • APA Style

    Dokun, O., John-Otumu, A. M., Eze, U. F., Ikerionwu, C., Etus, C., et al. (2024). Deep Learning Model for COVID-19 Classification Using Fine Tuned ResNet50 on Chest X-Ray Images. Machine Learning Research, 9(1), 10-25. https://doi.org/10.11648/j.mlr.20240901.12

    Copy | Download

    ACS Style

    Dokun, O.; John-Otumu, A. M.; Eze, U. F.; Ikerionwu, C.; Etus, C., et al. Deep Learning Model for COVID-19 Classification Using Fine Tuned ResNet50 on Chest X-Ray Images. Mach. Learn. Res. 2024, 9(1), 10-25. doi: 10.11648/j.mlr.20240901.12

    Copy | Download

    AMA Style

    Dokun O, John-Otumu AM, Eze UF, Ikerionwu C, Etus C, et al. Deep Learning Model for COVID-19 Classification Using Fine Tuned ResNet50 on Chest X-Ray Images. Mach Learn Res. 2024;9(1):10-25. doi: 10.11648/j.mlr.20240901.12

    Copy | Download

  • @article{10.11648/j.mlr.20240901.12,
      author = {Oyewole Dokun and Adetokunbo Macgregor John-Otumu and Udoka Felista Eze and Charles Ikerionwu and Chukwuemeka Etus and Emeka Matthew Nwanga and Ogadimma Thaddeus Okonkwo},
      title = {Deep Learning Model for COVID-19 Classification Using Fine Tuned ResNet50 on Chest X-Ray Images
    },
      journal = {Machine Learning Research},
      volume = {9},
      number = {1},
      pages = {10-25},
      doi = {10.11648/j.mlr.20240901.12},
      url = {https://doi.org/10.11648/j.mlr.20240901.12},
      eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.mlr.20240901.12},
      abstract = {Amid the COVID-19 pandemic, extensive research has focused on deep learning methodologies for accurately diagnosing the virus from chest X-ray images. Various models, including Convolutional Neural Networks (CNNs) and pre-trained models, have achieved accuracies ranging from 85.20% to 99.66%. However, the proposed Fine-Tuned ResNet50 model consistently outperforms others with an impressive accuracy of 98.20%. By leveraging on transfer learning and careful architectural design the proposed model demonstrates superior performance compared to previous studies using DarkNet, ResNet50, and pre-trained models. Graphical comparisons highlight its competitive edge, emphasizing its effectiveness in COVID-19 classification tasks. The ResNet50 architecture, known for its deep residual layers and skip connections, facilitates robust feature extraction and classification, especially in medical imaging. Data pre-processing techniques, like noise reduction and contrast enhancement, ensure input data quality and reliability, enhancing the model's predictive abilities. Training results reveal the model's steady accuracy improvement and loss reduction over 20 epochs, aligning closely with validation metrics. Evaluation on a test set of COVID-19 chest X-ray images confirms exceptional accuracy (98.20%), precision (99.00%), recall (98.82%), and F1-score (98.91%), highlighting its proficiency in identifying COVID-19 cases while minimizing false positives and negatives. Comparative analyses against prior studies further validate its superior performance, establishing the Fine-Tuned ResNet50 model as a reliable tool for COVID-19 diagnosis. Future research should focus on exploring ensemble learning techniques, interpretability methods, and stakeholder collaboration to ensure safe AI deployment in clinical settings. Moreover, larger and diverse datasets are crucial for validating model performance and improving generalization, ultimately enhancing patient care and public health outcomes in the mitigating COVID-19 and future pandemics.
    },
     year = {2024}
    }
    

    Copy | Download

  • TY  - JOUR
    T1  - Deep Learning Model for COVID-19 Classification Using Fine Tuned ResNet50 on Chest X-Ray Images
    
    AU  - Oyewole Dokun
    AU  - Adetokunbo Macgregor John-Otumu
    AU  - Udoka Felista Eze
    AU  - Charles Ikerionwu
    AU  - Chukwuemeka Etus
    AU  - Emeka Matthew Nwanga
    AU  - Ogadimma Thaddeus Okonkwo
    Y1  - 2024/05/10
    PY  - 2024
    N1  - https://doi.org/10.11648/j.mlr.20240901.12
    DO  - 10.11648/j.mlr.20240901.12
    T2  - Machine Learning Research
    JF  - Machine Learning Research
    JO  - Machine Learning Research
    SP  - 10
    EP  - 25
    PB  - Science Publishing Group
    SN  - 2637-5680
    UR  - https://doi.org/10.11648/j.mlr.20240901.12
    AB  - Amid the COVID-19 pandemic, extensive research has focused on deep learning methodologies for accurately diagnosing the virus from chest X-ray images. Various models, including Convolutional Neural Networks (CNNs) and pre-trained models, have achieved accuracies ranging from 85.20% to 99.66%. However, the proposed Fine-Tuned ResNet50 model consistently outperforms others with an impressive accuracy of 98.20%. By leveraging on transfer learning and careful architectural design the proposed model demonstrates superior performance compared to previous studies using DarkNet, ResNet50, and pre-trained models. Graphical comparisons highlight its competitive edge, emphasizing its effectiveness in COVID-19 classification tasks. The ResNet50 architecture, known for its deep residual layers and skip connections, facilitates robust feature extraction and classification, especially in medical imaging. Data pre-processing techniques, like noise reduction and contrast enhancement, ensure input data quality and reliability, enhancing the model's predictive abilities. Training results reveal the model's steady accuracy improvement and loss reduction over 20 epochs, aligning closely with validation metrics. Evaluation on a test set of COVID-19 chest X-ray images confirms exceptional accuracy (98.20%), precision (99.00%), recall (98.82%), and F1-score (98.91%), highlighting its proficiency in identifying COVID-19 cases while minimizing false positives and negatives. Comparative analyses against prior studies further validate its superior performance, establishing the Fine-Tuned ResNet50 model as a reliable tool for COVID-19 diagnosis. Future research should focus on exploring ensemble learning techniques, interpretability methods, and stakeholder collaboration to ensure safe AI deployment in clinical settings. Moreover, larger and diverse datasets are crucial for validating model performance and improving generalization, ultimately enhancing patient care and public health outcomes in the mitigating COVID-19 and future pandemics.
    
    VL  - 9
    IS  - 1
    ER  - 

    Copy | Download

Author Information
  • Abstract
  • Keywords
  • Document Sections

    1. 1. Introduction
    2. 2. Related Works
    3. 3. Materials and Methods
    4. 4. Results and Discussion
    5. 5. Conclusion
    Show Full Outline
  • Abbreviations
  • Author Contributions
  • Conflicts of Interest
  • References
  • Cite This Article
  • Author Information