A deep learning model to detect the brain tumor based on magnetic resonance images

— Deep learning techniques have been widely used in everything from analyzing medical information to tools for making medical diagnoses. One of the most feared diseases in modern medicine is a brain tumor. MRI is a radiological method that can be used to identify brain tumors. However, manual segmentation and analysis of MRI images is time-consuming and can only be performed by a professional neuroradiologist. Therefore automatic recognition is required. This study propose a deep learning method based on a hybrid multi-layer perceptron model with Inception-v3 to predict brain tumors using MRI images. The research was conducted by building the Inception-v3 and multilayer perceptron model, and comparing it with the proposed model. The results showed that the hybrid multilayer perceptron model with Inception-v3 achieved accuracy, recall, precision, and ﬁ-score of 92%. While the Inception-v3 and multilayer perceptron models only obtained 66% and 56% accuracy, respectively. This research shows that the proposed model successfully predicts brain tumors and improves performance.


I. INTRODUCTION
Deep learning is a more robust and efficient than machine learning in many disciplines, especially medical image segmentation [1], [2]. Deep learning has been used in the medical industry to uncover new information and methods for detecting tumors and malignancies, including cervical cancer [3], breast cancer [4], liver tumors [5], lung tumors [6], and brain tumors [7]. One of the most dreaded illnesses in modern medicine is a brain tumor. Brain tumors are fibrous tissues that develop uncontrolled from abnormal brain tissue growth [8]. In the United States, an estimated 25,050 persons, including 10,880 women and 14,170 men, have been diagnosed with brain tumors according to a 2022 study by the American Society of Clinical Oncology (ASCO) [9].
Magnetic Resonance Imaging (MRI) is a radiological examination that produces a large amount and contrast of tissue in every imaging modality and has been widely used to identify tumors in the brain [1], [10]. However, manual segmentation and analysis of structural MRI images of brain tumors is a complex and time-consuming task that, so far, only professional neuroradiologists have been able to complete [11]. In addition, several factors increase the difficulty in identifying brain tumors, including the brain's anatomy, the medical team's skills, and tumor shape and size. A deep learning-based method of evaluating brain MRI images is one method for automatically spotting brain cancers.
Several previous studies have detected brain tumors using MRI images. The study [12] uses a convolutional neural network model to detect brain tumors. The proposed model consists of a convolutional network with 50 fully connected nodes using the activation functions of Relu, Sigmoid, and SoftMax. The results show that the constructed model achieved 75.42% accuracy. Gowda  learning model to detect the brain tumor based on magnetic resonance images classify brain tumors using MRI images. The results showed that the proposedmodel achieved 90% accuracy and accuracy using transfer learning [13].
In the next study, the VGG16 model was proposed to classify brain tumors using MRI images into two categories: no tumor and existing tumor. The research showed that the proposed model obtains an accuracy of 90% [14]. Further research has proposed a transfer learning strategy. Feature extraction in this study was carried out with the help of the pre-trained deep CNN models, Inception-v3, MobileNetV2, and VGG19. The results showed that the model trained with MobileNetV2 had an accuracy of 92%, Inception-v3 had an accuracy of 91%, and the model trained with VGG19 only obtained an accuracy of 88% [15].
In his previous research, [16] conducted a study to detect breast cancer by proposing a CNN-based deep learning model. The research process was carried out by training previous CNN architecture and comparing them with the proposed model. The results showed that the proposed CNN model obtained an accuracy of 83%. Furthermore, [17] study researched to detect of cervical cancer by offering a deep learning model based on CNN and RNN. The results showed that the model obtained an accuracy of 89%.
Based on several previous studies, it was found that there were still some gaps, namely: the model in the previous research still obtained low accuracy and had the opportunity to be improved. Then some studies detect brain tumors using only two types of output. Therefore, the information is based on several gaps in previous research, and this research will propose a deep learning model based on the Hybrid Multi-layer Perceptron model with Inception-v3 to detect brain tumors using MRI images. Some of the contributions of this research are: 1) Build a deep learning model to detect brain tumors using MRI images 2) Proposing a Hybrid multi layer perceptron with Inception-v3 model. 3) Improve performance matrices such as precision, accuracy, recall, and F 1-score models to detect brain tumors.
This paper is organized as a general guide: the techniques employed are detailed in section II. Then, the study's results are explained in section III, the research's findings are discussed in section IV, and finally, section V contains conclusions from the research.

II. RESEARCH METHOD
The procedure performed in this study illustrates in Fig. 1. The methods used in this study begin with dataset collection, image pre-processing, and building a detection model, model training, and model testing, followed by model evaluation. The brain tumor detection model built will use hybrid Inception-v3 and multi-layer perceptron by applying the back propagation algorithm.

A. Dataset
The dataset used in this study is a public dataset containing 3160 brain MRI images. This dataset has obtained from the kaggle repository [18]. The dataset is divided into 4 classes consisting of 937 meningioma tumor images, 926 glioma tumor images, 901 pituitary tumor images, and 396 non-tumor images. Fig. 2 shows a frequency histogram of species on the dataset used, and Fig. 3 shows a sample image of the dataset we used.

B. Image Pre-processing
Image pre-processing is one of the steps to process the data set so that machine training can work properly.   This step then converts the original data in the form of an image into data of an array. We also change the image size from the actual size to 64 x 64 pixels at this stage. Fig. 4 shows a sample image that has been resized.

C. Inception-v3
The Inception-v3 model is a CNN architecture first proposed by [19]. Inception-v3 is a deep convolution network model developed by Google to meet ImageNet's Large Visual Recognition Challenge. This model has been used in several biomedical applications and has achieved good classification [20], [21]. This model is a rethink of the Inception-v1 and Inception-v2 architectures in computer vision.
The Inception-v3 model combines several different convolution filters into a new filter, reducing computational complexity and the number of parameters to be trained [21]. The network structure in the Inception-v3 architecture consists of several convolution layers, several types of pooling layers, concatenation layers, SoftMax layers, dropout layers, and fully connected layers [22]. Fig. 5 shows an illustration of the basic architecture of Inception-v3.

1) Convolutional Layer
The convolution layer aims to extract various input features through the convolution kernel and reduce the number of parameters. Convolution layers are usually designed with 3x3 and 1x1 convolution kernel sizes in 1-step increment. After the convolution operation, the image with the offset value will be merged into the feature graph [23]. Eq. (1) represents the conversion process:

2) Pooling Layer
A pooling layer is included primarily for downsampling feature maps by combining features from the local area. Pooling helps CNN to reduce computational costs and explore invariant characteristics. In addition, the pooling layer can prevent over fitting and speed up calculations. The process represents in (2).

3) Classifier Layers
Its function is to output specific neurons and categories of items from 0 to 1, thereby realizing the multiple classification processes and a probability distribution. The classification layer uses the softmax classifier as the output layer, calculated using (3).

4) Fully Connected Layer
This network is generally used to flatten the matrix into a vector that will enter-into a fully connected neural network type. The fully connected layer's mathematical operation is expressed in (4).

D. Multi-layer Perceptron
Multi-layer perceptron (MLP) is a deep learning model consisting of one input layer, several hidden layers, and one output layer [24]. MLP is used to learn linear and non-linear models. An MLP network includes a back propagation algorithm and an iterative procedure for adjusting weights and threshold values to increase the model's accuracy. The Hidden layers in MLP models help learn more complex features [25]. Fig. 6 shows an illustration of an architecture multi-layer perceptron.
There are two main problems in developing a multilayer perceptron network: architectural optimization and training [26]. In addition to the number of layers, the MLP model development will use several activation functions that aim to activate or deactivate neurons [27]. The activation function is calculated by (5).

E. Evaluation Matrix
Model evaluation metrics are used to evaluate the accuracy and performance of the built model. There are various metrics for evaluating the model. This study evaluates the proposed model using a classification metric consisting of a confusion matrix, accuracy, recall (sensitivity), and F 1-score. The confusion matrix contains the predictions from the test phase and is used to describe the model's performance. Table 1 shows an example of a multi-class confusion matrix.
Accuracy is how well the prediction results match the valid values, including positive and negative, with global data. Accuracy determination analyzes the difference between the predicted result and the correct value. Accuracy can be calculated using (6).
If the dataset used has class imbalances, the accuracy is unreliable, so necessary evaluate the precision performance. Precision can be defined as the ratio of true positive data compared to the number of positive predicted data. The formula for calculating the accuracy is shown in (7).
A recall is the ratio of correct optimistic predictions compared to the number of valid positive data. The formula for calculating precision is shown in (8).
F 1-score combines precision and recall, so the F 1score can be considered the harmonic mean of recall and precision. F 1-score can be calculated using (9).

III. RESULT
This study proposes a deep learning model based on hybrid multi-layer perceptron Inception-v3 for brain tumor detection. The dataset used consisted of 3160 MRI images divided into four classes: meningioma tumor, glioma tumor, pituitary tumor, and non-tumor. Before building the model, we do image pre-processing to resize the image to 64x64 pixels and convert the data in the image form into an array for the system to process. After image pre-processing, we split the dataset and compared the 80% training with the 20% test.
Tests were carried out in three experiments to determine the performance generated by the model. in the first experiment. We conducted a test to evaluate the performance of the Inception-v3 model using epoch 100. while in the second experiment, we used a Multi-layer perceptron model with an epoch value of 100. Table  2 compares the evaluation results of the Inception and Multi-layer Perceptron models. We tested our proposed model in the third test experiment, a hybrid multi-layer perceptron with Inception-v3 using an epoch value of 100. The models were trained using training data and test data. During the training process, we also implemented the ReduceLROnPlateau function, which aims to reduce the learning speed when the metric stops are increasing. Table 3 shows the results details of the evaluation of the proposed model, and Fig. 7 shows a graph of the results of our proposed model training.
This study also evaluates the proposed model using the confusion matrix. The results of the confusion   IV. DISCUSSION Table 2 shows that the model built using Inception-v3 obtained an accuracy value of 66% with recall, precision, and F 1-score respectively 67%, 68%, and 68%. While the model built using a multi-layer perceptron only obtained accuracy, recall, precision, and F 1-score values of 56%, 60%, 57%, and 55%, respectively. While the hybrid Multi-layer perceptron model with Inception-v3, as presented in Table 3, shows that the proposed model obtained the highest accuracy value of 92%, with recall, precision, and F 1-score values of 92%. The accuracy obtained is also higher when compared to the model proposed in previous studies. This value indicates that the proposed model has succeeded in increasing performance. Based on information on the confusion matrix, it shows that the proposed model can predict brain tumors using MRI images. This study offers a wealth of research options to investigate additional strategies for raising detection accuracy.

V. CONCLUSION
This study proposes a model for detecting brain tumors on MRI images using the Inception-v3 hybrid model with a multi-layer perceptron. Based on the tests and evaluations on the model, the following conclusions were drawn as the built model succeeded in predicting brain tumors using MRI images. The proposed model achieves the highest accuracy of 92%, with recall, precision, and F 1-score values of 92% compared to the Inception-v3 and multi-layer perceptron models, which only get 66% and 56% accuracy, respectively. The accuracy obtained is also higher when compared to several previous studies. This model shows that the model has succeeded in improving performance. However, this study still has limitations where the model is only trained using images. Therefore, future research can make predictions using other data and improve performance with other models.