A New Optimal Diagnosis System for Coronavirus (COVID-19) Diagnosis Based on Archimedes Optimization Algorithm on Chest X-Ray Images

The new coronavirus, COVID-19, has affected people all over the world. Coronaviruses are a large group of viruses that can infect animals and humans and cause respiratory distress; these discomforts may be as mild as a cold or as severe as pneumonia. Correct detection of this disease can help to avoid its spreading increasingly. In this paper, a new CAD-based approach is suggested for the optimal diagnosis of this disease from chest X-ray images. The proposed method starts with a min-max normalization to scale all data into a normal scale, and then, histogram equalization is performed to improve the quality of the image before main processing. Afterward, 18 different features are extracted from the image. To decrease the method difficulty, the minimum features are selected based on a metaheuristic called Archimedes optimization algorithm (AOA). The model is then implemented on three datasets, and its results are compared with four other state-of-the-art methods. The final results indicated that the proposed method with 86% accuracy and 96% precision has the highest balance between accuracy and reliability with the compared methods as a diagnostic system for COVID-19.


Introduction
Coronaviruses are a large family of viruses that can infect animals and humans. Many of the known coronaviruses have caused a range of respiratory infections in humans, ranging from the common cold to more severe illnesses such as Middle East Respiratory Syndrome (MERS) and Severe Acute Respiratory Syndrome (SARS). e newly discovered coronavirus is the cause of COVID-19 disease. e emerging virus and its disease were unknown before the recent outbreak.
COVID-19 is a new infectious disease that first broke out in December 2019 in Wuhan Province, China. e disease later spread to other countries in Asia, Europe (mainly Italy, Spain, France, and the United Kingdom), Africa, and the United States (mainly the United States). e COVID-19 disease is highly transmissible.
According to the World Health Organization (WHO), as of Apr 14, 2021, there are 13,804,929 cases of infection and 2,972,662 deaths. However, these statistics are exponentially increasing. From the outset, the World Emergency Committee stressed the need for prompt diagnosis, quarantine, and prompt treatment. Efforts to curb the spread of COVID-19, in which more than 170 countries are currently fighting and controlling the disease, are ongoing, with daily statistics on the number of deaths, which is based on a kind of global alliance among all countries of the world to prevent and stop the spread of this virus. With the spread of this virus and its epidemic worldwide, the diagnosis of this disease has become a priority for the medical system of the world and international organizations such as WHO.
ere are currently several ways to diagnose this disease. One of the important parameters in this regard is the use of advanced equipment and the help of technology to control this virus. Artificial intelligence and machine learning techniques play a significant role in carrying out this mission.
Recently, the analysis of disease-related data, data preparation, prevention, and control of infectious diseases, such as COVID-19, has become one of the goals of artificial intelligence. Artificial intelligence is one of the technologies that can easily track the spread of the virus, identify high-risk patients, and help control infection in a timely manner. It can also predict patient mortality risk by analyzing previous data. Artificial intelligence can help us fight the virus with population screening, medical help, information, and suggestions for infection control. is technology has the potential to improve the planning, treatment, and reported outcomes of the COVID-19 patient and is an evidence-based medical tool.
Artificial intelligence can quickly analyze the symptoms and alert patients and treatment staff. is technology helps make decisions faster, which is cost-effective. Artificial intelligence helps create a new COVID-19 patient diagnosis and management system through efficient algorithms. Artificial intelligence uses medical imaging technologies such as X-ray imaging, Computed tomography (CT), and magnetic resonance imaging (MRI) to diagnose infected cases. At the same time, in the field of medical imaging, machine learning helps to identify patterns in images and enhances the ability of radiologists to diagnose and detect disease early.
e diagnosis of COVID-19 is problematic due to the appearance of different types of coronaviruses. However, sampling offers well diagnosis, it is possible only by surgery, which gives an unpleasant experience to the patient. For avoiding redundant sampling, researchers have reviewed numerous noninvasive techniques for diagnosing COVID-19. Almost, all diagnosis systems based on image processing include three main parts of image preprocessing, boundary identification, feature extraction, and the final classification [1]. However, COVID-19 is a new disease, because of its highly dangerous and pandemic status, different works have been done in the diagnosis and purpose of this cancer from medical images.
Song et al. [2] proposed diagnosis method based on CT images. ey collected chest CT scans from hospitals of two provinces in China. Deep learning was used for the diagnosis of COVID-19. e final results indicated that the proposed method with 0.96 precision has good accuracy for detecting the COVID-19 patients. e method was also provided a model to extract significant lesion features from the CT images.
Zhang et al. [3] proposed deep anomaly detection system to provide a fast and reliable screening. For providing the model efficiency, Github, repository1, and Chest X-ray14 datasets were analyzed. Simulation results showed that the proposed method provides about 96.00% accuracy in the diagnosis of the COVID-19 cases with 96.00% sensitivity which are proper results for this purpose.
Jin et al. [4] presented another method based on medical imaging for a quick diagnosis of COVID-19 patients from CT scans. e method was based on a difficult multiclass diagnosis system based on Convolutional Neural Network (CNN) to reach the defective region. Moreover, the diagnosis accuracy of chest X-ray (CXR) was compared with that of CT to show its higher accuracy.
As mentioned above, X-ray imaging provides better results for diagnosing the COVID-19 disease. erefore, in this study, we propose a medical imaging system based on X-ray to provide better results of the diagnosis. However, the results of the researches in the literature are well, but there are also lots of works that can be done on the system consistency and accuracy. erefore, in this study, the following contributions are considered: (i) A new CAD-based approach for optimal diagnosis of COVID-19 from chest X-ray images (ii) Using a new algorithm to decrease the complexity of feature extraction (iii) Using a new algorithm for the final classification of the images (iv) e new algorithm is based on a new metaheuristic called Archimedes optimization algorithm (AOA) (v) Validating the method by three different datasets and comparing with four other state-of-the-art methods e next sections of this paper are organized as follows. In Section 2, the main preprocessing stages of the paper, including min-max normalization and histogram equalization, are explained. Section 3 explains about feature extraction and the features that are utilized for the classification. In Section 4, the theory of the Archimedes optimization algorithm has been explained. Section 5 describes the method of classification of the data based on optimization and multilayer perceptron. In Section 6, the simulation results have been completely performed and discussion proved the method capability. Finally, the paper has been concluded in Section 7.

Min-Max Normalization.
Data normalization is one of the most important stages of preprocessing in data mining science. In explaining the importance of normalization, imagine that the intervals corresponding to the values of the two properties are significantly different from each other. For example, suppose the interval for one of the attributes is the interval [1, 0] and the interval for another attribute of the same data set is [500, 1], in which case it is clear that when using criteria that are based on distance A feature with a smaller range will have virtually no significant effect on the calculations. According to these explanations, to achieve more accurate results, it is necessary that the intervals related to the different features be identical or close to each other. Normalization methods are used for this purpose. ere are various methods for normalization that are used in different studies. In this study, the Min-Max method has been used.
In this simple method, each set of data is mapped to arbitrary intervals, the minimum and maximum values of which are already known. In this method, any desired interval can be mapped to a new interval with just a simple conversion. Suppose attribute A is to be mapped from the data set between min A to max A and the new range new Min to new Max . For this purpose, any initial value such as v in the initial interval will be converted to the new value v ′ in the new interval according to the following equation:

Histogram Equalization.
Image histogram equalization is a process that involves changes in the pixel intensity of the input image, so that the output image looks better intuitively and perceptually. erefore, the purpose of image enhancement is to improve the interpretation or perception of the information contained therein for the viewer, or to provide better input for automated processing systems. One of the important quality factors in processing different images is contrast. If the contrast of an image is too dark, too bright, or too focused, the image information is lost in areas that are over and evenly focused. erefore, the contrast of the image should be enhanced to show all information in the input image. e general histogram equalizer in almost all types of images is due to its simplicity and relatively good performance. e main idea of modifying the histogram is to reprogram the gray surfaces of the input image based on the uniform expansion of its probability density function. is technique flattens the dynamic range of the image histogram, increasing the contrast of the input image as much as possible.
By considering a discrete grayscale image, x with n i as the number of occurrences of the i th gray level, the probability of an occurrence of a pixel of the level i in an image is as follows: where L describes the total number of gray levels in an image (typically 256), n signifies the image total number of pixels, and p x (i) determines the histogram of the image for pixel value i, normalized to [0, 1]. By considering the cumulative distribution function based on p x , we have at shows the accumulated normalized histogram of the image. e idea is to generate a transformation of the form y � T(x) to provide a new image (y), with a flat histogram. e generated image is a linearized cumulative distribution function (CDF) across the value range for some constant K is as follows: e CDF properties let us establish such a transform as follows: where k is limited in the range between 0 and L. Notice that T maps the levels into the range [0, 1]; subsequently, a normalized histogram of x has been employed. To map the values back into the original range, the following simple transformation should be performed: More details can be derived in [5]. Figure 1 shows some examples of the image preprocessing step.

Feature Extraction
e purpose of feature extraction is to make the raw data more usable for future statistical processing. Feature extraction is a widespread process in various types of data processing such as image processing, audio processing, etc. Feature extraction means selecting a feature that can describe the image with little information. ese features must have properties so that a set of these features for each image is described uniquely. erefore, feature extraction is a process in which data is mapped from a high-dimensional space to a lower-dimensional space. is mapping can be linear (like the principal component analysis method) or nonlinear. How to select these features requires the study of data properties, and to extract it, preprocessing operations and filters must be applied to the image to turn the image into the desired information.
Numerous features are introduced for image feature extraction. In this research, geometric features, statistical features, and texture features have been employed. In the following, the formulation of this feature is explained as follows: Computational Intelligence and Neuroscience Invariant moments: where MN defines the image size, B p signifies the length of the external side for the boundary pixel, p(i, j) states the value of the intensity of the pixel at location (i, j), a defines the major axis, and b determines the minor axis, μ signifies the mean value σ describes the standard deviation. Yet, some of the explained features have a low effect and some others have a high effect on the diagnosis of the image. In this study, an optimized procedure is utilized for a better selection of the useful features from the image. erefore, in this study, we consider the important features selection as an optimization problem. e objective function is formulated as follows: where FP, FN, TP, and TN represent false positive, false negative, true positive (TP), and true negative (TN).
To get the best value of this problem, we need a proper optimizer. Different kinds of optimization methods can be used for this, but due to the complexity and nonlinear behavior of this study, it is better to use a metaheuristic. e present study uses Archimedes optimization algorithm as one of the newest and efficient metaheuristics to solve this problem. More explanation about this algorithm is given in the next section.

Archimedes Optimization Algorithm
e goal of optimization is to find the best acceptable solution, given the limitations and needs of the problem. For a problem, there may be different solutions, and to compare them and to select the optimal solution, a function called the objective function is defined. e choice of this function depends on the nature of the problem. e purpose of optimization is to determine the design variables so that the objective function is minimized or maximized.
ere are different types of optimization methods. In the meantime, heuristic algorithms provide good results rather than classical methods in solving optimization problems. e purpose of heuristic algorithms is to provide a solution within an acceptable time frame that is appropriate to solve the problem. e heuristic algorithm may not be the best real solution to the problem, but it can be close to the best solution.
e heuristic algorithms can be combined with optimization algorithms to improve the performance of the algorithm. A metaheuristic algorithm combines heuristic algorithms designed to find, generate, or select any exploration at any stage and provides a good solution to problems that have optimization problems. Metaheuristic algorithms take into account some of the optimization assumptions that need to be solved.
Metaheuristic algorithms are techniques that are inspired by nature, physics, and human beings and are used to solve many optimization problems. Usually, metaheuristic algorithms are used in combination with other algorithms to achieve the optimal solution or to exit the local optimal solution status. In recent years, one of the most important and promising researches has been "heuristic methods taken from nature." ese methods have similarities with social or natural systems. eir application is derived from continuous metaheuristic methods that have had very good results in solving problem problems (NP-Hard). Based on the no-free-lunch theorem, each metaheuristic algorithm has some advantages and disadvantages. erefore, an algorithm may have the best results for a specific problem, while it gives the worst results on another problem.
Among the mentioned algorithms, the Archimedes optimization is the most newly introduced population-based metaheuristic algorithm, which is inspired by the Archimedes' principle and the buoyancy law.
is principle simulates the time an object is immersed partially or fully in fluid, the fluid employs an upward force on the object, which is equal to the fluid discharged weight by the object.
e Archimedes optimizer is an algorithm based on a population with consideration of the immersed objects as candidates. AOA starts with several random numbers being distributed consistently with a possible limitation, similar to other metaheuristics based on the population. e searching method of objects includes random volumes (V), densities (D), and accelerations (A). e Archimedes optimizer can be introduced as a global optimization method by consideration of exploitation and exploration.
is technique is described in the following. e initialization of the location of candidates is a phased one as defined below: where x(i) is the i th candidate with N candidates in a population and x l (i) and x u (i) stand for the minimum and maximum ranges of the solution space.
As aforementioned, V, D, and A are initialized randomly for each candidate by this algorithm. e update of V, D, and A for the i th candidate for the iteration t+ is phase two as follows: is algorithm computes the primary individuals and the candidates with optimum cost numbers are chosen here. ese optimum amounts have been specified as V best , D best , A best , and x best . en, by the algorithm parameters, the objects have been updated. By the collision condition of the acceleration of the object with neighborhood objects, they are updated. Next, V, D, and A parameters are used to achieve the updated locations of the candidates. is is defined as follows: Computational Intelligence and Neuroscience where V best and D best signify the volume and the density of the optimum candidate, and rand defines a consistent randomly distributed number. e application of a transfer operator (TF) and D factor is to transfer from exploration to exploitation. is is obtained as follows: where TF is stepped up gradually in duration to reach 1, t is the number of iterations, and t max is the highest number of iterations. Consequently, a reduction factor of D tries the algorithm to obtain a global to local search, which is defined as follows: where D t+1 minimizes slowly to give a suitable convergence. us, the balance between exploitation and exploration is possible by this.
If TF ≤ 0.5, candidates are considered without collision for exploitation, and the acceleration of the candidate is updated by the algorithm for i + 1 iteration as defined below: where D t+1 decreases over time which can converge in the former found promising area. is leads to a proper balance between exploration and exploitation in the AOA algorithm. en, to update the candidate acceleration for iteration t + 1, a random material (mr) was chosen as follows: where A(i), V(i), and D(i) denote the acceleration, volume, and density of the i th candidate, respectively, while A mr , D mr , and V mr define the acceleration, volume, and density of random material (mr). Exploration-exploitation performance can be altered by a performance value different from 0.5. e exploitation of the algorithm was modeled without any collision between the candidate if TF > 0.5. e update of the candidates was performed as below in this step: where the optimum candidate acceleration is specified by A best . erefore, the normalized acceleration can be obtained as follows: where A t+1 (i) defines the step variation percentage of each population and l and u explain the normalization restriction between 0.9 and 0.1, respectively. In the later phase, the location of the i th updated candidate for iteration t + 1 if TF ≤ 0.5 was obtained as follows: where C 1 denotes a constant equal to 2.
Otherwise, the candidates renew their locations if TF > 0.5 as follows: where T increments over time between c 3 × 0.3 and 1 and considers a defined percentage of the optimum location and c 2 denotes a constant amount of 6. is amount increases over time to decrease the difference between the present and the optimum locations to give a proper balance between exploration and exploitation, and F states the updated model of the candidates by their locations, which is defined as follows: where e AOA evaluates each candidate by fitness function f and saves the optimum solution. e application of AOA here is to minimize Fitness function that is described in the previous section.

Image Classification
To provide a proper classification, the CXR images are grouped into two target classes where each contains 140 images including normal and COVID-19. Here, an optimized multilayer neural network (MLP) has been utilized. In this research, the proposed AOA is used again to design an optimal classifier based on MLP neural network. e main purpose here is to optimize the value of the weight to accomplish an MLP with global optimal.
Generally, artificial neural networks (ANNs) are computing systems inspired by biological neural networks. ese systems learn activities by looking at examples (i.e., they improve their performance by performing activities over time), and this usually happens without any activity-specific programming. An ANN is based on a set of connected units or nodes, called artificial neurons (similar to biological neurons in the animal brain). Any connection (synapse) between neurons can transmit a signal from one neuron to another. e receiving neuron (postsynaptic) can process the signal (s) and then the signal neurons attached to it. In typical ANN implementations, a synapse signal is a real number, and the output of each neuron is calculated by a nonlinear function of its inputs. Neurons and synapses usually have weights that are adjusted as learning progresses.
is weight increases or decreases the signal strength it sends to the synapse. Neurons can have a threshold at which a signal can only be sent if the total signal is absorbed by that threshold.
One of the most basic neural models available is the multilayer perceptron (MLP) model, which simulates the transfer function of the human brain. In this type of neural network, most of the behaviors of human brain networks and signal propagation have been considered, and hence, they are sometimes referred to as feedforward networks. Each neuron in the human brain, called a neuron, processes the input (from another neuron or nonneuron) and transmits the result to another cell (neuron or nonneuron).
is behavior continues until a definite result is reached, which is likely to eventually lead to a decision process, thought, or move. Widely used supervision in neural networks is backpropagation, which is based on the error correction law. Assume a neural network output as y. is function is reliant on the inputs, x i , and their weights.
where α signifies the activation function (here the sigmoid function has been used). Backpropagation is a classic method based on gradient descent to adjust the network weights such that network errors get minimized. is technique takes a lot of time.
One big issue in using gradient descent algorithms is that they are sometimes stuck in the local minimum which is reliant on the initial weight. erefore, they need a global minimizer for refining this issue. is leads us to use again AOA, this time for classification of the COVID-19 data. e main purpose of AOA here is to adjust the network weights such that the network mean squared error (MSE) between the experimental data and the network value get minimized; that is, where m states the number of output nodes, n signifies the number of training samples, and Y j and T j represent the real output and the desired output, respectively.   Computational Intelligence and Neuroscience respectively [13]. Figure 2 shows some examples of the utilized dataset for the COVID-19.

System Configuration.
In this study, we used an optimized X-ray diagnosis system for COVID-19 disease detection. Figure 3 shows the graphical abstract of the proposed system. As can be observed from Figure 3, the proposed CAD-based COVID-19 X-ray diagnosis system has four main steps. First, the input image has been preprocessed based on min-max normalization to scale all data into a normal scale, and the scaled images have been improved based on the histogram equalization. en, geometric features, statistical features, and texture features are extracted from the images. In the next step, the useless or less informative features have been removed to increase the system speed, and the final step is the classification of the features based on an optimized MLP network.
As previously mentioned, Archimedes optimization algorithm is used to adjust the weights and train the proposed multilayer neural network with minimum error. e main parameter setting for the network is reported in Table 1. e experiment has been established on MATLAB R2016b 64-bit version and executed on computation environment of Intel ® Pentium ® CPU 2.30 GHz, 2.3 GHz, 4 GB RAM, and 64-bit Windows 7 operating system. e training stage has been iterated 15 times independently to obtain reliable results. During the training of the proposed model, both training and validation sets were reached. Figure 4 shows the loss graph of the model.
As can be observed from the loss graph in Figure 4, there is a satisfying fit between the validation and the training curves that confirms the suggested model's efficiency and with no further overfitting or underfitting. e analysis has been accomplished based on five performance indexes including accuracy, specificity, precision, recall, and F1-score that are formulated follows: where TP, FP, TN, and FN represent the numbers of true positives, false positives, true negatives, and false negatives, respectively. e final results are compared with four other methods including Ismail's method [14], Mangal's method [15], Abbas's method [16], and Castiglioni's method [17]. Table 2 reports the performance analysis of the proposed method compared with other state-of-the-art techniques.
As can be observed from Table 2, the proposed method achieved the highest accuracy score among all studied methods, and Ismail's and Abbas's methods are close, and Mangal's method has the lowest score. By analyzing the F-

Conclusions
e new coronavirus, which causes COVID-19 disease, is one of the seven viruses in the coronavirus family that are transmitted from one human to another. is disease is spreading around the world and makes lots of cases and deaths every day. One of the methods for the detection of this disease is to use chest X-ray images. e present study proposed a CAD procedure for automatic diagnosis of COVID-19 from chest X-ray images. At first, the original X-ray images were preprocessed by min-max normalization to scale all data into a normal scale, and then histogram equalization was performed to improve the quality of the images before main processing. In the next step, geometric features, statistical features, and texture features were extracted from the X-ray images. Afterward, by performing an optimized method for feature selection, the useless features were removed. e optimization of feature selection and the MLP classifier was based on a newly introduced metaheuristic, called Archimedes optimization algorithm. Finally, an optimized MLP network was used to determine the suspected cases of the COVID-19. Simulations were performed in Renmin Hospital of Wuhan University and two affiliated hospitals (the ird Affiliated Hospital and Sun Yat-sen Memorial Hospital) of the Sun Yat-sen University in Guangzhou dataset, and the results were compared with four state-of-the-art methods to examine the model efficiency. Final results specified that with analyzing accuracy, specificity, precision, recall, and F1-score, the proposed method has the best efficiency toward the other methods. As can be inferred from the results, the proposed method provides a good optimal result for the diagnosis of COVID-19. However, in some cases, the method has weak results. is leads us to work more on developing the AOA in the future work to provide better results. e future work will be to propose a new method for improving the algorithm efficiency and to provide a method with higher speed to use in real-time applications.

Data Availability
is research adopts reliable resources provided by the Renmin Hospital of Wuhan University and two affiliated hospitals (the ird Affiliated Hospital and Sun Yat-sen Memorial Hospital) of the Sun Yat-sen University in Guangzhou with 76 and 12 patients. e dataset can be accessed by sending a request to these hospitals.

Conflicts of Interest
None of the authors have any conflicts of interest regarding the publication of this study.