Thesis Brain Tumor Detection Using Deep Learning Models
Thesis Brain Tumor Detection Using Deep Learning Models
Models
School of Computing
National College of Ireland
I hereby certify that the information contained in this (my submission) is information
pertaining to research I conducted for this project. All information other than my own
contribution will be fully referenced and listed in the relevant bibliography section at the
rear of the project.
ALL internet material must be referenced in the bibliography section. Students are
required to use the Referencing Standard specified in the report template. To use other
author’s written or electronic work is illegal (plagiarism) and may result in disciplinary
action.
Signature:
Attach a completed copy of this sheet to each project (including multiple copies). □
Attach a Moodle submission receipt of the online project submission, to □
each project (including multiple copies).
You must ensure that you retain a HARD COPY of the project, both for □
your own reference and in case a project is lost or mislaid. It is not sufficient to keep
a copy on computer.
Assignments that are submitted to the Programme Coordinator office must be placed
into the assignment box located outside the office.
Date:
Penalty Applied (if applicable):
Brain Tumor Detection using Deep Learning Models
Nehal Deepak Sawant
X19243464
Abstract
Brain tumors are made up of abnormal brain cells. Brain cancer is classified into
benign and malignant tumors. Most tumors are diagnosed using magnetic resonance
imaging (MRI). The early detection of a brain tumor is crucial, since it is a fatal
condition. This study, therefore, employs Inception V3, VGG-16, and ResNet50
models, which are deep learning and transfer learning models, respectively. In this
study, data augmentation is proposed to minimize overfitting since limited MRI
data were used in the project. The study will use hyper-parameter tuning in order
to provide field workers with a more accurate model. Critically evaluated metrics
such as accuracy, precision and recall are used.In this study, VGG16, InceptionV3
and ResNet50 gives accuracy of 75%,67% and 94%. With the ResNet50 giving
better accuracy, it can efficetively detect brain tumor hence healthcare workers can
provide better treatment.
1 Introduction
It is critical in medical image processing to detect brain tumours for MR images. In
order to increase a patient’s treatment options and likelihood of survival, brain tumours
must be detected in their early stages. Detection by hand is highly subjective, differs
from doctor to doctor, and takes a long time to complete. On the other hand, accurate
detection enables doctors to make better decisions by allowing them to replicate findings
and store records electronically, enhancing assessment and treatment planning. In the
last few decades, neural networks (NN) and support vector machines (SVM) have become
increasingly popular for brain tumour diagnosis. The application of deep learning to brain
tumour detection automation, however, has recently gained attention because of its ability
to represent complicated structures, self-learn, and rapidly process large volumes of MRI
data.
This study analyzes brain tumours using a three-step deep network technique.
1. The early stages of model creation utilize multiple pre-processing approaches, in-
cluding the augmentation of data and normalization of MRI image data, to minimize
over-fitting.
2. Transfer learning models like VGG-16, InceptionV3, and ResNet50, are utilised to
build classification models. Hyperparameter tuning is performed during the model
building process and this helps in fine tuning the base models.
3. A better model is picked based on the evaluation and comparison of the performance
measures
1
With this three-stage procedure, clinical problems can be diagnosed using an MRI quickly
and accurately.
1. Using deep learning and transfer learning, the study can identify brain tumours.
2. Doctors and healthcare experts will be able to diagnose brain tumours as soon as
possible using this approach.
2
1.2 Research Objectives
Research question of the study is defined and explained below
How accurately deep learning models using transfer learning can detect brain
tumour?
The given Table 1 states all the research objectives defined in the study and meant to solve
research question. The main objective of this study is to detect a brain tumour as early
as possible so that the health-workers can provide better treatment hence, improving
medical facilities. To achieve this objective various other objectives such as building
a strong deep learning model by identifying gap between deep learning and machine
learning is been defined.
Table 1 states all the objectives in detail with evaluation matrix.
Research Objectives Description Evaluation Metrics
First Objective The evaluation in study helps -
to recognize gaps of previous study
Second Objective Visualization and augmentation of data -
using pre-processing techniques
Third Objective Modeling and evaluating VGG16 Accuracy, precision
recall
Fourth Objective Modeling and evaluating ResNet50 Accuracy, precision
recall
Fifth Objective Modeling and evaluating InceptionV3 Accuracy, precision
recall
Sixth Objective Analyzing all the models based Accuracy, precision
on evaluation metrics recall
Table 1- Research Objective of this research
2 Related Work
2.1 Papers related to Brain tumour Detection using Machine
Learning Algorithms.
Machine learning algorithms are used to detect brain tumours in this study Sharma et al.
(2014) . Texture-based information (GLCM) is retrieved using Gray Level Cooccurrence
Matrix. In this suggested study, energy, contrast, correlation, and homogeneity are all
textural characteristics of the picture. 212 brain MR images were analyzed using the
Multi-Layer Perceptron and Nave Bayes machine learning algorithms, with the best sens-
itivity being 98.6% and 91.6 %. It is almost certainly possible to improve this accuracy
by analyzing a large set of data and extracting both intensity-based characteristics and
texture-based characteristics.
The authors, Mudgal et al. (2017) propose an efficient and precise model which requires
MRI images to be handled using a modified K-Means Clustering algorithm so that detec-
tion is reduced later on, and then using Mean Shift Detection to maximize the efficiency
of images entering the processing stage and to increase MRI contrast and intensity. Com-
paring XGBoost models with other comparable machines, as well as hybrid models that
employ these extreme models, on a large dataset presents a wealth of research opportun-
ities. Feature selection can be improved using PCA, LDA, or GA, as well as eXtreme
3
boosted machines. A number of alternatives have been presented for watershed manage-
ment, and the existing system can be improved.
In order to increase segmentation accuracy, a variety of strategies have been used in this
study Abbas et al. (2019). These included noise reduction and image enhancement. In
this data set, some of the samples had poor MR image quality, so these pictures have been
enhanced. This project now includes LIPC. Another way of reducing requirements is by
using LDA. Further, the work can be complicated and time-consuming due to the addi-
tion of underlying or textural attributes. Based on the division result, our LIPC-based
system provides more and more appropriate precision compared to other methodologies.
In this investigation, the dice score was 0.95. Future research will apply Deep Learning
models like CNN. In order to detect photos automatically, CNN is the best model.
4
ject to errors. Several deep learning algorithms are used by researchers Sangeetha et al.
(2020) to identify the tumour site automatically. Millions of photos are trained and fine-
tuned within a short time. As an additional benefit, this work provides multi-iteration
classification algorithms based on CNNs such as GoogleNet, VggNet, and ResNet 50. In
terms of speed and accuracy, ResNet 50 is demonstrated to be superior to VggNet and
GoogleNet.
In this publication Raut et al. (2020), a CNN model is proposed for detecting brain tu-
mours. The first step is to enhance brain MRI scans so that there is enough data for deep
learning. Pre-processing of the photos follows, enabling them to be processed for the next
stage. It is based on MRI brain images that have already been processed to use training
characteristics to identify newly input images as tumours or not. A back propagation
technique reduces error during training and produces more accurate results. A picture is
constructed by removing extraneous information with autoencoders and segmenting the
tumour region using K-Means, which is an unsupervised learning algorithm.
The authors of this publication Nalepa et al. (2019), examined in detail several brain tu-
mour detection strategies. In addition to this, a deep-learning technique based on CNN
has been developed to detect and classify multiple forms of brain tumours. The limited
size of the medical imaging dataset is being improved using a data augmentation strategy.
As a data augmentation strategy for medical imaging, rotating at 90 degrees was found
to be more effective. The proposed model was also assessed against AlexNet and VGG-16
models from the point of view of sensitivity, precision, specificity, f1, and accuracy using
MATLAB scripts. Alternative networks did not perform as well as the suggested model,
which achieved an accuracy of 96.05 percent.
Convolutional neural networks are presented as a method of identifying tumours in brain
scans in this paper Seetha and Raja (2018). Input brain pictures are then used to train
the CNN model, and features are extracted. A fully connected layer followed by soft-
max activation is used to categorize the pictures based on the retrieved characteristics.
Harvard Medical School’s database of MR brain images is used to evaluate the strategy.
For both classification and training, CNN models like VGG16, ResNet, and Inception
are used. The experimented database offers 100 percent accuracy. Data augmentation
is used to improve segmentation accuracy. A learning rate that prevents overfitting the
model is chosen. MR brain images will be categorized in the future based on tumour
grade, allowing for better analytics and treatment planning.
In deep learning optical representation analysis Saxena et al. (2021) , convolutional neural
networks are often used. There are currently techniques available for detecting brain can-
cers, but they require large datasets and image processing techniques. Three of the main
components of the proposed system (CNN) are image enhancement, preprocessing im-
ages, and the use of convolutional neural networks. A deep learning algorithm and a
large dataset are used to create a system. In this study, the CNN outperformed all other
state-of-the-art training techniques with an accuracy of 87.42 percent and minimum dif-
ficulty.
Expertise and understanding of doctors are crucial in treating brain tumours. As a result,
an automated system for detecting brain tumours is critical for radiologists and clinicians.
This research focuses on the use of convolutional neural networks (CNNs) for predicting
brain malignancies and accurately interpreting magnetic resonance imaging (MRI) data.
An example of a method is the use of picture pre-processing algorithms that identify
extreme shapes and trim away black borders from images. The photos are then scaled
to the appropriate size. An Adaptive Moment Estimation (Adam) Optimizer was imple-
5
mented in our network in order to speed up the training process.In order to evaluate F1
score, the researchers used MRI dataset which was developed by their entire team. on
Kaggle to train and evaluate the best model.
This research Zhang et al. (2021) uses a novel cross-modality deep feature learning ap-
proach to detect brain cancers in multi-modality MRI data. Rather than rely on small
data sets, the focus is on mining patterns across multi-modal data sets. The cross-
modality feature transitions (CMFTs) and cross-modality feature fusions (CMFFs), both
of which essentially aim at learning rich feature representations by merging and transiting
knowledge obtained from different modes of data. A cross-modality deep feature learning
framework based on cross-modality deep learning is found to improve brain tumour seg-
mentation performance compared to baseline approaches and state-of-the-art methods as
demonstrated in extensive trials on the BraTS benchmarks.
3 Methodology
Specifically, the research was aimed at the development of a device to aid doctors in
diagnosing and improving life expectancy. An automated method could potentially re-
place the time-consuming and ineffective process of physically detecting brain tumours.
In a related study, deep learning proved to be a very effective method for detecting brain
tumours. It has been found that reviewing a variety of data sources for decision-making
can increase profitability and originality. The study follows CRISP-DM methodology to
detect if there’s a tumour present or not. Figure 1
6
Figure 3: Tumor Not present
Figure 2: Tumor Present
anatomical picture structures and abundant information for diagnosing clinically suspec-
ted illnesses. Additionally, it contributes to medical and biological research. One of the
most obvious benefits of MR imaging is the high spatial resolution with cross-section pic-
tures. The study uses Brain MR images to detect tumourous or non-tumourous images.
The given dataset has two folders namely yes which represent tumourous images as shown
in first image whereas the second folder represents non tumourous images as shown in the
second image. The dataset contains a total of 253 tumourous and non tumourous images.
7
Figure 5: Data Augmentation Technique Applied
The Visual Geometry group is abbreviated as VGG. The weights and convolutions
are divided evenly into 16 layers, and the output layer is completely linked to the other
layers. In the study, VGG-16 downloads the Imagenet weights with an input picture size
of (224,224,3); therefore, the first step is to obtain the weights from Imagenet.Figure 6
Wickrama Arachchilage and Izquierdo (2020) shows the architecture of VGG16. As
implied by the name, the VGG-16 model does not require any retraining.
8
Figure 7: Model Summary of VGG16
3.3.2 InceptionV3
Figure 8 Wickrama Arachchilage and Izquierdo (2020) shows the architecture of In-
ceptionV3. The Inception-v3 convolutional neural network is based on the ImageNet
database and trained by the Google Brain Team. The system divides photos into 1000
categories depending on how many layers there are in the deep neural network. This
model is capable of learning rich representations of various photographs. Each input
image needs to be 224x224 pixels. With Inception-v3, the number of parameters is dra-
matically reduced by batch normalization, picture distortion, RMSprop, and several tiny
convolutions Sharma and Miglani (2020). The InceptionV3 model does not need to be
retrained as, as its name suggests, it has been trained on a huge data set and has been
used to classify a variety of classes. InceptionV3 will then be set to ’FALSE’ for the
output layer. Other than the output layer, all of the layers have been disabled. The final
step will be to introduce a layer of new classification to train the data set photographs.
As a result of the research, the layer will be flattened and the ’ReLu’ activation function
will be used to create a 1024-layer connected layer. A dropout layer of 0.1 is added to
eliminate overlapping. In the dense output layer is a function known as ’Softmax’ that
activates the output.
9
Figure 9: Inception Model
10
3.3.3 ResNet50
11
4 Design Specification
The design architecture specified in the study is used to complete the project. The
architecture includes a Data Layer, a Business Layer, and a Client Layer.
1. Data Layer: In this layer, different steps such as collection of data, image pro-
cessing and data augmentation techniques are implemented. Initial dataset contains
253 MRI images of brain which states whether a patient is having a brain tumour
or not. The MRI image set includes overall of 155 pictures that depicts a tumour
in a brain and rest representing tumour not present. Once the dataset is gathered,
normalization technique is performed. In normalization technique, firstly a series of
erosions and dilations are performed to remove noise present in the images. In the
next step, finding contours in the threshold image and then extreme points in MR
image is retrieved. Finally, the images are cropped according to the extreme points.
Once image is pre-processed, Data augmentation is performed to scale, rotate and
to solve overfitting problem in a dataset.
3. Output Layer: After critically evaluating results, outputs are provided to health
practitioners to provide better and effective treatment. By studying classification
reports and graphs it will be easy to detect a tumour present in a brain or not. The
underlying architecture and accompanying requirements of the implementation are
presented in this section.
12
5 Implementation
5.1 Setup
The study uses Google Collaboratory with 13.6 GB RAM, this test is performed. Be-
cause big image data necessitates additional layers, all models run slower. GPUs are
used to accelerate the processing of transfer learning models in real time. TensorFlow
and Keras are used to implement these models. Google Collaboratory Notebook uses
Python 3. The information is stored in Google Drive. Numpy and Keras are used for
image normalization, argumentation, and cropping.
13
Figure 13: WorkFlow of ResNet50
6 Evaluation
Under this section, the results various transfer learning models such as VGG16, Incep-
tionV3 and ResNet50 are evaluated. Various evaluation metrics such as confusion matrix,
accuracy, recall and model performance plots are critically evaluated. The accuracy and
loss of each process are calculated for each epoch while evaluating models. Accuracy and
loss charts are presented in this section. Based on the prediction and test results, the
test accuracy is calculated.
From Figure 14, There were different epoch values tested and epoch=5 provided the
best accuracy. This model employs a batch size of 32. The number of accurately classified
predictions is known as precision,for labels ‘yes’ which is tumour positive and ’No’ which
is tumour negative the correct classification percentages are 88% and 69%. This recall
which is actually correct classification in this case is 58%, 92% for a brain tumour and
non-tumorous images. F1 is simply the sum of recall and precision
14
6.2 InceptionV3 Evaluation
The given Figure 16 illustrates Inception Model loss throughout the epoch process.
It is seen that the training losses fluctuated throughout the epoch process and at last
went down. Whereas, model loss of validation data was stable till epoch 3 and then was
fluctuating a bit till the end.
The given Figure 17 explains accuracy of training and validation tests through the
epochs. It is seen that for validation set the accuracy was stable at 50% and there was
no changes noticed while the accuracy of training model was 58% approx. initially then
there was a pattern of up and down and at last the final accuracy was more than 60%.
15
Figure 17: InceptionV3 Model Accuracy Plot
The model losses of ResNet50 through all the epochs have been getting low in Figure 19.
For validation set, there was a significant drop of model loss from 3.5 to 2 at step 1 epoch.
The model loss of validation set was decreasing gradually through out the epoch process.
The initial accuracy of training set was approx. 68% which was fluctuating in an up-
16
Figure 19: ResNet50 Model Loss Plot
17
ward way and at final epoch stage it was more than 90% for training data in Figure 20.
Whereas, accuracy of validation set was less than 80% but showed an upward trend .
6.4 Discussion
This study aims to improve the precision and accuracy of brain tumor identification.
It shortens the processing time and increases precision by using Google Colab.Three
transfer learning models such as VGG16, InceptionV3 and ResNet50 were built to detect
a tumor present in a brain or not. In evaluation method, all the models were critically
evaluated individually and explained model performance with the help of different plots.
In this section, Figure 21 gives overview of all the models evaluated in terms of accuracy,
recall and precision. VGG16 gives a total accuracy of 75% which is higher than Incep-
tionV3 Model and also VGG16 model’s precision and recall are better than InceptionV3.
ResNet50 gives the best accuracy of 94% which is better than other two models. Also
precision that is correctly classified tumour and non-tumour images are 91% and 98%
respectively. ResNet50 correctly identifies 98% of tumour presented images and 90% of
tumour not presented images, interpreted by recall parameter of ResNet50. Hence, Res-
Net50 model can detect a tumour present in a brain or not more efficiently and accurately.
Figure 22 illustrates the accuracy level of all three models. From the Figure 22 it is
clearly seen that ResNet50 gives better accuracy whereas VGG16 produces less accuracy
as compared.
18
Figure 22: Comparison of Accuracy
tion problems, like distinguishing between Gliomas, Meningiomas, and Pituitary tumors,
or identify other brain disorders. A proposed system may also provide early detection in
other clinical domains involving medical imaging, such as lung cancer and breast cancer,
both of which are highly fatal diseases worldwide.
7.1 Acknowledgement
In the research process, I appreciate the guidance, and invaluable response I received
from Prof. Aaloka Anant and would like to thank him for his guidance.
References
Abbas, K., Khan, P. W., Ahmed, K. T. and Song, W.-C. (2019). Automatic brain tumor
detection in medical imaging using machine learning, 2019 International Conference
on Information and Communication Technology Convergence (ICTC), pp. 531–536.
Brain tumor detection in MR image using superpixels, principal component analysis and
template based K-means clustering algorithm (2021). Machine Learning with Applica-
tions 5: 100044.
Choudhury, C. L., Mahanty, C., Kumar, R. and Mishra, B. K. (2020). Brain tumor de-
tection and classification using convolutional neural network and deep neural network,
19
2020 International Conference on Computer Science, Engineering and Applications
(ICCSEA), pp. 1–4.
Grampurohit, S., Shalavadi, V., Dhotargavi, V. R., Kudari, M. and Jolad, S. (2020). Brain
tumor detection using deep learning models, 2020 IEEE India Council International
Subsections Conference (INDISCON), pp. 129–134.
Liu, J., Li, M., Wang, J., Wu, F., Liu, T. and Pan, Y. (2014). A survey of mri-based
brain tumor segmentation methods, Tsinghua science and technology 19(6): 578–595.
Mudgal, T. K., Gupta, A., Jain, S. and Gusain, K. (2017). Automated system for
brain tumour detection and classification using extreme gradient boosted decision trees,
2017 International Conference on Soft Computing and its Engineering Applications
(icSoftComp), pp. 1–6.
Nalepa, J., Marcinkiewicz, M. and Kawulok, M. (2019). Data augmentation for brain-
tumor segmentation: A review, Frontiers in Computational Neuroscience 13: 83.
Noreen, N., Palaniappan, S., Qayyum, A., Ahmad, I., Imran, M. and Shoaib, M. (2020).
A deep learning model based on concatenation approach for the diagnosis of brain
tumor, IEEE Access 8: 55135–55144.
Raut, G., Raut, A., Bhagade, J., Bhagade, J. and Gavhane, S. (2020). Deep learning
approach for brain tumor detection and segmentation, 2020 International Conference
on Convergence to Digital World - Quo Vadis (ICCDW), pp. 1–5.
Seetha, J. and Raja, S. S. (2018). Brain tumor classification using convolutional neural
networks, Biomedical & Pharmacology Journal 11(3): 1457.
Sharma, K., Kaur, A. and Gujral, S. (2014). Brain tumor detection based on machine
learning algorithms, International Journal of Computer Applications 103(1): 7–11.
Zhang, D., Huang, G., Zhang, Q., Han, J., Han, J. and Yu, Y. (2021). Cross-modality
deep feature learning for brain tumor segmentation, Pattern Recognition 110: 107562.
URL: https://www.sciencedirect.com/science/article/pii/S0031320320303654
20