New machine learning method for image-based diagnosis of COVID-19

COVID-19 is a worldwide epidemic, as announced by the World Health Organization (WHO) in March 2020. Machine learning (ML) methods can play vital roles in identifying COVID-19 patients by visually analyzing their chest x-ray images. In this paper, a new ML-method proposed to classify the chest x-ray images into two classes, COVID-19 patient or non-COVID-19 person. The features extracted from the chest x-ray images using new Fractional Multichannel Exponent Moments (FrMEMs). A parallel multi-core computational framework utilized to accelerate the computational process. Then, a modified Manta-Ray Foraging Optimization based on differential evolution used to select the most significant features. The proposed method evaluated using two COVID-19 x-ray datasets. The proposed method achieved accuracy rates of 96.09% and 98.09% for the first and second datasets, respectively.


Introduction
COVID-19 is a global challenge that should be addressed by all scientific means. Medical image analysis is a well-known approach that could be beneficial in the diagnosis of COVID-19. Severe Acute Respiratory Syndrome (SARS) and COVID-19 belong to the same family of Coronaviruses, where the detection of SARS cases using chest images proposed by several methods [1][2][3] and for pneumonia detection in general [4].
ML has demonstrated high performance for several image processing applications such as image analysis [5,6], image classification [7], and image segmentation [8]. Image classification achieved by extracting the import features from the images by a descriptor (e.g., SIFT [9] and image moment [10]), and then these features can be used in the classification task using classifiers such as SVM [11]. In contrast to handcrafted features, deep neural network-based methods [12] provides high performance in classifying the images according to the extracted features. According to the characteristics of ML, several efforts utilized machine learningbased methods to classify the chest x-ray images into COVID-19 patient class or normal case class. All of these efforts utilized deep learning-based approaches. For instance, the authors a1111111111 a1111111111 a1111111111 a1111111111 a1111111111 proposed a CNN model for the automatic diagnosis of COVID-19 from chest x-ray images [13]. Their reported classification accuracy is 96.78% using MobileNet architecture [13]. Similarly, the conducted research in [14] utilized the transfer learning approach. The reported accuracy rate is 97% and 87% accuracy for InceptionV3 and 87% for Inception-ResNetV2, respectively.
Recently, orthogonal moments and their variants are powerful tools used in many image processing and pattern recognition applications. Feature extraction using the image moments successfully reported for several applications [15] and [16]. For instance, combining orthogonal quaternion Polar Harmonic Transform moments with optimization algorithms for image representation and feature selection has been successfully reported in color galaxies images classification [17].
The motivation of this research is to propose an accurate classification method for COVID-19 chest x-ray image depends on combining the strength of two techniques. First, a new image descriptor, FrMEMs. Second, a modified feature selection technique based on Manta-Ray Foraging Optimization and differential evolution (MRFODE).
In this work, we proposed a method of COVID-19 chest x-ray image classification. The proposed method extracts the features from chest x-ray images using FrMEMs moment. Then the extracted features are divided into testing and training sets. Followed by using the MRFODE algorithm to reduce these features an d remove the redundant and irrelevant features. This process achieved by generating a set of solutions and computing the fitness value for each of them using the KNN classifier based on a training set with determining the best of them. Then applying the operators of MRFO in the exploration phase; however, in the exploitation phase, the probability of each solution is computed using its fitness value. According to specified criteria, the solution updated either using DE or the operators of MRFO. The process of updating solutions stopped when reached to terminal conditions. The best solution used to remove the irrelevant features from the testing set and compute the label of the COVID-19 image dataset.
The main contributions of this study are: The organization of this paper is as follows. In Section 2, the proposed model utilized FrMEMs and the bio-inspired optimization algorithm represented. The experimental results of the proposed model discussed in Section 3. Finally, the paper concluded in Section 4. from the input digital images. In this paper, new orthogonal Exponent moments of fractionalorders derived. Then, these moments utilized to extract high accurate 961 features from each COVID-19 input image. The intrinsic properties of the new image moments are: 1. These orthogonal moments are successfully able to represent digital images for low and high orders.
2. The orthogonal moments are invariants to geometric transformations, which is an essential property for classification and recognition applications.
3. The orthogonal moments are robust to noise.
4. Fast and inexpensive computation requirements make them favorable for real-time applications.

Feature extraction
A few years ago, Hu et al. [19] defined the orthogonal exponent moments as: The basis functions of fractional-order, W a pq ðr; yÞ, are orthogonal where: In this paper, the authors utilized the multi-channel approach [20,21] in which the input color images processed using the RGB color model where the R−, G− & B−channels are expressed using f R (r,θ),f G (r,θ) & f B (r,θ) respectively. The multi-channel orthogonal fractionalorder exponent moments are: Assume the rotation of the original image, f c (r,θ), with an angle β, then the rotated image, f b C ðr; yÞ, is: Letŷ ¼ y À b, then y ¼ŷ þ b and dy ¼ dŷ, then using the Eq (8) in (7) yields: Based on the properties of Euler function, |e iqβ | = 1, So, equation (E10) is simplified as: This equation proves that the magnitude values of FrMEMs are unchanged with any rotation in the input image.
Wang et al. [22] showed that circular orthogonal moments achieved the scaling invariance when the input color images mapped into the unit circle. In this work, the input images interpolated to fit the unit-circle domain. Thus, the computed FrMEMs are scaling invariants. The central FrMEMs, are derived in a similar way to [23]. The FrMEMs calculated with high accuracy using the kernel-based approach [24,25].

Parallel implementation
The parallel implementation is a recent trend used to accelerate the intensive computing of image moments, especially for large-sized images and high moment orders. The emergence of new parallel architectures enriches the efforts toward this goal. Qin et al. [26] proposed a parallel recurrence method to accelerate the implementation of the Zernike moment. In this context, Deng et al. [27] extended the work of Qin and his colleague. They implemented a parallelfriendly method for moment computation and image reconstruction based on Zernike moment. Recently, Salah et al. [28] proposed a parallel computational method to accelerate the computational process of the polar harmonic transforms of integer-orders.
In the same direction, we proposed a parallel implementation of the FrMEMs on multicore CPU architecture. This parallel implementation provided to cope with the increasing size of the chest x-ray dataset. The FrMEMs consists of (pmax+1)×(qmax+1) moment component. These moment components computations are independent. Each moment component has a unique combination of p and q values. For instance, for a fractional moment order of 5, there are 36 separate moment components.
In Fig 1, the proposed parallel implementation of FrMEMs moment depicted. The multicore CPU has four cores; each core computes a portion of the moment components.

Feature selection
In this part, we introduced the modified Manta-Ray Foraging Optimization (MRFO) based on Differential Evolution (DE) as a feature selection method. However, the basics of MRFO and DE discussed firstly.

Manta Ray Foraging Optimization (MRFO).
In general, the MRFO simulates the behaviors of three foragings, including cyclone foraging, Chain foraging, and somersault foraging [29]. The details of each foraging given in the following subsections.
Chain foraging. In the MRFO, the foraging chain formed by using the manta rays' line up head-to-tail. Besides, the movement of each agent, except the first one, is in the direction of the food and the agent in front of it which means the current agent (x i (t),i = 1,2. . .,N) at iteration (t) is updated depends on the position of best agent and the agent in front of it. This process formulated as in the following equation: ( where r2[0,1] refers to random vector and x d best ðtÞ represents the best agent (in MRFO refers to the plankton with high concentration) at d-th dimension. α is a weight coefficient, and defined as: Cyclone foragin. In this foraging, the manta rays will construct a long chain foraging, and they are swimming towards the source of the food in a spiral movement. This process means that each agent will follow the front agent, and its movement is in the direction of the best

PLOS ONE
solution along the spiral. Therefore, the updating process of the current agent formulated as: where r 1 2[0,1] is a random number, T is the total number of generations. Followed [29], the agents forced to find a new position far from x d best ðtÞ by using a random number as reference to them in the search space instead of the best agent. This can be formulated as: ( where x d rand ðtÞ is a random agent generated in the search space using the following equation: Somersault foraging. In this foraging, each agent swims to and around the position of the food (is called pivot). Thus, the agents update their positions using the following equation: where r 2 and r 3 are random numbers belong to [0,1].

Differential evolution.
In this section, the mathematical modeling of Differential evolution (DE) introduced one of the most popular [30]. The DE, similar to other MHs, begins by setting the initial value for a set of agents X, then calculate the fitness value for each agent. Thereafter, mutation operator is applied to X i and it is formulated as.
In Eq (18), r1,r2, and r3 refer to random indices, but they are different from i. F represents the mutation scaling factor. The next step is to apply the crossover operator to generate a new agent, and defined as: ( In Eq (19), C r is the probability of the crossover, and r2[0,1] is a random value. The next process is to compute the fitness value of V i and compared it with f(X i ) to update the value of the current agent X i as in the following equation: (

Enhanced MRFO based on DE as feature selection.
In this section, the developed COVID-19 x-ray image classification model based on the extracted features using the FrMEMs and implemented an enhanced version from the MRFO based on DE, which called MRFODE presented. The developed method begins by extracting the features from the input images, either COVID-19 or Non-COVID-19, using FrMEMs. Then MRFODE generates a set of N agents; each of them is a solution for the FS problem (i.e., a subset of selected features). After that, the fitness value for each agent is computed, which indicates the quality of the selected features corresponding to the ones in the Boolean version of each agent. The best agent that has the best fitness value is determined and used in updating the position of agents using the operators of the traditional MRFO. Then, the terminal condition (if they reached) checked. Finally, they stop updating or repeat the process. The main steps of the proposed COVID-19 image classification contain three phases where the details of each stage discussed in a separate subsection.
In the first phase, the input x-ray images received then FrMEMs applied to extract a set of features (D Feat ) from these images. The extracted features split into two, training and testing sets, which represent 80% and 20% respectively from the total number of images.
The second phase begins by setting a random value for a set of N agents using Eq (21).
Each agent is converted to binary using the following equation: : This sigmoid function is applied since it provides high-quality performance than the traditional Boolean approach. According to the definition modeled in Eq (22). The values of ones in binary solution represent the features that should be selected features while removed those that corresponding to zero values. Algorithm 1. Proposed MRFODE feature selection method. 1. Input: Extracted features from COVID-19 x-ray images 2. Set the initial value for the parameters of MRFODE. 3. Split features into two training and testing sets 4. Generate a set of N agents (X). 5. Using Eq (23) to compute the fitness function of x i based on the training set. 6. Find the best solution x best . 7. While (terminal condition not reached). 8. Using Eq (22) to convert each x to binary. 9. Using Eq (23) to compute the fitness function of each x 10.
Find the best solution x best 11.
Using Eq (16) to update x i 17.
Using Eq (11) to update x i 20. END IF 21.
If Pr i <0. 5  Reduce the testing set according to x best , and using KNN to predict the target. 32.
Evaluate the quality of the model.
To illustrate this concept, consider the value of the current agent in binary form is x i = [1,0,0,1,1], so this indicates that the second and the third features will remove while others selected as relevant features. The process of converting the real solution to Boolean is followed by computing the quality of the selected features using the following equation: In Eq (23), γ refers to the classification error by using the KNN classifier. The N sel represents the number of features selected by the current agent. The β2[0,1] is a random value applied to provides a balance between γ and the selected features. Then the best agent (x best ) found in our study, which has the smallest. Then the agents are updated according to the operators of MRFO algorithm or DE, as discussed in Sections C .1 and C. 2, respectively. This process performed by computing the probability (Pr i ) of each agent in Somersault foraging as in Eq 24.
In the case of Pr i <0.5 then the operators of MRFO are used to update x i ; otherwise, the operators of DE used. After reaching the terminal conditions the best agent (x best ) is a return from this second phase.
In the third phase, the testing set applied to assess the selected features from the second phase, which performed by removing the irrelevant features-followed by evaluating the performance of classification using a variant set of metrics.

Datasets
We used two different datasets for this study. The first dataset collected by Joseph Paul Cohen and Paul Morrison and Lan Dao in GitHub [31] and images extracted from 43 different publications. References of each image provided in the metadata. Normal and Viral pneumonia images adopted from the chest x-ray Images (pneumonia) database [32]. It contains 216 COVID-19 positive images (some collected from the Twitter account of Italian Cardiothoracic radiologist), 1,675 negative COVID-19 images. The data was collected mainly from retrospective cohorts of pediatric patients of one to five years old from Guangzhou Women and Children's medical center. We refer to this dataset as dataset-1.
While the other dataset collected by a team of researchers from Qatar University, Doha, Qatar, and the University of Dhaka, Bangladesh, along with their collaborators from Pakistan and Malaysia in collaboration with medical doctors [33]. In addition to [31] and [32], they have added images from the Italian Society of Medical and Interventional Radiology (SIRM) COVID-19 DATABASE [34]. This dataset consists of 219 COVID-19 positive images and 1,341 negative COVID-19 images. We refer to this dataset as dataset-2.
Both datasets shared many characteristics regarding the collecting source. For both datasets, the COVID-19 images collected from a patient with an age range from 40 to 84 from both genders. The data contains 216 COVID-19 positive images and 1,675 COVID-19 negative images. Sample images of both datasets shown in Fig 3.

Evaluation of the proposed model
In this study, the results of the proposed COVID-19 x-ray classification image-based method compared with other popular MH techniques that applied as FS. These techniques include sine cosine algorithm (SCA), grey wolf optimization (GWO), Henry Gas Solubility optimization (HGSO), whale optimization algorithm (WOA), and Harris Hawks optimizer (HHO).
These algorithms are used in this comparison since they established their performance in different applications such as global optimization and feature selection methods [35][36][37][38][39]. The quality of each FS algorithm assessed by using three measures: Accuracy, the ratio of the selected features, and the fitness value where the accuracy (Acc) defined as:

Results and discussion
In this subsection, we described the performed experiments and discussed the obtained results. Table 1 lists the run-time in seconds and the obtained speedup of the moment computation, i.e., feature extraction phase, at moment order equals and 30 to extract 961 features from each image. The obtained speedup is close to the theoretical limits (2x, 4x & 8x for 2-, 4-and 8-multi-core), which prove the efficiency of the utilized parallel approach. The results of  Table 1 show that the proposed parallel implementation of the moment computation accelerating the feature extraction phase by a factor related to the number of used CPU cores. The proposed algorithm depends on extracting the features using FrMEMs and using a modified MRFO based on DE as a feature selection method. To find the smallest subset of relevant features that leads to increase the classification performance. Besides, the MRFODE compared with other MH methods that used as feature selection models, including such as MRFO, HGSO, HHO, GWO, SCA, and WOA. These FS methods are used the extracted features from FrMEMs as input and aimed to select the most relevant features. The Comparison results according to accuracy, several selected features, and fitness value given in Tables 2 and 3.
It observed from Table 2 that the MRFODE provides better accuracy than other MH methods based on the Best and mean of the accuracy among the two datasets. Since it achieves the first rank in both terms, followed by GWO that has the second rank. Meanwhile, the SCA algorithm is ranked #1 in terms of STD followed by HGSO and GWO at dataset-1 and dataset-2, respectively. As well as, the accuracy of using the extracted features without the feature selection method is the proposed model 0.901 and 0.9309 for Dataset-1 and Dataset-2, respectively. These results indicate the high effect of proposed MRFODE on the quality of classification the COVID-19 x-ray images.
In terms of the fitness value, it is seen from Table 3 that the proposed MRFODE has the smallest fitness value overall the mean, STD, Best, and Worst values at Qatar dataset. However, at the data1, it provides better results according to the mean and the Best value, which is ranked 1#, while, the traditional MRFO achieves the better at STD, and Worst. These results indicate that the proposed algorithm has a high ability to balance between the error of classification through selected the most relevant features, as well as, and, selecting the smallest number of features.
Moreover, Table 2 lists the average of MRFODE and other MH methods in terms of several selected features. It noticed that the proposed MRFODE picks the smallest number of features at the two datasets. The further analysis presented to evaluate the performance of the proposed model by using a non-parametric test named Friedman test, which ranks the methods. For the accuracy measure, the best algorithm is that it has the highest rank, while for the other measures, the lowest rank preferred. Table 4 lists the mean rank of each algorithm obtained using the Friedman test. From these results, it noticed that the developed MRFODE has the best rank at the accuracy, selected features, and fitness value. Since it has a higher rank at accuracy and the smallest mean rank at the other two measures. This indicates the high ability of MRFODE to select the optimal subset of features that leads to an increase in the classification accuracy for the two tested datasets.

Comparison with deep neural networks
In this subsection, the performance of the proposed approach compared to other convolutional neural networks. In [12], the proposed convolutional neural network (CNN) model for image classification surpasses the reported human-level performance. While CNN achieves the best results on large data sets, they require a lot of data and computational resources to train. In many cases, the dataset is limited and may not be sufficient to train a CNN from scratch. In such a scenario, to leverage the power of CNNs and, at the same time, reduce the computational costs, transfer learning can be used [40,41]. In this approach, the network trained using a large and diverse generic image data set and then applied to a specific task [42]. There are several pre-trained neural networks have won international competitions like VGGNet [12], Resnet [43], Nasnet [44], Mobilenet [45], Inception (GoogLeNet) [46] and Xception [47]. In this paper, we compare our model with MobileNet due to resource limitations. Table 4 presents a comparison with Mobilenet and related works on both datasets.
In Table 5, the proposed approach achieved high accuracy among other deep neural networks (DNN) and compared it to the only available published paper in this dataset. It turns out that the proposed approach, which has only 16 and 18 features for both dataset-1 and dataset-2, respectively, achieves better results in most classification criteria than one of the most popular DNN structures with a feature set which has about 50K features. The proposed approach achieves both high performances with the least number of features, which implies better resource consumption and time-saving.

Conclusion
In this study, we proposed a method for the visual diagnosis of COVID-19 cases on chest x-ray images. The proposed utilized a fractional moment (i.e., FrMEMs) to extract features of the COVID-19 x-ray images. Then, a modified version from Manta Ray Foraging Optimization (MRFO) applied as a feature selection method, which modified using DE to improve the ability of MRFO to find the relevant features from those extracted features. In the proposed

PLOS ONE
Image-based diagnosis of COVID-19

PLOS ONE
MRFODE feature selection method, the KNN classifier utilized to decide whether a given chest x-ray image as a COVID-19 or normal case. The proposed method evaluated on two different datasets. Comparing to a successful CNN architecture, the MobileNet model, the proposed method achieved comparable performance on the accuracy, recall, and precision evaluation metrics with the least number of features. The proposed approach achieved both high performances as well as resource consumption by selecting the most significant features. Our future work might include other applications from the medical and other relevant fields.
Supporting information S1 Appendix. Table of