# Automatic Intelligent System Using Medical of Things for Multiple Sclerosis Detection

Authors: Sujatha Krishnamoorthy; Yaxi Zhang; Seifedine Kadry; Muhammad Attique Khan; Majed Alhaisoni; Nasser Mustafa; Weifeng Yu; Abdullah Alqahtani
Journal: Computational Intelligence and Neuroscience
 (2023)

---

## Abstract

Malfunctions in the immune system cause multiple sclerosis (MS), which initiates mild to severe nerve damage. MS will disturb the signal communication between the brain and other body parts, and early diagnosis will help reduce the harshness of MS in humankind. Magnetic resonance imaging (MRI) supported MS detection is a standard clinical procedure in which the bio-image recorded with a chosen modality is considered to assess the severity of the disease. The proposed research aims to implement a convolutional neural network (CNN) supported scheme to detect MS lesions in the chosen brain MRI slices. The stages of this framework include (i) image collection and resizing, (ii) deep feature mining, (iii) hand-crafted feature mining, (iii) feature optimization with firefly algorithm, and (iv) serial feature integration and classification. In this work, five-fold cross-validation is executed, and the final result is considered for the assessment. The brain MRI slices with/without the skull section are examined separately, presenting the attained results. The experimental outcome of this study confirms that the VGG16 with random forest (RF) classifier offered a classification accuracy of >98% MRI with skull, and VGG16 with K-nearest neighbor (KNN) provided an accuracy of >98% without the skull.


---

## Body

## 1. Introduction

In humankind, the occurrence rate of brain abnormality is gradually rising, and appropriate screening and treatment are necessary to reduce the harshness. Multiple sclerosis (MS) is one of the diseases happening due to the malfunctions in the immune system, and untreated MS causes severe problems in the central nervous system (CNS). The multiple sclerosis lesions (MSLs) in the spinal cord and brain can be examined using the chosen bio-imaging scheme. Due to its merit and superiority, MRI is a commonly adopted imaging modality to diagnose MS [1–3].Clinical level examination of the MSL is commonly performed with the help of MRI due to its superiority and multi-modality nature. Further, the MSL’s location and severity are more visible in MRI than in other imaging schemes. Hence, several MRI-assisted MSL detection procedures are proposed and implemented [4–6].Detection of the MSL in MRI slice of a chosen modality is widely addressed due to its clinical significance, and initial level screening is necessary to distinguish the healthy patient from the patient with MSL. Hence, recently, a number of image supported MSL recognition procedures are proposed and implemented by the researchers [2–7]. The proposed work aims to develop a convolutional neural network (CNN) supported MSL detection system to achieve better detection accuracy during the MRI slice examination. This work initially implements the pretrained deep learning (PDL) schemes and the softmax classifier to detect the brain abnormality using five-fold cross-validation. During this process, the necessary performance metrics, such as accuracy (AC), precision (PR), sensitivity (SE), specificity (SP), and F1-score (FS), are computed for each PDL and based on the superiority of a particular scheme is adopted for further investigation. The selected PDL features are then combined with the hand-crafted features (HCFs), such as local binary pattern (LBP) and pyramid histogram of oriented gradient (PHOG) features, to achieve a better MSL detection. In order to avoid the overfitting problem, Brownian-walk firefly algorithm (BFA)-based feature reduction and serial feature integration are also employed in this work.The necessary test images are collected from [7, 8] in the proposed work, and the FLAIR modality MRI slices with/without the skull are considered the test images. After collecting the 3D MRI image, a 2D to 3D conversion is executed with ITK-SNAP [9], and during this conversion, the 2D slices with/without the MSL are separated manually. These separated images are then considered for testing and validating the detection performance of the PDL with the softmax classifier. Initially, the performance of the PDL scheme is tested using the MRI slices with a skull, and then a similar methodology is executed with the MRI without the skull. Finally, these experimental works are separately executed using Python software, and the achieved results are presented and examined.The various stages involved in the proposed scheme are as follows: (i) MRI slice extraction and resizing, (ii) deep feature extraction using chosen PDL scheme, (iii) HCF mining, (iv) BFA supported feature optimization, and (v) binary classification and validation. The experimental result of this study confirms that the proposed scheme helped achieve a classification accuracy of >97% with serially integrated DF and HCF.The chief contributions of the proposed work are as follows:(i)
Deep feature supported MSL detection using the MRI slices with/without skull section(ii)
BFA supported feature optimization to avoid the overfitting problem(iii)
MSL detection using integrated DF and MLFThe proposed work is organized as follows. Sections2 and 3 reveal the background and methodology executed, Section 4 shows the experimental results, and Section 5 presents the conclusion of this study.


## 2. Related Work

MS is progressively rising globally, and well-planned detection and treatment are necessary to identify MS in its early stage. Several computer algorithms have been proposed and implemented to detect the MSL using the brain MRI slices; the prior works in the literature confirm that the appropriate detection of the MSL is possible with machine learning and deep learning procedures, and hence several segmentation methods and classification methods are proposed and implemented by the researches to detect the MSL accurately.Ghosh et al. implemented a CNN segmentation scheme to extract MSL in an MRI slice [10]. Execution of CNN schemes, such as UNet and UNet++, is discussed using the MRI modalities, like T1, T2, and FLAIR, and achieved a Dice score of >75%. Birenbaum and Greenspan executed a multi-view long CNN method to mine the MSL from the images of the ISBI2015 benchmark database and achieved an average Dice score of 62.7% [11]. Gabr et al. proposed a fully convolutional neural network (FCNN) supported extraction of MSL on clinical data and confirmed that this scheme provided a Dice score of 82% [12]. Aslani et al. presented a modified encoder-decoder CNN scheme to mine MSL and achieved a maximum Dice score of 50.01% [13]. Ansari et al. discussed the segmentation of the MS lesion using the CNN scheme and achieved a Dice score of 63.06% [14].Weeda et al. presented a review of the segmentation methods implemented for the MSL extraction. This work verified that the CNN schemes help attain a better outcome than the alternatives [15]. Zeng et al. presented a review of the MSL segmentation methods existing in the literature for ISBI and MICCAI challenge datasets. They confirmed the merit of the CNN segmentation to examine the MS lesion in the MRI slices [16].Automatic classification of the MRI slices into standard and MS classes is also widely adopted by the researchers, and these works can be found in [17–19]. The work of Sand presented the image-assisted classification and diagnosis of the MSL [20]. Ye et al. presented PDL-based MSL classification in diffusion basis spectrum imaging [21]. Compared to the conventional methods, the deep learning supported schemes help to achieve a better MSL detection, and hence brain MRI slices are examined by several CNN schemes [22–24]. Recently, the work of Krishnamoorthy et al. implemented a CNN segmentation scheme to extract and evaluate the MSL from the chosen brain MRI slices and this work confirmed the merit of the CNN scheme compared with other existing approaches [25]. Hence, in this research, the CNN scheme is considered to categorize the brain MRI slices into normal and MSL class using two-class classifiers with chosen image features and the outcome of this study confirms the merit and clinical significance of the implemented scheme. The detection of the MSL using exemplar multiple parameters local phase quantization presents a methodology to detect the MSL with better accuracy [26]. The detection of ataxia using the CNN scheme for the patients with MSL presents the various co-relation among other disease information is clearly presented in [27].


## 3. Methods

The literature’s earlier works confirm the need for a chosen computer algorithm to detect the MSL with better accuracy. The proposed work of this research implements a methodology to classify the MRI slices into normal/MS classes with better accuracy. Initially, this work is implemented using the DF, and the appropriate PDL is identified. Later, the identified PDL’s feature is then considered to get the DF + MLF to detect the MSL. Finally, this work presents the proposed experimental investigation using the MRI with/without the skull. The presented work confirms that the implemented PDL-based scheme helped achieve a better detection accuracy of MSL.This work implements the PDL procedure to classify the MRI slices into normal/MS classes using a binary classifier. The FLAIR modality MRI slices are considered for the experimental investigation in this work. The methodology employed in this work is depicted in Figure1. Initially, the necessary teat images are collected form [7-8] These images are in 3D form, and to reduce the diagnostic complexity, 2D to 3D conversion is executed with ITK-SNAP [9]. The 2D MRI slices of normal/MSL are stored separately in appropriate locations during this conversion. The DF from these images is initially extracted using PDL, and a binary classification with softmax is applied to verify the MSL detection performance of the considered scheme. Later, essential HCF is then extracted from these images using LBP and PHOG, and all the available features are reduced using the BFA.Figure 1
Block diagram of the proposed disease examination procedure.The reduced features are then serially integrated (DF + HCF). The new feature vector is then considered to train and validate the merit of the considered scheme with five-fold cross-validation using chosen binary classifiers. During this examination, the metrics, such as AC, PR, SE, SP, and FS, are computed, and based on these values, the merit of the proposed scheme is confirmed. In this work, the proposed scheme is independently executed using the brain MRI slices with/without the skull section, and the attained results are individually presented and discussed.


### 3.1. Image Database

The success of the automatic disease examination procedure relies on the methodology employed and the database considered. After implementing the disease screening methodology, it is necessary to confirm its clinical significance by considering the clinically collected real-time images. Unfortunately, the availability of the clinical grade MSL database is limited and protected by ethical regulations. Hence, this research considered the clinical grade MRI slices for the assessment. The proposed experiment is verified using the FLAIR modality images with/without the skull section in this work.The test images for this experiment are collected from the MSL benchmark dataset, which consists of 30 patient images with raw various processed conditions. The essential information about this data can also be accessed from [7, 8]. The collected images are in 3D, and to minimize the complexity, 3D to 2D conversion is employed with ITK-SNAP [9]. Figure 2 demonstrates the 2D slices (axial, coronal, and sagittal), and this work considered only the axial plane for the assessment.Figure 2
Conversion of 3D to 2D with ITK-SNAP.The collected 2D slices are then segregated into normal and MS classes and every image is resized into224×224×3pixels. This research considers 2000 images (1000 normal and 1000 MS) for the analysis, and the sample test images considered in this work are shown in Figure 3. During the PDL implementation, 80% of data (800 images) are considered for training, 10% (100 images) are chosen for testing, and the remaining 10% (100 images) are considered for the validation, as graphically depicted in Figure 4.Figure 3
Sample test images with dimension of224×224×3 pixels.Figure 4
Image database distribution.


### 3.2. Feature Extraction

In the automated disease examination task, the features which are extracted from the medical data play a vital role during the disease detection task. In this work, the necessary features such as DF and HCF are extracted from the MRI slices considered for the examination, and these features are then considered to drive the classifier to detect the category of the images.


#### 3.2.1. Deep Feature Mining

The necessary deep features with size1×1×1000 are extracted using the PDL scheme. Different deep learning methods and their initial parameters are depicted in Table 1. Every scheme is separately implemented on the MRI dataset (with/without skull), and the achieved result with the softmax classifier is initially recorded and assessed. After confirming the MSL detection accuracy of the considered PDL schemes, the best performing PDL is chosen for further enhancement. During the enhancement, the DF is optimized with BFA, and the optimized DF is then integrated with the optimized HCF. For every PDL, the number of epochs is assigned as 200, and the search is allowed to stop when the specified monitoring value is achieved [28–31].Table 1
Initial parameters assigned for the PDL schemes.
ParametersAlexNetVGG16VGG19ResNet18ResNet50Initial weightsImageNetImageNetImageNetImageNetImageNetBatch size88888Epochs100100100100100OptimizerAdamAdamAdamAdamAdamPoolingAverageAverageAverageAverageAverageHidden-layer activationReluReluReluReluReluClassifierSoftmaxSoftmaxSoftmaxSoftmaxSoftmaxMonitoring metricsAccuracy and lossAccuracy and lossAccuracy and lossAccuracy and lossAccuracy and lossTraining images800800800800800Testing images100100100100100Validation images100100100100100The deep features extracted in this procedure are depicted in the following equation:(1)DeepFeature1×1×1000=DF1,1,DF1,2,DF1,1000.


#### 3.2.2. Hand-Crafted Feature Mining

The conventional image features are widely adopted in the machine learning scheme for automatic classification of the considered dataset. The extraction and evaluation of the HCF are considerably simple compared to the DF. Further, the HCF-supported image examination presents a better result compared to other existing methods in the literature [32, 33]. In this work, the commonly considered HCF, such as LBP [34, 35] with various weights and PHOG [36], is considered. The outcome achieved for LBP with weights W = 1 to W = 4 is presented in Figure 5, the PHOG with bins is shown in Figure 6, and the necessary HCF is extracted for both the LBP and PHOG.Figure 5
LBP pattern for a chosen MRI slice forW = 1 to W = 4.Figure 6
PHOG features for a chosen MRI slice for BIN = 1 and 2.The various LBP and PHOG features mined with these methods are depicted in equations (2–10).(2)LBP11×1×59=W11,1,W11,2,⋯,W11,59,(3)LBP21×1×59=W21,1,W21,2,⋯,W21,59,(4)LBP31×1×59=W31,1,W31,2,⋯,W31,59,(5)LBP41×1×59=W41,1,W41,2,⋯,W41,59,(6)LBP1×1×236=LBP1+LBP2+LBP3+LBP4,(7)PHOG11×1×85=BIN11,1,BIN11,2,⋯,BIN11,85,(8)PHOG21×1×170=BIN21,1,BIN21,2,⋯,BIN21,170,(9)PHOG1×1×255=PHOG11,85+PHOG21,170,(10)HCF1×1×491=LBPtotal1×1×236+PHOGtotal1×1×255.(10) presents the total HCF mined in this work, and the selection of the optimal HCF is achieved in this work using the BFA, and the selected features are then combined with the optimal DF to improve the detection accuracy of MSL in MRI slices.


#### 3.2.3. Firefly Algorithm-Based Feature Reduction and Integration

FA is a nature-inspired heuristic methodology developed by Yang in 2008 [37]. Due to its merit and optimization accuracy, it is widely adopted by researchers to find solutions for a number of optimization problems [38–43]. The FA is developed by mimicking the social behaviors found in fireflies. The initial version of the FA adopts the Levy flight (LF) strategy to improve the convergence speed with respect to the iterations. In order to improve the performance of the traditional FA, a considerable number of improvements are made by replacing the LF with other operators [44, 45]. Brownian walk (BW) is one of the known methodologies adopted by the researchers to improve the FA’s convergence towards the best optimal solution, and the earlier works on the BFA can be found in [46, 47]. The major merit of the BFA compared to FA with LF is that it provides a steady and best optimal solution for the chosen optimization problem. In this work, BFA is considered to find the optimal features from the DF and HCF to avoid the overfitting problem.Figure7 depicts the picture to discuss the movement of fireflies from the random location to the optimal location. Figure 7(a) presents a sample Brownian motion, which guides the movement of the firefly in the chosen search field. Figure 7(b) shows the scattered fireflies in the search area, and Figure 7(c) demonstrates the initial movement between the fireflies towards the optimal location by computing the Cartesian distance (CD) between the flies. Figures 7(d) and 7(e) present the intermediate and final converged position of the flies towards the optimized result. The complete working methodology can be found in [46].Figure 7
Working principle of firefly algorithm. (a) Brownian search pattern. (b) Random initialization. (c) Initial search. (d) Intermediate search. (e) Final convergence.
(a)(b)(c)(d)(e)The mathematical expression of the BFA is depicted below. Let us consider, in a search space, that there exist two groups of fireflies, likei andj. Due to its attractiveness, the firefly i will move close toj, and this procedure can be demoted as follows:(11)Xit+1=Xit+β0e−γdijtXjt−Xit+BW,where Xit = initial position of firefly i, Xjt = initial position of firefly j,BW= Brownian walk, β0 = attractiveness coefficient, γ = light absorption coefficient, and dijt = CD between flies.During the feature optimization task, the fireflies aim to find the CD between the features of the normal-class and MS-class images, and the feature which has the maximized CD is considered, and the features which show a minimal CD are discarded. This is the concept behind the BFA supported feature reduction, and similar procedures can be found in the literature [48–50].The proposed BFA helps to reduce the VGG16 features to a lower value to reduce the overfitting issue, and the reduced feature is depicted in the following equation:(12)DeepFeature1×1×618=DF1,1,DF1,2,⋯,DF1,618.Similar procedure is executed for HCF, and the reduced value is shown in the following equation:(13)HCF1×1×224=HCF1,1,HCF1,2,⋯,HCF1,224.The serially integrated features (DF + HCF) are depicted in (14), and this feature vector is then considered to train and validate the classifiers using five-fold cross valuation.(14)DF+HCF1×1×842=DeepFeature1×1×618+HCF1×1×224.


#### 3.2.4. Performance Evaluation

The proposed PDL method initially employs the softmax (SM) classifier to group the MRI images into the normal/MS class. After verifying the detection accuracy with softmax, its performance is then validated using other binary classifiers, such as decision tree (DT), random forest (RF), Naïve Bayes (NB), K-nearest neighbor (KNN), and support vector machine (SVM) with linear and RBF kernels (SVM-L and SVM-RBF). This work initially computes the primary metrics, like true positive (TP), false negative (FN), true negative (TN), and false positive (FP), and from these values, other metrics such as accuracy (AC), precision (PR), sensitivity (SE), specificity (SP), and F1-score (FS) are computed, and based on these values, the performance of the proposed scheme is confirmed.The mathematical expression for these measures is presented in equations (15–18) [25, 51–55].(15)AC=TP+TNTP+TN+FP+FN,(16)PR=TPTP+FP,(17)SE=TPTP+FN,(18)SP=TNTN+FP,(19)FS=2TP2TP+FN+FP.


## 3.1. Image Database

The success of the automatic disease examination procedure relies on the methodology employed and the database considered. After implementing the disease screening methodology, it is necessary to confirm its clinical significance by considering the clinically collected real-time images. Unfortunately, the availability of the clinical grade MSL database is limited and protected by ethical regulations. Hence, this research considered the clinical grade MRI slices for the assessment. The proposed experiment is verified using the FLAIR modality images with/without the skull section in this work.The test images for this experiment are collected from the MSL benchmark dataset, which consists of 30 patient images with raw various processed conditions. The essential information about this data can also be accessed from [7, 8]. The collected images are in 3D, and to minimize the complexity, 3D to 2D conversion is employed with ITK-SNAP [9]. Figure 2 demonstrates the 2D slices (axial, coronal, and sagittal), and this work considered only the axial plane for the assessment.Figure 2
Conversion of 3D to 2D with ITK-SNAP.The collected 2D slices are then segregated into normal and MS classes and every image is resized into224×224×3pixels. This research considers 2000 images (1000 normal and 1000 MS) for the analysis, and the sample test images considered in this work are shown in Figure 3. During the PDL implementation, 80% of data (800 images) are considered for training, 10% (100 images) are chosen for testing, and the remaining 10% (100 images) are considered for the validation, as graphically depicted in Figure 4.Figure 3
Sample test images with dimension of224×224×3 pixels.Figure 4
Image database distribution.


## 3.2. Feature Extraction

In the automated disease examination task, the features which are extracted from the medical data play a vital role during the disease detection task. In this work, the necessary features such as DF and HCF are extracted from the MRI slices considered for the examination, and these features are then considered to drive the classifier to detect the category of the images.


### 3.2.1. Deep Feature Mining

The necessary deep features with size1×1×1000 are extracted using the PDL scheme. Different deep learning methods and their initial parameters are depicted in Table 1. Every scheme is separately implemented on the MRI dataset (with/without skull), and the achieved result with the softmax classifier is initially recorded and assessed. After confirming the MSL detection accuracy of the considered PDL schemes, the best performing PDL is chosen for further enhancement. During the enhancement, the DF is optimized with BFA, and the optimized DF is then integrated with the optimized HCF. For every PDL, the number of epochs is assigned as 200, and the search is allowed to stop when the specified monitoring value is achieved [28–31].Table 1
Initial parameters assigned for the PDL schemes.
ParametersAlexNetVGG16VGG19ResNet18ResNet50Initial weightsImageNetImageNetImageNetImageNetImageNetBatch size88888Epochs100100100100100OptimizerAdamAdamAdamAdamAdamPoolingAverageAverageAverageAverageAverageHidden-layer activationReluReluReluReluReluClassifierSoftmaxSoftmaxSoftmaxSoftmaxSoftmaxMonitoring metricsAccuracy and lossAccuracy and lossAccuracy and lossAccuracy and lossAccuracy and lossTraining images800800800800800Testing images100100100100100Validation images100100100100100The deep features extracted in this procedure are depicted in the following equation:(1)DeepFeature1×1×1000=DF1,1,DF1,2,DF1,1000.


### 3.2.2. Hand-Crafted Feature Mining

The conventional image features are widely adopted in the machine learning scheme for automatic classification of the considered dataset. The extraction and evaluation of the HCF are considerably simple compared to the DF. Further, the HCF-supported image examination presents a better result compared to other existing methods in the literature [32, 33]. In this work, the commonly considered HCF, such as LBP [34, 35] with various weights and PHOG [36], is considered. The outcome achieved for LBP with weights W = 1 to W = 4 is presented in Figure 5, the PHOG with bins is shown in Figure 6, and the necessary HCF is extracted for both the LBP and PHOG.Figure 5
LBP pattern for a chosen MRI slice forW = 1 to W = 4.Figure 6
PHOG features for a chosen MRI slice for BIN = 1 and 2.The various LBP and PHOG features mined with these methods are depicted in equations (2–10).(2)LBP11×1×59=W11,1,W11,2,⋯,W11,59,(3)LBP21×1×59=W21,1,W21,2,⋯,W21,59,(4)LBP31×1×59=W31,1,W31,2,⋯,W31,59,(5)LBP41×1×59=W41,1,W41,2,⋯,W41,59,(6)LBP1×1×236=LBP1+LBP2+LBP3+LBP4,(7)PHOG11×1×85=BIN11,1,BIN11,2,⋯,BIN11,85,(8)PHOG21×1×170=BIN21,1,BIN21,2,⋯,BIN21,170,(9)PHOG1×1×255=PHOG11,85+PHOG21,170,(10)HCF1×1×491=LBPtotal1×1×236+PHOGtotal1×1×255.(10) presents the total HCF mined in this work, and the selection of the optimal HCF is achieved in this work using the BFA, and the selected features are then combined with the optimal DF to improve the detection accuracy of MSL in MRI slices.


### 3.2.3. Firefly Algorithm-Based Feature Reduction and Integration

FA is a nature-inspired heuristic methodology developed by Yang in 2008 [37]. Due to its merit and optimization accuracy, it is widely adopted by researchers to find solutions for a number of optimization problems [38–43]. The FA is developed by mimicking the social behaviors found in fireflies. The initial version of the FA adopts the Levy flight (LF) strategy to improve the convergence speed with respect to the iterations. In order to improve the performance of the traditional FA, a considerable number of improvements are made by replacing the LF with other operators [44, 45]. Brownian walk (BW) is one of the known methodologies adopted by the researchers to improve the FA’s convergence towards the best optimal solution, and the earlier works on the BFA can be found in [46, 47]. The major merit of the BFA compared to FA with LF is that it provides a steady and best optimal solution for the chosen optimization problem. In this work, BFA is considered to find the optimal features from the DF and HCF to avoid the overfitting problem.Figure7 depicts the picture to discuss the movement of fireflies from the random location to the optimal location. Figure 7(a) presents a sample Brownian motion, which guides the movement of the firefly in the chosen search field. Figure 7(b) shows the scattered fireflies in the search area, and Figure 7(c) demonstrates the initial movement between the fireflies towards the optimal location by computing the Cartesian distance (CD) between the flies. Figures 7(d) and 7(e) present the intermediate and final converged position of the flies towards the optimized result. The complete working methodology can be found in [46].Figure 7
Working principle of firefly algorithm. (a) Brownian search pattern. (b) Random initialization. (c) Initial search. (d) Intermediate search. (e) Final convergence.
(a)(b)(c)(d)(e)The mathematical expression of the BFA is depicted below. Let us consider, in a search space, that there exist two groups of fireflies, likei andj. Due to its attractiveness, the firefly i will move close toj, and this procedure can be demoted as follows:(11)Xit+1=Xit+β0e−γdijtXjt−Xit+BW,where Xit = initial position of firefly i, Xjt = initial position of firefly j,BW= Brownian walk, β0 = attractiveness coefficient, γ = light absorption coefficient, and dijt = CD between flies.During the feature optimization task, the fireflies aim to find the CD between the features of the normal-class and MS-class images, and the feature which has the maximized CD is considered, and the features which show a minimal CD are discarded. This is the concept behind the BFA supported feature reduction, and similar procedures can be found in the literature [48–50].The proposed BFA helps to reduce the VGG16 features to a lower value to reduce the overfitting issue, and the reduced feature is depicted in the following equation:(12)DeepFeature1×1×618=DF1,1,DF1,2,⋯,DF1,618.Similar procedure is executed for HCF, and the reduced value is shown in the following equation:(13)HCF1×1×224=HCF1,1,HCF1,2,⋯,HCF1,224.The serially integrated features (DF + HCF) are depicted in (14), and this feature vector is then considered to train and validate the classifiers using five-fold cross valuation.(14)DF+HCF1×1×842=DeepFeature1×1×618+HCF1×1×224.


### 3.2.4. Performance Evaluation

The proposed PDL method initially employs the softmax (SM) classifier to group the MRI images into the normal/MS class. After verifying the detection accuracy with softmax, its performance is then validated using other binary classifiers, such as decision tree (DT), random forest (RF), Naïve Bayes (NB), K-nearest neighbor (KNN), and support vector machine (SVM) with linear and RBF kernels (SVM-L and SVM-RBF). This work initially computes the primary metrics, like true positive (TP), false negative (FN), true negative (TN), and false positive (FP), and from these values, other metrics such as accuracy (AC), precision (PR), sensitivity (SE), specificity (SP), and F1-score (FS) are computed, and based on these values, the performance of the proposed scheme is confirmed.The mathematical expression for these measures is presented in equations (15–18) [25, 51–55].(15)AC=TP+TNTP+TN+FP+FN,(16)PR=TPTP+FP,(17)SE=TPTP+FN,(18)SP=TNTN+FP,(19)FS=2TP2TP+FN+FP.


## 3.2.1. Deep Feature Mining

The necessary deep features with size1×1×1000 are extracted using the PDL scheme. Different deep learning methods and their initial parameters are depicted in Table 1. Every scheme is separately implemented on the MRI dataset (with/without skull), and the achieved result with the softmax classifier is initially recorded and assessed. After confirming the MSL detection accuracy of the considered PDL schemes, the best performing PDL is chosen for further enhancement. During the enhancement, the DF is optimized with BFA, and the optimized DF is then integrated with the optimized HCF. For every PDL, the number of epochs is assigned as 200, and the search is allowed to stop when the specified monitoring value is achieved [28–31].Table 1
Initial parameters assigned for the PDL schemes.
ParametersAlexNetVGG16VGG19ResNet18ResNet50Initial weightsImageNetImageNetImageNetImageNetImageNetBatch size88888Epochs100100100100100OptimizerAdamAdamAdamAdamAdamPoolingAverageAverageAverageAverageAverageHidden-layer activationReluReluReluReluReluClassifierSoftmaxSoftmaxSoftmaxSoftmaxSoftmaxMonitoring metricsAccuracy and lossAccuracy and lossAccuracy and lossAccuracy and lossAccuracy and lossTraining images800800800800800Testing images100100100100100Validation images100100100100100The deep features extracted in this procedure are depicted in the following equation:(1)DeepFeature1×1×1000=DF1,1,DF1,2,DF1,1000.


## 3.2.2. Hand-Crafted Feature Mining

The conventional image features are widely adopted in the machine learning scheme for automatic classification of the considered dataset. The extraction and evaluation of the HCF are considerably simple compared to the DF. Further, the HCF-supported image examination presents a better result compared to other existing methods in the literature [32, 33]. In this work, the commonly considered HCF, such as LBP [34, 35] with various weights and PHOG [36], is considered. The outcome achieved for LBP with weights W = 1 to W = 4 is presented in Figure 5, the PHOG with bins is shown in Figure 6, and the necessary HCF is extracted for both the LBP and PHOG.Figure 5
LBP pattern for a chosen MRI slice forW = 1 to W = 4.Figure 6
PHOG features for a chosen MRI slice for BIN = 1 and 2.The various LBP and PHOG features mined with these methods are depicted in equations (2–10).(2)LBP11×1×59=W11,1,W11,2,⋯,W11,59,(3)LBP21×1×59=W21,1,W21,2,⋯,W21,59,(4)LBP31×1×59=W31,1,W31,2,⋯,W31,59,(5)LBP41×1×59=W41,1,W41,2,⋯,W41,59,(6)LBP1×1×236=LBP1+LBP2+LBP3+LBP4,(7)PHOG11×1×85=BIN11,1,BIN11,2,⋯,BIN11,85,(8)PHOG21×1×170=BIN21,1,BIN21,2,⋯,BIN21,170,(9)PHOG1×1×255=PHOG11,85+PHOG21,170,(10)HCF1×1×491=LBPtotal1×1×236+PHOGtotal1×1×255.(10) presents the total HCF mined in this work, and the selection of the optimal HCF is achieved in this work using the BFA, and the selected features are then combined with the optimal DF to improve the detection accuracy of MSL in MRI slices.


## 3.2.3. Firefly Algorithm-Based Feature Reduction and Integration

FA is a nature-inspired heuristic methodology developed by Yang in 2008 [37]. Due to its merit and optimization accuracy, it is widely adopted by researchers to find solutions for a number of optimization problems [38–43]. The FA is developed by mimicking the social behaviors found in fireflies. The initial version of the FA adopts the Levy flight (LF) strategy to improve the convergence speed with respect to the iterations. In order to improve the performance of the traditional FA, a considerable number of improvements are made by replacing the LF with other operators [44, 45]. Brownian walk (BW) is one of the known methodologies adopted by the researchers to improve the FA’s convergence towards the best optimal solution, and the earlier works on the BFA can be found in [46, 47]. The major merit of the BFA compared to FA with LF is that it provides a steady and best optimal solution for the chosen optimization problem. In this work, BFA is considered to find the optimal features from the DF and HCF to avoid the overfitting problem.Figure7 depicts the picture to discuss the movement of fireflies from the random location to the optimal location. Figure 7(a) presents a sample Brownian motion, which guides the movement of the firefly in the chosen search field. Figure 7(b) shows the scattered fireflies in the search area, and Figure 7(c) demonstrates the initial movement between the fireflies towards the optimal location by computing the Cartesian distance (CD) between the flies. Figures 7(d) and 7(e) present the intermediate and final converged position of the flies towards the optimized result. The complete working methodology can be found in [46].Figure 7
Working principle of firefly algorithm. (a) Brownian search pattern. (b) Random initialization. (c) Initial search. (d) Intermediate search. (e) Final convergence.
(a)(b)(c)(d)(e)The mathematical expression of the BFA is depicted below. Let us consider, in a search space, that there exist two groups of fireflies, likei andj. Due to its attractiveness, the firefly i will move close toj, and this procedure can be demoted as follows:(11)Xit+1=Xit+β0e−γdijtXjt−Xit+BW,where Xit = initial position of firefly i, Xjt = initial position of firefly j,BW= Brownian walk, β0 = attractiveness coefficient, γ = light absorption coefficient, and dijt = CD between flies.During the feature optimization task, the fireflies aim to find the CD between the features of the normal-class and MS-class images, and the feature which has the maximized CD is considered, and the features which show a minimal CD are discarded. This is the concept behind the BFA supported feature reduction, and similar procedures can be found in the literature [48–50].The proposed BFA helps to reduce the VGG16 features to a lower value to reduce the overfitting issue, and the reduced feature is depicted in the following equation:(12)DeepFeature1×1×618=DF1,1,DF1,2,⋯,DF1,618.Similar procedure is executed for HCF, and the reduced value is shown in the following equation:(13)HCF1×1×224=HCF1,1,HCF1,2,⋯,HCF1,224.The serially integrated features (DF + HCF) are depicted in (14), and this feature vector is then considered to train and validate the classifiers using five-fold cross valuation.(14)DF+HCF1×1×842=DeepFeature1×1×618+HCF1×1×224.


## 3.2.4. Performance Evaluation

The proposed PDL method initially employs the softmax (SM) classifier to group the MRI images into the normal/MS class. After verifying the detection accuracy with softmax, its performance is then validated using other binary classifiers, such as decision tree (DT), random forest (RF), Naïve Bayes (NB), K-nearest neighbor (KNN), and support vector machine (SVM) with linear and RBF kernels (SVM-L and SVM-RBF). This work initially computes the primary metrics, like true positive (TP), false negative (FN), true negative (TN), and false positive (FP), and from these values, other metrics such as accuracy (AC), precision (PR), sensitivity (SE), specificity (SP), and F1-score (FS) are computed, and based on these values, the performance of the proposed scheme is confirmed.The mathematical expression for these measures is presented in equations (15–18) [25, 51–55].(15)AC=TP+TNTP+TN+FP+FN,(16)PR=TPTP+FP,(17)SE=TPTP+FN,(18)SP=TNTN+FP,(19)FS=2TP2TP+FN+FP.


## 4. Result and Discussion

This section of the research presents the experimental outcome and its discussion. This investigation is implemented using a workstation of Intel i7, 20 GB RAM, and 4 GB VRAM associated with Python software.The proposed framework is initially executed with PDF and then classified using SVM classifier. The experimental outcomes achieved for the chosen PDL schemes, such as AlexNet, VGG16, VGG19, ResNet18, and ResNet50, are depicted in Table2. This result confirms that the detection accuracy of VGG16 is better than the alternatives. Further, the Glyph Plot constructed using these values is presented in Figure 8, and this also confirms that the overall performance of VGG16 is better than other PDL methods. Based on this result, the VGG16 is then considered to classify the chosen MRI slices with the help of DF + HCF using various binary classifiers.Table 2
Performance measures achieved with softmax for different PDL schemes.
SchemeTPFNTNFPACPRSESPFSAlexNet93594893.5092.0894.9092.1693.47VGG1694595694.5094.0094.9594.0694.47VGG1994794594.0094.9593.0794.9594.00ResNet1893895494.0095.8892.0895.9693.94ResNet5094594794.0093.0794.9593.0794.00Figure 8
Glyph Plot constructed using performance metrics in Table2.Figure9 depicts the experimental outcome of VGG16 along with the KNN classifier. Figure 9(a) presents the test image, and Figures 9(b)–9(f) present the intermediate results achieved with various convolutional layers. This figure confirms that the learning process of the VGG16 is smooth, and it easily distinguishes the patterns of the MRI with normal and MS classes.Figure 9
Sample convolutional results achieved for the VGG16 scheme. (a) Test picture. (b) Convolution1. (c) Convolution2. (d) Convolution3. (e) Convolution4. (f) Convolution5.Figure10 presents the final experimental outcome in which Figures 10(a) and 10(b) denote the convergence of the search concerning epochs. Figures 10(c) and 10(d) present the confusion matrix (CM) and the ROC curve, respectively. The outcome of CM confirms that the TP and TN, in this case, are better (0 denotes the normal and 1 demotes MS), and it provides superior values of AC, PR, SE, SP, and FS. In addition, the ROC value of this experiment shows a better result (99.9%) compared with other classifiers of this research work.Figure 10
The final experimental outcome was achieved using VGG16 and KNN classifier for MRI without skull. (a) Accuracy. (b) Loss. (c) Confusion matrix. (d) ROC curve.
(a)(b)(c)(d)Table3 presents the performance metrics achieved for DF + HCF with various binary classifiers for MRI slices with and without the skull section. The VGG16 with RF classifier achieved a classification accuracy of >98% for the image with the skull region, and the VGG16 with the KNN classifier also achieved a classification accuracy of >98%. This result confirms that the proposed scheme works well on the chosen MRI slices even though the skull section exists. In order to graphically denote the overall performance of these results, spider plot is constructed using the values in Table 3, and this plot is shown in Figure 11. Figure 11(a) presents that the RF classifier provides a superior result over other methods, and Figure 11(b) confirms the merit of the KNN compared to the alternatives.Table 3
The experimental result achieved with VGG16 and different binary classifiers using DF + HCF.
ImageSchemeTPFNTNFPACPRSESPFSMRI with skullSM95597396.0096.9495.0097.0095.96DT97597197.0098.9895.1098.9897.00RF98299198.5098.9998.0099.0098.49NB98395496.5096.0897.0395.9696.55KNN97496396.5097.0096.0496.9796.52SVM-L97297497.0096.0497.9896.0497.00SVM-RBF96597296.5097.9695.0597.9896.48MRI without skullSM95396695.5094.0696.9494.1295.48DT97396496.5096.0497.0096.0096.52RF96598197.0098.9795.0598.9996.97NB97496396.5097.0096.0496.9796.52KNN99298198.5099.0098.0298.9998.51SVM-L98297397.5097.0398.0097.0097.51SVM-RBF97297497.0096.0497.9896.0497.00Figure 11
Graphical representation to verify the overall performance of VGG with different classifiers. (a) Spider plot for MRI with skull. (b) Spider plot for MRI without skull.
(a)(b)The experiment confirms that the proposed work helps to get a better result on chosen MRI slices (with/without skull), and in the future, it can be considered to examine the clinical grade MRI slices associated with MSL. Further, the performance of the PDL schemes can also be improved with (i) ensemble feature techniques and (ii) fusion of deep features.


## 5. Conclusion

MS lesion happens due to a malfunction in the immune system, and early screening and treatment will reduce the problem of the disability. When the severity of the MSL is accurately detected, then it is possible to provide the appropriate medication to control the disease in its current stage. The proposed work in this research implements a PDL scheme to detect the MSL in FLAIR modality MRI slice. In this work, a detailed examination is performed by considering the MRI slices with and without the skull section, and the proposed investigation is executed using DF and DF + MLF. In this study, the BFA-based feature optimization is also implemented to avoid the overfitting problem. The experimental result of the proposed scheme is implemented on 30 patient images (2000 images (1000 normal and 1000 MS class)), and this methodology helps achieve a classification accuracy of >98% on brain MRI images with/without the skull. This confirms that this scheme helps to detect the MS lesion with better accuracy, and in the future, it can be considered to examine the clinical grade MRI slices collected from real patients. The limitation of the proposed work is that it considered both the deep and hand-crafted features, and in future, ensemble of deep features can be considered to achieve a superior result [56–60].



---

*Source: 4776770-2023-02-21.xml*