Keywords

1 Introduction

As per World Health Organization (WHO) as of August 2022, there are 603,711,760 confirmed cases and 6,484,136 confirmed deaths [1]. The virus that is responsible for the Corona Virus Disease (COVID-19) spreads from person to person at a very high rate. The COVID-19 virus can cause lung complications which also looks similar as pneumonia. If a person gets affected by pneumonia or COVID-19, his lungs are filled with fluid and inflamed which leads to breathing difficulty. If breathing problems becomes severe then the patient may require hospitalization and ventilator treatment is required [1]. To avoid all such severe condition and hospitalization, early diagnosis of pneumonia and COVID-19 is very much necessary. It is always better to diagnose the diseases at an early stage to treat it in a better way. The pneumonia and COVID-19 can be diagnosed by blood test, chest X-ray, pulse oximetry, computed tomography Images (CT), and sputum test [2]. CT scanning has its own drawback. From chest X-radiation (X-ray), if the disease is diagnosed early then, we can treat the patient accordingly, and by isolating the patient, we can stop speeding of pandemic disease, too. The programmed identification framework can work with the early screening of pneumonia and opportune clinical intercessions. In any case, there actually exist numerous nodule candidates delivered by starting harsh discovery in this framework, and how to decide credibility is a key issue. We set forward multi-resolution convolutional neutral networks (CNN) to separate highlights of different levels and resolutions from various depth layers in the organization for order of pneumonia competitors. Lung nodule identification and division assumes a significant part in pneumonia finding. It is a difficult errand inferable from the shape and force varieties of a lung nodule. Accordingly, the specialists, radiologists might have issue to appropriately recognize the little lung knobs and their sort. To resolve this issue, in this paper, we propose a deep learning method to detect and classify pneumonia and COVID-19 using chest X-ray. We use tensor stream programming and labelImg programming to recognize the area of the stone; CNN calculations like back-engendering for arrangement are proposed and examined.

2 Literature Survey

Marios Anthimopoulos et al. proposed a CNN [3] that is intended for the characterization of ILD. In this article, they propose and assess Convolutional Neural Networks (CNNs). The proposed network comprises of five convolutional layers with 2 × 2 bits and Leaky ReLU enactments, trailed by normal pooling which has size equivalent to the size of the last component guides and three thick layers. They have used the dataset of 14,696 picture patches and inferred by 120 CT examines from various scanners and emergency clinics. The large number of parameters, the relatively slow training and fluctuation of the results, for the same input could be considered as a drawback of this method.

Ali Narin proposed Feature Extraction using ResNet-50 Convolutional Neural Network which could detect COVID-19. In this work, chest X-ray images, which can be obtained effectively and rapidly, were utilized [4]. This method needs the help of radiology subject matter experts and decreases the rate of false discovery. But in this, work the strength of Dataset is limited.

Junfeng Li proposed COVID GATNet Architecture to detect COVID-19 from X-ray images [5]. COVID-19 CXR Dataset is used in this work. The review coordinates three CXR informational indexes distributed on the web and Kaggle rivalry, including CXR pictures of solid, different sorts of pneumonia, and COVID-19 positive patients. Since there is less information for COVID-19 positive CXR pictures than the other two kinds of information, this exploration widened CODIV-19 positive CXR images by scaling, pivoting, changing brilliance, and other increment strategies for picture information. The method produced the average accuracy of the model up to 94.3%.

Zhaohui Liang et al. proposed Deep Convolutional Generative Adversarial Networks cGAN Architecture and Optimization to detect COVID-19 from X-ray images [6]. The aim of this work is to gain a planning from the typical chest X-ray visual examples to the COVID-19 pneumonia chest X-ray designs. This study used a sequential CNN architecture which produced an accuracy of 93%.

Mohit proposed 2D CNN architecture. This paper intends to incorporate Artificial Intelligence with clinical science to foster a grouping instrument to perceive COVID-19 contamination and other lung illnesses [7]. Four circumstances considered were COVID-19 pneumonia, non-COVID-19 pneumonia, pneumonia, and typical lungs. The proposed AI framework is separated into two phases. Stage one group chest X-ray into pneumonia and non-pneumonia. Stage two gets input from stage one if the X-ray has a place with the pneumonic class and further characterizes it into COVID-19 positive and COVID-19 negative.

Harsh Sharma proposed two CNN architectures: one with a dropout layer and another without a dropout layer to separate elements from pictures of chest X-ray and group the pictures to recognize in the event that an individual has pneumonia. To assess the impact of dataset size on the presentation of CNN, the proposed CNN’s utilizing both the first as well as increased dataset. This work used early stopping and batch normalization [8].

3 Proposed Method

Figure 1 shows the flow diagram of the proposed model. The chest X-rays of total of 2000 images are taken as input. Out of that 80% and 20% of the database images are used to train and test the model, respectively. The input images have undergone preprocessing. Image enhancement is done to change the characteristics of an image to make it suitable to a task. Image segmentation is also done to partition the digital image into many segments to extract the region of interest from the whole image. The input X-ray image is preprocessed with the utilization of Discrete Wavelet Transform (DWT). Picture improvement or pre-handling of picture is done to discard of noise and light up the photo simplifying it to become mindful of the key abilities. The explanation of utilizing wavelets is to change over an information picture into a progression of wavelets, which can be put away more prominent productively contrasted with pixel blocks. The picture is broken down into high pass and low pass channels by applying discrete wavelet.

Fig. 1
A flow diagram of the process of analyzing chest X-ray images using a database. It includes image preprocessing, feature extraction, and classification.

Flow diagram of the proposed method

Deterioration of picture results into four sub-groups given as, HL, HH, LL, and LH. The LL sub-band contains the majority of the insights while the other better request groups contain the edges inside the upward, slanting, and even way. By utilizing Tensorflow engineering, the information goes toward one side, courses through the arrangement of numerous tasks, and comes out the opposite end as a result.

In this proposed work, MobileNet V2 architecture is used. This preprocessed image is given as an input to the input layer of the MobileNet. In the convolution layer, the features of the images are extracted. Based on the extracted features, the disease is detected and it is classified. The MobileNet V2 architecture has 53 convolution layers and 1 Average Pool with nearly 350 GFLOP. Inverted Residual Block and Bottleneck Residual Block are the two main components. There are two types of Convolution layers in MobileNet V2 architecture: (1) 1 × 1 Convolution. (2) 3 × 3 Depth wise Convolution. Each block has three different layers: (1) 1 × 1 Convolution with Relu6. (2) Depth wise Convolution. (3) 1 × 1 Convolution without any linearity. These are the two different components in MobileNet V2 model which is shown in Fig. 2.

Fig. 2
2 flow diagrams of the Mobile Net V 2 model. Stride = 1. Input passes through convolution 1 by 1 Relu 6, D wise 3 by 3 Relu 6, and convolution 1 by 1 linear before adding. Stride = 2. Input passes through convolution 1 by 1 Relu 6, D wise 3 by 3 stride = 2 Relu 6, and convolution 1 by 1 linear.

Architecture of MobileNet V2

4 Experimental Results

The input data set for the proposed work is taken from Kaggle. Total of 2000 images are taken. Eighty percent is used for training the model and 20% for testing the model. The images are labeled using LabelImg. The model is trained and tested. The obtained results are shown in Figs. 3, 4, and 5. Figure 3 shows the disease is classified as pneumonia and both lungs are affected by it. Figure 4 shows that disease is classified as both pneumonia and COVID-19 that has affected only one lung. Figure 5 shows that the disease is classified as only pneumonia that has affected only one lung.

Fig. 3
A radiograph of the opaque lungs indicates infection or inflammation. The size and location of the affected areas may classify pneumonia in the left lung at 79 percent and the right lung at 97 percent.

Infection in both the lunges identified and classified as pneumonia

Fig. 4
A radiograph of the opaque areas in the lungs that indicate infection or inflammation. The affected areas are small or large patches, the right lung with 74 percent pneumonia and 100 percent COVID.

Infection in both the lunges identified and classified as pneumonia with 74% confidence and COVID in one lunge as 100% confidence

Fig. 5
A radiograph of the inflamed lungs. Pneumonia classification in tiny or large patches at 94 percent in the left lung.

Infection in both the lunges identified and classified as pneumonia with 94% confidence

The number of True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN) are calculated from the confusion matrix. Using Eqs. (1)–(4) the Accuracy, Precision, Recall, and F1 score are calculated.

$$ \textrm{Accuracy}=\frac{\textrm{TP}+\textrm{TN}}{\textrm{Total}\kern0.17em \textrm{inputs}} $$
(1)
$$ \textrm{Precision}=\frac{\textrm{TP}}{\left(\textrm{TP}+\textrm{FP}\right)} $$
(2)
$$ \textrm{Recall}=\frac{\textrm{TP}}{\left(\textrm{TP}+\textrm{FN}\right)} $$
(3)
$$ \textrm{F}1\ \textrm{score}=2\times \frac{\textrm{Precision}\times \textrm{recall}}{\left(\textrm{Precision}+\textrm{recall}\right)} $$
(4)

For the proposed network, the obtained Accuracy is 98.3%, Precision is 0.97, Recall is 0.98, and F1 score is 0.98. The above experimental results confirm that the proposed method performs very well in the classification of the disease pneumonia and COVID-19.

5 Conclusion and Future Work

COVID-19 has become a pandemic disease, and the mortality rate is very high. Early detection of infection of COVID can stop spreading this deadly disease. To classify whether the patient is affected by COVID-19 or pneumonia, this proposed method is used. This method uses CNN with MobileNet V2 architecture. This method gives an accuracy of 98.3%.