Brain Tumor Detection by Using Convolution Neural Network

ayesha.samreen0504@gmail.com Abstract —Nowadays, Biomedical technology plays a vital role in diagnosis and treatment of small to dangerous life-threatening diseases and one of the most life-threatening disease is Brain Tumor, which is the mass growth of abnormal cells in brain. Early detection and treatment of it can save the human life by pre-venting the further growth of abnormal cells. Detection of it can be done by ana-lysing the Magnetic Resonance Imaging (MRI) Scans. Accurate analysis of MRI Scans needs to be done to detect the brain tumor and it can be achieved by using the algorithms of artificial neural networks, although human can detect manually but possibility to human errors is more and is time consuming. This paper pro-poses an effective algorithm model to predict brain tumor probability by using convolution neural networks. The algorithm includes image pre-processing in which noise is reduced using Gaussian filter and morphological operations. After that, images are normalized to scale fit. Batch normalization is added to the network to speed up the training. BRATS and Kaggle image dataset are used to train and evaluate the model to get maximised accuracy. Confusion matrix is used to evaluate the performance of the maximised


Introduction
The Brain tumor is a collection of abnormal cells grows in the brain which is a dangerous disease that impacts human life. It affects person stability and mental health. Different types of brain tumors affect in different ways, in which some can be dangerous to life. In the study, it is observed that the incidence of brain tumors in the last 20 years is increasing in all ages; however, it has grown more than 40 percent in an adult person. Global findings indicate a wide variation in the incidence of tumors of the nervous system that the standardization of age in different countries is between 0.01 and 12.7 in males and 0.01 and 10.7 in women, per 100,000 people. The lowest incidence is in Africa while its highest level is in northern Europe. As a consequence, the difference in the diagnosis of the disease and the registration and reporting system in different countries can be due to these disparities [1].
The diagnosis of a brain tumor is first suggested after conventional MRI. MRI of brain tumors is undoubtedly the standard technique for the diagnosis, pre-surgical planning, and post-therapeutic monitoring of brain and spinal tumors. MRI techniques that are now routinely available include thin (<2 mm) slices to provide high-resolution images, fast spin-echo sequences to reduce imaging time [2]. Different types of brain tumors affect in different ways, in which some can be dangerous to life if not diagnosed in the initial level of stages. Hence, it is important to detect the brain tumor early to extend the life span of a person. Quality of life is an important area of clinical neurooncology that is increasingly relevant as survivorship increases and as patients experience potential morbidities associated with new therapies and advanced technologies [3]. Advanced technologies like deep learning can be used in detecting the brain tumor in MRI thereby chances of reduction in the analyzing cost that can be afforded by all people and analyzing time reduction.
Deep learning is a part of machine learning which uses Artificial Neural Network (ANN) to learn in-depth analysis. One of the best ANN is the Convolution Neural Network (CNN), which operates by the process of convolution-pointwise multiplication (dot product) of small matrices of weights across the entire image to create corresponding neuronal maps [4]. TensorFlow and Keras are the powerful libraries in python which contains basic deep learning inbuilt functions. These are helpful in implementing the algorithms useful in the medical field.
In this paper, an algorithm prototype is designed which is useful in detecting the brain tumor likelihood by analyzing MRI images. BRATS and Kaggle are the sources of brain tumor MRI datasets used while doing the experiment. The algorithm involves some of the image processing techniques and CNN. The architecture of the algorithm is explained in the paper.
Section 2 says about the related work carried out in order to study and do the experiment. Section 3 talks about the methodology involved in the algorithm and Section 4 explains the experimental setup which was carried out. Section 5 shows the observed results and discussions on it. Conclusion and future scope is mentioned in section 6.

Related Work
Hussar Elnoor Mohammed Abdalla, M. Y. Esmail proposed a paper [5] on an automatic algorithm for the detection of brain tumor using Artificial Neural Network (ANN). The software used to detect brain tumor is Matlab. The proposed study consists of the following stages-the first stage is pre-processing and post-processing of MRI images to enhancement it and make it more suitable to analysis then used threshold to segment the MRI images by applied mean gray level method. In the second stage, the statistical feature analysis is used to extract features from images; the features computed from equations of Haralick's features based on the spatial gray level dependency matrix (SGLD) of images. Then select the suitable and best features to detect the tumor localization. In the third stage, the artificial neural networks are designed which uses the feed-forward back propagation neural network with supervised learning to classify the images under investigation into tumor or none tumor. The network performance was evaluated successfully, tested, and achieved the best results. Wang Mengqiao, YangJie, Chen Yilei, WangHao [6] proposed a paper an automatic brain tumor segmentation algorithm based on 22-layers deep, 3D Convolutional Neural Network (CNN) for the challenging problem of gliomas segmentation is proposed. The use of several cascaded convolution layers with small kernels allows building a deeper CNN. During training, dropout is added to reduce overfitting and adapt the batch normalization technique to speed up training. And through the experiments and results, it is proved that the method is time-saving and efficient. "Brain Tumor Segmentation using Cascaded Deep Convolutional Neural Network" proposed by Saddam Hussain, Syed Muhammad Anwar, Muhammad Majid [7]. In this paper, an automated segmentation algorithm for brain tumor using deep convolutional neural networks (DCNN) is proposed. Deep networks tend to have a lot of parameters thus overfitting is almost always an issue especially when data are sparse. Max-out and drop-out layers are used to reduce the chances of over-fitting since data are scant. The Patch-based training method is used for the model. The proposed algorithm includes preprocessing in which images are normalized and bias field corrected, and post-processing where small false positives are removed using morphological operators. BRATS 2013 dataset is used for evaluation of the proposed method, where it outperforms state-of-the-art methods with similar settings in key performance indicators. Ardhendu Bandhu proposed a paper "Classifying multi-category images using Deep Learning: A Convolutional Neural Network Model" [8]. It represents an image classification model using a convolutional neural network with Tensor Flow. Tensor Flow is a popular open-source library for machine learning and deep neural networks. A multicategory image dataset has been considered for the classification. The algorithm used is a Deep neural network -CNN classifier which has a large number of hidden layers and can derive meaningful information from images is used in the system. The authors trained the proposed classifier to calculate the decision boundary of the image dataset. Since the data in the real world is mostly in the form of unlabeled and unstructured format. The unstructured data may be image, sound, and text data.

Methodology
The methodology proposed, can be seen in fig.1. uses MRI brain tumor images dataset, obtained from BRATS and Kaggle, as the input. These images are then passed on for preprocessing to get the desired free noise images. The CNN model is used to learn the images and get the desired outputs. The design involved in data preprocessing and CNN explained in detail below. http://www.i-joe.org

Convolution neural network model
Convolution neural network (CNN) model is made up of different layers described as follows-1. Convolution layer: Two-dimensional convolution operations are performed on the images by employing the kernel matrix thereby giving a convoluted feature matrix as result. 2. Activation layer: Rectified linear unit (ReLU) is used as an activation function in the nodes. The negative components are made zero in the matrix to avoid summing up values to zero. 3. Maxpooling layer: Multiple times Maxpooling function can be used to reduce the convoluted feature matrix thereby improving the computation power. 4. Fully connected layer: In this layer two functions are performed. Firstly, flatten is used to convert a 2D matrix to a 1D array. It reduces the dimension and computation complexity. Secondly, the Dense function is used which takes the numerous inputs to give one output. 5. Batch Normalization layer: It is used to improve the speed, stability, and performance of the model. It reduces the generalized error.
The fig.3. gives the architecture followed in the CNN model. The model uses a number of Convolution, ReLU, and Maxpooling layers based on optimized training. Experimental Setup

Dataset
BRATS and Kaggle is the source of the MRI brain tumor images. The Kaggle dataset has 86 positive samples and 85 negative samples of images. The BRATS2018 dataset contains the data in nii.gz form which is then converted into a 2D image file format. Since the 2D image will require less computational power and is suitable for the experiment. Both datasets are added up and given to the data augmentation algorithm to get the number of positive and negative samples images, as the training images increases the overfitting can be reduced. The data images are different from each other in shape, size, and location of brain tumor in the brain and brain as well, which helps in the model stability acquirement if used in a real-time environment.

Implementation details
The algorithm is written in python by using various powerful deep learning libraries and frameworks like keras and TensorFlow respectively. It also uses numpy, sklearn etc libraries. The deep learning libraries are used to implement mainly neural networks. The algorithm is implemented in jupyter notebook and the system has 32GB RAM and uses CPU for execution. The data is preprocessed and the total images are split into 70 percent training, 15 percent validation and remaining 15 percent as testing images. The training and validation images are given to the model for training. In training the model, Adam optimizer is used which is an algorithm used in training the neural network models. It adapts the learning rate to obtain optimization in the result. The epochs are increased until better validation accuracy with precision is reached. To reduce the overfitting images are increased. The training is speeded up by batch normalization in the neural network. After the training, testing and prediction are done to get the F1 score and precision. Fig.4. is a flowchart to describe the implementation process.

Evaluation parameters
Confusion matrix is a table that visualizes the performance of an algorithm. It is also known as an error matrix. Confusion matrix parameters are considered as evaluation parameters to evaluate the experiment results. There are four cases in confusion matrix True positive (TP), False Positive (FP), True Negative (TN), False Negative (FN) as seen in Table.1.
TP and TN are the cases in which both prediction and actual values are positive and negative respectively. FP is a case in which prediction made is positive but the actual value is negative and FN is a case of negative prediction and actual positive. Based on these four parameters precision, accuracy, sensitivity, or Recall, F1-score are calculated.
F1 score is high if there is a balance between precision and recall.

Results and Discussion
The experiment was performed in jupyter notebook on BRATS and Kaggle dataset. These datasets images are augmented and 2065 images are regenerated. In 2065 of total images there are 1085 positive brain tumor case images and 980 negative brain tumor case images. The entire images are randomly divided into training, validation, and testing in 70:15:15 ratios. Both cases images are there in training, validation, and testing images. Training of the model is done on training and validation images. Both training and validation accuracy and loss are obtained and are plotted on the two different graphs versus the number of training epochs. Fig.5. shows the accuracy and loss graphs. For starting 10 epochs it is observed that training loss is high and the training accuracy is less. After 10 to 20 epochs the training loss and training accuracy is recorded as approximately 0 and 1 respectively. Since real-time ground performance is always different compared to training. The validation accuracy and loss are varied without attaining stability. The validation accuracy is observed to be 0.92 to 0.94 and validation loss varied from 0.5 to 0.6. The model is saved after training and is given some unlabeled images for prediction. The prediction is shown in the form of the probability of an uncertain event. If any probability occurs then the ground truth is considered ad brain tumor present. If the probability is very less than the ground truth is considered as brain tumor not present as shown in fig.6.

Conclusion Future Scope
A Deep Learning model is developed to predict the probability of brain tumor likelihood. The model is made by using a convolution neural network (CNN) and image preprocessing techniques. Image preprocessing is done to reduce the false positives or noise in the image and fitting all images to one scale avoiding high bias by model. Ground Truth Labelling of the images is introduced in order to train the model. An effective algorithm is developed successfully by incorporating some hidden convolution layers in the CNN. Better validation accuracy is obtained while training the model by varying epochs and also either by adding or removing layers of CNN. The best weights of the model are saved while training the model by observing the validation and training accuracy. The saved model is tested by using test images and an accuracy 95. 5% is observed. The model has various advantages of decreasing the cost if adopted by the hospitals in the future. The other benefits are time reduction in analyzing, early diagnosis, and better accuracy. Further, this work can be extended by improving the accuracy, converting it into GUI Support, and using it in the Hospitals for a better life.

Authors
Ayesha Samreen is a student of electronics and communication engineering department at Chaitanya Bharathi Institute of Technology. Her research focus is in creating applications using artificial intelligence for society. She is an Executive member of IEEE CBIT student chapter. She often works as an executive student board member for institutional Technical fests at national level and attend various international level events and conferences.
Amtul Mohimin Taha is an undergraduate student of electronics and communication engineering department at Chaitanya Bharathi Institute of Technology. Her interest is in working on artificial intelligence projects. She has good management skills and also worked as a member of placement executive team, organized evens and coordinated on her own. Yasa Vishwanath Reddy is an undergraduate student of electronics and communication engineering department at Chaitanya Bharathi Institute of Technology. He works on various projects on emerging technologies. He has good team building skills and management skill and worked as a member of placement team. P.Sathish is an Assistant Professor of the Electronics and communication engineering department at Chaitanya Bharathi Institute of Technology.