Artificial Intelligence Based COVID-19 Detection and Classification Model on Chest X-ray Images

Diagnostic and predictive models of disease have been growing rapidly due to developments in the field of healthcare. Accurate and early diagnosis of COVID-19 is an underlying process for controlling the spread of this deadly disease and its death rates. The chest radiology (CT) scan is an effective device for the diagnosis and earlier management of COVID-19, meanwhile, the virus mainly targets the respiratory system. Chest X-ray (CXR) images are extremely helpful in the effective diagnosis of COVID-19 due to their rapid outcomes, cost-effectiveness, and availability. Although the radiological image-based diagnosis method seems faster and accomplishes a better recognition rate in the early phase of the epidemic, it requires healthcare experts to interpret the images. Thus, Artificial Intelligence (AI) technologies, such as the deep learning (DL) model, play an integral part in developing automated diagnosis process using CXR images. Therefore, this study designs a sine cosine optimization with DL-based disease detection and classification (SCODL-DDC) for COVID-19 on CXR images. The proposed SCODL-DDC technique examines the CXR images to identify and classify the occurrence of COVID-19. In particular, the SCODL-DDC technique uses the EfficientNet model for feature vector generation, and its hyperparameters can be adjusted by the SCO algorithm. Furthermore, the quantum neural network (QNN) model can be employed for an accurate COVID-19 classification process. Finally, the equilibrium optimizer (EO) is exploited for optimum parameter selection of the QNN model, showing the novelty of the work. The experimental results of the SCODL-DDC method exhibit the superior performance of the SCODL-DDC technique over other approaches.


Introduction
COVID-19 revolutionized the healthcare system worldwide. Along with global economics, healthcare, transportation, and education have all been changed [1]. This disease may lead to severe respiratory sickness, but it can be healed with proper treatment. However, human-to-human interaction and community proliferation are the most dangerous side effects of the virus. In cluster cases, a prediction-based artificial intelligence (AI) can identify cases using these methods [2]. In addition, prior medical data are used for making the healthcare data prediction. AI involves a set of algorithms and mathematical models that are designed to simulate human intelligence. Moreover, AI can understand and describe the progression of the COVID-19 vaccine [3,4]. The current patient screening, tracking, predicting, and analyzing must be conducted to accurately predict COVID-19 cases that might assist in the prediction of infected persons in the future [5,6]. Now, AI is often used to find novel compounds to help combat COVID-19. Substantial research has been performed to find new treatments to cure the disease [7], along with computational Healthcare 2023, 11, 1204 2 of 16 methods to identify infected persons using medicinal image processing of X-ray pictures and CT scans.
In recent years, Convolutional Neural Networks (CNN) have become the most conventional technique in AI. CNN was effectively applied in medical image analyses such as ultrasonography, magnetic resonance imaging (MRI), X-rays, computed tomography (CT) scans, and so on [8][9][10][11][12]. Additionally, CNN has been highly successful in computer vision (CV), speech recognition, natural language processing (NLP), and audio recognition. Moreover, a neural network (NN) is a sequence of algorithms that identify relationships in a series of data that are exactly the same as the operation of the human brain [13]. For image processing and pattern recognition, this technique is highly successful. It takes an image as the input and constructs a model that processes the image to extract the features and identify a pattern. With these patterns, CNN can recognize similarities of new input images [14,15]. This technique is highly successful due to its adaptability, simple structure, the low complexity of the network model, and reduced training parameters. COVID-19 detection using CNN became a powerful method after the first cases became a global pandemic [16]. One study found outstanding CNN-based research using CT and X-ray images to identify and classify COVID-19. These are not an alternative to actual testing methods, although the CNN technique has had remarkable success [17]. This technique is highly beneficial when used with actual testing methods, but before commercial use, further research and development must be conducted.
This study designs a sine cosine optimization with deep learning-based disease detection and classification (SCODL-DDC) for COVID-19 on chest X-ray (CXR) images. The proposed SCODL-DDC technique examines the CXR images to identify and classify the presence of COVID-19. In particular, the SCODL-DDC technique uses the EfficientNet model for feature vector generation and its hyperparameters can be adjusted by the SCO algorithm. Furthermore, the quantum neural network (QNN) model can be employed for accurate COVID-19 classification process. Finally, an equilibrium optimizer (EO) is used for optimum parameter selection in the QNN model. The experimental outcomes of the SCODL-DDC method are tested on a benchmark CXR dataset.
The rest of the paper is organized as follows: Section 2 provides the related works and Section 3 offers the proposed model. Then, Section 4 gives the result analysis and Section 5 concludes the paper.

Related Works
In [18], the authors introduced an LW-CORONet method, which is a lightweight CNN method that encompasses a sequence of convolution layers, pooling layers, the two fully connected (FC) layers, and the rectified linear unit (ReLU). This method facilitates the extraction of useful features from CXR images with five learnable layers. Gupta and Bajaj [19] devised a robust structure utilizing deep learning (DL)-based techniques and chest CT-scan images for automatic screening of COVID-19. In this study, two pre-trained DL methods, DarkNet19 and MobileNetV2, publicly accessible CT-scan image data, and a lightweight DL technique were employed for automatic screening of COVID-19. In [20], a new technique was modelled to enrich the classification and screening of COVID-19 patients related to their CXR images. In this method, by integrating the conventional data augmentation methods with the generative adversarial networks (GANs), the author not only solved the data limitation issue, but also allowed a deeper extraction of attributes through the implementation of different filter banks such as the Gabor filters, Sobel, and Laplacian of Gaussian (LoG).
Ravi et al. [21] devised largescale learning techniques, including a stacked ensemble Meta classifier and a DL-related feature fusion technique for the classification of COVID-19. The extraction of attributes from global average pooling (penultimate layer) belonging to EfficientNet-related pre-trained methods was completed, and utilizing kernel principal component analysis (PCA), the dimensionality of extracted features was minimalized. Then, to join the features of different mined features, a method called the fusion approach Healthcare 2023, 11, 1204 3 of 16 was used. Lastly, for classification purposes, a stacked ensemble meta-classifier-based approach was used. In [22], the authors proposed an innovative Bayesian optimizationbased CNN technique for recognizing CXR imageries. This method has two major elements. The first element uses CNN to learn and extract deep features. The second element is a Bayesian-based optimizer that can be exploited for tuning the CNN hyperparameter as per an objective function.
Mansour et al. [23] devised a new, unsupervised DL-based variational autoencoder (UDL-VAE) method for the recognition and classification of COVID-19. To enhance the image quality, the proposed method included an adaptive Wiener filtering (AWF)-related preprocessing method. Additionally, InceptionV4 included the Adagrad method utilized as a feature extractor. For classification, an unsupervised VAE technique was implemented. A set of experiments was conducted to identify the potential outcome of the UDL-VAE method and to validate its detection accuracy. Shankar and Perumal [24] presented a fusion model handcrafted with DL features (FM-HCF-DLF) as a method for the classification and diagnosis of COVID-19. The FM method integrated the handcrafted feature with a local binary pattern (LBP) and DL features, and used the CNN-based InceptionV3 method. To additionally enhance the InceptionV3 model performance, a learning rate scheduler utilizing the Adam optimizer (AO) was implemented. Finally, to effectuate the classification process, a multilayer perceptron (MLP) was used.
In [25], a new artificial neural network (ANN), convolution capsule network (CapsNet), for recognition of COVID-19 was presented by utilizing CXR images with CapsNets. The presented method was intended to offer correct and quick diagnostics for COVID-19 with binary and multi-class classifications. Almalki et al. [26] examined a new approach, CoVIRNet (COVID Inception-ResNet method), which exploits the CXRs for automatically diagnosing people with COVID-19. The presented method has various inception residual blocks which provide data-utilizing various depths, mapping features at various scales, with several layers. These features can be concatenated at every presented classification block, utilizing the average-pooling layer, and concatenated features can be passed to the FC layer. Shorfuzzaman et al. [27] presented a new CNN-based DL fusion structure utilizing the transfer learning (TL) method, but parameters (weights) in various methods were integrated as a single method for extracting features in images that were provided to the custom classifier to forecast. Bekhet et al. [28] examined an AI-based approach for primary COVID-19 analysis in CXR images utilizing medical experience and deep CNNs. Finally, a DL technique was generated carefully and fine-tuned for achieving maximal performance in COVID-19 recognition.
Although several ML and DL models for COVID-19 classification are available in the literature, there is still a need to enhance the classification performance. Due to the continuous deepening of the model, the number of parameters of DL models also increases quickly, which results in model overfitting. At the same time, different hyperparameters have a significant impact on the efficiency of the CNN model. Particularly, hyperparameters, such as epoch count, batch size, and learning rate selection, are essential to attain effectual outcomes. Since the trial-and-error method for hyperparameter tuning is a tedious and erroneous process, metaheuristic algorithms can be applied. Therefore, in this work, we employed SCO and EO algorithms used for the parameter selection of the EfficientNet and QNN models, respectively.

The Proposed Model
In this study, we introduced a new SCODL-DDC algorithm for automated and accurate COVID-19 classification models on CXR images. The proposed SCODL-DDC technique examines the CXR images to identify and classify the presence of COVID-19. To accomplish this, it encompasses the EfficientNet feature extractor, SCO-based hyperparameter tuning, QNN-based classification, and EO-based parameter tuning. The overall procedure of the SCODL-DDC algorithm is illustrated in Figure 1. accomplish this, it encompasses the EfficientNet feature extractor, SCO-based hyperparameter tuning, QNN-based classification, and EO-based parameter tuning. The overall procedure of the SCODL-DDC algorithm is illustrated in Figure 1.

Feature Extraction Using EfficientNet
In this work, the SCODL-DDC technique used the EfficientNet model for feature vector generation. Tan and Le recently studied the connection between the depth and width of the CNN and proposed a powerful approach to design a CNN model with few parameters, but a great classification performance [29]. They developed seven models, which they represented as EfficientNetB0 to EfficientNetB7. Together, they were named the Effi-cientNet CNN model. Once the EfficientNet CNN model was employed in the ImageNet datasets, it was demonstrated that their model outperformed every new model with respect to the number of parameters and Top-1 accuracy. New technology for CNN scaling is the basis for the EfficientNet family. It exploits a powerful and straightforward compound coefficient. Unlike classical techniques that scale features of organizations, such as goal, width, and profundity, EfficientNet scales every aspect with an appropriate set of scaling coefficients. Scaling individual aspects acts on model implementation but adjusting each organization component with respect to the available resources works on implementation.
EfficientNet is considerably smaller than other models with comparable accuracy to ImageNet. As found in the Keras application, for example, the ResNet50 model has 23,534,592 boundaries. It still needs to meet the expectation of the small EfficientNet (named EfficientNetB0) model, which has 5,330,564 boundaries. An effective model is proposed on the basis of EfficientNetB3 CNN since it strikes a proper balance between computational power and accuracy. The mobile inverted-bottleneck convolution (MBConv) is a building block of the EfficientNet family. The concept of the MobileNet model is the

Feature Extraction Using EfficientNet
In this work, the SCODL-DDC technique used the EfficientNet model for feature vector generation. Tan and Le recently studied the connection between the depth and width of the CNN and proposed a powerful approach to design a CNN model with few parameters, but a great classification performance [29]. They developed seven models, which they represented as EfficientNetB0 to EfficientNetB7. Together, they were named the EfficientNet CNN model. Once the EfficientNet CNN model was employed in the ImageNet datasets, it was demonstrated that their model outperformed every new model with respect to the number of parameters and Top-1 accuracy. New technology for CNN scaling is the basis for the EfficientNet family. It exploits a powerful and straightforward compound coefficient. Unlike classical techniques that scale features of organizations, such as goal, width, and profundity, EfficientNet scales every aspect with an appropriate set of scaling coefficients. Scaling individual aspects acts on model implementation but adjusting each organization component with respect to the available resources works on implementation.
EfficientNet is considerably smaller than other models with comparable accuracy to ImageNet. As found in the Keras application, for example, the ResNet50 model has 23,534,592 boundaries. It still needs to meet the expectation of the small EfficientNet (named Efficient-NetB0) model, which has 5,330,564 boundaries. An effective model is proposed on the basis of EfficientNetB3 CNN since it strikes a proper balance between computational power and accuracy. The mobile inverted-bottleneck convolution (MBConv) is a building block of the EfficientNet family. The concept of the MobileNet model is the basis for MBConv. The fundamental concept is to apply depthwise separable convolution that involves a depthwise and a pointwise convolutional layer. The two basic concepts, (1) Linear bottlenecks and (2) Residual connections that were inverted are taken from MobileNetV2: The EfficientNet family starts with its stem which is common to every eight models and the last layers. After the stem, there exist seven blocks. In addition, this block has different sub-blocks, and the number rises as they progress from EfficientNetB0 to EfficientNetB7. The total number of layers in EfficientNetB0 is 237, whereas the total number of layers in EfficientNetB7 is 813. The next module is the basis for the initial sub-block of the seven major blocks, except the first. Module Three brings together each sub-block through a skip connection. The skip connection in the initial sub-block is merged with Module Four. Module Five connects with each sub-block through a skip fashion to the one before it. Lastly, a sub-block is generated by combining the module with being used in a specific way in the block.

Hyperparameter Tuning
The hyperparameters of the EfficientNet model can be chosen by the SCO algorithm at this stage. In 2016, Seyedali Mirjalili proposed an SCO, a newly established metaheuristic technique that is used to resolve real-time engineering problems [30]. The mathematical model is based primarily on the sine and cosine rules, and SCO changes many initial random solutions to the best possible region of convergence. Furthermore, SCO uses variables that pose adaptive and random behaviors for relocating a bad solution into the best possible region with ease. For this reason, the algorithm was extensively used. The SCO uses two fundamental processes for search: population and local search strategies. Both strategies are responsible for local exploitation and global exploration. The broad applicability of SCO is due to its hassle-free, adaptive, and simple structure. The SCO has been hybridized with different approaches for robust mathematical optimization. Due to this feature, SCO is widely employed to resolve various optimization problems, such as feature selection, scheduling, economic power dispatch planning, power energy, classification, and benchmark functions.
The candidate solution in SCO was expressed as a matrix without losing any generality: In Equation (1), the row vector can be signified for the subsequent entries X n = [x n,1 , x n,2 , . . . , x n,.d ]. Like other optimization techniques, the initialization technique has a matrix formation that consists of size (N × d). Furthermore, the location updating expression depends on the assessment of trigonometric function with an encoding step. The sine and cosine functions are used for updating the position, as follows: Here, Y t i denotes the location of the present solution in i − th parameter at t − th iteration. Furthermore, randomness is added by incorporating r 1 /r 2 /r 3 . Equations (2) and (3) characterize the location update to attain the desired destination point at i − th parameter. Furthermore, the updated formula uses the absolute value of the difference as follows: In Equations (4) and (5), j τ i represents the local optimum solution, random integer within [0, 2π]. Therefore, the search direction can be aggregated to the global optimum solution by incorporating the sine and cosine rules. r 3 is the uniform distribution random number between [0, 2]. Furthermore, the bridging is provided with the help of a monotonically decreasing linear function, m 1 . This number decreases with the increment in iterative count increasing.
In Equation (6), a denotes the constant, t and T max denote the present iteration and max iteration count which determines the ending condition for the optimization algorithm. As mentioned before, the balancing between the exploitation and exploration stages can be performed by using m 1 . The success of optimization algorithm greatly depends on these parameters.
Fitness selection is a crucial factor in the SCO approach. Solution encoding is exploited for assessing the aptitude (goodness) of candidate solution. Now, the accuracy value is the main condition utilized for designing a fitness function where the true positive value can be represented as TP and the false positive value can be denoted as FP.

Optimal QNN-Based Classification
For COVID-19 classification, the QNN model is used. The architecture of the quantum neuron model is based on quantum logic gate, involving the reverse rotation part, phase rotation part, output part, input part, and aggregation part [31]. The working process of QNN is given as follows: Step 1: let |x i = cost i , sint i ) T , as well as define the qubit phase rotation gate using Equation (9): Next, with the aggregation, the equation becomes where Step 2: the outcomes of Equation (7) make the reverse rotation operation by the controlled-NOT gate: where f denotes the sigmoid function as Thus, the relationships between the input and output of the quantum neuron models are defined below: The ship-steering controller design is created by using the quantum neuron model. The hidden layer (HL), output layer, and input layer are the three layers of the presented method. The QNN is used in the layer that is between the input layers and HLs; there is p conventional neuron in the output layer, n quantum neuron in the input layer, and m quantum neuron in the HL. Taking the qubit as the transfer function of the hidden layer, then the output of the QNN can be expressed as follows: where i = 1, 2, . . . , n; j = 1, 2, . . . , m; and k = 1, 2, . . . , p.
In Equation (14), y k represents the output of QNN, |x i denotes the input variable, h j denotes the output of HL, w jk indicates the network weight for the output layer and HL, and R θ ij shows the quantum rotation gate between the input and the HLs for updating the qubits. Figure 2 illustrates the architecture of the QNN method.
The ship-steering controller design is created by using the quantum neuron model. The hidden layer (HL), output layer, and input layer are the three layers of the presented method. The QNN is used in the layer that is between the input layers and HLs; there is conventional neuron in the output layer, quantum neuron in the input layer, and quantum neuron in the HL. Taking the qubit as the transfer function of the hidden layer, then the output of the QNN can be expressed as follows: where = 1,2, … , ; = 1,2, … , ; and = 1,2, … , .
In Equation (14), represents the output of QNN, | 〉 denotes the input variable, ℎ denotes the output of HL, indicates the network weight for the output layer and HL, and ( ) shows the quantum rotation gate between the input and the HLs for updating the qubits. Figure 2 illustrates the architecture of the QNN method. At the final stage, the EO algorithm is used for parameter optimization purposes. Using the dynamic mass balance, the main concept of single objective EO was established [32]. These characteristics could maintain the balance between detection and exploitation and the ability to maintain flexibility amongst every individual solution. At first, EO exploits a certain group, whereas every particle describes the vector focus that has a solution to the problems.
where represents the vector focus on particles, and characterize the upper and lower limits of the problem, specifies the randomly generated number At the final stage, the EO algorithm is used for parameter optimization purposes. Using the dynamic mass balance, the main concept of single objective EO was established [32]. These characteristics could maintain the balance between detection and exploitation and the ability to maintain flexibility amongst every individual solution. At first, EO exploits a certain group, whereas every particle describes the vector focus that has a solution to the problems.
where Y initial j represents the vector focus on j th particles, ub and lb characterize the upper and lower limits of the problem, rand j specifies the randomly generated number within [0, 1], and n indicates the number of particles. In the exploration and exploitation approaches, the five equilibrium candidates help EO. The first four candidates search for optimum exploration. However, the fifth candidate with average values searches for modification from exploitation.
The upgrade of concentration assists EO in equally balancing exploration and exploitation: where → λ specifies the randomly generated number within [0, 1], and t minimizes as the iteration amount increases. (18) where It and Max − it represent the present and maximal amount of the iteration, and a 2 denotes the constant control of the ability for exploitation. Another variable, a 1 , was exploited for enhancing exploration and exploitation: The generation rate can be represented by as G rises exploitation: where → l indicates the randomly generated number [0, 1], and the initial generation rate is denoted as where tr 1 and r 2 represent the randomly generated number ranges within [0, 1]. The vector → GCP signifies the control variable which controls the generation rate implemented for the upgrading stage.
The value of V corresponds to 1. The EO method not only derives a fitness function to accomplish superior accuracy of the classification but also delineates a positive integer to characterize the remarkable performance of the solution candidate. The reduction in the classification error rate is regarded as a fitness function.

Results and Discussion
The proposed model is simulated using Python 3.7 on PC i5-8600k, GeForce 1050Ti 4 GB, 16 GB RAM, 250 GB SSD, and 1 TB HDD. The QNN model is implemented in Python using a quantum computing library called Qiskit. Qiskit supports several different backends, including simulators and real quantum devices. The parameter settings are given as follows: learning rate: 0.01, dropout: 0.5, batch size: 5, and number of epochs: 50.
In this section, the experimental validation of the SCODL-DDC technique is tested on the CXR image dataset [33], comprising 305 samples with different classes as defined in Table 1. Figure 3 represents the sample images. In this section, the experimental validation of the SCODL-DDC technique is tested on the CXR image dataset [33], comprising 305 samples with different classes as defined in Table 1. Figure 3 represents the sample images.   In Figure 4, the COVID-19 detection results from the SCODL-DDC technique are demonstrated in the form of confusion matrices. This figure revealed that the SCODL-DDC technique identifies different classes efficaciously.
Healthcare 2023, 11, x FOR PEER REVIEW 10 of 16 In Figure 4, the COVID-19 detection results from the SCODL-DDC technique are demonstrated in the form of confusion matrices. This figure revealed that the SCODL-DDC technique identifies different classes efficaciously. In Table 2  In Table 2, an overall classification outcome of the SCODL-DDC technique is studied under varying sizes of TRP and TSP. These results showcase the enhanced results of the SCODL-DDC technique in all cases. For instance, on 70% of TRP, the SCODL-DDC technique attains an average accu y of 97.81%, a prec n of 92.10%, a sens y of 80.56%, a spec y of 97.08%, and an F score of 85.32%. Meanwhile, on 30% of TSP, the SCODL-DDC technique attains an average accu y of 98.55%, a prec n of 95.94%, a sens y of 92.61%, a spec y of 97.80%, and an F score of 93.95%. Eventually, on 80% of TRP, the SCODL-DDC method achieves an average accu y of 99.04%, a prec n of 94.75%, a sens y of 90.02%, a spec y of 99.16%, and an F score of 92.01%. The TACY and VACY of the SCODL-DDC method are inspected on COVID-19 detection performance in Figure 5. The figure reveals that the SCODL-DDC approach has demonstrated superior performance with maximum values of TACY and VACY. It can be observed that the SCODL-DDC method has attained higher TACY outcomes.
The TLOS and VLOS of the SCODL-DDC method are tested on COVID-19 detection performance in Figure 6. The figure implies that the SCODL-DDC approach has illustrated superior performance with the lowest values of TLOS and VLOS. It is demonstrated that the SCODL-DDC method has resulted in minimum VLOS outcomes. Healthcare 2023, 11, x FOR PEER REVIEW 12 of 16 The TLOS and VLOS of the SCODL-DDC method are tested on COVID-19 detection performance in Figure 6. The figure implies that the SCODL-DDC approach has illustrated superior performance with the lowest values of TLOS and VLOS. It is demonstrated that the SCODL-DDC method has resulted in minimum VLOS outcomes.  The TLOS and VLOS of the SCODL-DDC method are tested on COVID-19 detection performance in Figure 6. The figure implies that the SCODL-DDC approach has illustrated superior performance with the lowest values of TLOS and VLOS. It is demonstrated that the SCODL-DDC method has resulted in minimum VLOS outcomes.  A clear precision-recall analysis of the SCODL-DDC technique under a test database is portrayed in Figure 7. The figure indicates that the SCODL-DDC approach results in improved values of precision-recall values in all classes.

Conclusions
In this study, we introduced a new SCODL-DDC algorithm for automated and accurate COVID-19 classification algorithms on CXR images. The proposed SCODL-DDC technique examines the CXR images to identify and classify the presence of COVID-19. To accomplish this, it encompasses the EfficientNet feature extractor, SCO-based hyperparameter tuning, QNN-based classification, and EO-based parameter tuning. Moreover, the SCODL-DDC technique uses the EfficientNet model for feature vector generation and its hyperparameters can be adjusted by the SCO algorithm. Lastly, the EO algorithm with the QNN model is employed for an accurate COVID-19 classification process. The experimental results of the SCODL-DDC technique were tested on benchmark CXR datasets and the outcomes exhibited superior performance over other approaches. In the future, feature fusion with ensemble voting classifiers can be designed to enhance the performance of the SCODL-DDC algorithm. Data Availability Statement: Data sharing is not applicable to this article as no datasets were generated during the current study.