Project Final Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

‘JNANA SANGAMA’ BELAGAVI-590 018, KARNATAKA

PROJECT REPORT

ON

“BRAIN TUMOR DETECTION USING CNN”

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT


FOR THE AWARD OF THE DEGREE

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE & ENGINEERING
Submitted By

1. BHARATH KALYAN S 3. MAHADEV


[1CG18CS017] [1CG18CS048]
2. HIMAGIRISH N D 4. DARSHAN G A
[1CG18CS033] [1CG18CS025]

Under the guidance of: HOD:

Dr. Shantala C P Ph.D., Dr. Shantala C P Ph.D.,


Prof & Head, Dept. of CSE, Prof & Head, Dept. of CSE,
CIT, Gubbi, Tumakuru. CIT, Gubbi, Tumakuru.

Channabasaveshwara Institute of Technology


(NAAC Accredited & ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumakuru – 572 216. Karnataka.

(Affiliated to Visvesvaraya Technological University, Belagavi & Recognized by AICTE


New Delhi)
2021-22
IT Channabasaveshwara Institute of Technology
(NAAC Aceredited & ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumakuru-572 216. Karnataka.
(Amliated to Visvesvaraya Technological University, Belagavi & Recognized by AICTE

New Delhi)
2021-22

DEPARTMENT OF COMPUTER SCIENCE &ENGINEERING

CERTIFICATE

This is to certify that the project work entitled "BRAIN TUMOR

DETECTION USING CNN" has been success fully carried out by


BHARATH KALYAN S |ICG18CS017], MAHADEV [ICG18CS048),
HIMAGIRISHA N D |ICG18CS033], DARSHAN GA |ICG18CS025],
bonafide students of CHANNABASAVESHWARA INSTITUTE OF

TECHNOLOGY, GUBBI, TUMAKURU, under our supervision and


guidance and submitted in partial fulfillment of the requirements for the award
of Degree in Bachelor of Engineering by Visvesvaraya Technological
University, Belagavi during the academic year of 2021-2022. It is certified
that all corrections/suggestions indicated for internal assessment have been

incorporated in the report deposited in the departmental library. The project


report has been approved as it satisfies the academic requirements for the
above said degree.

Guide: H.O.D:

a
Dr. Shantale C P Ph.D. Dr. Shantala C P Ph.D
Prof& Head, Dept. of CSE, Prof &Head, Dept. of CSE,
CIT, Gubbi, Tumakuru. CIT, Gubbi, Tumakuru.

Principal: Examiners:

areb 1.
Dr. Suresh D S Ph.D..
CIT, Gubbi, Tumakuru. 2.
Channabasaveshwara Institute of Technology
(NAAC Accredited & ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumakuru – 572 216. Karnataka.
(Affiliated to Visvesvaraya Technological University, Belagavi & Recognized by AICTE
New Delhi)
2021-22

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that the project work entitled “BRAIN TUMOR


DETECTION USING CNN” has been successfully carried out by
BHARATH KALYAN S [1CG18CS017], MAHADEV [1CG18CS048],
HIMAGIRISHA N D [1CG18CS033], DARSHAN G A [1CG18CS025],
bonafide students of CHANNABASAVESHWARA INSTITUTE OF
TECHNOLOGY, GUBBI, TUMAKURU, under our supervision and
guidance and submitted in partial fulfillment of the requirements for the award
of Degree in Bachelor of Engineering by Visvesvaraya Technological
University, Belagavi during the academic year of 2021–2022. It is certified
that all corrections/suggestions indicated for internal assessment have been
incorporated in the report deposited in the departmental library. The project
report has been approved as it satisfies the academic requirements for the
above said degree.

Guide: H.O.D:

Dr. Shantala C P Ph.D., Dr. Shantala C P Ph.D.,


Prof & Head, Dept. of CSE, Prof & Head, Dept. of CSE,
CIT, Gubbi, Tumakuru. CIT, Gubbi, Tumakuru.

Principal: Examiners:

1.
Dr. Suresh D S Ph.D.,
CIT, Gubbi, Tumakuru. 2.
Channabasaveshwara Institute of Technology
(NAAC Accredited & ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumakuru – 572 216. Karnataka.

(Affiliated to Visvesvaraya Technological University, Belagavi & Recognized by AICTE


New Delhi)
2021-22

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

UNDERTAKING

We, BHARATH KALYAN S [1CG18CS017], MAHADEV


[1CG18CS048], HIMAGIRISHA N D [1CG18CS033], DARSHAN
G A [1CG18CS025] the students of VIII semester B.E. Computer
Science and Engineering of CHANNABASAVESHWARA
INSTITUTE OF TECHNOLOGY, GUBBI, TUMAKURU declare
that Project work entitled “BRAIN TUMOR DETECTION USING
CNN” has been carried out and submitted in partial fulfillment of the
requirements for the award of degree in Bachelor of Engineering in
Computer Science and Engineering by the Visvesvaraya
Technological University during the academic year 2021-2022.

1. BHARATH KALYAN S 3. MAHADEV


[1CG18CS017] [1CG18CS048]

2. HIMAGIRISHA N D 4. DARSHAN G A
[1CG18CS033] [1CG18CS025]
Channabasaveshwara Institute of Technology
C.I.T (NAAC Aceredited & ISO 9001:2015 Certified Institution)
N H 206 (B.H. Road), Gubbi, Tumakuru- 572 216. Karnataka.

(Amiliated to Visvesvaraya Technological University, Belagavi & Recognized by AICTE


New Delhi)
2021-22

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

BONAFIDE CERTIFICATE

This is to certify that the Project work entitled "BRAIN TUMOR

DETECTION USING CNN" is a bonafide work of BHARATH KALYAN

S[ICGISCS017), MAHADEV |1CGI8CS048, HIMAGIRISHA ND


[1CG18CSO033], DARSHAN G A [ICG18CS025] students of VIII

semester B.E computer Science and Engineering carried out at

Channabasavesh wara Institute of Technology, Gubbi, Tumakuru, in


partial fulfillment of the requirements of the award of degree in B.E. in

Computer Science and Engineering of Visvesvaraya Technological


University, Belagavi under my supervision and guidance. Certified that
to the best of my knowledge the work reported here in does not from
part of any other thesis on the basis of which degree or award was

conferred on earlier occasion to this or any other candidates.

Guide:

a
Df. Shantala C PraD.,
Prof &Head, Dept. of CSE,
CIT, Gubbi, Tumakuru.
Channabasaveshwara Institute of Technology
(NAAC Accredited & ISO 9001:2015 Certified Institution)
NH 206 (B.H. Road), Gubbi, Tumakuru – 572 216. Karnataka.

(Affiliated to Visvesvaraya Technological University, Belagavi & Recognized by AICTE


New Delhi)
2021-22

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

BONAFIDE CERTIFICATE

This is to certify that the Project work entitled “BRAIN TUMOR


DETECTION USING CNN” is a bonafide work of BHARATH KALYAN
S [1CG18CS017], MAHADEV [1CG18CS048], HIMAGIRISHA N D
[1CG18CS033], DARSHAN G A [1CG18CS025] students of VIII
semester B.E computer Science and Engineering carried out at
Channabasaveshwara Institute of Technology, Gubbi, Tumakuru, in
partial fulfillment of the requirements of the award of degree in B.E. in
Computer Science and Engineering of Visvesvaraya Technological
University, Belagavi under my supervision and guidance. Certified that
to the best of my knowledge the work reported here in does not from
part of any other thesis on the basis of which degree or award was
conferred on earlier occasion to this or any other candidates.

Guide:

Dr. Shantala C P Ph.D.,


Prof & Head, Dept. of CSE,
CIT, Gubbi, Tumakuru.
ACKNOWLEDGEMENT
A great deal of time and lot of effort has gone into completing this project report
and documenting it. The number of hours spent in getting through various books and
other materials related to this topic chosen by us have reaffirmed its power and utility in
doing this project.

Several special people have contributed significantly to this effort. First of all, we
are grateful to our institution Channabasaveshwara Institute of Technology, Gubbi
which provided us an opportunity in fulfilling our most cherished desire of reaching the
goal.

We acknowledge and express our sincere thanks to Dr. Suresh D S, Director and
Principal, for his many valuable suggestions and continued encouragement and support in
the academic endeavors.

We wish to express our deep sense of gratitude to Dr. Shantala C P, Head of the
Department of Computer Science and Engineering for all the guidance and who still
remains a constant driving force and motivated through innovative ideas with tireless
support and advice during the project to examine and helpful suggestions offered.

We wish to express our deep sense of gratitude to our project guide Dr. Shantala C
P, Head of the Department of Computer Science and Engineering, CIT, Gubbi for her
meticulous attention to details, which has contributed immeasurably to the quality of the
project report.

We would express our gratitude towards our parents and friends for their kind
cooperation and encouragement which helped us in completion of this project.

Finally, we would like to thank all the teaching and non-teaching staff of Dept. of
CSE, for their cooperation.

Thanking everyone……

BHARATH KALYAN S [1CG18CS017]

DARSHAN G A [1CG18CS025]

MAHADEV [1CG18CS048]

HIMAGIRISH N D [1CG18CS033]

i
ABSTRACT

Brain Tumor segmentation is one of the most crucial and arduous tasks in the
terrain of medical image processing as a human-assisted manual classification can
result in inaccurate prediction and diagnosis. Moreover, it is an aggravating task when
there is a large amount of data present to be assisted. Brain tumors have high diversity
in appearance and there is a similarity between tumors and normal tissues thus the
extraction of tumor regions from images becomes unyielding

The automatic brain tumor classification is a very challenging task in large


spatial and structure variability of the surrounding region of the brain tumor. In this
work, automatic brain tumor detection is proposed by CNN. The deeper architecture
design is performed by using small kernels where it will classify the brain tumor into 4
types glioma tumor, meningioma tumor, no tumor, and pituitary tumor.

ii
TABLE OF CONTENTS

ACKNOWLEDGEMENT i
ABSTRACT ii
LIST OF FIGURES v
LIST OF TABLES v

CONTENTS Page No.


1. INTRODUCTION 1-3

1.1.Problem Statement 2

1.2.Objectives 2

1.3.Scope of the project 3

2. LITERATURE SURVEY 4-9

3. SYSTEM ANALYSIS 10-11

3.1.Existing System 10

3.2.Proposed System 11

4. SYSTEM DESIGN 12-15

4.1.System Architecture 12

4.2.Flowchart 13

4.3.Use Case Diagram 14

4.4.Sequence Diagram 15

5. IMPLEMENTATION 16-25

5.1.Importing libraries 16

5.2.Image Dataset 17

5.3.Image Pre-processing 19

5.4.Building of Model 22
6. MODEL TESTING 26

7. RESULTS 27-29

8. CONCLUSION 30

REFERENCES

iv
LIST OF FIGURES
Figure Name Page No.
Figure 4.1: Architecture of the proposed system 12

Figure 4.2: Flowchart of the proposed system 13

Figure 4.3: Use Case Diagram of the proposed system 14

Figure 4.4: Sequence Diagram of the proposed system 15

Figure 5.1: Non Tumorous MRIs 17

Figure 5.2: Glioma Tumor MRIs 18

Figure 5.3: Meningioma Tumor MRIs 18

Figure 5.4: Pituitary Tumor MRIs 18

Figure 5.5: System Architecture of EfficientNet-B3 25

Figure 7.1: Loss and Accuracy plot over the training period 27

Figure 7.2: Confusion Matrix for Prediction 28

Figure 7.3: Classification Report 29

Figure 7.4: Accuracy of the Model 29

LIST OF TABLES
Table Name Page No.
Table 6.1: Model Testing Prediction Results 28

v
Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 1

INTRODUCTION

Medical imaging is the technique and process of creating visual representations of

the interior of a body for clinical analysis and medical intervention, as well as visual
representation of the function of some organs or tissues. Medical imaging seeks to reveal
internal structures hidden by the skin and bones, as well as to diagnose and treat disease.
Medical imaging also establishes a database of normal anatomy and physiology to make
it possible to identify abnormalities. Medical imaging processing refers to handling
images by using a computer. This processing includes many types of techniques and
operations such as image gaining, storage, presentation, and communication.
The brain tumor is one all the foremost common and, therefore, the deadliest brain
diseases that have affected and ruined several lives in the world. Cancer is a disease in
the brain in which cancer cells ascend in brain tissues. Conferring to a new study on
cancer, more than one lakh people are diagnosed with brain tumors every year around the
globe. Regardless of stable efforts to overcome the complications of brain tumors,
figures show unpleasing results for tumor patients. To contest this, scholars are working
on computer vision for a better understanding of the early stages of tumors and how to
overcome them using advanced treatment options.

Magnetic resonance (MR) imaging and computed tomography (CT) scans of the
brain are the two most general tests to check the existence of a tumor and recognize its
position for progressive treatment decisions. These two scans are still used extensively
for their handiness, and the capability to yield high-definition images of pathological
tissues is more.

The focus of this project is MR brain image tumor extraction and its representation
in a simpler form such that it is understandable by everyone. The objective of this work
is to bring some useful information in simpler form in front of the users, especially for
the medical staff treating the patient. This work aims to define an algorithm or a system
that will result in an extracted image of the tumor from the MR brain image. The
resultant image will be able to provide information like the size, dimension, and position
Department of CSE, CIT, GUBBI Page 1
Brain Tumor Detection using CNN 2021 - 2022
of the tumor, and its boundary provides us with information related to the tumor that can
prove useful for various cases, which will provide a better base for the staff to decide the
curing procedure. Finally, we detect whether the given MR brain image has a tumor or
not using Convolution Neural Network and classify the tumor if present.

1.1 PROBLEM STATEMENT

Based on our study on automated brain tumor detection and classification, normally
the anatomy of the brain is analyzed by MRI scans or CT scans. Histological grading,
based on a stereotactic biopsy test, is the gold standard and the convention for detecting
the grade of a brain tumor. The biopsy procedure requires the neurosurgeon to drill a
small hole into the skull from which the tissue is collected. There are many risk factors
involving the biopsy test, including bleeding from the tumor and brain causing infection,
seizures, severe migraine, stroke, coma, and even death. But the main concern with the
stereotactic biopsy is that it is not 100% accurate which may result in a serious diagnostic
error followed by wrong clinical management of the disease. Tumor biopsy is
challenging for brain tumor patients, non-invasive imaging techniques like Magnetic
Resonance Imaging (MRI) have been extensively employed in diagnosing brain tumors.
Therefore, the development of systems for the detection and prediction of the grade of
tumors based on MRI data has become necessary.

1.2 OBJECTIVES
• We aim to develop an automated system for the enhancement and classification of
brain tumors that can be used by neurosurgeons and healthcare specialists.

• To develop a system that incorporates image processing, pattern analysis, and


computer vision techniques and is expected to improve the sensitivity, specificity, and
efficiency of brain tumor detection.

Department of CSE, CIT, GUBBI Page 2


Brain Tumor Detection using CNN 2021 - 2022

1.3 SCOPE OF PROJECT


This project proposes a system that is used for tumor identification and
classification in brain MR images. The main reason for the detection of brain tumors is to
provide aid to clinical diagnosis. This provides an algorithm or a system implementation
that guarantees the detection processes of a tumor by combining several procedures to
provide a foolproof method of tumor detection in MR brain images. Diagnosing Brain
tissues share certain features and challenges in treating tumors in the body, but they also
present specific problems related to the unique features of the organ in which they live.

The project is mainly useful and focused on the medical field where several users
can make use of it. This benefits many patients in identifying their Brain tumor results
based on the MRI images that they have; from this, they will get to know whether they
have a tumor or not, if present our system can go one step further and classify the type of
tumor that the patient has (i.e. Meningioma Tumor, Pituitary Tumor, Glioma Tumor). It
also benefits the doctors in determining the tumor and treating their patients well to
minimize its effects which may sometime save many lives.

Department of CSE, CIT, GUBBI Page 3


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 2
LITERATURE SURVEY

RELATED WORK
In Medical diagnosis, robustness and accuracy of the prediction algorithms are very
important, because the result is crucial for the treatment of patients. There are many
popular classification and clustering algorithms used for prediction. The goal of
clustering a medical image is to simplify the representation of an image into a
meaningful image and make it easier to analyze. Several Clustering and Classification
algorithms are aimed at enhancing the prediction accuracy of the diagnosis process in
detecting abnormalities.

In the literature survey, we provide a summary of the different methods that have
been proposed for clustering over from 2018. We have been through 15 papers each of
which has a unique approach toward segmentation in some parameter or the other. The
summaries of each of the papers are provided below.

• A. Sivaramakrishnan And Dr. M. Karnan “A Novel Based Approach for


Extraction Of Brain Tumor In MRI Images Using Soft Computing Techniques,”
International Journal Of Advanced Research In Computer And Communication
Engineering, Vol. 2, Issue 4, April 2013.

A. Sivaramakrishnan et al. (2013) [1] projected an efficient and innovative discovery of


the brain tumor vicinity from an image that turned into finished using the Fuzzy C-
approach grouping algorithm and histogram equalization. The disintegration of images is
achieved by the usage of principal factor evaluation is done to reduce the extent of the
wavelet coefficient. The outcomes of the anticipated FCM clustering algorithm
accurately wwithdrewtumor area from the MR images.

Department of CSE, CIT, GUBBI Page 4


Brain Tumor Detection using CNN 2021 - 2022

• Asra Aslam, Ekram Khan, M.M. Sufyan Beg, Improved Edge Detection
Algorithm for Brain Tumor Segmentation, Procedia Computer Science, Volume
58,2015, Pp 430-437, ISSN 1877-0509.

M. M. Sufyan et al. [2] hahaveresented a detection using Earn advanced edge technique
for brain-tumor segmentation that mainly relied on Sobel feature detection. Their
presented work associates the binary thresholding operation with the Sobel approach and
excavates diverse extents using a secure contour process. After the completion of that
process, cancer cells are extracted from the obtained picture using intensity values.

• B.Sathya and R.Manavalan, Image Segmentation by Clustering Methods:


Performance Analysis, International Journal of Computer Applications (0975 –
8887) Volume 29– No.11, September 2011.

Sathya et al. (2011) [3], provided different clusterinalgorithmshm such as K-means,


Improvised K-means, C-means, and improvised C-means algorithms. Their paper
presented an experimental analysis for massive datasets consisting of unique
photographs. They analyzed the discovered consequences using numerous parametric
tests.

• Devkota, B. & Alsadoon, Abeer & Prasad, P.W.C. & Singh, A.K. & Elchouemi, A.
(2018). Image Segmentation for Early Stage Brain Tumor Detection using
Mathematical Morphological Reconstruction. Procedia Computer Science. 125.
115-123. 10.1016/j.procs.2017.12.017.

B. Devkota et al. [4] have proposed that a computer-aided detection (CAD) approach is
used to spot abnormal tissues via Morphological operations. Amongst all different
segmentation approaches existing, the morphological opening and closing operations are
preferred since it takes less processing time with the utmost efficiency in withdrawing
tumor areas with the least faults.

Department of CSE, CIT, GUBBI Page 5


Brain Tumor Detection using CNN 2021 - 2022

• K. Sudharani, T. C. Sarma and K. Satya Rasad, "Intelligent Brain Tumor lesion


classification and identification from MRI images using a K-NN technique,"
2015 International Conference on Control, Instrumentation, Communication
and Computational Technologies (ICCICCT), Kumaracoil, 2015, pp. 777-780.
DOI: 10.1109/ICCICCT.2015.7475384

K. Sudharani et al. [5] presented a K- nearest neighbor algorithm to the MR images to


identify and confine the hysterically full-fledged part within the abnormal tissues. The
proposed work is a sluggish methodology but produces exquisite effects.

• Kaur, Jaskirat & Agrawal, Sunil & Renu, Vig. (2012). A Comparative Analysis
of Thresholding and Edge Detection Segmentation Techniques. International
Journal of Computer Applications. vol. 39 .pp. 29-34. 10.5120/4898-7432.

Jaskirat Kaur et al. (2012) [6] defined a few clustering procedures for the segmentation
process and executed an assessment of distinctive styles for those techniques. Kaur
represented a scheme to measure selected clustering techniques based on their steadiness
in exceptional tenders. They also defined the diverse performance metric tests, such as
sensitivity, specificity, and accuracy.

• Li, Shutao, JT-Y. Kwok, IW-H. Tsang and Yaonan Wang. "Fusing images with
different focuses using support vector machines." IEEE Transactions on neural
networks 15, no. 6 (2004): 1555-1561.

J.T. Kwok et al. [7] delivered wavelet-based photograph fusion to easily cognizance of
the object with all focal lengths as several vision-related processing tasks can be carried
out more effortlessly when wholly substances within the images are bright. In their work,
Kwok et al. investigated different datasets, and the results in ts show that the presented
work is extra correct as it does not get suffering from evenness at different activity stages
computations.

Department of CSE, CIT, GUBBI Page 6


Brain Tumor Detection using CNN 2021 - 2022

• M. Kumar and K. K. Mehta, "A Texture based Tumor detection and automatic
Segmentation using Seeded Region Growing Method," International Journal of
Computer Technology and Applications, ISSN: 2229-6093, Vol. 2, Issue 4, PP.
855-859 August 2011.

Kumar and Mehta [8] proposed the texture-based technique in this paper. They
highlighted the effects of segmentation if the tumor tissue edges aren't shrill. The
performance of the proposed technology may get unwilling results due to those edges.
The texture evaluation and seeded region approach turned into executed inside the
MATLAB environment.

• Mahmoud, Dalia & Mohamed, Eltaher. (2012). Brain Tumor Detection Using
Artificial Neural Networks. Journal of Science and Technology. 13. 31-39.

Dalia Mahmoud et al. [9] presented a model using Artificial Neural Networks for tumor
detection in rain images. They implemented a computerized recognition system for MR
images withing the use of Artificial Neural Networks. That was observed that after the
Elman community was used during the recognition system, the period time and the
accuracy level were high, in comparison with other ANNs systems. This neural
community has a sigmoid characteristic which elevated the extent of accuracy of the
tumor segmentation.

• Marroquin J.L., Vemuri B.C., Botello S., Calderon F. (2002) An Accurate and
Efficient Bayesian Method for Automatic Segmentation of Brain MRI. In:
Heyden A., Sparr G., Nielsen M., Johansen P. (eds) Computer Vision — ECCV
2002. ECCV 2002. Lecture Notes in Computer Science, vol 2353. Springer,
Berlin, Heidelberg.

Department of CSE, CIT, GUBBI Page 7


Brain Tumor Detection using CNN 2021 - 2022

L. Marroquin et al. [10] presented the automated 3d segmentation for brain MRI scans.
Using a separate parametric model in preference to a single multiplicative magnificence
will lessen the impact on the intensities of a GA brain. A brain atlas is hired to find non-
rigid conversion normal to the usual brain. This transformation is further used to segment
the brain from non-brain tissues, computing prior probabilities and finding automatic
initialization,n, and finally applying the MPM-MAP algorithm to find out optimal
segmentation. Major findings from the study show that the MPM-MAP algorithm is
comparatively more y robust than EM in terms of errors while estimating the posterior
marginal. For optimal segmentation, the MPM-MAP algorithm involves only the solution
of linear systems and is therefore computationally efficient.

• Minz, Astina, and Chandrakant Mahobiya. “MR Image Classification Using


Adaboost for Brain Tumor Type.” 2017 IEEE 7th International Advance
Computing Conference (IACC) (2017): 701-705.

Astina minz et al. [11] implemented an operative automatic classification approach for
images image that projected the usage of the AdaBoost gadget mastering algorithm. The
proposed system includes three main segments. Pre-processing has eradicated noises in
the datasets and converted images into grayscale. Median filtering and thresholding
segmentation are implemented in the pre-processed image.

• Monica Subashini.M, Sarat Kumar Sahoo, “Brain MR Image Segmentation for


TumorDetection using Artificial Neural Networks,” International Journal of
Engineering and Technology (IJET), Vol.5, No 2, Apr-May 2013.

Monica Subashini and Sarat Kumar Sahhave[12] have suggested a technique for
detecting the tumor commencing the brain MR images. They also worked on different
techniques, which include pulse-coupled network networks and noise removal strategies
for reinforcing the mind MRI in mages and backpropagation network for classifying the
brain MRI images from tumor cells. They observed image enhancement and

Department of CSE, CIT, GUBBI Page 8


Brain Tumor Detection using CNN 2021 - 2022

segmentation of the usage of their proposed technique, and the backpropagation network
helps in the identification of a tumor in a brain MR image.

• S. Li, J.T. Kwok, I.W Tsang, and Y. Wang, ―Fusing Images with Different
Focuses using Support Vector Machines, Proceedings of the IEEE transaction on
Neural Networks, China, November 2007.

Li et al. [13] report that edge detection, image segmentation, and matching are not easy
to achieve in optical lenses that have long focal lengths. Previously, researchers have
proposed many techniques for this mechanism, one of which is wavelet-based image
fusion. The wavelet function can be improved by applying a discrete wavelet frame
transform (DWFT) and a support vector machine (SVM). In this paper, the authors
experimented with five sets of 256-level images. Experimental results show that this
technique is efficient and more accurate as it does not get affected by consistency
verification and activity level measurements. However, the paper is limited to only one
task related to fusion, and dynamic ranges are not considered during the calculation.

• H. Yu and J.L. Fan, ―Three-level Image Segmentation Based on Maximum


Fuzzy Partition Entropy of 2-D Histogram and Quantum Genetic Algorithm,
Advanced Intelligent Computing Theories, and Applications. With Aspects of
Artificial Intelligence. Lecture Notes in Computer Science, Berlin, Heidelberg
2008.

H. Yu et al. [14] state that image segmentation is used for extracting meaningful objects
from an image. They propose segmenting an image into three parts, dark, grey, and
white, Z-function and s-function are used for the fuzzy division of the 2D histogram.
Afterward, QGA is used for finding a combination of 12 membership parameters, which
have a maximum value. This technique is used to enhance image segmentation and the
significance of their work is that three-level image segmentation is used by following the
maximum fuzzy partition of 2D Histograms. QGA is selected for the optimal
combination of parameters with the fuzzy partition entropy. The proposed method of

Department of CSE, CIT, GUBBI Page 9


Brain Tumor Detection using CNN 2021 - 2022
fuzzy partition entropy of 2D histogram generates better performance than the one-
dimensional 3-level thresh holding method. Somehow, a large number of possible
combinations of 12 parameters in a multi-dimensional fuzzy partition are used, and it is
practically not feasible to compute each possible value; therefore, QGA can be used to
find the optimal combination.

• P.S. Mukambika, K Uma Rani, “Segmentation and Classification of MRI Brain


Tumor,” International Research Journal of Engineering and Technology
(IRJET), Vol.4, Issue 7, 2017, pp. 683 – 688, ISSN: 2395-0056

Mukambika et al. [15] propose a sed methodology for the subsequent stage’s
classification of the tumor, whether it is present or not. Their proposed work represents
the comparative study of strategies used for tumor identification from MR images,
namely the Level set approach, discrete wavelength transforms, (DWT), and K-method
segmentation algorithms. After that phase, feature extraction is done by allowed SVM
classification.

Department of CSE, CIT, GUBBI Page 10


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 3
SYSTEM ANALYSIS

3.1 EXISTING SYSTEM

Brain tumor detection is one of the most difficult tasks in the analysis of medical
images. Globally brain tumors become a very big reason for human death. By using
image processing early the detection of tumors is possible. MR images are considered
because it gives a clear structure of the tumor. In these, they have proposed systems with
a novel mechanism for detecting tumors from MR images by applying machine learning
and deep learning algorithm, ms, especially with the CNN model anime of image
processing techniques.
After the literature survey, it has been observed that most of the authors have used the
most common algorithms and techniques like KNN-technique, Edge detection, and
segmentation techniques, support vector machine, Artificial Neural Network (KNN), Ada
Boost algorithm, and Quantum genetical, algorithms and many more.
Drawbacks of these existing systems:
• Hardware Dependency of Artificial Neural requires requires processors with parallel
processing power, by their structure.
• Since KNN is a distance-based algorithm, the e cost of calculating the distance
between a new point and each existing point is very high which in turn degrades the
performance of the algorithm.
• The structure of Convent aims to mitigate over-fitting, you generally need a large
amount of data for a convolutional neural network to work effectively.
• Some of these systems have lower layer counts which makes them less accurate
while detecting tumors from high-resolution MRIs.
• Many of these systems concentrate only on the binary classification of the MRIs, i.e.
they will just detect the brain tumor.
• The lack of systems that classify the detected brain tumor into its respective type is
more useful and needed.

Department of CSE, CIT, GUBBI Page 11


Brain Tumor Detection using CNN 2021 - 2022

• Classification of the tumor is equally important with its detection because detection
alone will not be of any help. The tumor severity and its treatment are explicitly
dependent on the type of tumor that a person has.

3.2 PROPOSED SYSTEM

The proposed system uses the deep learning technique CNN to effectively identify
and classify the tumor based on the MRI images. We chose a deep learning technique
like CNN because of its superior performance when it comes to image processing and
classification. Convolution Neural Networks are well reputed in image classification on
different datasets over time thus proving their superiority compared to other techniques.
This system has three phases, Data pre-processing, Model selection and training g the
selected model, and last the testing of the model and its accuracy evaluation. During the
first phases, data is preprocessed to extract the MRIs to continue the further processes.
This dataset is stored in our local machine, these images are accessed through their paths
and these images are augmented. In augmentation, more images are produced using
existing images by rotating their angles, changing brightness, zooming, etc. so that we
have enough data to train the model. This data is split into training data and testing data
which will be used to train our model and test its accuracy respectively. The model that
we have used is EfficientNet-B3 which is based on a convolution neural network and
with minimal layers and parameters, it is proven to be efficient thus giving its name.
After training the model, it is tested on the test data to evaluate its efficiency and
performance. Finally y, the MRI image is fed into the trained model to predict its result
which is either tumor detected or not, if detected our system will classify the detected
tumor into one of its types i.e., either Meningioma Tumor or Pituitary Tumor or Glioma
Tumor.

Department of CSE, CIT, GUBBI Page 12


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 4
SYSTEM DESIGN

The design of the system deals with how the system is developed. It explains the flow
functionalities in brief. The section contains system data flow diagram. The flowchart
and Sequence Diagram are described below.

4.1 System Architecture

Fig 4.1 System Architecture of the proposed system.

Department of CSE, CIT, GUBBI Page 13


Brain Tumor Detection using CNN 2021 - 2022

4.2 Flowchart:

A flowchart is a type of diagram that represents an algorithm, work, flow, or


process. The flowchart can also be defined as a diagrammatic representation of an
algorithm (step by step approach to solving a task).

BRAIN MRI PREPROCESS SEGMENTATI


IMAGE ING ON

FEATURE
EXTRACTION

TRAINING/ FEATURE
TESTING REDUCTION

CLASSIFICATION

GLIOMA MENINGIOMA PITUITARY NON


TUMOR TUMOR TUMOR TUMOR

Fig 4.2 Flowchart of the proposed system.

Department of CSE, CIT, GUBBI Page 14


Brain Tumor Detection using CNN 2021 - 2022

4.3 Use Case Diagram:

Use cases are used during the analysis phase of a project to identify system functionality.
They separate the system into actors and use cases. Actors represent roles that are played
by users of the system. Users may be humans, other computers, or even other software
systems.

Use case diagrams are used to gather the requirements of a system including internal and
external influences. These requirements are mostly design requirements. Hence, when a
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified.

Preprocessing

Feature Extraction
for TestImage

Feature Extraction for


Training Images

Set True label for


Train Images

Classification

Fig 4.3 Use Case Diagram of the proposed system.

Department of CSE, CIT, GUBBI Page 15


Brain Tumor Detection using CNN 2021 - 2022

4.4 Sequence Diagram of f proposed system:

A sequence diagram shows object interactions arranged in a time sequence. It depicts the
objects and classes involved in the scenario and the sequence of messages exchanged
between the objects needed to carry out the functionality of the scenario. Sequence
diagrams are typically associated with use case realizations in the Logical View of the
system under development. Sequence diagrams are sometimes called event diagrams or
event scenarios. A sequence diagram shows, as parallel vertical lines (lifelines), different
processes or objects that live simultaneously, and, as horizontal arrows, the messages
exchanged between them, in the order in which they occur

Classified Result

Query Image Train Images Preprocessing Feature Extraction Classifier

Image

Image

Image
Train Features

Image

Test Features

True Label

Fig 4.4 Sequence Diagram of the proposed system.

Department of CSE, CIT, GUBBI Page 16


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 5
IMPLEMENTATION

5.1 IMPORTING LIBRARIES:

• Numpy: NumPy is the fundamental package for scientific computing in Python.


Numpy is a Python library that provides a multidimensional array object, various
derived objects (such as masked arrays and matrices), and an assortment of
routines for fast operations on arrays, including mathematical, logical, shape
manipulation, sorting, selecting, I/O, discrete Fourier transforms and much more.
• Pandas: Pandas is a Python package providing fast, flexible, and expressive data
structures designed to make working with “relational” or “labeled” data both easy
and intuitive. It aims to be the fundamental high-level building block for doing
practical, real-world data analysis in Python.
• Matplotlib: Matplotlib is a comprehensive library for creating static, animated,
and interactive visualizations in Python.
• Seaborn: Seaborn is a library for making statistical graphics in Python. It builds
on top of matplotlib and integrates closely with Pandas. Its plotting functions
operate on data frames and arrays containing whole datasets and internally
perform the necessary semantic mapping and statistical aggregation to produce
informative plots. Its dataset-oriented, declarative API lets you focus on what the
different elements of your plots mean, rather than on the details of how to draw
them.
• Scikit-learn: Scikit-learn (also known as sklearn) is an open-source machine
learning library that supports supervised and unsupervised learning. It also
provides various tools for model fitting, data pre-processing, model selection,
model evaluation, and many other utilities.
• TensorFlow: TensorFlow is an end-to-end open-source platform for machine
learning. It has a comprehensive, flexible ecosystem of tools, libraries, and
community resources that lets researchers push the state-of-the-art in ML and
developers easily build and deploy ML-powered applications.
Department of CSE, CIT, GUBBI Page 17
Brain Tumor Detection using CNN 2021 - 2022

5.2 IMAGE DATASET


• The dataset used in our project is downloaded from an open-source dataset
provider in Kaggle. The dataset consists of around 3264 MRIs each of which is
either non-tumorous MRIs or Meningioma Tumor or Pituitary Tumor or Glioma
Tumor images. These images are distributed among their respective folders
which is helpful while accessing these images for training and testing processes.
Below figures 5.1, 5.2, 5.3, and 5.4 shows some of the images belonging to Non-
tumorous, Glioma Tumor, Meningioma Tumorous, and Pituitary Tumorous MRIs
respectively.

Fig 5.1 Non-Tumorous MRIs. Fig 5.2 Glioma Tumor MRIs

Department of CSE, CIT, GUBBI Page 18


Brain Tumor Detection using CNN 2021 - 2022

Fig 5.3 Meningioma Tumor MRIs. Fig 5.4 Pituitary Tumor MRIs

5.3 IMAGE PREPROCESSING:

The Brain MRI image dataset has been downloaded from Kaggle. The MRI dataset
consists of around 1900 MRI images, including normal, benign, and malignant. These
MRI images are taken as input to the primary step. Pre-processing is an essential and
initial step in improving the quality of the brain MRI Image. The critical steps in pre-
processing are the reduction of impulsive noises and image resizing. In the initial phase,
we convert the brain MRI image into its corresponding gray-scale image. The removal of
unwanted noise is done using the adaptive bilateral filtering technique to remove the
distorted noises that are present in the brain picture. This improves the diagnosis and also
increases the classification accuracy rate

IMAGE ACQUISITION FROM DATASET:

In image processing, image acquisition is done by retrieving an image from


the data set for processing. It is the first step in the workflow sequence because without
an image no processing is possible. The image that is acquired is completely
unprocessed. Here we process the image using the file path from the local device.

Department of CSE, CIT, GUBBI Page 19


Brain Tumor Detection using CNN 2021 - 2022

CONVERT THE IMAGE FROM ONE COLOR SPACE TO ANOTHER:

There are more than 150 color-space conversion methods available in OpenCV. For
color conversion, we use the function cv2.cvtColor(input_image, flag) where flag
determines the type of conversion. In our work, we convert the input image into a gray-
scale image.

FILTERS:

In image processing, filters are mainly used to suppress the high frequencies in the
image. Median

Filter:

It is a non-linear filtering technique used to remove noise from the images. It is


performed by sorting all the pixel values from the window into numerical order and then
replacing the pixel being considered with the median pixel value. This filter removes the
speckle noise and salt and pepper noise through ‘ON’ and ‘OFF’ of pixels by white and
dark spots.

Bilateral filter:

It is also a non-linear, noise-reducing smoothing filter for images. It replaces the


intensity of each pixel with a weighted average of intensity values from nearby pixels.
This weight is based on the Gaussian distribution. Bilateral filtering smooth images
while conserving edges utilizing a nonlinear grouping of neighboring image pixels. This
filtering technique is simple, local, and concise. It syndicates a grey level grounded on
their likeness and the symmetrical nearness and chooses near vales to farther values in
both range and domain.

IMAGE ENHANCEMENT:

Image enhancement is a technique used to improve image quality and perceptibility by


using computer-aided software. This technique includes both objective and subjective
enhancements. This technique includes points and local operations. The local operations
depend on the district input pixel values. Image enhancement has two types: spatial and
transform domain techniques. The spatial techniques work directly on the pixel level,

Department of CSE, CIT, GUBBI Page 20


Brain Tumor Detection using CNN 2021 - 2022
while the transform technique works on Fourier and later on the spatial technique.

Edge detection is a segmentation technique that uses border recognition of strictly linked
objects or regions. This technique identifies the discontinuity of the objects. This
technique is used mainly in image study and to recognize the parts of the image where a
huge variation in intensity arises.

SOBEL FILTER:

The Sobel filter is used for edge detection. It works by calculating the gradient of image
intensity at each pixel within the image. It is widely used in image analysis to help locate
edges in images. The Sobel operator is used for segment purposes. This technique can be
dependent on the central difference which tends toward the central pixels on average.
This technique can be expressed as 3 × 3 matrices to the first derivative of the Gaussian
kernel. It combines smoothing and differentiation. For Sobel edge detection the gradient
of the image is calculated for each pixel position in the image

1. We calculate two derivatives:

An a. Horizontal changes: This is computed by convolving I with a kernel Gx witan h


odd size. For example, for a kernel size of 3, Gx would be computed as:

Gx = [[-1 0 +1]

[-2 0 +2]

[-1 0 +1]]

b. Vertical changes: This is computed by convolving I with a kernel Gy a with an odd


size. For example, for a kernel size of 3, Gy would be computed as:

Gy = [[-1 -2 -1]

[ 0 0 0]

[+1 +2 +1]]

2. At each point of the image we calculate an approximation of the gradient in that point
by combining both results above:

G=(G2 x+G2 y) 1/2

3. Although sometimes the following simpler equation is used:

G=|Gx|+|Gy|
Department of CSE, CIT, GUBBI Page 21
Brain Tumor Detection using CNN 2021 - 2022
After the completion of the pre-processing, the image will be free from the noises, but we
still need to enhance the image since the obtained image is smoothened, edges may not
be preserved, and the image will be dull. To overcome all these, we used edge detection
called the Sobel filtering technique. The whole thing is done by calculating the gradient
of image intensities at each pixel within the image. It is widely used in image analysis to
help locate edges in images. It will also enhance the darker areas of the image, slightly
increase cont, fast, and as sharp as possible.

MORPHOLOGICAL OPERATIONS:

Morphological operations apply a structuring element to an input image, creating an


output image of the same size. In a morphological operation, the value of each pixel in
the output image is based on a comparison of the corresponding pixel in the input image
with its neighbors.

The Morphological techniques are also used with segmentation techniques. The
morphological action is normally performed on binary images. It processes the
operations based on shape and it has wide use in the image processing operation. Erosion
and Dilation are two methods of morphological operations used in this proposed work.
We perform both Erosion and dilation operations used together.

Two main steps of the erosion and dilation morphological operation are opening and
closing. The first step is the opening of the MRI binary image. The main work of the
opening operation is to open up that which is present in between objects and connect that
to a small collection of pixels. After the sett of the bridge, the erosion was again restored
to actual size using dilation. If the binary image has been opened then the subsequent
opened same structured elements have not affected that image. After completing the
opening operations next step is the closing operation. Based on the closing operation
while keeping the original region sizes, the erosion and dilation can handle different
holes in the image region. Dilation and Erosion are the basic morphological operations.
Dilation adds pixels to the boundaries of objects in an image, while erosion removes
pixels on object boundaries.

Department of CSE, CIT, GUBBI Page 22


Brain Tumor Detection using CNN 2021 - 2022

5.4 BUILDING OF MODEL

CONVOLUTIONAL NEURAL NETWORK

Classification is the best approach for the identification of images like any
kind of medical imaging. All classification algorithms are based on the prediction of the
image, where one or more features and that each of these features belongs to one of
several classes.

An automatic and reliable classification method Convolutional Neural


Network (CNN) will be used since it is robust in structure which helps in identifying
every minute detail. A Convolutional Neural Network (ConvNet/CNN) is a Deep
Learning algorithm that can take in an input image, assign importance to various aspects/
objects in the image, and able differentiate one.

The preprocessing required in a ConvNet is much lower as compared to other


classification algorithms. While in primitive methods filters are hand-engineered, with
enough training, ConvNet can learn these filters/characteristics.

A ConvNet can successfully capture the spatial and temporal dependencies in


an image through the application of relevant filters. The architecture performs a better
fitting to the image dataset due to the reduction in the number of parameters involved and
the reusability of weights. In other words, the network can be trained to understand the
sophistication of the image better. The role of the ConvNet is to reduce the images into a
form that is easier to process, without losing features that are critical for getting a good
prediction.

For this step, we need to import Keras and other packages that we’re going to
use in building the CNN. Import the following packages:

• Sequential is used to initialize the neural network.

• Convolution2D is used to make the convolutional network that deals with the images.

• MaxPooling2D layer is used to add the pooling layers.

• Flatten is the function that converts the pooled feature map to a single column that is
passed to the fully connected layer.
Department of CSE, CIT, GUBBI Page 23
Brain Tumor Detection using CNN 2021 - 2022
• Dense adds the fully connected layer to the neural network.

SEQUENTIAL:

• To initialize the neural network, we create an object of the Sequential class.

• classifier = Sequential () 4.3.2

CONVOLUTION:

• To add the convolution layer, we call the add function with the classifier object and
pass in Convolution2D with parameters. The first argument is feature_detectors which is
the number of feature detectors that we want to create. The second and third parameters
are dimensions of the feature detector matrix.

• We used 256 feature detectors for CNNs. The next parameter the is input shape which
is the shape of the input image. The images will be converted into this shape during pre-
processing. If the image is black and white it will be converted into a 2D array and if it is
colored it will be converted into a 3D array.

• In this case, we’ll assume that we are working colored images. Input_shape is passed
in a tuple with the number of channels, which is 3 for a colored image, and the
dimensions of the 2D array in each channel. If you are not using a GPU it’s advisable to
use lower dimensions to reduce the computation time. The final parameter is the
activation function. Classifying images is a nonlinear problem. So, we use the rectifier
function to ensure that we don’t have negative pixel values during computation. That’s
how we achieve non-linearity.

• classifier.add (Convolution2D (256, 3, 3, input_shape = (256, 256, 3),


activation=’relu’))

POOLING:

• The Pooling layer is responsible for reducing the spatial size of the convolved feature.
This is to decrease the computational power required to process the data through
dimensionality reduction. Furthermore, it is useful for extracting dominant features
which are rotational and positional invariant, thus maintaining the process of effectively
training the model.

Department of CSE, CIT, GUBBI Page 24


Brain Tumor Detection using CNN 2021 - 2022
• There are two types of Pooling: Max Pooling and Average Pooling. Max Pooling
returns the maximum value from the portion of the image covered by the Kernel. On
the other hand, Average Pooling returns the average of all the values from the portion
of the image covered by the Kernel. Generally, we use max pooling.

• In this step we reduce the size of the feature map. Generally, we create a pool size of
2x2 for max pooling. This enables us to reduce the size of the feature map while not
losing important image information.

• classifier.add (MaxPooling2D (pool_size= (2,2)))

FLATTENING:

• In this step, all the pooled feature maps are taken and put into a single vector for
inputting the in-text layer.

• The Flatten function flattens all the feature maps into a single long column.

• classifier.add (Flatten ())

FULLY CONNECTION:

• The next step is to use the vector we obtained above as the input for the neural network
by using the Dense function in Keras. The first parameter is output which is the number
of nodes in the hidden layer. You can determine the most appropriate number through
experimentation. The higher the number of dimensions the more computing resources
you will need to fit the model. A common practice is to pick the number of nodes in
powers of two.

• classifier. Add (Dense (output = 64))

• The next layer we have to add is the output layer. In this case, we’ll use the sigmoid
activation function since we expect a binary outcome. If we expected more than two
outcomes, we would use the SoftMax function.

• The output here is 1 since we just expect the predicted probabilities of the classes.

• classifier.add (Dense (output=1, activation=’sigmoid’))

Department of CSE, CIT, GUBBI Page 25


Brain Tumor Detection using CNN 2021 - 2022

Efficient Net-B3:

EfficientNet is a convolutional neural network architecture and scaling method that


uniformly scales all dimensions of depth/width/resolution using a compound coefficient.
Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling
method uniformly scales network width, depth, and resolution with a set of fixed scaling
coefficients. Since model scaling does not change layer operators Fˆi in the baseline
network, having a good baseline network is also critical. They have evaluated their
scaling method using existing ConvNets, but to better demonstrate the effectiveness of
the scaling method, they have also developed a new mobile-size baseline, called
EfficientNet.
The EfficientNet-B3 model used has around 390 layers with 10,875,999 trainable
parameters, 87,303 non-trainable params which all together 10,875,999 Total params.
These layers are constructed out of multiple modules and these modules are meshed
together to form the EfficientNet-B3 model which is demonstrated in the pictures below.

Fig 5.5 System Architecture of EfficientNet-B3.

Department of CSE, CIT, GUBBI Page 26


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 6
MODEL TESTING
Testing of the model is conducted with the test data images to evaluate the trained
model's performance. Some of the test images and their prediction results are
demonstrated in the given table.

Table 6.1 Table comparing test results and the predicted result by our model.

Department of CSE, CIT, GUBBI Page 27


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 7
RESULTS

7.1 Loss and Accuracy plot for training the model

The model is trained for around 40 epochs during which the loss of the model
gradually decreases to a point where for any further epochs there won’t be any change in
the loss value. Likewise, the accuracy of the model, the accuracy the model increases
with the increasing number of epochs. The plot of this same is represented in figure 7.1
where the number of epochs is along the x-axis and the values of these accuracies and
losses over the corresponding epochs are along the y-axis.

Fig 7.1 Loss and Accuracy plot over the training period.

Department of CSE, CIT, GUBBI Page 28


Brain Tumor Detection using CNN 2021 - 2022

7.2 Confusion Matrix

Fig 7.2 Confusion matrix for prediction.

After training, the model is tested with the test images for which the classes are
predicted. Based on these predicted classes and the actual classes a confusion matrix is
drawn. From the above matrix, out of 139 Glioma tumor images 5, 1, and 1 were
incorrectly classified as Meningioma, Non-tumorous, and Pituitary tumor respectively.
Out of 141 Meningioma tumor images 4 and 2 images were incorrectly classified as
Glioma tumor and Pituitary tumor respectively. Out of 75 Non-tumor images 1 was
incorrectly classified as a Pituitary tumor and lastly out of 135 Pituitary images 1 was
misclassified as a Meningioma tumor. The remaining images in each of these classes
were correctly classified which can be seen diagonally with a dark blue shade in the
above figure.

Department of CSE, CIT, GUBBI Page 29


Brain Tumor Detection using CNN 2021 - 2022

7.3 Classification report

Fig 7.3 Classification Report


The above classification report shows the precision, recall, and f1-score with supporting
images for each class. With 490 images the model is around 97% accurate while
predicting and classifying.

7.4 Model Accuracy

Fig 7.4 Accuracy of the Model.


When the trained model is tested on the test date, an accuracy of 96.9388% and with a
loss of 0.08073 is obtained.

Department of CSE, CIT, GUBBI Page 30


Brain Tumor Detection using CNN 2021 - 2022

CHAPTER 8
CONCLUSION

We proposed a computerized method for segmenting and identifying a brain tumor


using the Convolution Neural Network. The input MR images are read from the local
device using the file path and converted into grayscale images. These images are pre-
processed using an adaptive bilateral filtering technique for the elimination of noises that
are present inside the original image. The binary thresholding is applied to the de-noised
image, and Convolution Neural Network segmentation is applied, which helps in figuring
out the tumor region in the MR images. The proposed model obtained an accuracy of
97% and yielded promising results without many errors and much less computational
time.

It is observed on extermination that the proposed approach needs a vast training set
for better accurate results, in the field of medical image processing, the gathering of
medical data is a tedious job, and, in a few cases, the datasets might not be available. In
all such cases, the proposed algorithm must be robust enough for accurate recognition of
tumor regions from MR Images. The proposed approach can be further improvised
through cooperating weakly trained algorithms that can identify the abnormalities with
minimum training data and also self-learning algorithms would aid in enhancing the
accuracy of the algorithm and reduce the computational time.

Department of CSE, CIT, GUBBI Page 31


Brain Tumor Detection using CNN 2021 - 2022

REFERENCES

[1] A. Sivaramakrishnan And Dr.M.Karnan “A Novel Based Approach For Extraction Of


Brain Tumor In MRI Images Using Soft Computing Techniques,” International Journal
Of Advanced Research In Computer And Communication Engineering, Vol. 2, Issue 4,
April 2013.

[2] Asra Aslam, Ekram Khan, M.M. Sufyan Beg, Improved Edge Detection Algorithm
for Brain Tumor Segmentation, Procedia Computer Science, Volume 58,2015, Pp
430-437, ISSN 1877-0509.

[3] B.Sathya and R.Manavalan, Image Segmentation by Clustering Methods:


Performance Analysis, International Journal of Computer Applications (0975 – 8887)
Volume 29– No.11, September 2011.

[4] Devkota, B. & Alsadoon, Abeer & Prasad, P.W.C. & Singh, A.K. & Elchouemi, A..
(2018). Image Segmentation for Early Stage Brain Tumor Detection using Mathematical
Morphological Reconstruction. Procedia Computer Science. 125. 115- 123. 10.1016/
j.procs.2017.12.017.

[5] K. Sudharani, T. C. Sarma and K. Satya Rasad, "Intelligent Brain Tumor lesion
classification and identification from MRI images using the k-NN technique," 2015
International Conference on Control, Instrumentation, Communication and
Computational Technologies (ICCICCT), Kumaracoil, 2015, pp. 777-780. DOI: 10.1109/
ICCICCT.2015.7475384

[6] Kaur, Jaskirat & Agrawal, Sunil & Renu, Vig. (2012). A Comparative Analysis of
Thresholding and Edge Detection Segmentation Techniques. International Journal of
Computer Applications. vol. 39. pp. 29-34. 10.5120/4898-7432.

[7] Li, Shutao, JT-Y. Kwok, IW-H. Tsang and Yaonan Wang. "Fusing images with
different focuses using support vector machines." IEEE Transactions on neural networks
15, no. 6 (2004): 1555-1561.

Department of CSE, CIT, GUBBI Page 32


Brain Tumor Detection using CNN 2021 - 2022
[8] M. Kumar and K. K. Mehta, "A Texture based Tumor detection and automatic
Segmentation using Seeded Region Growing Method," International Journal of
Computer Technology and Applications, ISSN: 2229-6093, Vol. 2, Issue 4, PP. 855- 859
August 2011.

[9] Mahmoud, Dalia & Mohamed, Eltaher. (2012). Brain Tumor Detection Using
Artificial Neural Networks. Journal of Science and Technology. 13. 31-39.

[10] Marroquin J.L., Vemuri B.C., Botello S., Calderon F. (2002) An Accurate and
Efficient Bayesian Method for Automatic Segmentation of Brain MRI. In: Heyden A.,
Sparr G., Nielsen M., Johansen P. (eds) Computer Vision — ECCV 2002. ECCV 2002.
Lecture Notes in Computer Science, vol 2353. Springer, Berlin, Heidelberg.

[11] Minz, Astina, and Chandrakant Mahobiya. “MR Image Classification Using
Adaboost for Brain Tumor Type.” 2017 IEEE 7th International Advance Computing
Conference (IACC) (2017): 701-705.

[12] Monica Subashini.M, Sarat Kumar Sahoo, “Brain MR Image Segmentation for
TumorDetection using Artificial Neural Networks,” International Journal of Engineering
and Technology (IJET), Vol.5, No 2, Apr-May 2013.

[13] S. Li, J.T. Kwok, I.W Tsang, and Y. Wang, ―Fusing Images with Different Focuses
using Support Vector Machines, Proceedings of the IEEE transaction on Neural
Networks, China, November 2007.

[14] H. Yu and J.L. Fan, ―Three-level Image Segmentation Based on Maximum Fuzzy
Partition Entropy of 2-D Histogram and Quantum Genetic Algorithm, Advanced
Intelligent Computing Theories, and Applications. With Aspects of Artificial Intelligence.
Lecture Notes in Computer Science, Berlin, Heidelberg 2008.

[15] P.S. Mukambika, K Uma Rani, “Segmentation and Classification of MRI Brain
Tumor,” International Research Journal of Engineering and Technology (IRJET), Vol.4,
Issue 7, 2017, pp. 683 – 688, ISSN: 2395-0056

Department of CSE, CIT, GUBBI Page 33

You might also like