COVID-19 Detection Based on Blood Test Parameters using Various Artificial Intelligence Methods

Kavian Khanjani
Department of Electrical Engineering
K. N. Toosi University of Technology
Tehran, Iran
[email protected]
&Seyed Rasoul Hosseini
Department of Electrical Engineering
K. N. Toosi University of Technology
Tehran, Iran
[email protected]
&Hamid Taheri
Department of Electrical Engineering
K. N. Toosi University of Technology
Tehran, Iran
[email protected]
&Shahrzad Shashaani
Department of Electrical Engineering
K. N. Toosi University of Technology
Tehran, Iran
[email protected]
&Mohammad Teshnehlab
Department of Electrical Engineering
K. N. Toosi University of Technology
Tehran, Iran
[email protected]
Abstract

In 2019, the world faced a new challenge: a COVID-19 disease caused by the novel coronavirus, SARS-CoV-2. The virus rapidly spread across the globe, leading to a high rate of mortality, which prompted health organizations to take measures to control its transmission. Early disease detection is crucial in the treatment process, and computer-based automatic detection systems have been developed to aid in this effort. These systems often rely on artificial intelligence (AI) approaches such as machine learning, neural networks, fuzzy systems, and deep learning to classify diseases. This study aimed to differentiate COVID-19 patients from others using self-categorizing classifiers and employing various AI methods. This study used two datasets: the blood test samples and radiography images. The best results for the blood test samples obtained from San Raphael Hospital, which include two classes of individuals, those with COVID-19 and those with non-COVID diseases, were achieved through the use of the Ensemble method (a combination of a neural network and two machines learning methods). The results showed that this approach for COVID-19 diagnosis is cost-effective and provides results in a shorter amount of time than other methods. The proposed model achieved an accuracy of 94.09% on the dataset used. Secondly, the radiographic images were divided into four classes: normal, viral pneumonia, ground glass opacity, and COVID-19 infection. These were used for segmentation and classification. The lung lobes were extracted from the images and then categorized into specific classes. We achieved an accuracy of 91.1% on the image dataset. Generally, this study highlights the potential of AI in detecting and managing COVID-19 and underscores the importance of continued research and development in this field.

Keywords Blood test, COVID-19, deep learning, Ensemble method, Radiography images

1 Introduction

Coronavirus disease 2019 (COVID-19) caused by the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) [1, 2], emerged in December 2019 and rapidly developed into a global outbreak [3, 4, 5, 6]. COVID-19 appears as an acute respiratory tract infection syndrome [7]. Patients infected with COVID-19 have a high mortality rate [8]. Because of the COVID-19 symptomatology, which showed a large number of asymptomatic [9], the disease has become difficult to diagnose. The typical clinical signs of COVID-19 cases include fever, respiratory symptoms, pneumonia, decreased white blood cell (WBC) count, or decreased lymphocyte count [10, 11], which are symptoms of the infection. In a more critical situation, this infection can lead to pneumonia, septic shock, SARS, organ failure, and death.

Since 2019, the virus has shown various mutations that have increased its pathogenicity. These changes have led to the creation of new species. One was the alpha-type mutation, which had a higher transmission rate than the original type. The beta version was identified in South Africa, which led to an increase in disease severity and mortality. A third species, called gamma, became common in Brazil, which had a higher transmission rate than the previous two species and reduced the effectiveness of vaccines. The most advanced species, lambda, was identified in India as having a higher transmission rate and increasing mortality and is the predominant species worldwide [12]. Respiratory problems spread faster in cases with COVID-19-induced pneumonia than in healthy instances [13]. Thus, tests to identify the SARS-CoV-2 virus play a key role in determining positive cases of this infection and thus curb the pandemic [14, 15].

Several COVID-19 screening methods exist, such as chest computed tomography (CT), X-ray images, RT-PCR, and blood tests. Medical imaging, CT, is often used as a complementary examination in the diagnosis and management of COVID-19 [2, 16, 17]. This imaging interpretation played a key role in diagnosing and treating COVID-19 and monitoring disease progression [18, 19]. On the other hand, evidence of the disease in medical images may appear at least some days after the onset of symptoms, which leads to late detection and ultimately reduces the chances of patients’ recovery and preventing transmission [20]. Blood tests and radiocardiography (X-ray) are suitable diagnostic methods for COVID-19, and we have chosen to utilize data from both in our article. While blood tests have advantages over other methods such as X-rays, CT scans [21], and PCR tests [22], radiocardiography can complement them to improve accuracy and speed up diagnosis. Blood tests are cost-effective and provide faster results, even before symptoms appear, while radiocardiography can detect lung changes that may not be visible on blood tests. Additionally, blood tests do not have adverse side effects such as X-ray exposure.

However, other diagnostic methods have certain drawbacks. CT scans and X-rays, for example, can expose patients to harmful ionizing radiation, which can increase the risk of cancer. On the other hand, PCR tests can take longer to yield results and may not detect the virus in the early stages of infection. Furthermore, these tests rely on the presence of symptoms, which means that asymptomatic carriers may not be identified until it is too late. Artificial intelligence can be integrated further to enhance the accuracy and efficiency of these diagnostic methods, as numerous studies have already explored.

2 Related Works

Machine learning techniques have been employed to detect COVID-19 from lung CT scans with 90% sensitivity [23, 24]. A deep learning technique was also developed to extract the graphical characteristics of COVID-19 from CT images to make diagnosis quicker and more precise than pathogenic testing to save critical time [15, 25]. Several deep learning architectures are deployed to detect COVID-19, such as ResNet, Inception, Google Net, etc. All these approaches can detect subjects who suffer from pneumonia, and it is hard to decide the source of pneumonia [15]. In addition, studies on the uncertainty of the methods implemented by deep learning to diagnose the disease from CT images are done [26, 27, 28]. Using X-ray images is a cheaper and easier way than CT. However, lower accuracy and quality of X-ray images can lead to misdiagnosis and a worse epidemic [28, 29]. In other studies, by using deep learning with different architectures such as ResNet50 [30, 31], VGG [32], Mobile Net [33], etc., they were able to find acceptable results for correct diagnosis [15]. Due to the different symptoms, the polymer chain reaction (PCR) is considered a standard method for screening suspicious cases [15, 34, 35] Using blood test parameters, each parameter’s effect on the disease’s development is determined to be much faster and less expensive than other methods [36]. In addition, using different classification methods, models with an accuracy between 82% and 86% have been obtained [35].

These studies highlight the potential of combining blood test parameters and X-ray imaging with various artificial intelligence methods for COVID-19 detection. While further research is needed to validate the efficacy of these methods in clinical practice, the results suggest that they could be promising tools for improving diagnostic accuracy and reducing false positives. The article is organized into several sections. Section 3 explains the data and preprocessing procedures. In section 4, the methods used for classification are introduced. Section 5 presents implementation details and results, while section 6 discusses related topics.

3 Data Description

In this work, the dataset includes Blood test data of patients adopted from San Raphael Hospital, Italy.

3.1 Blood dataset (San Raphael Hospital)

The provided information in this section contains Alanine Amino Transferase (ALT), Aspartate Aminotransferase (AST), Lactate Dehydrogenase (LDH), Urea, White blood cells (WBC), Red Blood Cells (RBC), Platelet, Monocyte, Lymphocyte, and Neutrophil. The dataset has two classes, COVID-19 and non-COVID, identified by labels 1 and 0, respectively. This dataset was adopted from San Raphael Hospital and is available on link 111https://zenodo.org/record/4081318. The number of cases includes 505 blood test samples with a label 1 for patients with COVID-19 and 410 samples with a label of 0 for people without this disease [37]. More details are shown in Table 1

Table 1: Blood test data (San Raphael Hospital) details
Disease Number of samples Target label
Non-COVID-19 410 0
COVID-19 505 1

3.2 Classification Data

The dataset contains four classes of radiography images. Categories include patients with COVID-19, normal, Viral pneumonia, and grand glass opacity. The details are given in Table 2.

Table 2: Classification data details
Type of Image Number of Images Label
Normal 3000 0
Viral Pneumonia 1345 1
Opacity 3000 2
COVID-19 3000 3

The images are presented in grayscale and with the original version of 299×299299299299\times 299299 × 299 in PNG format. Images are resized to 256×256256256256\times 256256 × 256 to apply to the classifier. Before performing other processing, the data sets are Normalized between zero and one.

3.3 Segmentation Data

This section’s data for segmenting lung lobes includes 3500350035003500 images with 3500350035003500 corresponding masks. Because the images’ dimensions differ, the masks have been resized to 256×256256256256\times 256256 × 256 to match the images.

4 Methodology

This section summarizes the significant methods and their mathematical basis in separate sections.

4.1 Proposed Method

If a compound of classifiers is used for classification, an ensemble method will be created. One combination method, for example, is voting among the classifiers used, and whichever group gets the most votes will be used as the overall output. In this work, a mixture of categorizers, including multi-layer perceptron, k-nearest-neighborhood, and random forest, has been used. The overall structure of the ensemble method is shown in Figure 1.

Refer to caption
Figure 1: Overall structure of Ensemble method.

4.2 Adaptive Neural Fuzzy Inference System

Adaptive Neural Fuzzy Inference System (ANFIS) is a hybrid model consisting of fuzzy logic that uses the fuzzy Takagi-Sugeno model and an artificial neural network designed to determine the behavior of highly complex dynamic systems. An adaptive fuzzy network can interpret and represent prior knowledge. It creates several if-then fuzzy rules with appropriate membership functions to generate the input’s correct output. The capability of back-propagation in neural networks can be used to train fuzzy rules’ membership functions. The ANFIS structure consists of five layers, namely, fuzzification layer, product layer, normalized layer, de-fuzzification layer, and output layer. The mathematical explanation of ANFIS layers is summarized below:

Layer 1: Each node ij𝑖𝑗ijitalic_i italic_j generates the membership function (MF) μi,jsubscript𝜇𝑖𝑗\mu_{i,j}italic_μ start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT for the corresponding crisp input xisubscript𝑥𝑖x_{i}italic_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT based on Eq.1.

Oi,j1=μAi,j(xi),i=1,,n,j=1,,pformulae-sequencesuperscriptsubscript𝑂𝑖𝑗1subscript𝜇subscript𝐴𝑖𝑗subscript𝑥𝑖formulae-sequence𝑖1𝑛𝑗1𝑝O_{i,j}^{1}=\mu_{A_{i,j}(x_{i})},\quad i=1,...,n,\quad j=1,...,pitalic_O start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT = italic_μ start_POSTSUBSCRIPT italic_A start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ( italic_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) end_POSTSUBSCRIPT , italic_i = 1 , … , italic_n , italic_j = 1 , … , italic_p (1)

In this study, the MF type is Gaussian functions.

μAi,j(x)=exp(((xCi,j)ai,j)2bi,j).subscript𝜇subscript𝐴𝑖𝑗𝑥superscript𝑥subscript𝐶𝑖𝑗subscript𝑎𝑖𝑗2subscript𝑏𝑖𝑗\mu_{A_{i,j}}(x)=\exp\left(-\left(\frac{(x-C_{i,j})}{a_{i,j}}\right)^{2b_{i,j}% }\right).italic_μ start_POSTSUBSCRIPT italic_A start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_x ) = roman_exp ( - ( divide start_ARG ( italic_x - italic_C start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ) end_ARG start_ARG italic_a start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT end_ARG ) start_POSTSUPERSCRIPT 2 italic_b start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT end_POSTSUPERSCRIPT ) . (2)

ai,jsubscript𝑎𝑖𝑗a_{i,j}italic_a start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, bi,jsubscript𝑏𝑖𝑗b_{i,j}italic_b start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT, and ci,jsubscript𝑐𝑖𝑗c_{i,j}italic_c start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT are trainable parameters known as premise parameters.

Layer 2: Each node r𝑟ritalic_r in this layer calculates the firing strength of the rule r𝑟ritalic_r following.

Or2=wr=μA1,jl1(x)μA1,jln(x),r=1,,R,i=1,,pformulae-sequencesuperscriptsubscript𝑂𝑟2subscript𝑤𝑟subscript𝜇subscript𝐴1subscript𝑗subscript𝑙1𝑥subscript𝜇subscript𝐴1subscript𝑗subscript𝑙𝑛𝑥formulae-sequence𝑟1𝑅𝑖1𝑝O_{r}^{2}=w_{r}=\mu_{A_{1,j_{l_{1}}}}(x)\ldots\mu_{A_{1,j_{l_{n}}}}(x),\quad r% =1,...,R,\quad i=1,...,pitalic_O start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT = italic_w start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_μ start_POSTSUBSCRIPT italic_A start_POSTSUBSCRIPT 1 , italic_j start_POSTSUBSCRIPT italic_l start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_x ) … italic_μ start_POSTSUBSCRIPT italic_A start_POSTSUBSCRIPT 1 , italic_j start_POSTSUBSCRIPT italic_l start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_x ) , italic_r = 1 , … , italic_R , italic_i = 1 , … , italic_p (3)

Layer 3: The nodes of this layer normalize the firing strength of rule r𝑟ritalic_r from the previous layer in Eq. 4.

Or3=w¯r=wrk=0rwksuperscriptsubscript𝑂𝑟3subscript¯𝑤𝑟subscript𝑤𝑟superscriptsubscript𝑘0𝑟subscript𝑤𝑘O_{r}^{3}=\bar{w}_{r}=\frac{w_{r}}{\sum_{k=0}^{r}w_{k}}italic_O start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT = over¯ start_ARG italic_w end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = divide start_ARG italic_w start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG start_ARG ∑ start_POSTSUBSCRIPT italic_k = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_ARG (4)

Layer 4: Output of this layer indicates the contribution of each node r𝑟ritalic_r in output based on Eq. 5.

Or4=w¯rfr=w¯r(i=1ncr,ixi+er)superscriptsubscript𝑂𝑟4subscript¯𝑤𝑟subscript𝑓𝑟subscript¯𝑤𝑟superscriptsubscript𝑖1𝑛subscript𝑐𝑟𝑖subscript𝑥𝑖subscript𝑒𝑟O_{r}^{4}=\bar{w}_{r}f_{r}=\bar{w}_{r}\left(\sum_{i=1}^{n}c_{r,i}x_{i}+e_{r}\right)italic_O start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 4 end_POSTSUPERSCRIPT = over¯ start_ARG italic_w end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = over¯ start_ARG italic_w end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_r , italic_i end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT + italic_e start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) (5)

Parameters cr,isubscript𝑐𝑟𝑖c_{r,i}italic_c start_POSTSUBSCRIPT italic_r , italic_i end_POSTSUBSCRIPT, and ersubscript𝑒𝑟e_{r}italic_e start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT are trainable parameters known as consequent parameters.

Layer 5: The output of this layer represents the total output as the summation of all rules’ results of incoming inputs given in Eq. 6.

Or5=r=1RWr¯fr=r=1RWrfrr=1RWrsuperscriptsubscript𝑂𝑟5superscriptsubscript𝑟1𝑅¯subscript𝑊𝑟subscript𝑓𝑟superscriptsubscript𝑟1𝑅subscript𝑊𝑟subscript𝑓𝑟superscriptsubscript𝑟1𝑅subscript𝑊𝑟O_{r}^{5}=\sum_{r=1}^{R}\bar{W_{r}}f_{r}=\frac{\sum_{r=1}^{R}W_{r}f_{r}}{\sum_% {r=1}^{R}W_{r}}italic_O start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 5 end_POSTSUPERSCRIPT = ∑ start_POSTSUBSCRIPT italic_r = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_R end_POSTSUPERSCRIPT over¯ start_ARG italic_W start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = divide start_ARG ∑ start_POSTSUBSCRIPT italic_r = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_R end_POSTSUPERSCRIPT italic_W start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG start_ARG ∑ start_POSTSUBSCRIPT italic_r = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_R end_POSTSUPERSCRIPT italic_W start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG (6)

The overall structure of the ANFIS model is shown in Figure 2 [38].

Refer to caption
Figure 2: Structure of Adaptive Neural Fuzzy Inference System.

4.3 Data Preprocessing

Two preprocessing steps are performed to apply blood data as input to the designed classifiers. At first, information is normalized on the scale of [0, 1]. Then, a statistics function is calculated to get knowledge about the data distribution. The covariance matrix of datasets is a criterion for determining the data correlation and their statistical distribution. The covariance matrix’s eigenvalues show the data’s scatter in each direction. The graph of eigenvalues of the covariance matrix is shown in Figure 3. According to this Figure 3, the highest difference between eigenvalues is negligible. Therefore, the data is significantly distributed in all dimensions, and omitting each feature will reduce classification accuracy.

Refer to caption
Figure 3: Covariance matrix eigenvalues-Blood test data.

Among 26 blood parameters adopted from San Raphael Hospital, ten features are extracted from the main data source, following the correlation coefficient Pearson. The correlation matrix is shown in Figure 4.

Refer to caption
Figure 4: Correlation Matrix for San Raphael Hospital data.

4.4 Image preprocessing

Various map**s can be applied to improve the contrast of the images. The changes mentioned in the histogram pot alter the images according to the user’s purpose.

The histogram equalization transform improves the contrast of the image. It changes the brightness intensity of the pixels so that they are uniformly distributed in the defined range of values. In the Eq. 7, h(x)𝑥h(x)italic_h ( italic_x ) represents the histogram equation.

h(x)=nx;x=0,,L1h(x)=n_{x}\quad;x=0,...,L-1italic_h ( italic_x ) = italic_n start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT ; italic_x = 0 , … , italic_L - 1 (7)

So x𝑥xitalic_x specifies the brightness of each pixel, and L𝐿Litalic_L is the maximum brightness. The nxsubscript𝑛𝑥n_{x}italic_n start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT parameter indicates the number of pixels with x𝑥xitalic_x brightness. The probability function of the brightness intensity values is considered as described in the Eq. 8.

p(xk)=nkMN;k=0,,L1p(x_{k})=\frac{n_{k}}{MN}\quad;k=0,\ldots,L-1italic_p ( italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) = divide start_ARG italic_n start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_ARG start_ARG italic_M italic_N end_ARG ; italic_k = 0 , … , italic_L - 1 (8)

The histogram balancing map** is determined using the Eq. 9.

sk=T(xk)=(L1)j=0kp(xj)=(L1)MNj=0knjsubscript𝑠𝑘𝑇subscript𝑥𝑘𝐿1superscriptsubscript𝑗0𝑘𝑝subscript𝑥𝑗𝐿1𝑀𝑁superscriptsubscript𝑗0𝑘subscript𝑛𝑗s_{k}=T(x_{k})=(L-1)\sum_{j=0}^{k}p(x_{j})=\frac{(L-1)}{MN}\sum_{j=0}^{k}n_{j}italic_s start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_T ( italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) = ( italic_L - 1 ) ∑ start_POSTSUBSCRIPT italic_j = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT italic_p ( italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) = divide start_ARG ( italic_L - 1 ) end_ARG start_ARG italic_M italic_N end_ARG ∑ start_POSTSUBSCRIPT italic_j = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT (9)

Figure 5 shows the original, mapped images and corresponding histogram plots.

Refer to caption
Figure 5: Original, mapped images and corresponding histograms

The contrast-limited adaptive histogram equalization transform works similarly to the histogram equalization method. This method prevents noises that may occur in the histogram balancing method. It divides the image matrix into smaller dimensions and performs equalization on each. Figure 6 shows the transformation of the X-ray image.

Refer to caption
Figure 6: Transformation of the X-ray image

The grad-CAM method is one of the generalization approaches of CAM. This method can be extended to various structures, such as categorizing images, captioning images, and answering image questions. Like the class activation map, the weights corresponding to each feature map are calculated. Then, the RELU activation function is applied to their linear combination to prevent the pixel values from becoming negative. The equations of the Grad-CAM method are according to 10 and 11.

αkc=1ZijycAijksuperscriptsubscript𝛼𝑘𝑐1𝑍subscript𝑖subscript𝑗superscript𝑦𝑐superscriptsubscript𝐴𝑖𝑗𝑘\alpha_{k}^{c}=\frac{1}{Z}\sum_{i}\sum_{j}\frac{\partial y^{c}}{\partial A_{ij% }^{k}}italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT = divide start_ARG 1 end_ARG start_ARG italic_Z end_ARG ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∑ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT divide start_ARG ∂ italic_y start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT end_ARG start_ARG ∂ italic_A start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT end_ARG (10)
LGrad-CAMc=ReLU(kαkcAk)superscriptsubscript𝐿Grad-CAM𝑐ReLUsubscript𝑘superscriptsubscript𝛼𝑘𝑐superscript𝐴𝑘L_{\text{Grad-CAM}}^{c}=\text{ReLU}\left(\sum_{k}\alpha_{k}^{c}A^{k}\right)italic_L start_POSTSUBSCRIPT Grad-CAM end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT = ReLU ( ∑ start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT italic_A start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT ) (11)

The parameter αkcsuperscriptsubscript𝛼𝑘𝑐\alpha_{k}^{c}italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT is the weight corresponding to the feature map k𝑘kitalic_k and the score related to the class c𝑐citalic_c. Aijksuperscriptsubscript𝐴𝑖𝑗𝑘A_{ij}^{k}italic_A start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT represents the ij𝑖𝑗ijitalic_i italic_j domain of the feature map Aksuperscript𝐴𝑘A^{k}italic_A start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT. The 1Z1𝑍\frac{1}{Z}divide start_ARG 1 end_ARG start_ARG italic_Z end_ARG parameter corresponds to the global maximum integration layer (average feature matrices). Finally, the heat map is determined by the parameter LGrad-CAMcsuperscriptsubscript𝐿Grad-CAM𝑐L_{\text{Grad-CAM}}^{c}italic_L start_POSTSUBSCRIPT Grad-CAM end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_c end_POSTSUPERSCRIPT.

4.5 Loss Functions

The loss function used in autoencoder training is the mean square error, which is shown in 12. Another part of the loss function is the regularization term 13, which restricts the values of adaptive parameters, and the total function includes the summation of these two parts that are available in 14.

Jmse=1Md=1Mxdx^d2subscript𝐽mse1𝑀superscriptsubscript𝑑1𝑀superscriptdelimited-∥∥superscript𝑥𝑑superscript^𝑥𝑑2J_{\text{mse}}=\frac{1}{M}\sum_{d=1}^{M}\left\lVert x^{d}-\hat{x}^{d}\right% \rVert^{2}italic_J start_POSTSUBSCRIPT mse end_POSTSUBSCRIPT = divide start_ARG 1 end_ARG start_ARG italic_M end_ARG ∑ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_M end_POSTSUPERSCRIPT ∥ italic_x start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT - over^ start_ARG italic_x end_ARG start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT ∥ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (12)
JRegularization=λ2l=1nl1i=1Slj=1Sl+1(wijl)2subscript𝐽Regularization𝜆2superscriptsubscript𝑙1subscript𝑛𝑙1superscriptsubscript𝑖1subscript𝑆𝑙superscriptsubscript𝑗1subscript𝑆𝑙1superscriptsuperscriptsubscript𝑤𝑖𝑗𝑙2J_{\text{Regularization}}=\frac{\lambda}{2}\sum_{l=1}^{n_{l}-1}\sum_{i=1}^{S_{% l}}\sum_{j=1}^{S_{l}+1}\left(w_{ij}^{l}\right)^{2}italic_J start_POSTSUBSCRIPT Regularization end_POSTSUBSCRIPT = divide start_ARG italic_λ end_ARG start_ARG 2 end_ARG ∑ start_POSTSUBSCRIPT italic_l = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT - 1 end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_S start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_S start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT + 1 end_POSTSUPERSCRIPT ( italic_w start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_l end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (13)
JTotal=Jmse+JRegularization=1Md=1M12xdx^d2+λ2l=1nl1i=1Slj=1Sl+1(wijl)2subscript𝐽Totalsubscript𝐽msesubscript𝐽Regularization1𝑀superscriptsubscript𝑑1𝑀12superscriptdelimited-∥∥superscript𝑥𝑑superscript^𝑥𝑑2𝜆2superscriptsubscript𝑙1subscript𝑛𝑙1superscriptsubscript𝑖1subscript𝑆𝑙superscriptsubscript𝑗1subscript𝑆𝑙1superscriptsuperscriptsubscript𝑤𝑖𝑗𝑙2J_{\text{Total}}=J_{\text{mse}}+J_{\text{Regularization}}=\frac{1}{M}\sum_{d=1% }^{M}\frac{1}{2}\left\lVert x^{d}-\hat{x}^{d}\right\rVert^{2}+\frac{\lambda}{2% }\sum_{l=1}^{n_{l}-1}\sum_{i=1}^{S_{l}}\sum_{j=1}^{S_{l}+1}\left(w_{ij}^{l}% \right)^{2}italic_J start_POSTSUBSCRIPT Total end_POSTSUBSCRIPT = italic_J start_POSTSUBSCRIPT mse end_POSTSUBSCRIPT + italic_J start_POSTSUBSCRIPT Regularization end_POSTSUBSCRIPT = divide start_ARG 1 end_ARG start_ARG italic_M end_ARG ∑ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_M end_POSTSUPERSCRIPT divide start_ARG 1 end_ARG start_ARG 2 end_ARG ∥ italic_x start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT - over^ start_ARG italic_x end_ARG start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT ∥ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + divide start_ARG italic_λ end_ARG start_ARG 2 end_ARG ∑ start_POSTSUBSCRIPT italic_l = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT - 1 end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_S start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_S start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT + 1 end_POSTSUPERSCRIPT ( italic_w start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_l end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (14)

xdsuperscript𝑥𝑑x^{d}italic_x start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT is the input vector, x^dsuperscript^𝑥𝑑\hat{x}^{d}over^ start_ARG italic_x end_ARG start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT is an estimation vector (AE output) and batch size is M𝑀Mitalic_M. nlsubscript𝑛𝑙n_{l}italic_n start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT shows the number of network layers, Slsubscript𝑆𝑙S_{l}italic_S start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT is the number of neurons in the l𝑙litalic_lth layer and wijlsuperscriptsubscript𝑤𝑖𝑗𝑙w_{ij}^{l}italic_w start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_l end_POSTSUPERSCRIPT demonstrates the weight between i𝑖iitalic_ith neuron in the l+1𝑙1l+1italic_l + 1th layer and j𝑗jitalic_jth neuron in the l𝑙litalic_lth layer.

5 Implementation details

In both experiments performed on the data, the 5-fold validation method is used. Thus, the normalized data is divided into five equal parts, and in each step, 80% of the data are for training and 20% for testing are considered. The results in each folder are presented separately, as well as the average. In this way, the performance of the designed categorizer regarding all data is evaluated.

5.1 Experiments on Blood dataset (San Raphael Hospital)

This data, with ten dimensions, has been classified using several methods. ANFIS model is trained with a learning rate of 0.001 and a number of epochs of 4000. The different number of rules and optimizers apply, and 14 and Adam optimizers obtain the best result. Besides, machine learning methods that classified blood test data in the previous section were used again for this data. Another approach is the stacked autoencoder, which reduces the dimensions of the input vector and extracts the main features. The number of inputs for the first AE is ten, and the number of neurons in the encoder layer is 20. Activation functions are leaky ReLU, and the coefficients of the learning rate, momentum, and regularizations are 0.008, 0.9, and 0.001, respectively. The training process is based on batch learning with 250 epochs, and the batch size is 128. The number of neurons in the encoder layer of the second autoencoder is 15, and for the third one is 8. Other details are similar to the first layer. The extracted features are applied to the last layer with two neurons using the SoftMax function. After designing a stacked structure, the whole network is adopted based on the global training method. In this part, the optimizer is Adam, and the cross-entropy loss function is used. Its equation is shown in 15.

J(y,y^)=i=1kyilogy^i𝐽𝑦^𝑦superscriptsubscript𝑖1𝑘subscript𝑦𝑖subscript^𝑦𝑖J(y,\hat{y})=-\sum_{i=1}^{k}y_{i}\log\hat{y}_{i}italic_J ( italic_y , over^ start_ARG italic_y end_ARG ) = - ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT roman_log over^ start_ARG italic_y end_ARG start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (15)

y^isubscript^𝑦𝑖\hat{y}_{i}over^ start_ARG italic_y end_ARG start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the classifier’s estimation, and if it is the same as the target label, yisubscript𝑦𝑖y_{i}italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT becomes 1; otherwise, this value is 0.

The results are represented by confusion matrices, which are an average of 5-folds, and the accuracy, precision, recall, and f1-score criteria given in 16, 17, 18, 19 and 20,, which determine the results in each fold.

Accuracy=True Negative+True PositiveTrue Negative+True Positive+False Positive+False NegativeAccuracyTrue NegativeTrue PositiveTrue NegativeTrue PositiveFalse PositiveFalse Negative\text{Accuracy}=\frac{\text{True Negative}+\text{True Positive}}{\text{True % Negative}+\text{True Positive}+\text{False Positive}+\text{False Negative}}Accuracy = divide start_ARG True Negative + True Positive end_ARG start_ARG True Negative + True Positive + False Positive + False Negative end_ARG (16)
Recall=True PositiveTrue Positive+False NegativeRecallTrue PositiveTrue PositiveFalse Negative\text{Recall}=\frac{\text{True Positive}}{\text{True Positive}+\text{False % Negative}}Recall = divide start_ARG True Positive end_ARG start_ARG True Positive + False Negative end_ARG (17)
Precision=True PositiveTrue Positive+False PositivePrecisionTrue PositiveTrue PositiveFalse Positive\text{Precision}=\frac{\text{True Positive}}{\text{True Positive}+\text{False % Positive}}Precision = divide start_ARG True Positive end_ARG start_ARG True Positive + False Positive end_ARG (18)
F1-Score=2×(Recall×Precision)Recall+precision\text{F1-Score}=\frac{2\times(\text{Recall}\times\text{Precision)}}{\text{% Recall}+\text{precision}}F1-Score = divide start_ARG 2 × ( Recall × Precision) end_ARG start_ARG Recall + precision end_ARG (19)
Inverse Recall=True PositiveTrue Positive+False NegativeInverse RecallTrue PositiveTrue PositiveFalse Negative\text{Inverse Recall}=\frac{\text{True Positive}}{\text{True Positive}+\text{% False Negative}}Inverse Recall = divide start_ARG True Positive end_ARG start_ARG True Positive + False Negative end_ARG (20)

6 Results

In this section, the outcomes of simulations are displayed. The results of each dataset are given in detail in two separate parts. In this section, the outcomes of simulations are displayed. The results of each dataset are given in detail in two separate parts.

6.1 Blood dataset (San Raphael Hospital)

In this section, the results and parameters of the evaluation are similar to the previous section, except that the specifications and dimensions of the data are different. The best results are acquired from the Ensemble method. Element 11 in the confusion matrix is True Negative which shows the number of non-COVID persons that identified correctly. Element 2-2, True positive, shows the number of patients who have COVID-19 precisely. Figure 7 and Figure 8 are the average train and test confusion matrices of the Ensemble Classifier, respectively. The details of each fold of this procedure are specified in Table 3 and 4.

Refer to caption
Figure 7: Confusion matrix of train data on Blood test samples for San Raphael Hospital with Ensemble method.
Refer to caption
Figure 8: Confusion matrix of test data on Blood test samples for San Raphael Hospital with Ensemble method.
Table 3: Evaluation parameters of each fold of train data-Blood test samples- San Raphael Hospital-Ensemble
Train Fold-1 Fold-2 Fold-3 Fold-4 Fold-5 Average
Accuracy 0.948 0.942 0.934 0.945 0.934 0.940
Precision 0.943 0.941 0.929 0.949 0.933 0.939
Recall 0.962 0.955 0.952 0.954 0.947 0.954
F1-Score 0.953 0.948 0.940 0.951 0.940 0.946
Table 4: Evaluation parameters of each fold of test data-Blood test samples- San Raphael Hospital-Ensemble
Test Fold-1 Fold-2 Fold-3 Fold-4 Fold-5 Average
Accuracy 0.912 0.934 0.967 0.923 0.967 0.940
Precision 0.923 0.932 0.980 0.895 0.961 0.938
Recall 0.923 0.950 0.963 0.955 0.980 0.954
F1-Score 0.923 0.941 0.971 0.924 0.971 0.946

The results of fuzzy systems with different numbers of rules are available in Table 5. Table 6 and 7 are general comparisons of methods for blood test data of San Raphael hospital, which presents the percentages as the average of the folds.

Table 5: Fuzzy result with the number of rules 10, 12, 14, 16, and 18 respectively- San Raphael Hospital
Test Train
Classifiers Accuracy Precision Recall F1-Score Accuracy Precision Recall F1-Score
Model_1 (10 Rules) 82% 82% 84% 83% 84% 85% 87% 86%
Model_2 (12 Rules) 80% 78% 84% 81% 85% 86% 87% 87%
Model_3 (14 Rules) 83% 82% 86% 84% 90% 90% 92% 91%
Model_4 (16 Rules) 85% 86% 87% 87% 89% 93% 87% 90%
Model_5 (18 Rules) 84% 87% 82% 85% 87% 88% 89% 89%
Table 6: Comparison of classifiers based on evaluation parameters-Blood test data- San Raphael Hospital-Ensemble-TRAIN
Train
Classifiers Accuracy Precision Recall F1-Score
K-NN 99.11% 99.90% 99.94% 99.92%
Random-Forest 99.83% 99.89% 99.80% 99.85%
MLP 81.69% 83.62% 83.46% 83.41%
Fuzzy Network 90% 90% 90% 90%
SVM (kernel: Linear) 76.20% 79.96% 75.93% 77.88%
SVM (kernel: RBF) 80.05% 83.35% 79.79% 81.53%
SVM (kernel: Sigmoid) 51.44% 54.74% 69.02% 61.05%
SAE 79.04% 81.68% 79.94% 80.80%
Ensemble 94.09% 93.95% 95.44% 94.69%
Table 7: Comparison of classifiers based on evaluation parameters-Blood test data- San Raphael Hospital-Ensemble-TEST
Test
Classifiers Accuracy Precision Recall F1-Score
K-NN 67.65% 70.19% 72.06% 71.01%
Random-Forest 78.46% 80.46% 80.71% 80.50%
MLP 76.72% 78.78% 79.80% 78.98%
Fuzzy Network 83% 83% 83% 83%
SVM (kernel: Linear) 74.86% 78.42% 75.32% 76.78%
SVM (kernel: RBF) 76.93% 80.74% 76.51% 78.55%
SVM (kernel: Sigmoid) 52.24% 55.44% 69.87% 61.64%
SAE 78.25% 80.76% 79.68% 80.16%
Ensemble 94.09% 93.88% 95.44% 94.64%

6.2 Result Comparison (San Raphael Hospital)

Compared to similar articles, comparisons have been made due to the general public of San Rafael Hospital. The result obtained in [39], which is obtained with two procedures, standard with 88% accuracy, 86% sensitivity, and 91% specificity, and the three-way version (a model that abstains from prediction when the confidence score is below 75%) with 93% accuracy, 92% sensitivity, and 94% specificity. In, several methods implemented on the data, the best outcome has been gained with sensitivity between 92% and 95%, and accuracy between 82% and 86%. It is worth noting in [34] the number of used features is more than in our study. Besides, other research related to our study with different datasets has been done. In [40], by the routine blood tests of 6635 patients of BMI hospital, the results include 84% recall, 84% precision, and 84% F1-score have been obtained. Our study with 95% sensitivity, 94% specificity, and 94,1% accuracy, offers acceptable percentages compared to other methods.

6.3 Radiographic Image Processing

6.3.1 Lung Segmentation

Using the image segmentation dataset and the deep structure of U-Net, lung lobes can be separated from other organs in the image. By following this idea, the classifier structure will be able to make decisions based on the lung organ only, and other body organs will not be affected.

In the deep structure of U-Net, the RELU functions are considered, but the convolutional layer at the end of the model, which has a one-to-one filter, uses the sigmoid activation function. The cost function is based on the Jaccard criterion and Adam’s optimization algorithm is used to update the structure. 5% of the data set is considered for validation, 10% for testing and the remaining 85% for the training process in groups with eight samples and 100 epochs. By applying the stated approach, the results will be checked in the community. The results of the training and validation process are displayed according to Figure 9.

Refer to caption
Figure 9: Training and validation learning curves.

The schematic of the simulation performed for two test data samples can be seen as described in Figure 10.

Refer to caption
Figure 10: Data samples for simulation schematic.

Each example displays the original image, the corresponding mask, and the segmented image as the output of the structure in order from the left side. The segmented image will be applied as input to the classifier structure. Next, the structure of the classifier and its results will be examined.

6.3.2 Image Classification

The basic structure criterion used is taken from the initial deep convolution network-version three. In the initial network architecture version three, there are two initial modules expressed at the end of the structure. In the proposed model, one of the mentioned modules is removed and a stacked autoencoder is installed at the end of the convolutional model. Figure 11 shows the schematic of the proposed model.

Refer to caption
Figure 11: Training and validation learning curves.

6.3.3 Structure and Specification of Autoencoder

The input to the vector stack autoencoder is 2048-in-1. The details of the coding layers in the stack autoencoder used in the proposed structure are described in Table 8 and 9.

Table 8: Structural specification of stack autoencoder
First layer Second layer Third layer
Number of Neurons 512 128 32
Activation Function Exponential Linear Unit Exponential Linear Unit Exponential linear unit
Table 9: Specification of stack autoencoder training process
Loss Function Optimizer Epoch Batch-Size
MSE Adam 150 16

At first, the initial deep convolutional structure is trained by removing a module in Figure 11 along with the SoftMax activator function, and then its output is saved as input for training the stack autoencoder. The stack autoencoder is initially trained independently by the mentioned data set without a supervisor. 80% of the data set is considered for raining, 15% for testing, and 5% for validation. The value of the cost function resulting from the network test data is 0.0017.

6.3.4 Classifier Design Process

After completing the training process of the stacked autoencoder network, the initial reduced convolutional deep neural network architecture shown in Figure 11 is placed in series with the stacked autoencoder, and the structure set is under global training with 80% The dataset is used for training and 20% for testing and validation. Note that the input data set to the classifier includes segmented images without pre-processing by U-Net architecture. The details of the learning process are specified in Table 10.

Table 10: Specification of stack autoencoder training process
Loss Function Optimizer Epoch Batch-Size
Sparse Categorical Cross Entropy Adam 80 8

It should be noted that the activation functions in the convolution layers are RELU. After the completion of the training process, the obtained results will be evaluated. The confusion matrices of the training and test data sets are presented according to Figure 12. Element 1-1 in the confusion matrices of Figure 12 is related to the number of correctly recognized individuals of the normal class. Element 2-2 is related to the number of correctly diagnosed patients with viral pneumonia. Elements 3-3 and 4-4 also correspond to the number of correct diagnoses of patients related to Grand opacities and COVID-19, respectively.

Refer to caption
Figure 12: Confusion matrices of the train and test sets.

For applying the test data set with the trained structure, the values of accuracy and cost function have reached 91.1% and 0.472, respectively. To evaluate more accurately, the results obtained by the proposed structure are compared with the numbers obtained from the modified architectures. In addition to the proposed structure, in another architecture, instead of the stacked autoencoder, a multilayer neural network with the structural characteristics of the table is placed. Then, in another approach, the output of the convolutional structure is directly applied to the SoftMax activation function. The comparison of the stated structures is according to Table 11.

Table 11: Comparison results of different structures
Structure Accuracy Loss
Reduced Inception V3+SAE+SoftMax (Proposed Model) 91.1% 0.472
Reduced Inception V3+SoftMax 88.9% 0.555
Reduced Inception V3+Fully Connected Neural Network +SoftMax 89.0% 0.511

In addition to comparing the results by making changes in the structure, the input data set in three modes without pre-processing, histogram equalization, and adaptive histogram equalization pre-processing with limited contrast, is applied to the proposed structure in Figure 11 and their comparison is as described in Table 12.

Table 12: Comparison results of different pre-processing
Pre-processing Accuracy Loss
Original Image 91.1% 0.472
Histogram Equalization Map** 88.2% 0.672
Contrast Limited Adaptive Histogram Equalization Map** 88.7% 0.557

6.3.5 Visualization Result

In this section, visualization results using the Grad-CAM method will be presented. The application of the visualization process can be seen in hel** specialists to observe the abnormal areas of the lung, including the view of ground glass opacities and the phenomenon of consolidation. Figure 13 shows two examples of lung images along with their heat map. According to Figure 13, the pixels are displayed in different colors based on the degree of importance, and extreme amounts of infection and abnormal tissues are shown in red, orange, and yellow colors.

Refer to caption
Figure 13: Confusion matrices of the train and test sets.

7 Discussion

COVID-19 viruses have rapidly spread worldwide, posing a significant global health threat with a high mortality rate [39]. The quick and accurate diagnosis of this disease is crucial to curb its further spread and initiate timely treatment for patients. Considering the constraints of time, cost, and the virus’s mutation, it is essential to develop a reliable and resilient diagnostic method. In our study, we employed both blood test parameters and image processing techniques to enhance the accuracy and efficiency of COVID-19 diagnosis.

For blood test analysis, we utilized two datasets: the blood test dataset from San Raphael Hospital. These datasets contained various blood parameters, including CRP, Lymphocyte, Platelet, W.B.C, LDH, AST, ALT, RBC, Urea, and Neutrophils. By applying different classification methods such as KNN, Random Forest, MLP, RBF Neural Network, Fuzzy Network, Ensemble Method, and SVM, we evaluated the performance of each method in disease detection. The results showed that the Ensemble Method achieved the highest performance with an F1-score of 94.69% on the blood dataset from Raphael Hospital.

In addition to blood test analysis, our study incorporated image processing techniques, particularly the U-Net deep structure for lung segmentation. By effectively separating lung lobes from other organs in radiography images, we ensured that the subsequent classification model focused exclusively on the lung region, minimizing the influence of irrelevant factors and improving diagnostic accuracy.

For image classification, we developed a modified architecture by integrating a stacked autoencoder with the deep convolutional network. This approach enhanced the model’s ability to extract relevant features from the segmented lung images, leading to improved classification performance. The ensemble method demonstrated the best overall performance, achieving an accuracy of 91.1% on the test data.

The combination of blood test parameter analysis and image processing techniques provides a comprehensive diagnostic approach for COVID-19. By leveraging both these methods, we obtained significant advancements in disease detection accuracy, reducing the likelihood of false positives or negatives. This integrated approach offers several advantages, including cost-effectiveness, shorter diagnosis time, and the potential for implementation in areas with limited healthcare resources.

Further research can be conducted to enhance the diagnostic capabilities of the proposed methods. Increasing the size of the datasets would improve the robustness and generalizability of the models, allowing for more accurate disease diagnosis. Additionally, consulting medical experts or employing feature selection techniques can expand the number of relevant parameters, making the trained models more comprehensive. Incorporating deep learning algorithms and expanding the dataset would enable the identification of hidden features in the data, leading to even higher accuracy in disease detection.

8 Conclusion

In conclusion, our research highlights the significant role that artificial intelligence, machine learning, and image processing can play in enhancing the diagnosis of COVID-19, making it more accurate and efficient. By integrating blood test analysis and advanced image processing, we have formulated a dependable and economical diagnostic solution beneficial for healthcare settings, especially those with limited resources. Our approach, which includes the analysis of various blood parameters and the application of sophisticated classification and image processing techniques, has led to notable improvements in identifying the disease. The Ensemble Method, in particular, stood out for its effectiveness across different datasets.

Moreover, by employing cutting-edge image processing to analyze lung images specifically, we’ve managed to increase the accuracy of our diagnoses further. This progress underscores the vast potential of leveraging AI and machine learning in medical diagnostics. Looking ahead, expanding our dataset, integrating expert insights, and exploring deeper learning algorithms promise to enhance these diagnostic methods’ accuracy and applicability even more. This forward momentum paves the way for more sophisticated medical AI tools and promises to make high-quality healthcare diagnostics more accessible and affordable globally.

Declarations

Conflict of interest The authors declare that there is no conflict of interest regarding the publication of this paper

Acknowledgment

We thank the experts at San Rafael Hospitals for providing the data, and we appreciate the suggestions of the anonymous referees.

References

  • [1] Sibylle Bernard Stoecklin, Patrick Rolland, Yassoungo Silue, Alexandra Mailles, Christine Campese, Anne Simondon, Matthieu Mechain, Laure Meurice, Mathieu Nguyen, Clément Bassi, et al. First cases of coronavirus disease 2019 (covid-19) in france: surveillance, investigations and control measures, january 2020. Eurosurveillance, 25(6):2000094, 2020.
  • [2] Di Dong, Zhenchao Tang, Shuo Wang, Hui Hui, Lixin Gong, Yao Lu, Zhong Xue, Hongen Liao, Fang Chen, Fan Yang, et al. The role of imaging in the detection and management of covid-19: a review. IEEE reviews in biomedical engineering, 14:16–29, 2020.
  • [3] Jasper Fuk-Woo Chan, Shuofeng Yuan, Kin-Hang Kok, Kelvin Kai-Wang To, Hin Chu, ** Yang, Fanfan Xing, Jieling Liu, Cyril Chik-Yan Yip, Rosana Wing-Shan Poon, et al. A familial cluster of pneumonia associated with the 2019 novel coronavirus indicating person-to-person transmission: a study of a family cluster. The lancet, 395(10223):514–523, 2020.
  • [4] Kimberlyn Roosa, Yiseul Lee, Ruiyan Luo, Alexander Kirpich, Richard Rothenberg, James M Hyman, ** Yan, and Gerardo Chowell. Real-time forecasts of the covid-19 epidemic in china from february 5th to february 24th, 2020. Infectious disease modelling, 5:256–263, 2020.
  • [5] Na Zhu, Dingyu Zhang, Wenling Wang, Xingwang Li, Bo Yang, **gdong Song, Xiang Zhao, Baoying Huang, Weifeng Shi, Roujian Lu, et al. A novel coronavirus from patients with pneumonia in china, 2019. New England journal of medicine, 382(8):727–733, 2020.
  • [6] Li Yan, Hai-Tao Zhang, Yang Xiao, Maolin Wang, Yuqi Guo, Chuan Sun, Xiuchuan Tang, Liang **g, Shusheng Li, Mingyang Zhang, et al. Prediction of criticality in patients with severe covid-19 infection using three clinical features: a machine learning-based prognostic model with clinical data in wuhan. MedRxiv, pages 2020–02, 2020.
  • [7] Nanshan Chen, Min Zhou, Xuan Dong, Jieming Qu, Fengyun Gong, Yang Han, Yang Qiu, **gli Wang, Ying Liu, Yuan Wei, et al. Epidemiological and clinical characteristics of 99 cases of 2019 novel coronavirus pneumonia in wuhan, china: a descriptive study. The lancet, 395(10223):507–513, 2020.
  • [8] Xiaobo Yang, Yuan Yu, Jiqian Xu, Huaqing Shu, Hong Liu, Yongran Wu, Lu Zhang, Zhui Yu, Minghao Fang, Ting Yu, et al. Clinical course and outcomes of critically ill patients with sars-cov-2 pneumonia in wuhan, china: a single-centered, retrospective, observational study. The lancet respiratory medicine, 8(5):475–481, 2020.
  • [9] Michael Day. Covid-19: identifying and isolating asymptomatic people helped eliminate virus in italian village. BMJ: British Medical Journal (Online), 368, 2020.
  • [10] Wei-jie Guan, Zheng-yi Ni, Yu Hu, Wen-hua Liang, Chun-quan Ou, Jian-xing He, Lei Liu, Hong Shan, Chun-liang Lei, David SC Hui, et al. Clinical characteristics of coronavirus disease 2019 in china. New England journal of medicine, 382(18):1708–1720, 2020.
  • [11] Michael D Hope, Constantine A Raptis, and Travis S Henry. Chest computed tomography for detection of coronavirus disease 2019 (covid-19): don’t rush the science, 2020.
  • [12] Lauren Forchette, William Sebastian, and Tuoen Liu. A comprehensive review of covid-19 virology, vaccines, variants, and therapeutics. Current medical science, pages 1–15, 2021.
  • [13] Yunlu Wang, Menghan Hu, Yuwen Zhou, Qingli Li, Nan Yao, Guangtao Zhai, Xiao-** Zhang, and Xiaokang Yang. Unobtrusive and automatic classification of multiple people’s abnormal respiratory patterns in real time using deep neural network and depth camera. IEEE Internet of Things Journal, 7(9):8559–8571, 2020.
  • [14] Tao Ai, Zhenlu Yang, Hongyan Hou, Chenao Zhan, Chong Chen, Wenzhi Lv, Qian Tao, Ziyong Sun, and Liming Xia. Correlation of chest ct and rt-pcr testing for coronavirus disease 2019 (covid-19) in china: a report of 1014 cases. Radiology, 296(2):E32–E40, 2020.
  • [15] Muhammad Ilyas, Hina Rehman, and Amine Naït-Ali. Detection of covid-19 from chest x-ray images using artificial intelligence: An early review. arXiv preprint arXiv:2004.05436, 2020.
  • [16] Heshui Shi, Xiaoyu Han, Nanchuan Jiang, Yukun Cao, Osamah Alwalid, ** Gu, Yanqing Fan, and Chuansheng Zheng. Radiological findings from 81 patients with covid-19 pneumonia in wuhan, china: a descriptive study. The Lancet infectious diseases, 20(4):425–434, 2020.
  • [17] Jeffrey P Kanne. Chest ct findings in 2019 novel coronavirus (2019-ncov) infections from wuhan, china: key points for the radiologist, 2020.
  • [18] Zheng Ye, Yun Zhang, Yi Wang, Zixiang Huang, and Bin Song. Chest ct manifestations of new coronavirus disease 2019 (covid-19): a pictorial review. European radiology, 30:4381–4389, 2020.
  • [19] Alfonso J Rodriguez-Morales, Jaime A Cardona-Ospina, Estefanía Gutiérrez-Ocampo, Rhuvi Villamizar-Peña, Yeimer Holguin-Rivera, Juan Pablo Escalera-Antezana, Lucia Elena Alvarado-Arnez, D Katterine Bonilla-Aldana, Carlos Franco-Paredes, Andrés F Henao-Martinez, et al. Clinical, laboratory and imaging features of covid-19: A systematic review and meta-analysis. Travel medicine and infectious disease, 34:101623, 2020.
  • [20] Wu Cai, Junlin Yang, Guohua Fan, Liang Xu, Bo Zhang, and Rong Liu. Chest ct findings of coronavirus disease 2019 (covid-19). J Coll Physicians Surg Pak, 30(1):S53–5, 2020.
  • [21] Faisal Muhammad Shah, Sajib Kumar Saha Joy, Farzad Ahmed, Tonmoy Hossain, Mayeesha Humaira, Amit Saha Ami, Shimul Paul, Md Abidur Rahman Khan Jim, and Sifat Ahmed. A comprehensive survey of covid-19 detection using medical images. SN Computer Science, 2(6):434, 2021.
  • [22] Puck B van Kasteren, Bas van Der Veer, Sharon van Den Brink, Lisa Wijsman, Jørgen de Jonge, Annemarie van Den Brandt, Richard Molenkamp, Chantal BEM Reusken, and Adam Meijer. Comparison of seven commercial rt-pcr diagnostic kits for covid-19. Journal of clinical virology, 128:104412, 2020.
  • [23] Ophir Gozes, Maayan Frid-Adar, Nimrod Sagie, Huangqi Zhang, Wenbin Ji, and Hayit Greenspan. Coronavirus detection and analysis on chest ct with deep learning. arXiv preprint arXiv:2004.02640, 2020.
  • [24] Lin Li, Lixin Qin, Zeguo Xu, Youbing Yin, Xin Wang, Bin Kong, Junjie Bai, Yi Lu, Zhenghan Fang, Qi Song, et al. Using artificial intelligence to detect covid-19 and community-acquired pneumonia based on pulmonary ct: evaluation of the diagnostic accuracy. Radiology, 296(2):E65–E71, 2020.
  • [25] Shuai Wang, Bo Kang, **lu Ma, Xianjun Zeng, Mingming Xiao, Jia Guo, Mengjiao Cai, **gyi Yang, Yaodong Li, Xiangfei Meng, et al. A deep learning algorithm using ct images to screen for corona virus disease (covid-19). European radiology, 31:6096–6104, 2021.
  • [26] Biraja Ghoshal and Allan Tucker. Estimating uncertainty and interpretability in deep learning for coronavirus (covid-19) detection. arXiv preprint arXiv:2003.10769, 2020.
  • [27] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International conference on machine learning, pages 1613–1622. PMLR, 2015.
  • [28] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050–1059. PMLR, 2016.
  • [29] Maryam Zokaeinikoo, Pooyan Kazemian, Prasenjit Mitra, and Soundar Kumara. Aidcov: an interpretable artificial intelligence model for detection of covid-19 from chest radiography images. ACM Transactions on Management Information System (TMIS), 12(4):1–20, 2021.
  • [30] Ali Narin, Ceren Kaya, and Ziynet Pamuk. Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks. Pattern Analysis and Applications, 24:1207–1220, 2021.
  • [31] Prabira Kumar Sethy and Santi Kumari Behera. Detection of coronavirus disease (covid-19) based on deep features. MDPI AG, 2020.
  • [32] Ezz El-Din Hemdan, Marwa A Shouman, and Mohamed Esmail Karar. Covidx-net: A framework of deep learning classifiers to diagnose covid-19 in x-ray images. arXiv preprint arXiv:2003.11055, 2020.
  • [33] Ioannis D Apostolopoulos and Tzani A Mpesiana. Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks. Physical and engineering sciences in medicine, 43:635–640, 2020.
  • [34] World Health Organization et al. Clinical management of severe acute respiratory infection when novel coronavirus (ncov) infection is suspected: interim guidance, 25 january 2020. Technical report, World Health Organization, 2020.
  • [35] Davide Brinati, Andrea Campagner, Davide Ferrari, Massimo Locatelli, Giuseppe Banfi, and Federico Cabitza. Detection of covid-19 infection from routine blood exams with machine learning: a feasibility study. Journal of medical systems, 44:1–12, 2020.
  • [36] Soheil Mehralian, Effat Jalaeian Zaferani, Shahrzad Shashaani, Farnaz Kashefinishabouri, Mohammad Teshnehlab, Hosein Ali Sokhandan, Zahra Sadat Dibaji Forooshani, Bina Montazer, Zeinab Joneidi, and Maryam Vafapeyvand. Rapid covid-19 screening based on the blood test using artificial intelligence methods. Journal of Control, 14(5):131–140, 2021.
  • [37] Federico Cabitza, Andrea Campagner, Davide Ferrari, Chiara Di Resta, Daniele Ceriotti, Eleonora Sabetta, Alessandra Colombini, Elena De Vecchi, Giuseppe Banfi, Massimo Locatelli, et al. Development, evaluation, and validation of machine learning models for covid-19 detection based on routine blood tests. Clinical Chemistry and Laboratory Medicine (CCLM), 59(2):421–431, 2021.
  • [38] Li-Xin Wang. Adaptive fuzzy systems and control: design and stability analysis. Prentice-Hall, Inc., 1994.
  • [39] Chaolin Huang, Yeming Wang, ** Zhao, Yi Hu, Li Zhang, Guohui Fan, Jiuyang Xu, Xiaoying Gu, et al. Clinical features of patients infected with 2019 novel coronavirus in wuhan, china. The lancet, 395(10223):497–506, 2020.
  • [40] Josephine Moulds. People with mild or no symptoms could be spreading covid-19. Technical report, Independent, 2020.