Deep learning with multi class classification for detection of COVID-19 and Pneumonia

DOI : 10.17577/IJERTCONV11IS03012

Download Full-Text PDF Cite this Publication

Text Only Version

Deep learning with multi class classification for detection of COVID-19 and Pneumonia

Deep learning with multi class classification for detection of COVID-19 and Pneumonia

P. Kalaivani

Assistant Professor

Department of Computer Science and

Engineering

Kongu Engineering College

Erode, India

kalaivanip.cse@kongu.edu

A.Dhivya

UG Scholar

Department of Computer Science and

Engineering

Kongu Engineering College

Erode, India

dhivya.arumugam28@gmail.com

G.Dharani

UG Scholar

Department of Computer Science and

Engineering

Kongu Engineering College

Erode, India

dharanigopal30@gmail.com

S.Bharathi

UG Scholar

Department of Computer Science and

Engineering

Kongu Engineering College

Erode, India

bharathisanmugaraj@gmail.com

Abstract – Early detection of pneumonia disease and COVID- 19 can increase the survival rate of patients with lung infections. While the signs and symptoms of COVID-19 and pneumonia are quite similar, a chest X-ray can distinguish between the two to identify and diagnose each condition. A trained radiologist may find it challenging to distinguish between pneumonia and Covid19 from CXR pictures since manual mistakes are quite likely to occur. The classification of images for use in medical imaging and other fields benefits greatly from deep learning (DL) techniques. The problem statement is that it is difficult to distinguish COVID- 19 infection from pneumonia using chest X-rays since they both have similar symptoms. Here the work depicts by comparing various CNN models and detects the differences in chest X-rays for the identification of diseases, with high accuracies. A new approach to the multi-classification method is accomplished. Pre- processing techniques such as histogram equalization and bilateral filtering are used to enhance the quality of chest X-ray images. The proposed system is experienced with the CNN architectures such as VGG16 and InceptionV3 which are used for multi- classification. It is noted that InceptionV3 is less expensive. The comparison is done between both the models, and the accuracies are compared to identify the best model. VGG16 attained an accuracy of 88%, and InceptionV3 attained the highest accuracy with 93%. All architecture performances are compared using various classification metrics for estimating the performance of DL techniques.

Keywords: Covid 19; Pneumonia; Inception V3; VGG; CNN.

  1. INTRODUCTION

    Deep learning, which is fundamentally a neural network with more than three layers, is a subset of machine learning. For the detection and classification of defects in Chest X-rays deep learning techniques were carried out, as it is the most commonly used method in image recognition. CNN is one of the deep learning techniques examined in this work for identifying

    whether the patients are affected with pneumonia, COVID-19 or they are free from diseases through the X-ray images and explained in terms of accuracy. In the existing system, the binary classification method is used for classifying the defects with an accuracy of 85%. Multiclass classification is a classification task with more than two classes as pneumonia, COVID 19 and normal are the three various classes defined in the proposed system. This approach brings detection faster and easier with the help of Chest X-ray images. For better-quality images, pre-processing methods of histogram equalization and bilateral filtering are carried out. Histogram equalization is an image pre-processing method that stretches out the intensity range of images. Smoothening and preservation of edges are achieved with bilateral filtering. CNN models of VGG16 and InceptionV3 architectures are established for identifying the best performances among them.

    1. Detection of pneumonia

      A lung infection known as pneumonia is brought on by bacteria, viruses, or fungi. Based on the x-rays that were collected, our project is to identify lung illness. A sudden, high fever and chills are the classic symptoms of pneumonia. Infections are primarily brought on by bacteria or viruses, and less frequently by fungi and parasites, resulting in pneumonia. The majority of the time, pneumonia is brought on by microorganisms that are inhaled (aspirated) from the upper airways into the lungs, but it can also be brought on by an imbalance between the microorganisms that inhabit the airways and lungs or that directly infect the lungs from another infection site close by. Within a few hours, people with pneumonia begin to feel sick. However, it can start slowly and just have a few, moderate symptoms, especially in older persons.

    2. Detection of covid 19

      The SARS-CoV-2 virus causes coronavirus disease, which is an infectious disease. It belongs to the coronavirus family, which also includes viruses that cause more serious disorders such as Middle East respiratory syndrome (MERS) and severe acute respiratory syndrome (SARS). Droplets released when an infected individual cough, sneezes or speaks are the major means of transmission for this. A person can contract the coronavirus from another individual. A test is used to diagnose it. The severity of the infection will determine how COVID-19 is treated.

      Resting at home and taking medication to lower the fever usually suffices for lesser illnesses. As with the delta and omicron versions, mutations may make it possible for the coronavirus to spread more quickly from person to person. More infections can lead to more people being seriously ill, as well as more chances for the virus to evolve new mutations.

    3. Deep learning

    Deep learning is a form of mimic of the human brain, much like Artificial Neural Networks are. A branch of Machine Learning called "deep learning" is solely dependent on neural networks. The concept of deep learning is not new. It has been around for some time . Accessing more data and computational power than the procedure had in the past, is more common now. Over the past 20 years, processing power has grown exponentially, which has led to the development of deep learning and machine learning. Deep learning is formally defined as neurons.

    1. Convolution neural network

      Convolutional neural networks (CNN), a particular kind of deep learning architecture, are designed for certain tasks like classifying images. An input layer is one of the components of a CNN. However, the input for fundamental image processing typically consists of the image's pixel values which is a two- dimensional array of neurons. It also has an output layer, which is made up of a single-dimensional array of output neurons. CNN processes the incoming images by combining convolution layers with sparse connections. They also include down sampling levels known as pooling layers used to reduce the number of neurons required in subsequent layers of the network.

    2. VGG16

      The VGG model, also known as VGGNet, is a 16-layer convolutional neural network model that is commonly abbreviated as VGG16. The model which these researchers released is defined as "Deep Convolutional Networks for Large Scale Image Recognition". ImageNet is a dataset that contains over 14 million images arranged into about 1000 sections. It also performed well in comparison to other models submitted to ILSVRC-2014. It outclasses AlexNet by using many 3×3 kernel-sized filters instead of the massive kernel-sized filters. Over several weeks, Nvidia Titan Black GPUs were used to train the VGG16 model. The previously mentioned 16-layer VGGNet-16 can classify photos into 1000 different object

      classifications, such as animals, pencils, mice, and many more. Chest X-rays with a resolving of 224 x 224 are also supported by the model.

    3. InceptionV3

    Convolutional Neural Networks are a deep learning method for categorizing images called Inception V3. The basic model V1 of Inception, which was first made available in 2014 as Google Net, has been upgraded into the more complex Inception V3. When a model has numerous thick layers of convolutions, the data became overfit. The conception V1 model uses the idea of numerous on same level, filters of different sizes to get around this. As a result, inception models use parallel layers rather than deep layers, which results in a larger model than a deeper one. The inception V3 model is simply the Inception V1 model with improvements. The InceptionV3 model optimizes the network using a variety of techniques for enhanced model adaptability. It yields better results. Compared to the Inception V1 and V2 models, it has a larger network, but its speed is unaffected. In terms of computing, it is less expensive. It makes use of auxiliary Classifiers as it regularizes.

  2. EXISTING SYSTEM

    Most research domains have used machine learning and deep learning techniques. Deep Learning is a component of machine learning that helps create intelligent solutions to complex problems [5]. Artificial neural networks are used in deep learning to examine data and create predictions. Almost all corporate sectors have used it. However, they need a lot of data, a lot of processing power, and not a lot of resources. In addition, for smart various applications to enable and assist their services, developed systems must be secure and have high energy efficiency.

    In terms of accuracy and efficiency, medical healthcare systems are one of these applications that needs improvement. In existing, the dataset is trained as two binary classifications without pre-processing. A CNN architecture is made up of a stack of unique layers that, by using a differentiable function, convert the input volume into an output volume (such as keeping the class scores). There are several uses for CNN, including medical imaging, object identification, and picture classification. VGGNet, ZFNet, and Alexnet are three CNN models for the classification of an image that excel in practical applications. In existing, the covid x CT 1,94,922 chest X-ray slices from 3,745 patients are trained as hybrid binary classification without preprocessing with greater accuracy.

    There are two phases: The accuracy in the first phase, used the DenseNet-201 structure to separate the covid and normal CT slides, which was high and the accuracy of the second phase which used the InceptionV3 architecture to classify Normal and Pneumonia CT slices was greater. The data are divided into Covid and Pneumonia categories using the Phase-1 model. The phase-2 model may categorize Pneumonia

    pictures after phase 1 into groups of either normal or pneumonia. Consequently, phase 1 and 2 both undergoes classification.

    Rajpurkar, Pranav, and Jeremy Irvin trained CheXNet on the recently released Chest X-ray14 dataset to expert-level automation, wishing that this technology is improving healthcare delivery and increasing access to medical image analysis, particularly X-rays. The retrained model is then analyzed by comparing the results to state-of-the-art approaches. Creating an algorithm that identifies the disease pneumonia from anterior chest X-ray images to a level that exceeds the abilities to practice radiologists.

  3. PROPOSED SYSTEM

    Fig 1. Proposed model architecture

    The proposed system explains that the dataset is collected concerning the chest X-rays which were distinguished as covid 19, pneumonia, and normal images. After collection, the images were undergone to two different kinds of pre-processing methods. The first pre-processing method used here is histogram equalization, which helps improve the contrast in images. This method depicts and visualizes the defective area in chest X-ray images. The second method is bilateral filtering, this method is an edge-preserving, and noise-reducing smoothing filter used in chest X-ray images.

    The models used were VGG16 and InceptionV3 in this proposed system. This system experiences four phases for identifying the best performance among them. At first, the images were pre-processed using histogram equalization with VGG16 with an accuracy of 87%. In the second phase, the images are processed with both preprocessing methods of histogram equalization and bilateral filtering with the model VGG16 of 88%. The third phase portrays that the images

    treated with the histogram equalization along with the model InceptionV3 of 93%. The last phase set out that the chest X-ray images experience the histogram equalization and bilateral filtering with the model of InceptionV3 with an accuracy of 92%.

    The phases are evaluated concerning the performance and accuracy obtained. This method gives us a clear view of finding the defect in the chest X-ray images with great accuracy. This makes the detection of classes such as covid19, pneumonia, and normal identified easily. Fig 1. represents the proposed model architecture.

  4. DATASET

    The first and most important duty of each application is dataset collection. Here are a few procedures to follow when gathering datasets.

    1. Chest X rays

      The dataset is collected from Kaggle (https://www.kaggle.com/datasets/anasmohammed tahir/covidqu) which consists of 33,920 chest X-ray (CXR) images. The datasets are in the form of images which refers the diseases such as covid19, Pneumonia, and Normal. All images are in Portable Network Graphics format. Fig.2. represents the normal chest x-rays without pre-processing of covid-19, normal, pneumonia.

      Covid 19 Normal Pneumonia Fig 2. Normal chest x-rays

    2. Data pre-processing

      Fig 3. display how the pre-processing method is carried out step by step as shown above.

      Fig 3.Model image [https://doi.org/10.1371/journal.pone.0265949.g002]

    3. Histogram equalization

    A contrast-normalized image is produced using the histogram equalization technique that exclusively uses authentic Chest X-ray pictures. The low-contrast images were

    preprocessed using histogram equalization and thresholding operation.The suggested approach is to manipulate the histogram before applying histogram equalization. The results suggested that the suggested strategy would be more effective than other common strategies for contrast enhancement. Future iterations of an approach may be more effective if the background is automatically removed before use. Fig.4 The images that are pre-processed using histogram equalization are represented below.

    Covid 19 Normal Pneumonia

    True positive: A state where both the expected and actual values are positive.

    True negative: A state where the expected and actual values are opposite to each other.

    False Positive: A state in which the value expected is positive but the value obtained is negative.

    False Negative: A state where the actual value is positive and the expected value is negative.

    A. Accuracy

    Accuracy is one of the most important for analyzing the performance of the model. The ratio between the sum of true negative and true positive to the total number of samples is the accuracy.

    No of correct predictions

    Accuracy = ————————————- (1)

    Total number of predictions

    Fig 4. Histogram Equalization chest X-rays

    1. Bilateral filtering

      The bilateral filter is a method for image smoothing that keeps edges clean. It solely depends on two factors that define the size and contrast of the features that should be preserved. According to the BF's formulation for noise reduction, each pixel is replaced by a weighted average of its neighbors, as is done, for reference, when an image is convoluted with a Gaussian filter. The concept of combining domain and range filtering is embodied by bilateral filtering. The authors conclude that the bilateral filter in image space significantly reduces noise while maintaining sharp edges. Fig.5 The images that are preprocessed using bilateral filtering are shown below.

      Covid 19 Normal Pneumonia Fig 5. Bilateral Filtering chest X-rays

  5. PERFORMANCE METRICS

Various parameters are employed during the evaluation, including

    • Accuracy

    • Precision

    • Recall

    • F1 Score

Some basic terms associated with performance evaluation are,

  1. Precision

    The precision is calculated between the variety of positive samples properly classified either properly or incorrectly they were classified as positive for all the samples. The precision measures the accuracy of a model in classifying a sample positive. The below equation depicts the formula for the calculation of precision.

    Precision = TP/(TP+FP) (2)

  2. Recall

    The quantitative relationship between the number of correctly identified Positive samples as well as the overall number of Positive samples is used to estimate recall. Recall is a metric that measures a model's capacity to recognize positive samples. The elevated the recall, the more positive samples are found.

    Recall = TP/(TP+FN) (3)

  3. F1 score

The F1 Score is the harmonic mean of both precisions. It achieves its maximum value of 1 (perfect precision and recall) and its minimum value of 0 respectively.

VI . RESULTS AND DISCUSSION

A. Accuracy

Fig 6. Accuracy comparison displays the accuracy comparison of the DL approaches of the algorithms. The graphical representation clearly shows the accuracy of 87% in VGG16 along with the pre-processing method of histogram equalization. 88% in VGG16 with both histogram equalization and bilateral filtering. InceptionV3 with histogram equalization attained 93% of accuracy and in histogram and bilateral attained 92%. To increase the predictability of the dataset, InceptionV3 applies some perceptron layers to diverse subsets of the data and chooses the average. As a result, it is shown that InceptionV3, based on testing accuracy, has the highest accuracy.

Fig 6 Accuracy comparison

  1. Precision

    Fig 7. displays the precision comparison of the DL approaches. The graphical representation clearly shows the accuracy of 78% in VGG16 along with a preprocessing method of histogram equalization. 68% in VGG16 with both histogram equalization and bilateral filtering. InceptionV3 with histogram equalization attained 96% of accuracy and in histogram and bilateral attained 96%. It is demonstrated that across all methods, the InceptionV3 Algorithm has the highest precision score. The InceptionV3 blends various perceptron layers to forecast the dataset's class. In light of testing precision, it is shown that InceptionV3 has the highest precision score.

    Fig 7. Precision comparison

  2. Recall

    Fig 8. displays the recall comparison of the DL approaches. The graphical representation clearly shows the accuracy of 73% in VGG16 along with a preprocessing method of histogram equalization. 65% in VGG16 with both histogram equalization and bilateral filtering. InceptionV3 with histogram equalization attained 96% of accuracy and in histogram and bilateral attained 95%. The InceptionV3 algorithm has the highest recall of all the techniques. It employs several perceptrons on various subsets of the data and averages the outcomes to improve the dataset's accuracy. To predict the dataset's class, InceptionV3 combines several perceptrons. As a result, it is demonstrated that InceptionV3 has the highest memory score based on the recall score.

    Fig 8. Recall comparison

  3. F1 score

The F1 Score comparison of the DL techniques is shown in Fig 9. The graphical representation clearly shows the accuracy of 75% in VGG16 along with the preprocessing method of histogram equalization. 65% in VGG16 with both histogram equalization and bilateral filtering. InceptionV3 with histogram equalization attained 96% of accuracy and in histogram and bilateral attained 95%. Of all algorithms, InceptionV3 Algorithm has the highest f1 score. It employs several perceptrons on various subsets of the data and averages the outcomes to improve the dataset's accuracy. The InceptionV3 blends various perceptrons to forecast the dataset's class. As a result, it is demonstrated by the testing f1 score that InceptionV3 has the greatest f1 score.

Fig 9. F1 score comparison

VII. CONCLUSION AND FRAMEWORK

In conclusion, the healthcare system predicts that highly accurate diagnostic results will enable it to deliver effective treatments to the patient more quickly. To accomplish this, VGG16 and InceptionV3 deep learning frameworks were created in our study to examine x-rays of covid19, pneumonia, and normal. In the present study deep learning models of Multi- class classification are used and compare the accuracy with different image pre-processing techniques and analyze the differences in accuracy. The comparison is done between both the models, and the accuracies are compared to identify the best model. VGG16 attained the highest accuracy of 88%, and InceptionV3 attained the highest accuracy of 93%. In the future, steps may be taken to improve the accuracy and to evaluate the model by implementing a hybrid multi-classification approach.

REFERENCES

[1] Nahiduzzaman, Md, Md Rabiul Islam, and Rakibul Hassan. "ChestXRay6: Prediction of multiple diseases including COVID-19 from chest Xray images using convolutional neural network." Expert Systems with Applications 211 (2023): 118576.

[2] Almasi, Simin, et al. "Prevalence of COVID-19 in Different Types of Collagen Vascular Diseases and its Relationship with Drugs Used in these Patients." Mediterranean Journal of Rheumatology 33.3 (2022): 311.

[3] Joloudari, Javad Hassannataj, et al. "Early detection of the advanced persistent threat attack using performance analysis of deep learning." IEEE Access 8 (2020): 186125-186137.

[4] Hasija, Sanskar, et al. "A Novel Approach for detecting Normal, COVID- 19 and Pneumonia patient using only binary classifications from chest CT-Scans." Neuroscience Informatics (2022): 100069.

[5] Ibrahim, Abdullahi Umar, et al. "Pneumonia classification using deep learning from chest X-ray images during COVID-19." Cognitive Computation (2021): 1-13.

[6] Bhattacharyya, Abhijit, et al. "A deep learning based approach for automatic detection of COVID-19 cases using chest X-ray images." Biomedical Signal Processing and Control 71 (2022): 103182.

[7] Jangam, Ebenezer, and Chandra Sekhara Rao Annavarapu. "A stacked ensemble for the detection of COVID-19 with high recall and accuracy." Computers in Biology and Medicine 135 (2021): 104608.

[8] Heidari, Ali, and Hamidreza Erfanian. "Online COVID-19 Infection Diagnoses via Chest X-Ray Images using Alexnet Deep Learning Model." International Journal of Web Research 5.1 (2022): 50-55.

[9] Wu, Qianyu, et al. "Masked joint bilateral filtering via deep image prior for digital X-ray image denoising." IEEE Journal of Biomedical and Health Informatics 26.8 (2022): 4008-4019.

[10] Mujahid, Muhammad, et al. "Pneumonia Classification from X-ray Images with Inception-V3 and Convolutional Neural Network." Diagnostics 12.5 (2022): 1280.

[11] Jain, Puneet, and S. Santhanalakshmi. "Diagnosing Covid-19 and Pneumonia from Chest CT-Scan and X-Ray Images Using Deep Learning Technique." 2022 2nd International Conference on Intelligent Technologies (CONIT). IEEE, 2022.

[12] Hasan, MD Kamrul, et al. "Deep learning approaches for detecting pneumonia in COVID-19 patients by analyzing chest X-ray images." Mathem (Placeholder1) artical Problems in Engineering 2021 (2021):1-8.