DETECTION AND CLASSIFICATION OF BRAIN TUMOR USING ML

: Brain tumor detection and classification is the most difficult and tedious task in the area of medicinal image preparing. MRI (Magnetic Resonance Imaging) is a medicinal procedure, generally adopted by the radiologist for representation of inner structure of the human body with no surgery. MRI gives abundant data about the human delicate tissue, which helps in the conclusion of brain tumor. Precise segmentation of MRI image is basic for the conclusion of brain tumor by computer supported clinical device. This paper is focused towards the design of an optimal and more accurate way for the detection of tumor from brain MRI scans and if it confirms the presence of tumor then it is focused on evaluating its stage, i.e., benign or malignant. We have experimentally shown that our proposed methodology has a greater accuracy than other existent methods for classifying tumor type to be either as Malignant or Benign since the maximum accuracy for detection of malignant tumor is 99.02% and for Benign tumor is 99.67%.


INTRODUCTION
The human brain is the sensitive organ of the body which controls the other part of the body. This correspondence is done with the assistance of neural framework. Each section of the brain has some particular work that coordinates human movements. However, when a portion of the brain develops to an unnatural size then the work done by the brain get hampered and some of the time brains may stop its ordinary behavior. This unusual enlargement of the brain cells is named as 'brain tumor' in medical science. A tumor can be characterized as a group of unusual cells increasing inside the brain. The correct explanations for brain tumors are still at the darkest side of medical science yet the genuine impacts of brain tumors are watched, at times it shows unusual human activities, internal cavity paralysis, and few cases may become a threat to human life [1]. Thus, to battle this issue, an exact diagnosis is exceptionally ideal. In the last few decades, we have encountered a couple of cutting-edge techniques, among which computer-based imaging is the most favored one, in the determination of brain tumors that are valued and acknowledged in surgical planning and further treatment. In neuroscience and, the brain MRI is broadly acknowledged imaging strategy. The MRI is the most regularly utilized methodology for imaging brain tumors and recognition of its territory. The customary strategy for CT and MRI brain images grouping and tumor recognition are still for the most part in light of an immediate human investigation of those images, in spite their being various other diverse techniques have just been proposed [2,3]. MRI is a non-destructive and non-invasive strategy in nature. It gives high-resolution images which are generally utilized as a part of brain scanning reason. There are many image processing method, for example, histogram equalization, picture segmentation, image enhancement, morphological operation, feature choice and obtaining the features, and order.
The remaining sections of the paper are as follows. Section II, discusses about the review of some existing research work towards the detection of brain tumor and its classification. Section III, describes our own proposed method which is adopted. In section IV, the experimental results are shown in a tabular form which we have obtained for detection. And last section describe the conclusion.

LITERATURE SURVEY
Over the decades, different specialists have worked in the space of brain tumor detection and grouping and they have used and formulated a stack count that surveys the implementation of their proposed methodologies and plans. In this section, we have propelled a few summaries of such existing studies and techniques. Researchers A.S. Swakshar et al. [4] have suggested a strategy that accomplishes tumor stage by utilizing ANN. In the pre-processing stage, three distinctive differentiation upgrade plans have been connected; I) adjusted ii) adaptive threshold and iii) histogram imaging. The TKFCM calculation which is basically a combined approach of the K-implies and Fuzzy C-implies plans has been embraced with specific alterations for actualizing the division organize. In the feature extraction the property based measurement features have been inferred. At long last, the SVM conspire characterizes the brain MRI picture either into the normal or having tumor classes. The Brain Tumor arrange is ordered utilizing the ANN classifier. The dataset for every MRI image of the normal brain, malignant tumor,  and the amiable tumor has been removed from 39 pictures  out of which 3 normal, 9 benign, 17 malignant I, 6  malignant II, 3 malignant II, and 1 malignant IV organize  tumor brain MRI images have been effectively distinguished. The precision of the proposed strategy was expected around 97.44%. Researchers G. Singh et al. [5] have contrived a novel strategy for brain tumor identification that envelops Histogram Normalization and selection of K-implies/ Kmeans Segmentation schemes. In this present work under scrutiny at, to begin with, the input image is pre-prepared to de-commotion undesirable signs from MRI examines utilizing shifted channels like Median channel, Adaptive channel, Averaging channel, Un-sharp covering channel and Gaussian channels. The histogram of the pre-prepared image is then standardized and arrangement of MRI examine is encouraged. In the end, the picture is sectioned by receiving the K-means calculation to isolate the tumor from the output. MRIs can be productively grouped the SVM in order to offer exact expectation and characterization. SVM classifier allegedly gave the precision of 91.49%. As obviously apparent, the SVM approach offered higher precision. Researchers H.B.Nandpuru et al. [6] have received a scholarly grouping framework to sort normal and abnormal MRI brain examines where the scan experiences three stages in particular; I) image pre-processing, ii) features or highlight extraction and ensuing iii) classification. Amid the pre-preprocessing stage, the RGB parts of the brain are changed into grey scale image. Next, the Median Filter has connected to de-clamor the MRI checks. At last, Skull Masking approach is utilized to isolate non-mind tissues from MRI brain images. Enlargement and Erosion are two noteworthy morphological errands that are used for realizing the skull covering the technique. In the second period of feature extraction, the surface features of the scan like symmetrical, grayscale portions are removed. Finally, in the classification step, diverse machine learning strategies like SVM, KNN and SVM-KNN have been embraced and a similar report among them is encouraged. The dataset contained 50 pictures and it was inferred that the Hybrid classifier SVM-KNN conspire offered the most elevated precision rate of 98% when contrasted with its partners. Researchers Parveen et al. [7] have come up with an algorithm that is a mix of SVM and fuzzy c-implies, a hybrid scheme for recognition of brain tumor from MRI scans. Here the picture quality is enhanced utilizing the complexity change and mid-range stretch procedures. In addition, morphological activities like the Double thresholding plan have been received for skull striping. With the end goal of image segmentation and feature extraction, FCM bunching and GLRLM is actualized individually. The informational index comprised of 120 MRI brain outputs of patients; out of which 96 was embraced to prepare the SVM classifier and the rest of the 24 checks were used to test the prepared SVM. SVM classifier working under the Linear, Quadratic and Polynomial kernel function modes detailed precision level of 91.66%, 83.33% and 87.50% individually and was guaranteed to offer 100% accuracy. Researchers T.C. Sarma et al. [8] uses histogram, which computes the total quantity of specified pixel values distributed in a particular image. Finally the Classification and identification stages are facilitated using k-NN which is based on training of k value. Interestingly in this work the Manhattan metric has also been incorporated to estimate the distance of the classifier. The algorithm was tested on 48 images where the overall accuracy rates for all images were around 95%. In the next section, we have proposed our methodology to detect and classify brain tumor from brain MR images that we have deduced by overcoming the found limitations on the subject.

PROPOSED METHODOLOGY
Brain tumor is always considered as one of the most dangerous and life threatening disease for the patients and fatal as well. The earliest and accurate detection of such kind of tumors can only provide the correct diagnosis which can lead to medical healing of the patient. Here, in this paper, we have described our objective in two parts, the first half deals with detection of brain tumor i.e. the presence of the tumor in the provided MRI. The other part, i.e. the second part contains the classification of the tumor. Basically, here we will analyze the MRI images which will conclude the stage of the tumor as benign or malignant. In general, the block diagram for our process, i.e. MRI image segmentation and classification is depicted in Fig. 1.The input images will undergo various stages which can be summarized as follows, Image Acquisition, Filtering, feature extraction and classification of MRI images.

A. Detection of Brain Tumor
The proposed model is capable to detect the brain tumor through morphological operations on input MRI images. To pave the way for morphological operation on MRI image, the image was first filtered using Anisotropic Diffusion Filter [9] which reduces the contrast between adjacent pixels of the working image. Then, using a threshold pixel value the whole image is converted into a greyscale one programmatically. This initial filter is quite efficient in detecting the exact position of the tumor, if present. On this semi-processed image next morphological operations are applied and information of solidity and probable tumor locations are obtained. A minimum value of both the above mentioned criteria is hence determined from a statistical average of different MRI images which contain tumors. Thus a final detection result is obtained and produced further.

Anisotropic Diffusion Filter [9]
Anisotropic diffusion filter, proposed by Persona and Malik, is a strategy for expelling noise from input pictures. This strategy is utilized for smoothing the picture by saving required edges and structures. The essential thought is simply to modify the smoothing level in a region based on the edge structure in the area. Homogenous portions are highly smoothed and solid edge areas are scarcely smoothed (to save the structure).

Morphological Operations [10]
An image is a set of pixels and morphological operations are done on those image pixels. Binary morphology utilizes just set membership and doesn't manage the parameters, for example, grey level or colour value of a pixel. This process is dependent on the ordering of pixels of the image and on several occasion is applied to binary or gray scale images. Binary images can be changed to the client's particulars by introducing processes like erosion, dilation, opening and closing. As a matter of fact binary pictures or highly contrasting pictures can have just two kinds of pixel shading esteems. Numerically, those two shading esteems are regularly 0 for black, and either 1 or 255 for white. This kind of binary images are obtained after processing a gray scale or may be color images in order to isolate the required object in the image from the background. The color of the object (usually white) denotes the foreground color and the rest (usually black) refers to the background color.

Confirmation of tumor based on Morphological Operator
When the image is converted into a binary formatted one, various morphological operations are then applied on top of the image. The objective of the morphological operators is to separate out the tumor part of the image from the image itself. The part of the tumor in the image is clearly visible as white colour, which is used to denote the affected tumor zone in the image. It has the utmost intensity among all color values used in different parts of the image. The process of classification of brain tumor starts with feature extraction of the image. Several feature extraction algorithms exist but Wavelet Transform Decomposition technique is used for this purpose. Finally Support Vector Machine (SVM) is applied to classify the tumor whether that is benign or malignant in nature.

Feature extraction using DWT
So far we are done with the pre-processing stage of the MRI input image, and now the pre-processed image will undergo a discrete wavelet transform decomposition technique. Now the important features are extracted from the decomposed image. Then the extracted features are combined and normalized. The Discrete Fourier Transform (DFT) is a mathematical transform operation [11] which is used to convert digital signal from the spatial or temporal domain to the frequency domain. Then the frequency domain signal is expressed as a set of coefficients which is a factor of known sinusoidal components. The Discrete Wavelet Transformation (DWT) is quite similar to the DFT. Both DFT and DWT express the original signal as a combination of simpler signal called basic function. DCT and DFT use sinusoidal waves as basic functions whereas Wavelet Transform use small waves of varying frequency and of limited extent as basis function. This is known as wavelets. DWT can analyze the signal at different resolution. It deals with an approximated coefficient and detail coefficient [12,13]. This resembles passing the signal through several bandpass filters. Successive low-pass and high-pass filtering of the signal and down sampling the signal after each filters is being done. DWT can be executed in multiple levels. The data matrix used in each level is the approximation matrix generated in the previous level. In 2D wavelet decomposition, the wavelet transforms can be applied again on the low pass -low pass (LL) version of the image, yielding seven sub images. Hence N level decomposition in 2D cases resulting in 3N+1 different frequency bands namely, LL, LH, HL and HH. Classification using Support Vector Machine Support vector machines are a supervised machine learning algorithm which is used for analyzing high-dimensional data. SVM were first proposed by Vapnik. It has the capacity of learning non-linear appropriation of the genuine information without utilizing any earlier information [14]. As indicated by Statistical Learning Theory, the arrangement of the ideal order level with most prominent characterization edge can deliver an ideal productivity of SVM [15]. One-class SVM sets up a classifier just from an accumulation of marked positive formats called "positive training tests" [16]. Assuming that the client has the sequent training set X = {xi, where i=1, 2, 3... ℓ} and ℓ⊆ N is the amount of discernment. Assume that training information is mapped into feature space F, i.e.
If there is a function ƒ which takes the amount +1 for tumor and −1 for non-tumor, after that in F, the data can be divided from the source with the maximal margin. So just the tumor information is deemed and the object function is detailed as: (2) W = the typical vector of hyperplane which depict the decision limit.
b= depicts the threshold of functionƒ. ηі= the slack variable which is condemned in the target function. ν = regularization term, a client characterized parameter which controls the trade off and demonstrates the fraction of samples that ought to be acknowledged by the depiction. Appropriate W and b are to be found to limit (2). Here for every one of the disparity compels in eq. (2), the positive Lagrange coefficients, αі and βі (for i=1, 2, 3,..,.ℓ), was presented. This gives the accompanying Lagrange frame ) ) ( . (   1  2   1  ) , , , , ( Replacing (4) (8) demonstrates a notable quadratic frame and its minimization can be understood by utilizing the notable quadratic programming (QP) improvement technique. The ideal amount α relates to the base of the target function. Those question with weight αi >0 is required in the last articulation of the informational index. They are ordinarily called support vectors in machine learning research. The ideal measure of b can be figured by equation (9).
Where x i The tumor part can be classified, when the optimal values of the parameters are obtained, according to the following decision function = any one of the support vectors.
The data comparing to ƒ(x)≥0 are resolved as tumor data applicants. If not, they are viewed as non-tumor zones. The learning capacity of one-class SVM exudes from the "kernel trick" [17]. This trick is performed by different choice of k(x,y) introduced in (7). Notice that in the definition of oneclass SVM, the mapping φ is just relegated verifiably by part k(x,y). An adequate bit ought to be depicted, i.e., an appropriate bit can delineate target information into a limited circularly formed territory in the element space and blueprint the items outside the information limit. With the "kernel trick", one-class SVM can manage nonlinear multimode data dispersion [17].

EXPERIMENTAL RESULT
The experiments were carried out on the platform of AMD A8 with 2 GHz processor and 8 GB RAM, running under Windows 8.1 operating system. The algorithm was in-house developed via the wavelet toolbox, of Matlab 2017b. We downloaded the open SVM toolbox and applied it to the MR brain images classification. The programs can be run or tested on any computer platforms where Matlab is available. Our experiment was carried out in two noteworthy parts, first dealing with the detection of brain tumor, that if present proceeds to the second part which is, finding the type of tumor present, i.e., Malignant or Benign. Fig 2 and Fig 3 shows the first part that is the detection of tumor in the brain MRI scan, whether tumor is present or not present. Fig 3.a is the input MRI scan, then filtering is done using anisotropic filter which is shown in

CONCLUSION
In this paper, an optimal way for the detection of tumor from brain MRI scan has been devised which on successful detection classifies the type: benign or malignant. The entire procedure consists of four stages namely: anisotropic filtering, morphological operations, feature extraction and classification. The proposed model is capable of detecting tumor by conducting morphological operations on input MRI images by employing the image filtering scheme using Anisotropic Diffusion Filter. Wavelet Transform Decomposition technique is used for feature extraction purpose. Finally Support Vector Machine (SVM) is applied to classify the tumor whether that is benign or malignant in nature. From the conducted experiments it can be concluded that for detection of malignant tumor the accuracy rate is 99.02% whereas for benign tumor it is 99.67% accurate which is significantly higher than the existent face detection algorithms pertaining to this domain.