Empowering diagnosis: an astonishing deep transfer learning approach with fine tuning for precise lung disease classification from CXR images

A fast and precise diagnosis is crucial for the treatment and management of lung diseases, which are a major global cause of morbidity and mortality. Medical diagnosis and treatment planning depend heavily on the classification of lung diseases. The correct diagnosis and classification of many lung disease types is crucial for effective management and treatment. Radiologists with training evaluate medical images subjectively in order to classify lung diseases using traditional approaches. This paper proposed an effective technique for classifying lung diseases from CXR images. For the accurate classification of lung disorders, three distinct fine-tuned models are proposed. The effectiveness of the suggested fine-tuned models was evaluated using a newly developed CXR image dataset. According to the experimental findings, the proposed fine-tuned models outperformed the existing lung disease categorization models the accuracy is 98%. The suggested approach can effectively be used for lung disease classification.


Introduction
Several people all around the world have been affected by various lung diseases.Lung conditions increase a person's vulnerability to air pollution and certain physical issues.Lung function is consequently compromised [1].An infectious disease with a substantial death rate is lung disease.As a result of the significant disparities in morbidity and mortality in Indian states, chronic respiratory diseases, particularly pneumonia and tuberculosis, are of particular importance.
The lungs are located on either side of the chest.The trachea carries breathed air into the lungs through its tubular branches, or bronchi.The bronchi keep splitting into smaller and smaller branches till they are very small.Alveoli, which are collections of tiny air sacs, are where the bronchioles finally terminate.The alveoli collect and incorporate oxygen from the air into the blood.CO 2 and metabolic waste products are transported by the bloodstream to the alveoli, where they can be breathed in.The lungs are shielded by a thin tissue covering called the pleura, as shown in Figure 1.21% of oxygen is present in room air at standard atmospheric pressure.People consume roughly 4-6 percent of the oxygen when they exhale and return about 16 percent of the oxygen and carbon dioxide to the atmosphere [2].
One of the most serious medical issues in the world is lung disease.Lung disease can be brought on by infections, workplace exposure, drugs, and a variety of disorders, as shown in Figure 2.
Respiratory disorders pose a significant threat to human life, health, and productivity.Since December 2019, COVID-19, a novel coronavirus infection, has been associated with significant lung damage and breathing problems.Furthermore, the COVID-19 causal virus or other viral or bacterial infection can induce pneumonia, a type of lung disease [3].
• COPD: Damage to the lungs makes it difficult to expel air, resulting in shortness of breath.The most common cause of COPD is smoking [4].• Pneumonia: Bacteria is the most prevalent cause, but a virus can also cause pneumonia [5].• sthma: Breathlessness and wheezing are caused by the lungs' airways (bronchi), which swell and may even spasm.Allergies, viral infections, or air pollution are commonly responsible for asthma symptoms [6].• Pleural Effusion: The pleural space, which is often quite small, is where fluid gathers between the lung and the interior of the chest wall.Breathing problems may result from significant pleural effusions [7].• Lung Cancer: It can attack nearly any portion of the lungs.Smoking is the leading cause of lung cancer [8].• Tuberculosis: A bacterial pneumonia caused by Mycobacterium tuberculosis that progresses slowly.A recurring cough, a fever, weight loss, and night sweats are all indications of tuberculosis [9].• Pulmonary Hypertension: High blood pressure in the arteries flowing from the heart to the lungs can be caused by a variety of illnesses.Idiopathic pulmonary arterial hypertension is a disorder in which no cause can be found [10].• Severe Acute Respiratory Syndrome: The virus causes a specific type of pneumonia and it was originally identified in Asia in 2002.The pneumonia in both lungs brought on by the coronavirus that sparked a worldwide outbreak in 2019 might result in fluid buildup and make breathing challenging.COVID-19 can cause long-term lung damage as well as other respiratory illnesses such acute respiratory distress syndrome [11].
The most widely used medical imaging modalities include X-rays, positron emission tomography, computed tomography, ultrasound imaging and magnetic resonance imaging.A diagnostic imaging technique known as X-ray medical imaging uses X-rays to yield images of the inside of the body.Broken bones, dental issues, lung infections, and cancers are just a few of the conditions that are commonly diagnosed with X-ray imaging.X-ray imaging has a variety of advantages.A range of lung disorders, including pneumonia, lung cancer, emphysema, and tuberculosis, can be swiftly and precisely diagnosed with this non-invasive imaging technique.X-rays are often used in healthcare settings and are easily accessible, making them a useful diagnostic tool for many patients.The location and severity of lung anomalies can be determined by X-ray imaging, which can help with treatment planning.The management and treatment of respiratory illnesses heavily depend on the accurate diagnosis of lung diseases.Many lung diseases can now be correctly identified and categorized by healthcare professionals because of advancements in medical technology and research.Clinical evaluation, imaging techniques, pulmonary function testing, and laboratory investigations are all used to diagnose lung diseases.Even though, it can be difficult to distinguish between various lung diseases because many respiratory diseases have similar clinical presentations and symptoms.As a result, proper diagnosis is necessary to deliver the right care and enhance patient outcomes.This necessitates a detailed analysis of the patient's medical history, checkup, and diagnostic tests.Generally, a multidisciplinary approach comprising interaction between medical experts, radiologists, pathologists, and laboratory technicians is necessary for the identification of lung diseases.Thus, it is crucial to have a reliable system for classifying lung diseases.
For the classification and identification of lung disorders from CXR images, several techniques are frequently used.Tawsifur Rahman et al. [12] introduced an efficient method for the detection of tuberculosis from CXR images.The ability to distinguish between TB and normal CXR images was tested across nine distinct CNN models.The data was segmented by two different U-Net models.The proposed strategy outperformed all other current models.The segmentation can greatly increase the classification accuracy.Arpan Mangal et al. [13] developed a novel technique to recognize covid-19 from CXR images.A fully connected layer and a 121-layer deep convolutional network compose the model's framework.The suggested approach can successfully detect COVID 19 and showed promising results.Through the use of chest radiography and a dense convolutional network, Rajat Mehrotra et al. [14] presented a unique technique for diagnosing pulmonary disease.The region of interest can first be extracted for preprocessing from the CXR images.The preprocessed images can then be utilized for detection, and the infected lung images are ultimately categorized into several lung disorders.The suggested approach can improve detection performance.The lack of data is the primary limitation on this research work.Subrato Bharati et al. [15] created a novel hybrid DL system.The proposed hybrid deep learning model offers higher detection performance on the NIH dataset, and the hybrid approach can effectively identify the diseased area in CXR images.A Deep-Learning System (DLS) was developed by Nilanjan Dey et al. [16] to diagnose lung abnormalities from CXR images.Chest radiographs that have been conventionally processed and those that have undergone a threshold filter are both used in the proposed work.The results of this method demonstrate that, in comparison to previous DL approaches, the VGG19 framework with RF offers improved classification accuracy.The classification test is then conducted using the TL and ensemble methodology.
A deep transfer learning technique that leverages CXR and CT-Scan images to speed up the recognition of COVID-19 cases was proposed by Harsh Panwar et al. [17].This is due to the possibility that early CXR screening for COVID-19 could yield significant data in the identification of suspicious COVID-19 cases.The suggested model is evaluated across three different datasets.To readily comprehend the detection of radiological images and choose the next step, a Grad-CAM based colour visualization strategy was also recommended.According to the experimental findings, the proposed method may efficiently identify covid-19 positive cases much more quickly than an RT-PCR test.In order to efficiently identify covid-19 from CXR images and CT scans, Emtiaz Hussain et al. [18] developed a unique CNN-based technique.Binary and multiclass classifications can be performed well using this suggested strategy.The suggested model offers remarkable solutions to problems involving binary and many classes of classification.The main drawback of this method is that, due to hardware constraints, only a few datasets were employed for training.Amit Kumar Jaiswal et al. [19] suggested a DL-based technique for the identification and localization of pneumonia from CXR images.The suggested model is based on pixelby-pixel segmentation using mask-RCNN, which combines global and local data.The training process was significantly altered in the suggested method to achieve robustness, and a novel post processing phase that combines bounding boxes from many models was included.Using a dataset of chest radiographs showing possible causes of pneumonia, the proposed identification model performed better than expected.A powerful algorithm for the identification of pneumonia based on digital CXR images was created by Mohammad Farukh Hashmi et al. [20], which may help physicians in making decisions.The deep networks used in this technology featured fewer parameters but more complex structures, thus they used a shorter processing time but were more reliable.It was suggested to mix various architectures using a weighted classifier.The suggested approach provided better outcomes.The lack of readily available data was the main drawback of this proposed approach.Vikash Chouhan et al. [21] introduced a unique DL architecture that makes use of the methodology of transfer learning to identify pneumonia.By extracting attributes from images using a variety of neural network models that have already been trained on ImageNet, and then feeding those attributes into a classifier for prediction.The outputs of the five pretrained models were combined to create an ensemble model.The outcomes of the experiment demonstrated that the ensemble model performed better than the five pretrained models.The lack of image data that accurately represents all different forms of pneumonia pathologies places a restriction on the proposed approach because it makes it impossible to increase accuracy or use a deeper network with more parameters.
Luca Brunese et al. [22] proposed a method for the detection of pneumonia.The initial phase is to recognize pneumonia if an X-ray of the chest shows it.The goal of the second phase is to clearly differentiate between COVID-19 and pneumonia.The major aim of the last stage is to indicate COVID-19 existence.Two separate datasets are used to examine the suggested technique.The suggested method demonstrated improved detection accuracy.A novel computer-aided diagnosis approach was created by Xianghong Gu et al. [23] to detect viral and bacterial pneumonia in chest radiography.Lung area identification and pneumonia type classification constitute the two main components of the approach.A DCNN was used to identify the regions of the lungs.From the target lung region, the characteristics are extracted.Finally, the manual and DCNN characteristics are combined, and SVM classifiers are employed for binary classification.The effectiveness of the suggested technique was evaluated using two different datasets.The model provided outstanding performance.Pedro R. A. S. Bassi and Romis Attux [24] proposed image classifiers based on TL and Dense CNN to categorize CXR images.The fine-tuned neural networks are applied using a two fold transfer learning method and pre-trained on ImageNet.The twice TL approach is changed by the output neuron keeping that was also proposed.Twice TL and output neuron retaining both enhanced performances, particularly in the early stages of training.To enhance the effectiveness of diagnostic performance, Sungyeup Kim et al. [25] proposed a DL technique employing a TL algorithm to classify lung diseases on CXR images.In order to include more samples and variance diversities, the data were first augmented.In order to extract their useful characteristics for classifying disorders, they were then immediately incorporated into a DL model.The model surpassed the current models and had excellent detection performance.A robust tuberculosis detection technique was created by Muhammad Ayaz et al. [26] by combining deep features and hand-crafted features using ensemble learning.Deep features were extracted using pre-trained DL models, while the Gabor Filter was used to extract hand-crafted features.The several classifiers were integrated using an ensemble to produce a classifier that was more reliable and precise.Data from two distinct datasets were used to assess the model's performance.According to the experimental findings, the proposed system performs better than the current approaches.
Some of the limitations of the existing works related to lung disease classification are mentioned below.The availability of large, high-quality datasets is essential for developing accurate and reliable machine learning models.However, there is still a scarcity of annotated medical image data for lung diseases, particularly for rare conditions.This limits the ability of deep learning models to generalize to new cases and may lead to overfitting to the available data.One of the challenges of DL models is their lack of interpretability.Due to the complexity of their decision-making processes, these models are frequently referred to as "black boxes."This makes it challenging for clinicians to trust and utilize the model's outputs in clinical decision-making.Deep learning algorithms can extract complex features from images automatically, but this can make it difficult to interpret the results and understand which features are driving the classification.In some cases, lung disease datasets may be imbalanced, with a disproportionate number of cases of one disease compared to others.This can make it difficult for the algorithm to learn to classify all diseases accurately.In order to solve the mentioned problems, an efficient lung disease classification model was proposed in this research work.

Materials and methods
The initial step in the research work is the dataset collection.The dataset collection was followed by data preprocessing and data augmentation.The CXR dataset contains images that were used to train the pretrained models, which had already been trained on the ImageNet dataset.For classifying lung diseases, the proposed fine-tune architectures are employed.The model divided the CXR images into five groups according to the type of lung disease they represented.Finally, the effectiveness of the suggested method is assessed and contrasted with the current approaches.Figure 3 displays the block diagram of the suggested method.

Dataset description
The absence of freely available labelled datasets is the biggest barrier to training and validating the suggested method.Thus, to increase the generalizability of the proposed model and create a more accurate system, working with a large dataset is crucial.As a result, two separate datasets were collected and combined to cre-

Data preprocessing and data augmentation
The primary objective of image pre-processing is to improve data quality by applying techniques for  denoising, boosting the edges of image structures, and enhancing image contrast.The method of "image preprocessing" involves modifying digital images to enhance their visual quality or to draw out relevant information.The process of artificially creating more images using the original images is known as augmentation, and it is used to increase the size of datasets.This is especially beneficial for computer vision and artificial intelligence applications where training on a sizable dataset is necessary.The techniques for image augmentation include rotating, zooming, flipping, adding noise, adjusting brightness and contrast, and shifting the colour of the images.Images are frequently preprocessed before being utilized in learning systems by combining image processing and augmentation.

Convolutional neural networks and TL approaches
Convolutional neural networks (CNNs) are a form of DL neural network that are highly efficient for processing images.Several convolutional layers in a CNN process the input image, using convolutional filters to each layer to gather information from the image.The output of each convolutional layer is then processed using a non-linear activation function, such as the "Rectified Linear Unit (ReLU)", to ensure non-linearity into the network.The output of the last convolutional layer which was preceded by one or more fully connected layers is then applied to make the final classification or prediction, as illustrated in Figure 5.
The activation layer is very helpful since it may be used to estimate any nonlinear function.The activation layer receives the feature map from the convolutional layer as input [27].After convolution, the representation produced by earlier kernels is reduced in spatial size using pooling layers.This helps to reduce the amount of parameters, which minimizes the amount of computation needed.Positional and rotationally invariant dominating features are extracted using these layers.The most widely used pooling layers are max pooling and average pooling.Both techniques lower the dimensions and computing cost [28].
It takes an absurdly long time and costs a lot of computation power to train a CNN model from scratch [29].Therefore, the traditional approach uses datasets to train pre-trained CNN models.The new information is being utilized by TL.Pre-trained samples of TL are employed in classification problems when there are insufficient training examples.In TL, pre-trained models can be applied in two distinct ways.The data is categorized using a pre-trained CNN model in the first technique, which involves extracting features from the data.In accordance with the number of classes included in the data set, the final fully connected layer is then modified.The alternate approach involves retraining all or a subset of the layers in the CNN model using a set of predetermined techniques.As a result, the new classification task uses a modified architectural design.

Proposed fine-tune architectures
A neural network that has already been trained can be modified using a deep learning technique called fine tuning to match a new task or dataset.It entails changing or retraining some of a model's layers on a new dataset after it has already been trained, such as a convolutional neural network.The core concept of fine tuning is that the pre-trained model has already acquired a collection of generic features from a sizable and varied dataset.The model can be modified to execute a new task with less training time and training samples by freezing the weights of the bottom layers, which capture these basic properties, and retraining the higher layers on a new dataset.When the new dataset is minimal or the training time is constrained, fine tuning can be a very successful technique for modifying previously learned models for new tasks.To obtain the best performance, it is necessary to carefully choose the pre-trained model and the new dataset as well as to finetune the hyperparameters.The fundamental algorithm for fine tuning is given here.

Algorithm: Input:
• A pretrained CNN • A new dataset for fine-tuning • Hyperparameters for fine-tuning (eg: learning rate, number of epochs etc.) Output: • A fine-tuned model for lung disease classification Begin: 1. Load the pretrained model: • Load the weights and architecture of the pretrained model.

Freeze the lower layers:
• Identify the lower layers of the pretrained model that capture general features.• Freeze the weights of these layers to prevent them from being modified during fine-tuning.3. Replace or retrain the higher layers: • Identify the higher layers of the pretrained model that are responsible for the task specific features.
• Replace these layers with new layers that are appropriate for the new task, or retrain these layers on the new dataset.• Initializes the weights of the new layers randomly.4. Fine-tune the model: • Compile the modified with a new loss function and optimer appropriate for the new task.
• Train the modified model on the new dataset using the fine-tuning hyperparameters.• During training unfreeze the lower layers and update their weights using a smaller learning rate than the higher layers.5. Evaluate the fine-tuned model: • Evaluate the effectiveness of the fine-tuned model on a validation set.• Adjust the fine-tuning hyperparameters as needed to optimize performance.6. Save the fine-tuned model: In this work, three fine-tuned models are implemented for lung disease classification.The proposed finetuned models are: Modified VGG-16, VGG-19 and MobileNetV2.The following sections provide a detailed discussion of the suggested models.

Fine-tuned modified VGG-16 model
VGG-16 is a CNN architecture.The kernels might learn more complex attributes if the VGG model's depth is increased.During research on the viability of transfer learning, a VGG-16 network that had already been trained significantly outperformed fully trained networks [30].Over one million images from the ImageNet database were used to train this network.The network, which consists of 16 layers, can identify images from a range of categories.The first convolution layer receives 224×224 standard-sized RGB images.The image is distorted with the help of a set of kernels suited to have the smallest feasible receptive field.The 1×1 convolutional filter used by one of the pairings also linearly modifies the input channels.In order to maintain spatial resolution after convolution, the stride of convolution is adjusted to one pixel and the input spatial padding of the convolution layers is changed.Spatial pooling is achieved after the convolutional layers using five max-pooling layers.Using Stride 2, max pooling operations are performed over 2×2 pixel frames.
There are three convolutional layers placed above one another.The VGG-16 structure is displayed in Figure 6.
In this paper, a modified VGG-16 model was used to prevent the issue of underfitting and overfitting during training.On this modified VGG-16 network, a finetuning mechanism has been used.By employing two succeeding small convolutional kernels during feature extraction rather than a single large one, the original architecture of the VGG16 convolutional network was preserved.This speeds up training and retains the network depth by lowering the number of parameters and keeping the VGG16 perceptual effects.The input image size was 224×224.There were five blocks in the hidden layer.The pooling layers diminished the size of the image, while the flattened layer reduced the dimension of the feature maps.Before fine-tuning, the modified VGG-16 model underwent 50 epochs of training.Finetuning was applied at the tenth layer onwards of the base model and provided a low learning rate.After completing the fine-tuning, the model was trained for fifty epochs.An overview of the proposed modified VGG-16 model's before-and-after fine-tuning are provided in Table 1.

Fine-tuned VGG-19 model
VGG-19 is an extension of the original VGG-16 architecture and has nineteen layers, comprising sixteen convolutional layers and three fully connected layers.Images with a dimension of 224 × 224 pixels are accepted by the VGGNet.In addition, it remains one of the most extensively applied image recognition architectures in use today.A small receptive field is used in the convolutional layers of the VGG, or 3 × 3, which is a minuscule size but still has left/right and up/down recording capabilities.In addition, the input is linearly transformed using 1 × 1 convolution filters.ReLU units, which are a significant improvement over AlexNet in terms of training time, are the next component.The proposed VGG-19 model consists of sixteen convolutional layers, five max pooling layers, a flatten layer, and three fully connected layers.A RGB image with a fixed size was fed into the network.With the help of a single preprocessing operation performed throughout the whole training set, the mean RGB value   of each pixel was calculated.To cover the full image, they employed a kernel with a stride size of one pixel and a size of 3 × 3. To maximize pooling over a 2 × 2 pixel window, stride 2 was employed.Then, in order to enhance classification and compute performance, ReLu was used to provide the model non-linearity.3 fully connected layers were created, with the first 2 layers having a combined size of 4096 and the third layer being a softmax function, as displayed in Figure 7. Before fine-tuning, the proposed VGG-19 model underwent 20 epochs of training.Fine-tuning was applied at the tenth layer onwards of the base model and provides a low learning rate.After fine-tuning, the model underwent ten epochs of training.The review of the suggested fine-tuned VGG-19 model before and after fine-tuning is tabulated in Table 2.

Fine-tuned MobileNetV2 model
MobileNetV2, a CNN architecture, is designed to perform effectively on mobile devices.The bottleneck layers are connected by residual connections in an inverted residual architecture that underpins the structure.In the intermediate expansion layer, lightweight depthwise convolutions are employed as an origin of nonlinearity to filter characteristics.In the MobileNetV2 layout, the initial layer consists of a fully convolutional layer with thirty two filters, followed by nineteen bottleneck layers, as shown in Figure 8.
The amount of parameters and computation needed for MobileNetV2 are decreased with the usage of depthwise separable convolutions and linear bottlenecks.Because of this, it can operate more effectively on embedded and mobile devices that have constrained resources.Squeeze and excitation blocks, inverted residuals, linear bottlenecks, and other new design elements are all included in the architecture.Inverted residuals refers to the use of residual connections with a bottleneck topology, where the input and output dimensions are the same.This makes it possible to deepen the network without adding more  parameters.To minimize the dimensionality of the feature maps, linear bottlenecks are used in conjunction with 1 × 1 convolutions and linear activations.As a result, the network has fewer channels and can operate more effectively.The feature maps are utilized to capture channel-wise dependencies using squeeze-andexcitation blocks.They consist of a squeeze operation that lowers the feature maps' dimensionality and an excitation operation that determines channel-wise weights to emphasize key features.The complete model can be trained using this method for 60 epochs.Finetuning was applied at the eighty fifth layer onwards of the base model and provides a low learning rate.After fine tuning, the model underwent 65 epochs of training.Table 3 summary of the proposed MobineNetV2 model before and after fine-tuning.

Hardware and software setup
In order to create the new dataset, the two datasets were combined with the sample dataset that was obtained from Kaggle.The dataset was partitioned into training data, testing data and validation data.A total of 350 images from five different classes constitute the training data.The testing and validation data consists of a total of 100 and 50 images belonging to five classes respectively.In order to provide a robust computer environment, this study utilized the Google Collaboratory and the Microsoft Windows 10 operating systems.The proposed fine-tuned structures receive the preprocessed and enhanced CXR images as input.Finally the models classified the input images into five classes (Bacterial Pneumonia, Tuberculosis, Viral Pneumonia, Covid-19, Normal).The effectiveness of the proposed models are evaluated and compared with present methodologies.

Performance parameters
The effectiveness of the suggested model is evaluated using the performance parameters.Accuracy, Precision, Recall, and F1-Score are some of the frequently utilized performance metrics.One of the most often used measures to determine the performance of a DL model is the accuracy.It refers to the degree to which a model's predictions match the true values of the data it is trained on.Typically, it is expressed as a percentage of accurate predictions over all of the predictions generated by the model.
A model's precision refers to how effectively it can distinguish perfectly between positive cases among those that it has classified as positive.It is determined as the ratio of real positives to all cases labelled as positive.
The precision metric and recall are similar in that they both attempt to determine the percentage of actual positives that were incorrectly detected.True Positive, or predictions that are genuinely true, is a measure of the ratio of positives that were correctly identified as positive or misidentified as negative.
The F1-score provides a balance between precision and recall, which can be useful when the classes are imbalanced or when both FP and FN are costly.model can predict the actual labels of the data.Like the accuracy plot, there may be multiple lines on the plot for the training and validation loss to compare their performance.The accuracy and loss plot of the suggested  The classification reports of the suggested fine-tuned architectures show that the model's performance was   enhanced after fine-tuning.The modified VGG-16 model that has been performed superior to the other two models, as shown in Figure 15.
The performance comparison of the suggested methods with performance metrics are tabulated in Table 7.The modified, fine-tuned VGG-16 model performed better than the other two models.The finetuned modified VGG-16 has got an accuracy of 98%.The suggested method can efficiently be employed for lung disease classification.The following table compares the performance of the suggested model with the current approaches.
Seven currently used techniques were evaluated with the proposed fine-tuned models' performance.Compared to other methods, the proposed lung disease classification model provides an accuracy of 98%, which is superior to other methods.The suggested models efficiently be used for lung disease classification.

Conclusion
The accurate classification of lung diseases is crucial for proper diagnosis and treatment planning.With advancements in medical imaging technology and deep learning techniques, significant progress has been made in this area.Various studies have explored the effectiveness of DL algorithms for classifying lung diseases from medical images, achieving promising results.However, there are still some challenges, such as the lack of annotated data, generalizability, and interpretability of the model, that need to be addressed to improve the clinical application of these models.A novel lung disease classification model based on fine-tuning mechanism is proposed in this paper.Three fine-tuned models were employed for the effective categorization of lung diseases from CXR images.The proposed models are evaluated on a newly generated chest X-ray image dataset, which contain CXR images of four diseases and also normal CXR images.The results indicated that the suggested models performed superior to the existing lung disease classification approaches.

Disclosure statement
No potential conflict of interest was reported by the author(s).

CONTACT
M. Shimja shimjam.cse@yandex.com© 2023 The Author(s).Published by Informa UK Limited, trading as Taylor & Francis Group.This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0/),which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.The terms on which this article has been published allow the posting of the Accepted Manuscript in a repository by the author(s) or with their consent.
ate a new dataset.The first dataset [26] contains CXR images in four classes (Covid-19, Pneumonia, Tuberculosis, Normal).The CXR images of Bacterial Pneumonia and Viral Pneumonia are added to the above mentioned dataset.The final CXR image dataset was employed for training and testing.It comprised 5 classes (Tuberculosis, Covid-19, Bacterial Pneumonia, Viral Pneumonia and Normal).The new dataset consists of test, train and validation subfolders.Each subfolder contains five lung disease classes.The sample images are given in Figure 4.

Figure 3 .
Figure 3. Block Diagram of the Suggested Approach.

Figure 10 .
Figure 10.Loss plot of proposed fine-tuned modified VGG-16 (a) before fine-tuning (b) after fine-tuning.The proposed models were executed after the dataset had been prepared.The models were created and trained on Google Collaboratory and the entire process was done in Python and TensorFlow.For classification, the Adam optimization algorithm was applied.The batch size was chosen at 32, and categorical cross entropy was used as the loss function.The performance of the models were evaluated on two instances (before fine-tuning and after fine-tuning).Two popular visualizations for tracking a model's training include accuracy plots and loss plots.The effectiveness of a model on the training and validation datasets can be observed on an accuracy plot.The plot may show multiple lines, one for the training accuracy and one for the validation accuracy, to compare the performance of the model on both the datasets.A loss plot displays the loss of a model on the training and validation datasets across the training period.The loss represents how effectively the

Table 3 .
Model summary of Fine-tuned MobileNetV2 Model.

Table 7 .
Comparison with current models.