Brain Tumor Detection using Convolutional Neural Network

— Brain tumor is the main threat among the people. But currently, it become more advanced because of the many Machine Learning techniques. Magnetic Resonance Imaging is the greatest technique among all the image processing techniques which scans the human body and gives a clear resolution of the tumors in an improved quality image. The fundamentals of MRI are to develop images based on magnetic field and radio waves of the anatomy of the body. The major area of segmentation of images is medical image processing. Better results are provided by MRI images than CT scan, X-rays etc. Nowadays the automatic tumor detection in large spatial and structural variability. Recently Convolutional Neural Network plays an important role in medical field and computer vision. One of its application is the identification of brain tumor. Here, the pre-processing technique is used to convert normal images to grayscale values because it contains equal intensity but in MRI, RGB content is included. Then filtering is used to remove the unwanted noises using median and high pass filter for better quality of images. The deeper architecture design in CNN is performed using small kernels. Finally, the effect of using this network for segmentation of tumor from MRI images is evaluated with better results.


I. INTRODUCTION
Magnetic resonance Imaging (MRI) provides brief information about brain tumor anatomy, cellular structure and vascular supply, making it a vital tool for the effective diagnosis, treatment and monitoring of the disease.Magnetic resonance imaging (MRI) is a non-invasive medical test that helps physicians diagnose and treat medical conditions.MRI uses a powerful magnetic field, radio frequency pulses and a computer to produce detailed pictures of organs, soft tissues, bone and virtually all other internal body structures.The images can then be inspected on a computer monitor, transmitted electronically, printed or copied to a CD.MRI does not use ionizing radiation (x-rays).Detailed MRI images allow physicians to figure out various parts of the body and resolve the presence of certain diseases.Automated brain tumor detection from MRI images is one of the most demanding tasks in today's modern medical imaging research.
Automatic detection requires brain image segmentation, which is the process of separating the image into distinct regions, is one of the most vital and demanding aspect of computer aided clinical diagnostic tools.Noises present in the Brain MRI images are multiplicative noises and reductions of these noises are complex task.These makes accurate `segmentation of brain images a challenge.However, accurate segmentation of the MRI images is very vital and crucial for the exact diagnosis by computer aided clinical tools.A large variety of algorithms for segmentation of MRI images had been developed.Surgical planning, post-surgical assessment, abnormality detection, and many other medical applications require medical image segmentation.In spite of wide number of automatic and semi-automatic image segmentation techniques, they fail in most cases largely because of unknown and irregular noise, inhomogeneity, poor contrast.

II. LITERATURE SURVEY
In the paper of R. B. Dubey, he removed noises from the input of MRI image by using the Gaussian filter.Weierstrass Transform is almost similar to the Gaussian filter, which involves convolving using a Gaussian Function.The purpose of using Gaussian filter is to convert the image as a smooth image.The outlook of the image is similar to view through a translucent screen.Gaussian filter is a type of low pass filter, so by passing the filter in the high frequency regions of an image remove the noises.But it takes more time to complete the process and also more details will not be given.Bahadure et al. proposed SVM and BWT techniques image analysis for MRI-based brain tumor detection and classification.95% of accuracy is achieved by using this method, using skull stripping which eliminated all nonbrain tissues for the detection purpose.

A. INTRODUCTION TO CNN:
Fig.

Convolutional Neural Network work
Convolutional Neural Network (CNN) are a biologically-inspired variation of the multilayer perceptron's (MLPs).In CNN, neurons contribute weights but in MLPs every neuron has a separate weight vector.Applying the weights sharing method, neurons are able to achieve convolutions on the input of the data with the help of convolution filter being composed by the weights.This process is then succeeded by a pooling action which is a form of non-linear down-sampling, which decreases the spatial size of the image which decreases the volume of parameters and computation in the net.
Activation function is in between the convolution and pooling layer.The important function is ReLu layer which is a non-saturating activation function is correlated element-wise, i.e., f (x) = max (0, x) thresholding at zero.After by using these layers, the size of the image is decreased and further complex features are obtained.

C. CONVOLUTIONAL LAYER:
In neural networks, the input is in the form of vector, whereas in CNN the input is a multi-channeled image i.e. three channels.In CNN, the input image is convolved with the kernel matrix (dot product operation) or filter and the result will be scalar.The filter is moved along the input image to achieve repeated convolution thus it gives an output matrix termed as feature map.

Output size = [(W-K+2P)/ S) +1]
Where k is a filter or kernel matrix, W is a chunk of the input image.

D. ReLu Layer
The simplest non-linearity is achieved by the pursuing a linear filter by a non-linear gating function, related identically to every component (point-wise) of a feature map.This kind of function is termed as Rectified Linear Unit (ReLu layer).Yijk = max {0, Xijk}

E. POOLING LAYER:
Later the convolution layer, pooling is achieved to decrease the dimensionality.This permit to decrease the number of parameters, which both reduces the combats overfitting and training time.These layers ensample every feature map separately which decreases the width and height whereas the depth is maintained perfect.

Fig. 3Pooling layer
The dimensional of the pooling layer of an input image is 32x32x10.The result of this pooling layer will be in 16x16x10 feature map.In the output the width and height of the feature map are split into two whereas there is no change in depth because pooling layer functions separately on the depth of the input image.

F. FULLY CONNECTED LAYER:
The Fully Connected layer is a traditional Multi-Layer Perceptron that uses an activation function called SoftMax in the output layer (SVM classifiers can also be used).The term "Fully Connected" signifies that each neuron in the preceding layer is connected to each neuron on the adjacent layer.The high-level feature of the input image is obtained from the output of the convolution and pooling layers.The aim of using the Fully Connected layer is to use these features for segmenting the image into several classes based on the training dataset.The output of the fully connected layer is 1D vector of numbers whereas the output from both convolutional and pooling layers are 3D volumes.

IV RESULTS AND DISCUSSION A. BLOCK DIAGRAM EXPLANATION
The main theme of the project is to extract the tumor part in the brain image.This can be achieved by using preprocessing, CNN and post-processing.The feature map is obtained by using kernels.And the back-proportion algorithm is used to enhance the characteristics the input image.Here, the feature map helps to reduce over fitting.The detailed description of the process is explained below:

B. INPUT IMAGE
The main aim of this project is to find the brain tumor part in the brain image.This Process is done by using pre-processing, classification via CNN and post-processing.The main aim of this project is to find the brain tumor part in the brain image.This Process is done by using pre-processing, classification via CNN and post-processing.

C. PRE-PROCESSING
These pre-processing techniques consist of filtering, image detection, and image enhancement mentioned in figure .To enhance and smooth the image while processing the Convolutional neural network preprocessing is used.

D. PATCH EXTRACTION
Brain image is pixel by pixel and to find the brain tumor part in the image.There are basically two types of patch-based image models-descriptive and generative.Descriptive models focus on the extraction of the distinctive features from the given image so that they can facilitate the task of classifying the image into one of several classes.So, we can say that they are suitable for the task of classification and recognition.Generative models preserve the information in an image that is why they are more desirable for the task of compression and restoration.

E. PATCH PRE-PROCESSING
The ultimate goal of the pre-processing is to develop the data of an image which overcomes the undesired distortions or raise some relevant features of an image for further processing and analysing the task.Repetition in images is done by pre-processing.The brightness value is similar to the neighbouring pixels which is identical to one real object.The distorted pixel in an image can be replaced by average value of neighbouring pixels.

F. MEDIAN FILTER
To retain the vital image details like edges, removal of noise, median filter has been widely used in image processing.The reason back its comprehensive usage is that it preserves the edges of the image.As the name indicates, in this every entry is replaced with the median of its adjacent entries.Salt and pepper noise and poisson's noise is removed by this filter.This filter works by moving the whole signal in a pattern.The intensity of the median of the pixels in the pattern becomes the output intensity.The median is calculated by sorting the pixel values into the ascending order and replace the pixel value with the calculated middle pixel value.

G. SEGMENTATION
The process of segmentation is dividing an image into parts with identical properties such as level, grey, colour, brightness, contrast and texture the role of segmentation is to divide the regions in an image.The aim of segmentation is to extract the region of local tumor in the case of medical image segmentation.It is a difficult task because the medical images are complex and hardly have any linear feature.Several researchers have done the segmentation techniques in different ways at present from the medical image segmentation point of view.Here, the segmentation technique is achieved on the basis of grey level using convolutional neural network.

V. CONCLUSION
The main theme of this project is to study the automatic brain tumor analysis with high accuracy, performance and low complexity.Fuzzy C Means (FCM) logic is performed by conventional brain tumor based on its segmentation, shape and texture of feature extraction, Support Vector Machines (SVMs) and Deep Neural Network (DNN) based division are carried out.There is low complexity.The time required for computation is high and there will be low accuracy.To avoid the low accuracy and high computation time, the Convolutional Neural Network (CNN) is established in the scheme.The result will be classified as tumor and normal images of brain.CNN comes under the technique of deep learning, which consists of chain feed forward layers.Python language can also used for working.Database based on image net is used for classification.Pre trained models are performed so that the training is executed only for final layer.In CNN, the results are obtained in 3D volume i.e. raw pixel value with depth, width and height.High accuracy is obtained by using Gradient decent based loss function.Here the calculation is obtained by training accuracy, validation accuracy and validation loss.Here, the validation loss is very low whereas the validation accuracy is high.The training accuracy will be 97.5%.
Joseph et al. suggested the K-means clustering algorithm for segmentation of MRI brain images along with morphological filtering for the detection of tumor images.Support Vector Machine for automated brain tumor classification of MRI images was proposed by Alfonse and Salem.The author Sachdeva et al. used an Artificial Neural Net-work (ANN) and PCA-ANN for the multiclass brain tumor MRI images classification, segmentation with dataset of 428 MRI images and an accuracy of 75-90% was achieved.