Brain Tumors Detection from Magnetic
Resonance Image (MRI) Segmentation
Using Deep Learning Approach
Shalini V. Wankhade, Dr. M. K. Kodmelwar Kishor Pathak
Asst. Professor Vishwakarma Institute of Asst. Professor Vishwakarma Institute of Asst. Professor Vishwakarma Institute of
Information Technology Information Technology Information Technology
a brain tumor is an abnormal growth of cells in the
Abstract- Brain tumors are major contributing factor for brain and it is One of the main reasons for the rise in
mortality and morbidity in the world. The diagnosis of brain mortality among people. These tumors can be either
tumors is a challenging task, requiring specialized expertise malignant (cancerous) or benign (non-cancerous).
and advanced imaging techniques. This paper describes the Tumors can form and stay in one place, or they can
proposed approach for the segmentation of Magnetic invade and expand into nearby tissues.[20] Most of
Resonance Image (MRI) scans of the brain and the the brain tumors are primary tumors which means
detection of brain tumors. In general, tumors have a higher they are created within the brain and do not spread
water content and more hydrogen atoms than healthy tissue, from other regions. Gliomas, Meningiomas, Pituitary
this creates noticeable variations in MRI image intensity adenomas, Medulloblastomas, and Schwannomas are
between tumor regions and normal tissue. In this the most occurring types of brain tumors among
methodology, Convolutional Neural Network (CNN) was patients. Although the exact causes of brain tumours
used as main deep learning algorithm to analyze the brain's are unknown, various risk factors have been found,
MRI scans. To establish the best method for brain tumour including radiation exposure, some genetic
detection and classification, the effectiveness of various abnormalities, and a compromised immune system.
deep learning models was examined..The developed system According to their location and size, brain tumour
provides a user-friendly interface for the visualization and
symptoms might vary, but they can include
interpretation of brain MRI scans. Deep learning can help
headaches, seizures, altered vision or hearing, limb
numbness or weakness, and trouble speaking or
provide more accurate and efficient diagnoses, improving
coordinating. A combination of imaging tests, such as
outcomes for patients affected by this debilitating condition
CT scans or MRIs, which employ radio waves and a
strong magnetic field to provide comprehensive
Keywords: Convolutional Neural Network, Brain Tumor
images of the body's internal components, is routinely
Detection, Healthcare technology, Machine Learning,
used to diagnose brain tumours.
Image Classification, Segmentation A biopsy may also be necessary to remove a small
sample of tumour tissue for testing. It's also crucial to
I. INTRODUCTION remember that brain tumours can be challenging to
identify because their symptoms can resemble those
One of the human body's most ingeniously built of other illnesses. The type, size, and location of the
organs, the brain possesses an incredible tumour, as well as the patient's general health, all
affect the treatment options for brain tumours.
Radiation therapy, chemotherapy, surgery, or a
combination of these treatments are all possible forms
quantity of cells of treatment.
A global estimate of brain and nervous system II LITERATURE SURVEY
tumour cases in 2020 was estimated by the
Sunil et al. [1] discuss the methodologies
International Agency for Research on Cancer (IARC)
and findings of 20 research papers published between
to be around 280,000. The American Brain Tumour
2000 and 2020 on the detection and segmentation of
Association estimates that 91,470 new cases of
brain tumors using MRI images. The use of CNN
primary brain tumours, including both benign and
classification techniques is found to be effective for
malignant tumours, were diagnosed in the United
accurately detecting brain tumors with a low error
States in 2022.
rate. The review suggests that future work should
The detection of brain tumors is difficult because of
focus on improving accuracy and reducing errors
the complex structure of the Brain. Most of the
using different classifier techniques. Overall, this
currently present methods to detect brain tumors are
literature survey highlights the potential of automated
semi-automatic and dependent on human perception
techniques for improving the detection and treatment
of a choice made during an MRI scan, which
of brain tumors.A brand-new technique for
increases the possibility of a mistaken diagnosis and
identifying brain tumours is put out by Gobhinath et
the identification of brain tumors, among other risks.
al. [2] and involves three steps: picture pre-
Detection is also difficult for many of the machines
processing, image segmentation, and image
because of the noise present in the MRI images. [1].
morphological function. In the suggested method,
Due to their restricted data handling capabilities, the
KSVM (kernel support vector machine) is used to
machine learning-based models and automated
categorise the tumour after acquiring the image
systems that were previously proposed are not very
features of a tumour using wavelet transform and
effective. PCA. The suggested method demonstrated a
The method discussed in this paper is fully automatic. classification accuracy of 98.17% utilising the GTB
This method uses the fundamental property of kernel on 240 human brain pictures from MRI scans,
Magnetic Resonance Images which is ‘Intensity encompassing seven general brain disorders.
Difference.’ The CNN algorithm, which is one of the According to the study's findings, the
Machine Learning classification algorithms uses this PCA+DWT+KSVM approach using the GTB kernel
property to classify MRI images. This automatic is able to accurately classify objects and extract
system has mainly 3 phases.
Mahnoor et al.'s [3] main goal is to
i) Image Pre-Processing: Noise Reduction accurately segment brain tumours from medical
from MRI images photos using deep learning algorithms. The research
ii) Image segmentation - To detect which part suggests combining 3D CNN and U-Net, two
of the brain has a tumor segmentation networks. The BRATS-19 challenge
dataset is used to train the system that is suggested in
iii) Image Post-processing: Extraction of brain this research. These networks' outputs are merged in a
Tumor method that produces more precise and better
One of the best algorithms for image segmentation is predictions for the type of tumour tissue. The
CNN, which is employed in the paper's suggested suggested ensemble outperformed cutting-edge
system. It is also strong at identifying patterns and methods in the validation set, achieving good dice
features in images without the need for manual scores. The most accurate ensemble technique was
feature extraction. The primary contribution of the identified through analysis of various ensemble
paper is the suggested system for the detection and strategies. The outcomes demonstrated that the
classification of brain tumours, which includes global suggested ensembling strategy outperformed the
threshold segmentation for tumour segmentation, simple average.
morphological operations and windowing techniques Vaishnavee et al. [4] proposed HFS-SOM
for image classification, Contrast Limited Adaptive for segmentation and PSVM for the classification of
Histogram Equalisation (CLAHE) for preprocessing brain MRI images. GLCM-PCA is employed for
of an image and a Convolutional Neural Network feature extraction and selection. The system achieves
(CNN) classification of tumors and various types. high accuracy and less error rates for normal and
This paper's structure is set up as follows: A review abnormal brain classification. The study highlights
of the literature is presented in Section II, the importance of accurate medical image processing
methodology and various algorithms and techniques for disease diagnosis, particularly brain tumor
utilised for recognition technologies, wireless detection.
networks, and standardisation are covered in Section
III.
An enhanced U-net model is put forth by Yang et al. Saroj et al. [14] present a new fractional
[5] for the automatic segmentation of MRI images of mask design for detecting benign brain tumors, which
brain tumours. The approach employs a patches- addresses the limitations of existing techniques. The
based input and adds a feature recombination layer to proposed method is tested on a numerical head
reduce training parameters and shorten training times phantom, and a comparative study is conducted with
in order to address the imbalanced data distribution popular boundary-based methods like Sobel, Prewitt,
issue. Using a five-fold cross-validation approach, the Canny, and Laplacian of Gaussian (LoG). The results
study assesses the suggested algorithm using the show that the fractional order mask is superior to
HGG dataset from the Brats 2015 training set, existing methods and is able to detect small intensity
showing significant competitiveness in comparison to variations in the image. Quantitative analysis is also
existing convolutional network models. Nevertheless, performed to evaluate the performance of the
the assessment is restricted to the HGG dataset, and proposed method, which demonstrates its
conventional data augmentation techniques are not effectiveness in detecting benign brain tumors.
employed,
Amruta et al. [15] propose a system to detect
According to Navpreet et al. [11], a self-adaptive K-
and classify brain tumors into benign and malignant.
means clustering algorithm can accurately and
The proposed methodology involves pre-processing
quickly identify brain tumours without the need for
the MR image, segmenting the tumor using
human input on the number of clusters. For size and
morphological operations, extracting tumor features
location estimation, the segmented portion is
using Discrete Wavelet Transform (DWT), and
converted into a binary picture. The grayscale version
classifying the tumor using Support Vector Machine
is then used to extract textural and color-based
(SVM) algorithm. The image is first pre-processed by
elements for growth analysis. Utilising area and
resizing and converting to grayscale, followed by
perimeter measures, the size of the final segmented
morphological operations. The DWT is used to
component is determined. The programme detects
extract features from the image, which are then used
every slice of the MRI image containing a growing
as input to the SVM classifiers to classify the tumor
brain tumour, and the graphical profiles of the
as benign or malignant.
cancer's perimeter and area are trustworthy. The
method can be applied to compute cancer growth in Acharya et al. [19] discuss the problem of
the blood oxygen domain during functional magnetic automatic segmentation of brain tumors in MRI
resonance imaging (fMRI) to study brain status.A images using deep learning models. The proposed
brain tumour detection technique utilising an artificial approach uses a CNN with small convolution kernels,
neural network (ANN) and support vector machine which has shown significant improvement in
(SVM) is proposed by Kabir et al. [12]. accuracy, specificity, and sensitivity while reducing
The algorithm includes steps like image processing time. To address these limitations, the
enhancement, segmentation, feature extraction, and authors propose a DNN model that includes
classification, and has achieved 97.7% accuracy on modifications in the segmentation and feature-
the BRATS dataset. The neural network uses a fully extraction stages. They used only 10 MRI images to
connected backpropagation model with 40 neurons in train the model and to check its performance which is
the hidden layer and a tanh activation function. The too less. Validation of the model with a larger dataset
proposed algorithm provides better accuracy than is recommended also there may be a decrease in
existing methods and can be further improved by response time & decline in the performance of the
incorporating convolutional neural networks for model when trained on a larger dataset.
larger datasets.
Hayder and associates [20] The Hidden Markov
Vidya et al. [13] discuss the use of Random Fields (HMRF) model was used in this
diagnostic imaging for medical analysis and the work. For the purpose of segmenting noisy and
detection of brain tumors. The authors propose a new homogenous regions in MR images, these models
system for brain tumor detection using a combination have been frequently advocated. The EM algorithm is
of k-means partitioning and object labeling commonly employed in this context to estimate the
algorithms for tumor area detection. The proposed parameters of pertinent probabilistic models. For the
technique involves preprocessing using a median purpose of segmenting glioma tumours, the suggested
filter and morphological operation to remove noise approach produced good results. In the diagnosis of
and the skull part of the brain. The paper provides a brain tumours, hybrid approaches combining HMRF
detailed explanation of each stage of the proposed and thresholding techniques have also demonstrated
system, including algorithms used and results encouraging outcomes
obtained.
III METHODOLOGY
The goal of this research on brain tumour
identification is to analyse medical images accurately
and effectively. The suggested method is divided into
multiple phases, which include pre-processing,
segmentation, post-processing, extraction of features,
and classification of images. The goal of the image
pre-processing step is to improve the medical
pictures' quality and get them ready for additional
analysis. The tumour region is separated from the
surrounding brain tissues using segmentation, and the
segmented region is then further refined using
morphological procedures during post-processing.
CNN windowing techniques are used for feature
extraction, allowing pertinent features
A Image pre-processing
The first step is image enhancement, which
aims to improve the quality of the medical images to
enhance the visibility of the brain tumor. We can use
a variety of image enhancement techniques to
preprocess the MRI images such as Gaussian
filtering, Contrast stretching, and Histogram
equalization.
Here are the steps involved in Image pre-processing:
1. Load the MRI image and convert it into
grayscale
2. Apply noise reduction techniques such as
median filtering to reduce noise and enhance the
image's contrast
Apply the CLAHE (Contrast Limited
Adaptive Histogram Equalization) algorithm for
enhancing the image. CLAHE is the best algorithm
for image enhancement as it adapts the contrast to Figure 1. Process flow of the system
local regions of the image, which enhances the
contrast of the brain tumor region while preserving
the contrast of the surrounding healthy tissues [12]. i) Image segmentation
Algorithm for CLAHE: The simple and widely used technique for
image segmentation is “Global Thresholding”, which
assumes that the foreground and background pixel
1. Divide the image into small regions called intensities can be separated by a threshold value. The
tiles threshold value is calculated based on the histogram
2. Apply the Histogram Equalization algorithm of the image, which represents the distribution of the
to each tile to enhance the contrast pixel intensities. The global threshold is chosen in
such a way that all the pixels with intensity values
below the threshold are assigned to the background,
and all the pixels with intensity values above the
threshold are assigned to the foreground [18].
Here are the steps involved in global threshold
segmentation:
Image classification is the process of
assigning a label or category to an image based on its
1. Firstly, Convert the input image into
features. In the case of brain tumor detection, the
grayscale.
features extracted using the CNN can be used to
2. Calculate the histogram of the grayscale classify the image as either containing a tumor or not.
image. Different algorithms and techniques such as SVM,
Random Forests, and KNN classifiers can be used for
3. Calculate the cumulative distribution
image classification. The brain tumor detection
function (CDF) of the histogram.
system performance can depend heavily on the choice
4. Normalize the CDF values between 0 and 1. of these techniques and their specific parameters.
Therefore, it is important to carefully evaluate and
5. Choose a threshold value based on a desired compare different methods in order to determine the
criterion such as maximizing best approach for your specific application. CNNs
inter-class variance or minimizing intra-class have been widely used in image classification process
variance. possessing the property to learn complex features
from the images. CNNs can be trained on large
6. Threshold the image by setting the intensity datasets and can achieve high accuracy in image
values below the threshold to 0 (background) classification tasks.
and the intensity values above the threshold to
1 (foreground).
● Convolutional Neural Network(CNN)
ii) Feature Extraction One kind of deep learning technique that is
frequently used for image processing tasks including
image identification, segmentation, and classification
Finding and extracting pertinent characteristics from is the convolutional neural network (CNN) which is
a picture that can be utilised for additional analysis having many layers of networked nodes that
and classification is a crucial stage in the process of convolutionally process the incoming visual data to
feature extraction. CNN can be utilised for feature extract patterns and features that may be applied to
extraction utilising the windowing technique in the classification. CNNs can be trained to analyse MRI
instance of brain tumour identification. Using this pictures and identify regions that suggest the
method, the image is divided into smaller windows or existence of a tumour in the context of detecting brain
sub-images, and each window is subjected to the tumours using magnetic resonance image
CNN in order to extract pertinent information. By segmentation. MRI scans would be fed into the CNN,
mapping the pixel values to a new range of values, which would then provide a probability map showing
windowing techniques are used to modify the image's the possibility of a tumour in each area of the image
brightness and contrast. To do this, choose a window after a number of convolutional layers. After that, the
of values for the pixels that fall within a specific tumour can be divided up and a diagnosis can be
range, then scale those values to the entire range of made.
intensity values. This aids in detecting brain tumors This can then be used to segment the tumor and make
a diagnosis. The convolutional layers of a CNN in the
Let I(x,y) be the input image, and I_w(x,y) be the context of detecting brain tumors from MRI
output image after applying windowing. Then, the segmentation involve applying a series of filters to
windowing function can be defined as: the input MRI image to extract relevant features.
These filters or kernels are typically small in size
(e.g., 3x3 or 5x5) and are slid over the image to
I_w(x,y) = (I(x,y) - L) * (H - L) / (H - L) compute the dot product between the filter weights
and the image pixels in a local region. This process is
repeated multiple times to create a feature map that
where L is the lower limit of the window, and H is the highlights important patterns and structures in the
upper limit of the window. This function scales the image. The feature maps are then processed through
pixel values within the window to the full range of additional layers, such as pooling layers or more
intensity values. convolutional layers, to further downsample or
extract higher-level features. Finally, the output of the
CNN is fed into a fully connected layer or softmax
ii) Image classification layer to generate the final prediction.
In the specific case of detecting brain tumors, the
convolutional layers of the CNN would learn to
The dataset contains almost 3000 MRI scans out of
identify features such as changes in tissue texture,
which 1500 scans are Tumor affected and 1500 scans
shape, or intensity that may indicate the presence of a
are of normal brain i.e., without brain tumor. The
tumor. By training on a large dataset of MRI images
dataset of MRI scans contains MRI scans collected
with and without tumors, the CNN can learn to
from various sources on internet. From the dataset
recognize these patterns and generalize to new
80% of the available data is used for training purpose
images.
of the model and 20% of remaining the data is used
It is important to note that the architecture and for testing the model.
hyperparameters of the CNN, such as the number of
Total no. of images used -> 3000
layers, filter size, and learning rate, can greatly
impact its performance on this task. Therefore, Images with Tumor [Yes] -> 1500
careful design and tuning of the network are
Images without Tumor [No] -> 1500
necessary to achieve optimal results.
80-20training-Testing is used i.e. 80% of the
data is used for model training and
20% of the data is used for testing the
model.
B Image post-processing
Proposed System:
Morphological operations are used in image
post-processing to clearly locate the tumor part in the
[Link] operations, such as erosion and
The proposed system for brain tumor
dilation, are used to remove noise and fill gaps in the
detection and classification involves a pipeline of
image. Erosion is used to reduce the size of the
image processing techniques, including Contrast
objects in the image, while dilation is used to increase
Limited Adaptive Histogram Equalization (CLAHE)
the size of the objects. These operations are applied
for image pre-processing, global threshold
using a structuring element that defines the shape and
segmentation for tumor segmentation, morphological
size of the neighborhood to be considered.[18].
operations and windowing techniques for image
classification, and a Convolutional Neural Network
(CNN) algorithm for tumor type classification.
Let A and B be two sets, where A is the image and B
Additionally, a user interface has been developed
is the structuring element. The dilation of A by B is
using [Link] and Flask, allowing users to upload
defined as:
MRI images and receive predictive output for brain
tumor detection and classification. This system aims
(A ⊕ B)(x,y) = max {A(x-i,y-j) + B(i,j)}
to provide accurate and reliable results for medical
professionals in a timely and user-friendly manner.
Similarly, the erosion of A by B is defined as:
(A ⊖ B)(x,y) = min {A(x+i,y+j) - B(i,j)}
IV RESULTS AND DISCUSSION
where (x,y) is the center of the structuring
element, and (i,j) are the coordinates of the
structuring element
C Dataset Size and Diversity:
Figure 2. User Interface after uploading and
submitting the image on the p
Figure 5. Graph of performance evaluation
Figure 3. Output Screen of the portal
(Accuracy vs. Epoch)
Existing Model Accuracy
“An Superior Achievement of Brain Tumor 96%
Detection Using
Segmentation Based on F-Transform” [17]
“Computer Aided System for Brain Tumor 97%
Detection and
Segmentation”[18]
“Early Stage Brain Tumor Detection on MRI 97.7%
Figure 6. Graph of performance evaluation Image Using a Hybrid
(Accuracy, loss, val_accuracy,
Technique”[12]
val_loss vs. Epoch)
Model Proposed in this paper 98%
Future Directions
(vast dataset of 3000 MRI images)
There are several future directions that can be
explored based on the proposed features for the
website's user interface. Future research can focus on
integrating more comprehensive information on brain
tumor types, including a wider range of precautions
and treatment options for each type. and improved Table 1. Comparison with existing model
patient outcomes for those with brain tumors. Table
shows the comparison with existing model
In terms of suggesting the best treatment center Overall, these future directions can lead to more
for brain tumor patients, future research can explore accurate diagnosis, personalized treatment options,
the use of ML algorithms to personalize accuracy and efficiency of brain tumor detection
recommendations based on individual patient needs, significantly, leading to better patient outcomes.
such as proximity to their location and treatment Continued research and collaboration between
preferences. This can also involve leveraging patient medical and machine learning will pave the way for
data to better understand the effectiveness of different further advancements in this field and ultimately
treatments and the factors that contribute to positive benefit patients as well as doctors.
outcomes. Finally, in terms of keeping patient
records, future research can focus on developing V CONCLUSION
secure and effective data management systems that
allow doctors to easily access and update patient Promising outcomes have been observed when brain
information. This can involve integrating patient data tumours are detected using magnetic resonance image
from multiple sources and leveraging analytics tools (MRI) segmentation using deep learning approaches.
to track patient progress and treatment effectiveness. The development of deep learning algorithms has
made it possible for MRI segmentation to reliably
detect and localise brain tumours, a useful tool for
diagnosis and therapy planning.
The study's findings emphasise the value of applying
deep learning-based techniques to the diagnosis of
brain tumours since they outperform conventional
techniques in terms of efficiency and accuracy. With
the capacity to handle intricate patterns and variations
in tumour shapes and sizes, convolutional neural
networks (CNNs) and other deep learning
architectures have demonstrated considerable promise
in the segmentation of brain tumours from MRI data.
But there are still issues that must be resolved in this
approach
Research and development are needed to refine and
validate these deep learning methods, and to translate
them into practical clinical tools for routine brain
tumor detection in clinical practice. In conclusion, the
integration of deep learning-based MRI segmentation
methods into clinical practice has the potential to
improve the accuracy and efficiency of brain tumor
detection significantly, leading to better patient
outcomes. Continued research and collaboration
between medical and machine learning will pave the
way for further advancements in this field and
ultimately benefit patients as well as doctors.