An improved tumor segmentation algorithm from T2 and FLAIR multimodality MRI brain images by support vector machine and genetic algorithm

: This paper puts forth a framework of a medical image analysis system for brain tumor segmentation. Image segmentation helps to segregate objects right from the background, thus proving to be a powerful tool in medical image processing. This paper presents an improved segmentation algorithm rooted in support vector machine (SVM) and genetic algorithm. SVMs are the basis of a machine-learning technique that has been used for segmentation and classification of medical images. The database consists of two weighted images: T2 and FLAIR. The proposed system mainly consists of two stages. The first stage performs pre-processing the MRI image, followed by block division. The second stage includes feature extraction, feature selection, and finally, the SVM-based training and testing. The feature extraction is done by first-order histogram and co-occurrence matrix; GA using wrapper method is used to select optimum subset features. Experimental outcomes for 10 patients with

over 250 MRIs are proof of the proficiency of our work.The performance of the proposed system is evaluated in terms of specificity, sensitivity, accuracy; time elapsed and figure of merit.This approach also permits the segmentation of image volumes based on training sets selected on a single slice.

Introduction
Brain tumor segmentation of MRI is very significant in medical image diagnosis, as it yields information related to anatomical structures as well as abnormal tissues which are absolutely necessary for treatment planning and patient follow-up.The brain image segmentation can also be helpful for general modeling and construction of pathological brains and brain atlases Olabarriago and Smeulders (2001).Althogh there have been numerous efforts and promising developments in the medical imaging community, characterization of abnormalities are still considered to be a challenging and difficult task, due to its widespread variety of possible shapes, locations, structure, and image intensities of various types of tumors Duncan and Ayache (2000).Some sections of the tumor may also deform the surrounding structures or the edema associated with it.The tumor might also affect necrosis that changes the image intensity around the tumor.Present methods set aside scope for increased automation, applicability, and accuracy.This paper aspires to subsidize to this area, by proposing a distinct method, which is universal enough to address a large class of tumor types.
There exist different methods for the image segmentation and processing Priyanka (2013).These methods can be supervised, semi-supervised, and unsupervised.Zhang, Brady, and Smith (2001) proposed a new method known as Hidden Markov Random Field (HMRF) model.This model has the ability to encode both the spatial and statistical properties of a given image.When compared with existing methods, it is more flexible for image modeling.The limitation of this system is that its preliminary estimations is based on threshold value which is purely heuristic and its time consuming.It gives inaccurate results most of the time.Tolba, Mostafa, Gharib, and Salem (2003) proposed a new method for MRI brain image segmentation known as Gaussian Multi-Resolution Expectation Maximization algorithm.This algorithm is based on EM algorithm and the multi resolution analysis of the given image.The limitation of this technique is that miss-classified pixel is generated when this algorithm is applied to pixel laying in the edges of boundaries.Agarwal and Kumar (2014) introduced a model based on a threshold value that uses level set methods for 3D brain tumor segmentation.
In this proposed model, the speed function of the level set was designed using a general threshold.Zhang et al. (2001) in their paper explain the number of fuzzy clustering methods based on fuzzy set theory.Fuzzy c mean (FCM) algorithm (Shen, Sandham, Granat, & Sterr, 2005) assigns every pixel to the clusters without any label; however, the algorithm fails to succeed completely to segment image having noise, images having the intensity difference, artifacts, etc.To overcome these draw back, modified FCM algorithm was proposed.Selvaraj and Dhanasekharan (2013) proposed a method to overcome the intensity inhomogeneity.Though this algorithm work well in medical image segmentation, it has some limitation such as time required for segmentation is more due to its complexity in spatial and additional terms.In our proposed system, we try to over come the limitation on the existing system such as time complexity, figure of merit absolute volume segmentation.This paper recommends a fully automatic and effective tumor segmentation based on SVM classifier and wrapper-based genetic algorithm (GA).SVM classifier is used to classify the segmented region of the MRI image obtained by the block integrated process and truth image of the input is also taken, followed by feature extraction by using texture features and histogram-based method.Feature selection done by using GA and the optimum features are selected by wrapperbased method, and are used to train the SVM classifier Tolba, Mostafa, Gharib, and Salem (2003).The sum of the total block output gives the classified region.Basic block diagram is shown in Figure 1.
The remaining part of this paper is outlined as follows.Section 2 gives an idea of method overview.Section 3 explains about experimental discussion with manual delineation.A comparative analysis with the existing system is discussed in Section 4. Finally, Section 5 concludes the paper.

Pre-processing
In pre-processing, the image is enhanced so as to get an improved form of the finer image and to remove unwanted noise present in the image.In the proposed method, importance is given to background separation so as to get the region of interest.The main processes in pre-processing are thresholding, region filling and morphological operation Vanitha, Prabhu Deepak, PonNagesharan, and Saucepan (2015).

Algorithm for pre-processing
Step 1: calculate the mean.
Step 2: Perform the thresholding operation.
Step 3: Region filling is done to remove the holes.
Step 4: Morphological operation is done to remove noise and small objects from the background.
Step 5: Region filling operation is done to fill the unfilled region Step 6: Morphological Opening-Remove noise & small objects from the background

Feature extraction
Extracting a good feature set for classification is a challenging task.There are many features extraction techniques such as texture features, Gabor features, feature based on wavelet transform, principal component analysis, minimum noise fraction transforms, discriminant analysis, decision boundary feature extraction, non-parametric weighted feature extraction and spectral mixture analysis.Texture feature extraction is used for our recommended system.

Texture features extraction
The proposed system uses two approaches for texture feature extraction.The first-order histogram is the basis of the first method, and co-occurrence matrix-based method is the core of the second method.
2.2.1.1.First-order histogram-based feature extraction.A histogram of an image gives a summary of the statistical information about the image Ghosh and Mitchell (2006).On dividing the value of intensity level histogram with the total number of pixels in the image, the probability density of occurrence of the intensity levels can be given as follows: where N represents the number of the resolution cells in the horizontal spatial domain and M represents the resolution cell number in the vertical spatial domain.The total gray level of the image is represented by G. Useful features of the image can be obtained from the histogram for describing first-order statistical features of the image are mean, variance, skewness, kurtosis, energy, and entropy Seara (2002).
2.2.1.2.Co-occurrence matrix-based feature extraction Here the feature is extracted based on gray-level spatial co-occurrence matrix h i (i,j) Ong and Khoo (2009).This is also termed as second order histogram-based features.These extracted features are based on the joint probability distribution of pairs of pixels.To compute the joint probability distribution between pixels, distance d and angle θ within a given neighbourhood are used.Normally, d = 1,2 and θ = 0°, 45°, 90°, 135°a re used for calculation.Texture features can be labeled using this co-occurrence matrix.The following features are extracted angular second moment, correlation, inertia, absolute value, inverse difference, entropy, and maximum probability.
All such features are extracted from each block of the T2 and FLAIR modal slice of the same patient and are arranged in a matrix of dimension m × n, where m is the number of blocks and n is the number of features.It is clear that there are n/2 features each in T2 and FLAIR.From Tables 1 and 2, the first column contains the index of the block randomly selected for the sake of demonstration.The columns 2 through 6 contain, respectively, the mean, variance, kurtosis and entropy.The 7th column contains the Target, which stipulates whether the block belongs to tumor regions or not."1" in the Target means it belongs to the tumor region Padma and Sukanesh (2011).

Feature selection
To find the most significant feature set, optimized feature selection process is to be used, for which GA is a good approach (Frohlich, Chapelle, & Scholkopf, 2003).The probability of getting an optimal feature subset for classification is high when GA is employed for feature selection with suitable fitness functions and possible considerations.Taking these advantages, a feature selection scheme based on GA is proposed.
Input pattern of GA population of chromosome transformed pattern wavelet transform.

Genetic algorithm-based feature selection
The important phases in GA are chromosome encoding, fitness evaluation, selection mechanism, genetic operators, and the criteria to stop the iteration Ghosh and Mitchell (2006) from Figure 2, the GA operates on the binary search space as the chromosomes are taken as bit strings.To begin with, an initial population is created randomly and evaluated using the fitness function.In the bit string which represents the chromosome, a bit value "1" depicts that the particular feature indexed by the position has been selected.Only those features selected by the 1s in the chromosome are taken in the testing.The ranking is based on the accuracy of classification based on an already classified test data.Based on the ranking, the top n fittest chromosomes are selected in order to survive to the next generation.The remaining chromosomes are passed through the functionals such as mutation and crossover which produces new and probably better chromosomes Faulkner (1998).The fitness of the new chromosomes is found.These steps continue until the fitness is reached.Basic Block diagram for fitness evaluation by GA is shown in Figure 3.

Initial population
Initial population is generally a matrix of dimension m × n, where m is the population size and n is the chromosome length.In this work, the chromosome length (genome length) is equal to the number of features extracted from a block of the image.The population size is the number of chromosomes taken in the population.Each bit of a chromosome as discussed earlier represents the position of a feature in the feature matrix.A "1" in the chromosome represents the selection of the corresponding feature from the feature matrix.

Algorithm: Initial population
Step 1: Procedure popFunc () Step 2: Pop ≤ randomly created binary matrix of size, population Size x GenomeLength Step 3: Return pop Step 4: End procedure

Fitness evaluation
For a GA to select subset features, a fitness function is defined to evaluate the discriminating capability of each subset.The KNN algorithm is used to evaluate the fitness function; it solves the classification problem by looking for the shortest distance between the test data and the training sets in the feature space.The KNN algorithm computes the Euclidean distance between test data and the training sets and then find the nearest point of the training set to the test set: As the GA iteration proceeds, the individual chromosomes in the current population are evaluated and the fitness is ranked based on the kNN classification error.The main aim behind the iteration is to reduce the error rate and pick the individual with the least (best) fitness value: where α is the kNN-based classification error and N f is the cardinality of the selected features.The algebraic structure of this equation ensures the learning of the GA, error minimization, and reduced number of features selected.
Step 2: featureIndex = indices of ones from binary chromosome.

Selection mechanism: tournament
The aim of selection mechanism in GA is to make sure that the population is being constantly improved in accordance with the overall fitness values.The selection mechanism helps the GA in discarding bad designs and keeping only the best individuals.Tournament selection of size 2 is used in this proposed work due to its speed, simplicity, and efficiency.Also, tournament selection enforces higher selection pressures on the GA and makes sure the worst individual does not get into the next generation.Two functions are needed to perform in tournament selection.The first function generates the players (parents) needed in the actual tournament function, while the second function outputs the winner of the tournaments.In the tournament selection of size 2, two chromosomes are selected from the population, after the elite kids are taken out and the best of the two chromosomes is selected.This process is performed iteratively until the newly generated population is filled up.

Crossover function
The crossover operator in the GA genetically combines two individuals named parents to form children for the next generation.Two chromosomes are taken from tournament selection.The crossover fraction specifies the number of kids produced by the crossover functional, after Elite kids are removed from the current population being evaluated.The crossover fraction is bounded by 0 and 1.The value of crossover fraction used in this work is 0.8 and the crossover function is arithmetic type.An XOR operation is performed on the two parent chromosomes since they are binary.For two parents p1 and p2, such as p1 = 1 0 0 0, 1, p2 = 0 1 1 0, 1, crossover kid = p1 XOR p2 = 1 1 1 0 0.

Wrappers for feature subset selection
Wrapper approach is a random search technique for subset generation,which takes the advantage of the supervised learning algorithm to evaluate the significance of the feature subset and employs the GA to optimize the searching of features in the feature selection process Karegowda, Jayaram, and Manjunath (2010).In our proposed system wrapper approach along with GA is used for random search subset generation.Here, from Figure 4 subset feature generation consists of four steps: (1) generate candidate subset by GA, (2) subset evaluation function to evaluate the subset generated in the previous step by using wrapper approach, (3) stopping Condition (until the optimal subset according to some evaluation function is obtained), and (4) validation procedure to check whether the feature subset selected is valid.

SVM segmentation
SVM is generalized statistical learning theory Vapnik (1995), which is used for classifying the set of inputs based on supervised learning theory Kim, Jung, Park, and Kim (2002).It separates the set of inputs into two classes with class labels −1 and 1.The classifier separates into classes by defining a hyper plane defined by f(x) = β T x + α, where β ∈ Ɍ n is orthogonal to the hyper plane and α ∈ Ɍ n is a constant.For the set of training feature set f(a i , b j ) defined in the form Here, a i is the input vector and b i is the target vector with two classes with class 0 and 1. SVM training will maximize the distance between the classes by defining the hyper planes with a small empirical risk Li, Zhou, Wang, and Wu (2011) and Nandpuru, Salankar, and Bora (2014).The hyper planes for the classes can be represented as b i β T a þ α À Á ! 1.The objective function for optimizing the distance between the classes defined by the hyper planes can be represented as minimize: where ε i is a set of slack variables and C is a cost variable for each slack variable.

Training and testing phase
Proposed SVM-based segmentation consists of two parts: (1) testing and ( 2) training.Firstly, the image is divided into blocks and features extracted from each block are arranged in the feature matrix.A truth vector is formed from the corresponding truth image.This matrix is used to train the classifier.SVM classifies data by finding the best hyperplane that separates all specific data points of one class from those of the other shown in Figure 5.The finding of the hyper plane and the corresponding support vector is called Training Nandpuru et al. (2014).For segmentation, the test image undergoes the feature extraction.Feature Selection is done with the help of wrapperbased GA.These selected features are used for SVM classifier training Niyogi, Burges, and Ramesh (1999).Here SVM classifier is trained to classify a tumor region and abnormal region.This classification takes place block wise, and the sum total of the classified blocks can give out the classified region Niyogi et al. (1999).

Algorithm for training phase
Step 1: Divide the input database image into blocks of size m X m Step 2: Extract features of each block and arrange them in a feature matrix.Features are calculated Step 3: The extracted feature vector of each block is arranged on feature matrix of size Nx5, (N = no of block).
Step 4: Construct the truth vector from the Truth image.
Step 5: SVM is trained using the feature matrix and the corresponding Truth vector.

Algorithm for testing phase
Step 1: Divide the images into blocks of size m X m Step 2: Extract features of each block and place them in a feature matrix and features are calculated.
Step 3: Construct an M x N Zeros matrix where, M represent rows and N represent column size.
Step 4: feed feature vector of each block into already trained SVM.If the SVM output is 1, The resultant block in the Zero matrix is made 1.
Step 5: repeat 2-4.This makes the Zeros matrix change each time, the SVM gives 1 output.
Finally gives a map of the tumor location.

Experimental results and discussion with manual delineation
For the performance evaluation, a series of 30 images (T2 and FLAIR) were taken in the same class of tumor and segmented with a common threshold value, in association with the radiologist segmented image.For the numerical analysis, the number of false negatives (FN) and false positives (FP) are calculated, based on the number of pixels in the interested region (ROI).The four parameters-TP, FP, TN, and FN--are evaluated by the logically AND ing the ground truth and segmented image Zeljkovic et al. (2014).The proposed methods have been implemented by using MATLAB software with a computer specification of core 2duo having a processor speed of 1.6 GHz.The proposed algorithm is implemented on real human brain MRI data set available on the web.In our proposed method a data set consisting 30 medical images (23 abnormal and 7 normal) were taken into consideration, of these 95 objects are used in the training and 30 objects were used in testing phase.The images in the database have been exported into a set of 2D axial slice in the MHA format of pixel size 256 × 256.In our proposed system the images are divided into a block of size (m X m).The Supervised evaluation is carried out to figure out the difference between the ground truth and the segmentation result using the evaluation metric.The ground truth is obtained from manual segmentation.The results of the proposed SVM-based algorithm are evaluated by comparing it with the result of manually segmented data done by medical experts Wang (2006).The degree of similarity of the segmented results gives the accuracy of the segmented image.The result is obtained in terms of specificity, accuracy, absolute volume measurement error (AVME) and figure of merit (ε), helps to demonstrate the validity of the proficiency: Table 1 illustrates the features extracted from the randomly selected blocks of an image, FLAIR, and T2.First column of Table 1 contains the index of the block randomly selected for the sake of illustration.The columns 2 through 6 contain, respectively, the mean, variance,  kurtosis and entropy.The 7th column contains the Target, which specifies whether the block belongs to tumor regions or not.A "1" in the Target means it belongs to the tumor region.Table 2 shows the comparison result of volume measurements of manual segmentation with the proposed system for FLAIR and T2 images.The degree of accuracy is compared with the manual segmentation done by the radiologist.The time required for processing each image for 10 patients for T2 and FLAIR is plotted as graphs in Figure 6. Figure 7 shows the statistical evaluation, showing specificity and accuracy of multimodality images of FLAIR and T2.The performance of the classifier is evaluated from the confusion matrix, specificity and accuracy by testing it with the features extracted from the feature set such as mean; histogram; variance; standard deviation; skewness; kurtosis; entropy.The proposed scheme gives out a better performance on the basis of sensitivity, which is 96.799 in the case of FLAIR modality whereas 91.2326 in the case of T2 modality.The specificity was reported to be 98.3240 for

Comparitive analysis with existing system
Proposed method is compared with two existing methods such as expectation maximization using level set (Aswathy, Kumar, & Glan Devadhas 2014, 2015) and FCM method (Agarwal & Kumar, 2014;Gordillo, Montseny, & Sobrevilla, 2013).The comparison diagram of proposed SVM-based system with the existing method such as combination of EM & level set and FCM using T2 and FLAIR images is shown in Figure (9c & f). Figure (9b) shows the segmented image output for the method such as EM and level set, FCM, and SVM for same image input is shown.The results of the proposed system are evaluated by comparing it with the result of manually segmented data done by medical experts; the degree of similarity of the segmented results gives the accuracy of the segmented image.The proposed method is evaluated in terms of specificity, accuracy, AVME and figure of merit (ε).The evaluation metrics of sensitivity, specificity, and accuracy can be stated in the terms of TP, FP, FN, and TN based on their pixel values.A comparison of the proposed SVM-based system with the existing method such as combination of EM and level set and FCM using T2 and FLAIR is shown in Tables 4 and 5.  Tables 4 and 5 show the statistical evaluation of the methods, such as combination of EM and level set, FCM, and SVM method for T2 and FLAIR inputs.The time required for processing each image for T2 and FLAIR for the methods is shown in Table 4. Table 3 gives the volumetric analysis for manual and automatic segmentation for the combination of EM and level set, FCM, and SVM-based method for T2 and FLAIR input image is shown.The degree of similarity between the manual segmentation and the machine segmented results gives the similarity of the segmented results.Theoretical studies prove that the combination of EM and level set algorithm helps to detect the tumor boundaries more accurately.Figure (9a) shows that it fails to produce so.Table 4 shows that the computational time required for FCM is very less compared with the other two algorithms.Statistical comparison and tumor volume calculation from Tables 4 and 5 for the proposed algorithm show the efficiency.The performance of the classifier is evaluated from the confusion matrix, specificity, and accuracy by testing it with the features extracted from the feature subset by a wrapper method such as mean, histogram, variance, standard deviation, skewness, kurtosis, and entropy.The experimental results show the effectiveness of the proposed system and this algorithm turns out to an efficient fully automatic brain tumor segmentation.

Conclusion and future works
Fully automatic brain tumor segmentation is one of the snags faced in medical image processing.Even if much exertion has been made in discovering out a good solution for this problem, it still remains unsolved.In our proposed system, authors are using wrapper-based GA for random search technique in identifying the best features and SVM as a classifier.The comparative analysis of the proposed system with other existing system such as FCM and EM and level set is carried out and the performance of the proposed method is analyzed in terms of number of subset features selected, figure of merit, sensitivity, specificity, AVME, and the classification accuracy.From the conducted experiments, it is evident that the proposed method outperforms other methods compared and produces better accuracy for the classifier which is adopted as the feature evaluation mechanism in the feature selection process.However, experiment results show that employing feature subset selection surely enhances the classification accuracy.Hence, this proposed method is well suited for the medical application where the classification algorithm is predefined.In the future, matrix transformations of the image may be used which could reduce the complexity and time.In order to avoid manual error, author's tried to propose a fully automatic intelligent system by making use of the advantage of finding the global optimum by using GA, thereby reducing the error rate of brain tumor segmentation.

List of abbreviations
Figure 1.Basic block diagram for brain tumor segmentation using SUM Classifier.

Figure 2 .
Figure 2. Basic diagram for genetic algorithm-based feature selection.

Figure 4 .
Figure 3. Optimal variable output of fitness function evaluation based on GA.

Figure
Figure 5. Graphical representation of SVM based on liner separable data.

Figure 9
Figure 8. Statistical graph showing specificity and accuracy for T2 and FLAIR images.

Table 1 .
Feature extraction for randomly selected blocks (FLAIR IMAGES)

Table 2 .
Feature extraction for randomly selected blocks (T2 IMAGES)

Table 3 .
Volumetric measurement of manual and automatic segmentation for FLAIR and T2 images using GA and SVM-based method 2.3.4.Generation of children for new populationAfter fitness evaluation, a new population is created using genetic operator such as crossover and mutation.Three types of children are created, which are Elite children, crossover children and mutation children.2.3.4.1.Elite children.These children are pushed automatically into the next generation as these are the best children with greatest fitness so far.The count of elite chromosome is bounded by population size.This implies EliteCount populationSize, with size 2, GA picks the two best chromosomes and pushes them automatically to the next generation.Consider the case where the population size is 100 and the EliteCount = 2.This means there are 98 (100-EliteCount) individuals in the population apart from the elite kids.Crossover and mutation kids are then produced.2.3.4.2.Crossover children.The proportion of the next generation apart from the left over kids that are produced by crossover is called crossover fraction.If the fraction is set to one, then there are no mutation kids.The crossover fraction used in this work is 0.8, then the number of crossover children will be COcount = round(98*0.8)= 78.

Table 4 .
Statistical comparison for the FLAIR and T2 input images for existing system

Table 5 .
Comparative analysis of volume measurement of manual and automatic segmentation for existing system