Brain Tumor Detection Using Convolutional Neural Networks (CNNS)
Brain Tumor Detection Using Convolutional Neural Networks (CNNS)
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
ABSTRACTBrain tumors are a serious medical condition that requires early detection for
successful treatment. However, accurate diagnosis can be difficult and time-consuming, and
current methods such as MRI scans can be expensive and may require highly trained specialists to
interpret the results. A model of a brain tumor detection system using Convolutional Neural
Networks (CNNs) has been proposed to address these challenges. To use this model, a dataset of
medical images of the brain is collected, the dataset is then preprocessed, and the relevant feature
is extracted from the images using CNNs. The developed CNN model is designed and trained to
accurately detect the presence and location of brain tumors in the images. Optimization of the CNN
model's performance is done by experimenting with different architectures, hyperparameters, and
optimization techniques, and its performance is evaluated using metrics such as accuracy,
sensitivity, specificity, and F1 score. The model training was carried out on MRI images containing
tumors and without tumors. The developed CNN-based model achieved impressive accuracy in
detecting brain tumors, demonstrating high precision and recall rates. This brain tumor detection
system has the potential to significantly improve the accuracy and efficiency of brain tumor
diagnosis, leading to better treatment outcomes and reducing the burden on healthcare systems.
1. INTRODUCTION
have been successfully applied in medical
Brain tumors are a serious medical condition image analysis, including brain tumor
that can have significant impacts on a patient's detection, to improve the accuracy and
health and well-being. Early detection of brain efficiency of diagnosis. Additionally, this
tumors is critical for successful treatment, but
project has applications in research, education,
accurate diagnosis can be difficult and time-
and public health, making it a valuable area of
consuming (Abdusalomov et al., 2023).
study for medical professionals and computer
Current methods for brain tumor detection,
scientists alike. The main objectives were to
such as MRI scans, can be expensive and may
optimize the CNN model's performance by
require highly trained specialists to interpret
experimenting with different architectures,
the results. Convolutional Neural Networks
hyperparameters, and optimization techniques
(CNNs) are a type of deep learning model that
and evaluate the performance of the CNN
has shown promising results in image
model using metrics such as accuracy, loss,
recognition and classification tasks. CNNs
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
and F1 score(Johny et al., 2020). This research carefully crafted design that allows for
endeavors to bridge this gap by leveraging a increasing the depth and width of the network
unique dataset sourced directly from real while keeping the computational budget
hospital environments. The acquisition and constant. His results seem to yield solid
utilization of authentic patient data from Bir evidence that approximating the expected
Hospital present a significant opportunity to optimal sparse structure by readily available
enhance the robustness and clinical relevance dense building blocks is a viable method for
of our proposed brain tumor detection model. improving neural networks for computer
The utilization of this real-world dataset vision. In this study, a review of the previous
addresses the pressing need for models trained work of the last ten years is discussed for
on diverse, clinically representative cases, comparison purposes. CNN technique is used
enabling our approach to potentially excel in for the classification of the grey-scaled
practical medical settings. The utilization of segmented MR Images to get accurate results
hospital data not only contributes to the for treatment planning and improvement.
authenticity and richness of our research but This study provides help to radiologists,
also underscores our commitment to ethical doctors, and surgeons in the diagnosis of
practices and patient privacy. disease in a very short time and with high
accuracy. This study will contribute
2. LITERATURE REVIEW effectively to the field of image
processing(Szegedy et al., 2015).
Sankari et al. along with the other researchers
Mustaqeem et al. proposed a hybrid
came up with a model for cancer diagnosis for
segmentation technique including Watershed
a brain tumor which is the toughest task. Most
and Thresholding-based segmentation
research has been done in this field using
techniques. Firstly, the quality of the scanned
PCA, Route set theory, and the Wavelet
images is enhanced and then morphological
method. The authors here used Convolutional
operations are applied to detect the tumor
neural networks to solve the problem.
along with their proposed hybrid
Respected authors proposed image de-
segmentation. The proposed system is easy to
noising, intensity normalization, and bias-
execute and thus can be managed easily.
field correction methods for the image pre-
Obtained MRI images are displayed in two-
processing task. They used a bilateral filter to
dimensional matrices having pixels as their
remove the noise from the MRI images.
elements. Gaussian low pass filter and
Histogram Equalization is used for enhancing
averaging filters are used to remove salt and
and feature extraction of the image. And
pepper noise from the image. The filter pixel’s
finally, CNN is used to classify the
value is replaced with its neighborhood
images(Sankari et al., 2020).
values. Gaussian high pass filter improves the
Szegedy et al. proposed a deep convolutional
boundaries of the objects in the image.
neural network architecture codenamed
Threshold segmentation is used to convert the
Inception, which was responsible for setting
grayscale image into a binary image format.
the new state of the art for classification and
Watershed Segmentation is used to group
detection in the ImageNet Large-Scale Visual
pixels of an image based on their intensities.
Recognition Challenge 2014(ILSVRC14).
Morphological operators are applied to the
They used this architecture to improve the
converted binary image to separate the tumor
utilization of computing resources inside the
part of the image(Mustaqeem et al., 2012).
CNN network. This was achieved by a
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
Input Layer
Convolution Convolution
al layer Activation al layer
32 64
Kernel Size: Layer Kernel Size:
Feature Feature
33 Function: 33
Maps Maps
Filters: 32 relu Filters: 64
MRI Image
224 224 pixels RGB
Feature Extraction
Is there Activation
Dropout Layer
a layer Function:
Flattening
tumor? relu
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
Data Acquisition
Data Processing
Model Development
Model Training
Model Evaluation
Development
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
tumors. The data is further divided into 80% layer, four convolutional layers, two dropout
of the data as data training, 10% of the data as layers, and a fully connected(dense) layer;
data validation, and 10% of the data as data each experiment uses 15 epochs and 32
testing. The data is run 15 times, each using batches.
the CNN model which consists of one input
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
Labelled
Dataset Data
Partitioning
Training and
Validation Testing
Build Model
Final Performa-
CNN Training
Set hyper- nce
architecture Model Computa-
parameters
tion
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
precision measures the proportion of true The harmonic mean of precision and recall,
positive predictions (correctly identified providing a balanced measure that considers
tumors) among all the samples predicted as both false positives and false negatives. It's
tumors. It helps in understanding the model's particularly useful when dealing with
ability to avoid false positives. imbalanced datasets.
Precision = (TP+FP)/TP F1score = (2*precision*recall)/(precision +
recall)
3.5.2 Recall
This metric indicates the proportion of true 4. RESULTS AND DISCUSSIONS
positive predictions (correctly identified
tumors) among all actual tumor samples. It The results of the training are shown below.
measures the model's ability to capture all This model has an accuracy of 83.17% and a
positive instances and avoid false negatives. loss of 0.3614 on test data, an accuracy of
Recall= (TP)/(TP+FN) 80.48% and a loss of 0.4263 on train data, and
an accuracy of 84.68% and a loss of 0.3296 on
3.5.3 F1 Score validation data while running it for 15 epochs.
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148
Kathford Journal of Engineering and Management,
ISSN: 2661-6106.
© 2023 Kathford Journal of Engineering and Management
https://kathford.edu.np/Journal/
Vol. 3 Issue 1 JUNE 2023, pp.134148
S. Aryal, et al. Kathford Journal of Engineering and Management (KJEM), 2023; 3(1), 134148