Crimson Publishers Publish With Us Reprints e-Books Video articles

Full Text

Gerontology & Geriatrics Studies

Transfer Learning Based Covid-19 Detection Using Chest X-Ray Images

Lakshmi Patibandla RSM* and Anil N

Vignan’s Foundation for Science, Technology & Research, India

*Corresponding author:RSM Lakshmi Patibandla, Vignan’s Foundation for Science, Technology & Research, India

Submission: January 23, 2023; Published: February 14, 2023

DOI: 10.31031/GGS.2023.08.000685

ISSN 2578-0093
Volume8 Issue2


The number of verified COVID-19 virus infections has continued to climb since the beginning was detected in Wuhan, China, near the year’s conclusion in 2019. The COVID-19 virus can be stopped from spreading if people who are afflicted are recognised immediately and appropriately. CNNs (Convolutional Neural Networks) are a type of Deep-learning, method used to detect visual data anomalies. To increase the CNN technique’s accuracy for recognising COVID-19 patients’ X-ray pictures of the chest, the researchers recommend utilising a transfer learning model. The model of Transfer Learning was employed in this investigation. was DenseNet121. The precision acquired in this study is analysed using the model of transfer learning, which is then compared to standard learning accuracy findings. With regards to the, We employed 1500 chest X-ray images from a large open-source dataset in the typical teaching approach. The settings for epoch and batch size selection, as well as transfer learning, are utilised to evaluate system performance. When using transfer learning methods, pairing parameters with epochs of 100 and batch size 64 give a 98 percent rate of precision, indicating that this is the ideal pair parameter. In terms of classification accuracy, our transfer learning approaches surpass the techniques of traditional education.

Keywords: COVID-19; Convolutional neural networks; Transfer learning; DenseNet121; Accuracy


Acute Respiratory Syndrome with Severity (SARS) is an abbreviation for Respiratory Acute Syndrome (SARS). Coronavirus 2 is a kind of virus. new coronavirus from the Coronavirus disease is caused by the Coronaviridae family of viruses (COVID-19) (SARS-CoV-2). Covid-19 had its international premiere in December in Wuhan, China this year. MERS-CoV the first instance of Middle East Respiratory Syndrome- Coronavirus was discovered in the Middle East. discovered in Saudi Arabia in 2012, albeit it did not spread as much as it does now. As of April 28, 2021, there were 147,539,302 confirmed cases, with there were 3,116,444 fatalities registered. In the year following the original outbreak. The entire number of confirmed instances and fatalities from COVID-19 is rising, posing a worldwide health threat. COVID-19 infects epithelial cells in the lungs. in the alveolus. As a result, pneumonia is a symptom that occurs before the commencement of the disease. of the illness, because it is difficult to think of examples of COVID-19 was identified when it was yet in its infancy. Instances can assist to decrease infection propagation while lowering the likelihood of death of a patient. Intelligent machines (AI) are used to analyse medical pictures for example, X-rays and CT scans to find cases of X-ray pictures of the chest from COVID-19 and with advanced learning, radiologists may be able to diagnose more COVID-19 rapidly and accurately. X-ray scans of the chest are common. Utilized to diagnose illness because of their great sensitivity. The lungs of the patient are COVID-19 virus infects in its early stages. Showed differences from normal pneumonia-indicated lungs, notably lower lobe subpleural and posterior regions. Chest X-Ray is also a low-cost, low-radiation technique that many hospitals provide. This diagnosis is based on data from COVID-19 people who had healthy lungs but pneumonia caused by germs and viruses of various types. The Convolutional Neural Network, a deep learning architecture built especially for the handling of images, is used to recognize chest X-ray pictures (CNN). Although CNN’s method is effective for categorizing huge quantity datasets, datasets, themselves in each case research aren’t necessarily huge and may contain an uneven percentage of every label, lowering the accuracy obtained. It is feasible to solve the problem by implementing a transfer learning strategy. A transfer learning strategy is defined as a CNN system that has been trained on a single individual and applied to new data sources [1]. The classical learning paradigm, which is based on layer depth, varies from the transfer learning technique.

Transfer learning has gained popularity in recent years. Popular with the medical field to aid in the Medical images being classified. N. Hilmizen had already proposed utilizing two distinct transfer learning architecture models COVID-19 should be classified into two categories: COVID-19 and normal including a CT scan and a chest X-ray, with excellent accuracy. Grey Level Co-occurrence, Local Binary Pattern (LBP), and Oriented Pattern Histogram (HOG) are all features that can be found in the data. from glcm were used, NR, Luqy’s suggested categorization COVID-19 X-ray and CT scan pictures reveal Grey Level Co-occurrence, Local Binary Pattern (LBP), and Oriented Pattern Histogram (HOG) are all characteristics that can be found in the data in glcm increase accuracy. According to Ensemble learning stacking, Annisa methods like SVC, RF, and K-Nearest Neighbors are examples of classification algorithms (KNN) that improve CT and X-Ray picture accuracy. In prior studies, two categories were employed. COVID-19 detection differs between the Normal and COVID-19 classes. We proposed integrating CNN’s transfer learning architecture using the DenseNet121 model, which is included in the Keras distribution, to categorise COVID-19 into three categories. Chest X-ray pictures must reveal Normal COVID-19 Pneumonia, Pneumonia COVID-19 Pneumonia and Viral Pneumonia sufferers must be identified. ImageNet datasets are used by the Keras Library to pre-train denseNet121 models. We tested a variety of big batch sizes and epoch sizes to achieve maximum accuracy. The transfer learning’s precision approach is then evaluated and compared to techniques of traditional education. The goal of this research is to see how the approach to transfer learning affects the accuracy of Pneumonia COVID-19 case categorization.

Literature Survey

A variety of experiments and research projects using machine learning and deep learning have been developed and produced in medical imaging utmost field diagnostics, such as Chest X-Ray imaging. Ibrahim and his colleagues created a deep learning algorithm based on a pre-trained AlexNet model. The model allowed for two-, three-, and four-way categorization. The results of the three-way and four-way categories were nearly identical. To improve prediction accuracy in a unique diagnosis platform created by Hou et al., a convolutional neural network with deep layers (DCNN) was employed to recognize photographs from the X-ray dataset. Their method is 96 percent accurate and may be utilized on a large scale for COVID-19 rapid screening for a variety of applications. CovXNet, a CNN-based deep model, was developed. Mahmud et al. used CovXNet, a deep CNN-based model that blends depth-wise convolution with variable dilation rates, to extract different information from chest X-rays. The model is built and trained using the stacking technique. Finally, a discriminative localization based on the gradients approach is used to identify abnormal areas of X-ray images associated with many forms of pneumonia. COVID/Normal pneumonia accuracy was 97.4 percent, the Accuracy of COVID/Viral pneumonia was 96.9%, COVID/ Bacterial pneumonia accuracy was 94.7%, and COVID/Bacterial pneumonia accuracy was 94.7 percent.COVID/normal/viral/ bacterial pneumonia multiclass test has a 90.2 percent accuracy rate [2].

Dataset and Method


The Kaggle platform, which is free and open source, provided the data for this study. Only 1500 images were picked from a total of 15.161 submissions. Normal Pneumonia, COVID-19-induced pneumonia and viral pneumonia Pneumonia each have 500 photos. This is a two-dimensional object collection of X-Ray pictures of the chest in various sizes (Figure 1). COVID-19 the first step in using CNN architecture to identify pneumonia is data pre-processing. We apply data enhancement to decrease the picture by 224x224 pixels during these phases. This was done to guarantee that the picture sizes used in training and testing were the same. The training process will take longer and the accuracy will deteriorate if the picture data has a size disparity. Additionally, normalised data normalises pixels with values ranging from 0 to 1. The data is segmented. into three categories: Sets for Validation, training and testing with training sets accounting for 70% of the dataset, sets of validation for ten percent, and twenty percent for testing sets. In addition, the CNN optimization approach was used to minimize the loss function in this study. Adam Optimizer was used in conjunction with it [3].

Figure 1:Chest x-ray images (i) COVID-19 Pneumonia patients, (ii) Patients who have healthy lungs, (iii) Patients suffering from viral pneumonia.

Transfer learning

Man learns from his experiences and applies what he has learnt to circumstances that are similar to the previous one. Like transfer learning, this concept establishes a mechanism for learning a task and then transferring what you’ve learned to the target task. This study used DenseNet121, a transfer learning model that was trained using ImageNet data that might be used to make quicker and more precise classification models. In this work, the Transfer Learning method’s accuracy results were also investigated by utilizing the usual learning approach. The study framework for transfer learning and traditional learning methodologies is depicted in (Figure 2).

Figure 2:Densenet121 transfer learning program flowchart.

DenseNet121 model

The denseNet121 model was picked since it is one of ImageNet’s smaller types of DenseNet. DenseNet is a network of networks. Design that uses feed-forward connections between layers. DenseNet’s layer distributes the map feature to all L 1 subsequent layers, giving an L(L+1)/2 network, by using lh map input features from all preceding convolution blocks. The number of layers of a classic convolutional network with L layers is L, with each layer’s input coming from the layer before and its output flowing to the next. As a consequence, DenseNet, like Reset, achieves good accuracy with fewer parameters and dense net accuracy in the ILSVRC 2012 datasets. Improve your training’s efficiency and accuracy. DenseNet121 has 427 layers that are grouped into 58 blocks. Its Keras library was used as a foundation. The Architecture of Densenet121 is depicted in (Table 1). DenseNet provides the benefit of reducing the number of parameters while simultaneously addressing gradient problems, improving feature propagation, and increasing feature reuse. (Table 1) shows the DenseNet architecture for ImageNet, which is made consists of multiple levels: DenseNet121, DenseNet169, DenseNet201, and DenseNet264 are examples of dense networks [4]. It’s critical to remember this while using DenseNet. In four dense chunks three batches, transition layers normalization, Convolution with 33 filters and ReLU activation are implemented. A transition layer is used to link two neighboring blocks. Convolution and pooling can be used to increase or decrease the size of a feature (average pooling). Following the classification step, the following stage employs softmax activation with global average pooling. Four people were trained. types of classical and transfer learning models with batch sizes of 48 and 64 for 80 and 100 epochs to compare batch size and epoch to ensure the maximum level of accuracy, all models and other components are created simultaneously [5]. To assess system performance, the Model performance of DenseNet121 via transfer learning or classical learning is employed, picking precision into consideration. precision, and speed into consideration taking into consideration, as well as different levels of sensitivity (Figures 3 & 4) show the confusion matrix of each categorization result for analytical purposes [6]. The accuracy formula for multiple classes is as follows: Create three categorization classes: Normal, COVID-19, and Viral Pneumonia, using a multi-class confusion matrix (33) classification looking like (Table 2). The True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN) values are used to determine whether something is true or false are derived as shown in (Table 3) based on (Table 2).

Table 1:DenseNet architecture

Figure 3:Confusion matrices of transfer learning.

Figure 4:Confusion matrices of traditional learning.

Table 2:The confusion matrix 3×3.

Table 3:Value of TP, FP, TN, FN.

The following formulas are used to calculate accuracy, precision, and sensitivity:

Results and Discussions

We evaluated each detection program using 1080 data points in a training set and 120 data points in a validation set using varied epoch and batch size settings. Matrixes of confusion in (Table 1) and classical learning in (Figure 3) are used to characterize each program’s classification of COVID-19 utilizing transfer learning models. (Table 4) lists the model’s accuracy, precision, and recall. In this study, medical data is gathered, and machine learning is used to establish classes, guaranteeing that all forecasts are equally important. As a consequence, (Table 4) compares the precision, accuracy, and sensitivity numbers generated to demonstrate how well each parameter worked. The Confusion Matrix is a useful tool for problem-solving. Traditional learning is competent for COVID-19 classification, however as shown in (Table 3), Transfer Learning exceeds Traditional Learning in terms of precision, precision, and sensitivity. In this study, the transfer of knowledge approach with epoch 100, 64 batches yielded the greatest 98 percent accuracy. With batch size 48 and epochs 100 and 80, the classical learning technique achieves 95% accuracy. (Table 3) illustrates that Transfer Learning outperforms traditional learning in terms of precision and sensitivity. You’ll need the following computational capabilities to apply this method: 8192MB RAM, NVIDIA GeForce MX250 graphics card, Intel® Core i5-10210U CPU.

Table 4:Performance of all models.


According to the conclusions of this paper’s experiments, using classical learning architecture to categorize chest X-ray images resulted in an unstable classification model the model DenseNet121 was chosen. Since it possesses the fewest layers of any DenseNet model. This shows how a single layer may produce excellent precision. During the categorization test, utilizing The best results are obtained the transfer learning model DenseNet121 with the settings batch size 64 and epoch 100. The model’s constant performance and 98 percent accuracy back this up. With a transfer learning architecture, the appropriate for example, parameters or a different model structure might be employed. future study [7].


  1. Musleh AAWA, Maghari AY (2020) COVID-19 detection in X-ray images using CNN algorithm. Proc-2020 Int Conf Promise Electron Technol ICPET, pp. 5-9.
  2. Deb SD, Jha RK (2020) COVID-19 detection from chest X-Ray images using an ensemble of CNN models. Proc 2020 IEEE Int Conf Power Instrumentation Control Comput PICC, pp. 13-17.
  3. Rawat RM, Garg S, Jain N, Gupta G (2021) COVID-19 detection using convolutional neural network architectures based upon chest X-rays images. Proc-5th Int Conf Intell Comput Control Syst ICICCS, pp. 1070-1074.
  4. Fradi M, MacHhout M (2021) Real-time application for Covid-19 class detection-based CNN architecture. 3rd IEEE Int Conf Des Test Integr Micro Nano-Systems, DTS 2021.
  5. Dasare A, Harsha S (2021) Covid-19 infection detection and classification using CNN on chest X-ray images. 2021 IEEE Int Conf Distrib Comput VLSI Electr Circuits Robot Discov, pp. 292-296.
  6. Shadin NS, Sanjana S, Farzana M (2021) Automated detection of COVID-19 pneumonia and non-COVID-19 pneumonia from chest X-ray images using Convolutional Neural Network (CNN). 2nd Int Conf Innov Creat Inf Technol ICITech, pp. 57-63.
  7. Hastuti ET, Bustamam A, Anki P, Amalia R, Salma A (2021) Performance of true transfer learning using CNN DenseNet121 for COVID-19 detection from chest X-Ray images. IEEE Int Conf Heal Instrum Meas Nat Sci, pp. 2-6.

© 2023 Lakshmi Patibandla RSM. This is an open access article distributed under the terms of the Creative Commons Attribution License , which permits unrestricted use, distribution, and build upon your work non-commercially.