Final Report Brain TM
Final Report Brain TM
GREATER NOIDA
A Project Report
On
Submitted in partial fulfillment of the requirement for the award of the degree of
Master of Computer Applications
(2023-24)
By
Sunil Singh
Roll No. 2212000140111
1 Acknowledgment 1
2 Certificate of Originality 2
3 Certificate of Acceptance 3
4 Abstract 4
5 Introduction 5
7 Problem Statement 11
11 Software Requirement 23
12 Hardware Requirement 24
13 Implimentation Methodology: 30
15 Conclusion 36
16 Future Scope 37
17 Bibliography 38
18 References 41
ACKNOWLEDGEMENT
Date: Signature
Sunil Singh
(2212000140111)
1
CERTIFICATE OF ORIGINALITY
I hereby declare that my Project titled “Brain Tumor Detection “submitted to Dr. APJ
ABDUL KALAM TECHNICAL UNIVERSITY, Lucknow for the partial fulfillment of the degree
of Master of Computer Application Session 2023-2024 from GL Bajaj College of
Technology and Management, Greater Noida has not previously formed the basis for the award
of any other degree, diploma or other title.
Place: Signature
Sunil Singh
Date: (221200140111)
2
CERTIFICATE OF ACCEPTANCE
This is to certify that this project report entitled “Brain Tumor Detection” is submitted
in partial fulfillment of the degree of Master of Computer Applications, G L Bajaj
College of Technology and Management, Greater Noida affiliated to Dr. A.P.J.
Abdul Kalam Technical University (AKTU) (formerly UPTU) Lucknow, done by “Sunil
Singh”, Roll No. 2212000140111, Master of Computer Application, is an authentic work
carried out by him/her during session 2023-24.
The project work in this project has not been submitted earlier for award of any degree or
diploma to the best of my knowledge and belief. This project work is approved and accepted
for the award of above said degree.
Head
Department of Computer Applications
(G L Bajaj College of Technology & Management)
3
ABSTRACT
Brain tumor diagnosis is a critical task in the field of medical imaging, with the potential to significantly
impact patient outcomes and treatment planning. The use of deep learning has been more well-known
within the last ten years as a potential method for improving and automating the detection and
categorization of brain tumors. The goal of this literature review is to present a thorough overview of
the application of deep learning to the diagnosis of brain tumors.
Brain tumor is mass of normal and abnormal cells in a brain. In medical field, MRI images are widely
used forbrain tumor detection.
MRI images gives broad information about soft tissues of human body. This informationcan be used for
brain tumor detection by
using feature extraction technique. In thisstudy, we propose a novel deep learning-based approach for
brain tumor detection using
multimodal magnetic resonanceimaging (MRI) data. The proposed model combines convolutional
neural networks (CNNs) and
recurrent neural networksRNNs) to efficiently analyze both structural and functional information from
T1-weighted, T2-weighted
and diffusion-weightedMRI scans. The proposedmethodology describes extraction of tumor from MRI
images. Firstly, find out the
region of interest of brain tumorfor feature extraction and then calculate the shape features. Obtained
shape features used for the
classification of of tumor.
4
INTRODUCTION
Brain tumor is an unrestrained group of tissue may be implanted in the regions of the
brain that makes the responsive functioning of the body to be disabled. Tumor can be
divided into two types: benign and malignant tumors. Benign tumors are those which are
able of spreading and affecting the other healthy brain tissue. Malignant tumors are
typically grows outside of brain and called brain cancer. An image technique plays a
central role in the diagnosis and treatment of brain tumor. Imaging of the tumors can be
done by many ways such as Computed Tomography (CT) scan, Ultrasound and magnetic
resonance image (MRI). Due to its non- invasive and soft tissues with high resolution
MRI (Magnetic Resonance, MR) image has become an important diagnosis of brain
tumors Tool. MRI image for a brain includes large amount of spatial information on brain
structure and it can be utilized to medical diagnostics. Brain tumors are considered as one
of the most deadly and difficult to identify and be treated forms of cancer. With the
development of almost two decades, the pioneering approaches applying computer aided
techniques for segmenting brain tumor are becoming more and more mature and coming
closer to routine clinical applications.Magnetic resonance (MR) [1] image segmentation
of a brain is a very important and exigent task that is needed for the purpose of
diagnosing brain tumors and other neurological diseases. Brain tumors have different
characteristics such as size, shape, location, and image intensities. They may deform
neighboring structures and if there is edema with the tumor, intensity properties of the
nearby region change. An automatic segmentation of the brain MRI image is necessary
because manual segmentation requires more time and can be subjected to errors.
A fast reliable technique is necessary to detect the brain tumor because treatment
planning is the key method to improve the survival period of oncological patients. This
paper presents a reliable detection method based on CNN that reduces operators and
errors. The Convolutional Neural Network (CNN) is used in convolving a signal or an
image with kernels to obtain feature maps. The image processing techniques such as
image conversion, feature extraction and histogram equalization have been developed for
extraction of the tumor in the MRI images of the cancer affected patients. A suitable
Fuzzy Classifier is developed to recognize healthier tissue from cancer tissue. The whole
system is divided into two phases: firstly learning/Training Phase and secondly
Recognition/Testing Phase. The detection of tumor takes place in main three main stages:
(1) preprocessing (2) classification by CNN and (3) post-processing .The aim of the
project is to detect and extract the of tissue abnormalities by using the biochemical
features. The specificity and the sensitivity of the method are evaluated and accuracy is
determined.
5
BRAIN TUMOR DETECTION SYSTEM
The human body is made up of many organs and brain is the most critical and vital
organ of them all. One of the common reasons for dysfunction of brain is brain tumor. A
tumor is nothing but excess cells growing in an uncontrolled manner. Brain tumor cells
grow in a way that they eventually take up all the nutrients meant for the healthy cells and
tissues, which results in brain failure. Currently, doctors locate the position and the area of
brain tumor by looking at the MR Images of the brain of the patient manually. This results
in inaccurate detection of the tumor and is considered very time consuming. A Brain
Cancer is very critical disease which causes deaths of many individuals. The brain tumor
detection and classification system is available so that it can be diagnosed at early stages.
Cancer classification is the most challenging tasks in clinical diagnosis. This project deals
with such a system, which uses computer, based procedures to detect tumor blocks and
classify the type of tumor using Convolution Neural Network Algorithm for MRI images
of different patients. Different types of image processing techniques like image
segmentation, image enhancement and feature extraction are used for the brain tumor
detection in the MRI images of the cancer-affected patients.
Detecting Brain tumor using Image Processing techniques its involves the four stages is
Image Pre-Processing, Image segmentation, Feature Extraction, and Classification. Image
processing and neural network techniques are used for improve the performance Of
detecting and classifying brain tumor in MRI images.
6
OVERVIEW OF BRAIN AND BRAIN TUMOR
Main part in human nervous system is human brain. It is located in human head
and it is covered by the skull. The function of human brain is to control all the parts of
human body. It is one kind of organ that allows human to accept and endure all
type of environmental condition. The human brain enables humans to do the action and
share the thoughts and feeling. In this section we describe the structure of the
brain for understanding the basic things .
The brain tumors are classified into mainly two types: Primary brain tumor (benign
tumor) and secondary brain tumor (malignant tumor).The benign tumor is one type of
cell grows slowly in the brain and type of brain tumor is gliomas. It originates from
non neuronal brain cells called astrocytes. Basically primary tumors are less
aggressive but these tumors have much pressure on the brain and because of that,
brain stops working properly . The secondary tumors are more aggressive and more
quick to spread into other tissue. Secondary brain tumor originates through other part
of the body. These type of tumor have a cancer cell in the body that is metastatic
which spread into different areas of the body like brain, lungs etc. Secondary brain
tumor is very malignant. The reason of secondary brain tumor cause is mainly due to
lungs cancer, kidney cancer, bladder cancer Etc.
7
MAGNETIC RESONANCE IMAGING (MRI)
Raymond v. Damadian invented the first magnetic image in 1969. In 1977 the
first MRI image were invented for human body and the most perfect technique.
Because of MRI we are able to visualize the details of internal structure of brain and
from that we can observe the different types of tissues of human body. MRI images
have a better quality as compared to other medical imaging techniques like X-ray
and computer tomography. MRI is good technique for knowing the brain tumor in
human body. There are different images of MRI for mapping tumor induced Change
including T1 weighted, T2 weighted and FLAIR (Fluid attenuated inversion recovery)
weighted
The most common MRI sequence is T1 weighted and T2 weighted. In T1 weighted only
one tissue type is bright FAT and in T2 weighted two tissue types are Bright FAT and
Water both. In T1 weighted the repetition time (TR) is short in T2 weighted the TE and
TR is long. The TE an TR are the pulse sequence parameter and stand for repetition
time and time to echo and it can be measured in millisecond(ms). The echo time
represented time from the centre of the RF pulse to the centre of the echo and TR is the
length of time between the TE repeating series of pulse and echo
The third commonly used sequence in the FLAIR. The Flair sequence is almost same
as T2-weighted image. The only difference is TE and TR time are very long.
8
APPLICATION
OBJECTIVE
NEED OF SCOPE
9
MOTIVATION
A brain tumor is defined as abnormal growth of cells within the brain or central
spinal canal. Some tumors can be cancerous thus they need to be detected and cured in
time. The exact cause of brain tumors is not clear and neither is exact set of symptoms
defined, thus, people may be suffering from it without realizing the danger. Primary brain
tumors can be either malignant (contain cancer cells) or benign (do not contain cancer
cells).Brain tumor occurred when the cells were dividing and growing abnormally. It is
appearing to be a solid mass when it diagnosed with diagnostic medical imaging
techniques. There are two types of brain tumor which is primary brain tumor and
metastatic brain tumor. Primary brain tumor is the condition when the tumor is formed in
the brain and tended to stay there while the metastatic brain tumor is the tumor that is
formed elsewhere in the body and spread through the brain.
The symptom having of brain tumor depends on the location, size and type of the tumor.
It occurs when the tumor compressing the surrounding cells and gives out pressure.
Besides, it is also occurring when the tumor blocks the fluid that flows throughout the
brain. The common symptoms are having headache, nausea and vomiting, and having
problem in balancing and walking. Brain tumor can be detected by the diagnostic imaging
modalities such as CT scan and MRI. Both of the modalities have advantages in detecting
depending on the location type and the purpose of examination needed. In this paper, we
prefer to use the MRI images because it is easy to examine and gives out accurate
calcification and foreign mass location.The MRI is the most regularly utilized strategy for
imaging brain tumors and the identification of its vicinity. The conventional technique for
CT and MR image classification and detection of tumor cells remains largely supported
for the human reviewing apart from different other methods. MR images are mainly used
because there are non-destructive and non-ionizing. MR imaging offers high-definition
pictures that are extensively utilized in discovering brain tumors. MRI has diverse
schemes such as flair, T1-weighted, T2-weighted images. There are many image
processing techniques such as pre-processing, segmentation of images, image
improvements, feature extraction, and classifiers.
10
PROBLEM STATEMENT
BACKGROUND
Different types of tissues in the body can be distinguished completely with MRI
and contains fine information for treatment Texture of MRI contains information of size,
shape, color and brightness that texture properties help to detect texture extraction. Neural
Network (NNs) consists of an interconnected component, it contains the mimic properties
of biological neurons.In (Feed-Forward backprop) more than one neuron can be simply
defined as interconnected components having large inputs activation function and output.
Methods like regression, gradient descent are used for this.
11
LITERATURE SURVEY
Paper-1: Image Analysis for MRI Based Brain Tumor Detection and
Feature Extraction Using Biologically Inspired BWT and SVM
Summary:
In this paper using MR images of the brain, we segmented brain tissues into
normal tissues such as white matter, gray matter, cerebrospinal fluid (background),
and tumor-infected tissues. We used pre-processing to improve the signal-to-noise
ratio and to eliminate the effect of unwanted noise. We can used the skull stripping
algorithm its based on threshold technique for improve the skull stripping
performance.
Summary:
This paper surveys the various techniques that are part of Medical Image
Processing and are prominently used in discovering brain tumors from MRI Images.
Based on that research this Paper was written listing the various techniques in use. A
brief description of each technique is also provided. Also of All the various steps
involved in the process of detecting Tumors, Segmentation is the most significant.
12
Paper-3: Identification of Brain Tumor using Image Processing Techniques
• Publication Year: 11 September 2017
• Author: Praveen Gamage
• Journal Name: Research gate
Summary:
This paper survey of Identifying brain tumors through MRI images can be
categorized into four different sections; pre-processing, image segmentation, Feature
extraction and image classification.
Summary:
In this paper, some of the recent research work done on the Brain tumor
detection and segmentation is reviewed. Different Techniques used by various
researchers to detect the brain Tumor from the MRI images are described. By this
review we found that automation of brain tumor detection and Segmentation from
the MRI images is one of the most active Research areas.
1. Artificial Intelligence:
Artificial intelligence (AI) is the simulation of human intelligence processes
by machines, especially computer systems enabling it to even mimic human
behaviour. Its applications lie in fields of Computer Vision, Natural Language
Processing, Robotics, Speech Recognition, etc. Advantages of using AI are improved
customer experience, accelerate speed to market, develop sophisticated products,
enable cost optimisation, enhance employee productivity and improve operational
efficiency. Machine Learning (ML) is a subset of AI which is programmed to think
on its own, perform social interaction, learn new information from the provided data
and adapt as well as improve with experience. Although training time via Deep
Learning (DL) methods is more than Machine Learning methods, it is compensated
by higher accuracy in the former case. Also, DL being automatic, large domain
knowledge is not required for obtaining desired results unlike in ML.
2. Brain tumor:
The human brain consists of Grey Matter (GM), White Matter (WM) and
Cerebrospinal Fluid (CSF) and on the basis of factors like quantification of tissues,
location of abnormalities, malfunctions & pathologies and diagnostic radiology, a
presence of tumor is identified. A tumor in the brain can affect such sensory
information and muscle movements or even results in more dangerous situation
which includes death. Depending upon the place of commencing, tumor can be
categorised into primary tumors and secondary tumors. If the tumor is originated
inside the skull, then the tumor is known as primary brain tumor otherwise if the
tumor's initiation place is somewhere else in the body and moved towards the brain,
then such tumors are called secondary tumors.
14
Brain tumor can be of the following types-glioblastoma, sarcoma, metastatic
bronchogenic carcinoma on the basis of axial plane. While some tumours such as
meningioma can be easily segmented, others like gliomas and glioblastomas are
much more difficult to localise. World Health Organisation (WHO) categorised
gliomas into - HGG/high grade glioma/glioblastoma/IV stage /malignant &
LGG/low grade glioma/II and III stage /benign. Although most of the LGG tumors
have slower growth rate compared to HGG and are responsive to treatment, there is
a subgroup of LGG tumors which if not diagnosed earlier and left untreated could
lead to GBM. In both cases a correct treatment planning(including surgery,
radiotherapy, and chemotherapy separately or in combination) becomes necessary,
considering that an early and proper detection of the tumor grade can lead to a good
prognosis. Survival time for a GBM (Glioblastoma Multiform) or HGG patient is
very low i.e. in the range of 12 to 15 months.
Since glioblastomas are infiltrative tumours, their borders are often fuzzy and hard to
distinguish from healthy tissues. As a solution, more than one MRI modality is often
employed e.g. T1 (spin-lattice relaxation), T1-contrasted (T1C), T2 (spin-spin
relaxation), proton density (PD) contrast imaging, diffusion MRI (dMRI), and fluid
attenuation inversion recovery (FLAIR) pulse sequences. T1-weighted images with
intravenous contrast highlight the most vascular regions of the tumor (T 1C gives
much more accuracy than T1.), called ‗Enhancing tumor' (ET), along with the ‗tumor
core' (TC) that does not involve peritumoral edema. T2-weighted (T2W) and T2W-
Fluid Attenuation Inversion Recovery (FLAIR) images are used to evaluate the
tumor and peritumoral edema together defined as the ‗whole tumor' (WT). Gliomas
and glioblastomas are difficult to distinguish in T1, T1c, T2 and PD. They are better
identified in FLAIR modalities.
15
We have attempted to separate the brain tumor into following types-necrosis (1),
edema (2), non- enhancing (malignant) (3) and enhancing (benign) (4) tumor. MRI
images can be of three types on the basis of position from which they are taken
which are Sagittal (side), Coronal (back) and Axial (top). We have used sagittal
images in our project.
Neural Networks (NN) form the base of deep learning, a subfield of machine
learning where the algorithms are inspired by the structure of the human brain. NN
take in data, train themselves to recognize the patterns in this data and then predict the
outputs for a new set of similar data. NN are made up of layers of neurons. These
neurons are the core processing units of the network. First we have the input layer
which receives the input; the output layer predicts our final output. In between, exist
the hidden layers which perform most of the computations required by our network.
Our brain tumor images are composed of 128 by 128 pixels which make up for
16,384 pixels. Each pixel is fed as input to each neuron of the first layer.Neurons of one
layer are connected to neurons of the next layer through channels .Each of these
channels is assigned a numerical value known as ‗weight'. The inputs are multiplied to
the corresponding weight and their sum is sent as input to the neurons in the hidden
layer. Each of these neurons is associated with a numerical value called the bias' which
is then added to the input sum. This value is then passed through a threshold function
called the ‗activation function'. The result of the activation function determines if the
particular neuron will get activated or not. An activated neuron transmits data to the
neurons of the next layer over the channels. In this manner the data is propagated
through the network this is called ‗forward propagation'. In the output layer the neuron
with the highest value fires and determines the output. The values are basically a
probable. The predicted output is compared against the actual output to realize the ‗error'
in prediction. The magnitude of the error gives an indication of the direction and
magnitude of change to reduce the error.
16
This information is then transferred backward through our network. This is known
as back propagation'. Now based on this information the weights are adjusted. This
cycle of forward propagation and back propagation is iteratively performed with
multiple inputs. This process continues until our weights are assigned such that the
network can predict the type of tumor correctly in most of the cases. This brings our
training process to an end. NN may take hours or even months to train but time is a
reasonable trade-off when compared to its scope Several experiments show that after
pre-processing MRI images, neural network classification algorithm was the best
more specifically CNN(Convolutional Neural Network) as compared to Support
Vector Machine(SVM),Random Forest Field.
Results are
Input from
shown on IoT
medical
based devices or
professionals or
Web-based
users
applications
Weights(w)
Nodes
17
4. Transfer Learning:
A major assumption in many machine learning and data mining algorithms is
that the training and future data must be in the same feature space and have the same
distribution. However, in many real-world applications, this assumption may not
hold. For example, we sometimes have a classification task in one domain of interest,
but we only have sufficient training data in another domain of interest, where the latter
data may be in a different feature space or follow a different data distribution. In
such cases, knowledge transfer, if done successfully, would greatly improve the
performance of learning by avoiding much expensive data labelling efforts. In recent
years, transfer learning has emerged as a new learning framework to address this
problem.
Transfer learning allows neural networks using significantly less data .With
transfer learning, we are in effect transferring the ‗knowledge' that a model has
learned from a previous task, to our current one. The idea is that the two tasks are not
totally disjoint, as such we can leverage whatever network parameters that model
has learned through its extensive training, without having to do that training
ourselves. Transfer learning has been consistently proven to boost model accuracy
and reduce required training time, less data, less time, more accuracy. Transfer
learning is classified to three different settings: inductive transfer learning,
transductive transfer learning and unsupervised transfer learning. Most previous
works focused on the settings. Furthermore, each of the approaches to transfer
learning can be classified into four contexts based on ―what to transfer‖ in learning.
They include the instance-transfer approach, the feature-representation-transfer
approach, the parameter transfer approach and the relational- knowledge-transfer
approach, respectively.
The smaller networks converged & were then used as initializations for the
larger, deeper networks- This process is called pre-training. While making logical
sense, pre-training is a very time consuming, tedious task, requiring an entire
network to be trained before it can serve as an initialization for a deeper network.
5. Activation Function:
Sigmoid function ranges from 0 to 1 and is used to predict probability as
an output in case of binary classification while Softmax function is used for
multi-class classification. tanh function ranges from -1 to 1 and is considered
better than sigmoid in binary classification using feed forward algorithm. ReLU
(Rectified Linear Unit) ranges from 0 to infinity and Leaky ReLU
18
(better version of ReLU) ranges- from -infinity to +infinity. ReLU stands for
Rectified Linear Unit for a non-linear operation. The output is ƒ(x) =
max(0,x).ReLU's purpose is to introduce non-linearity in our ConvNet. Since, the
real world data would want our ConvNet to learn would be non-negative linear
values. There are other nonlinear functions such as tanh or sigmoid that can also
be used instead of ReLU. Most of the data scientists use ReLU since performance
wise ReLU is better than the other two. Stride is the number of pixels that would
move over the input matrix one at a time.
Sometimes filter does not fit perfectly fit the input image. We have two
options: either pad the picture with zeros (zero-padding) so that it fits or drop the
part of the image where the filter did not fit. This is called valid padding which
keeps only valid part of the image.
19
Convolutional neural network processes closely knitted data used for
image classification, image processing, face detection etc. It is a
specialised 3D structure with specialized NN analysing RGB layers of an
image .Unlike others, it analyses one image at a time .
Disadvantages-
Solution-Transfer Learning for inadequate data which will replace the last fully
connected layer with pre-trained ConvNet with new fully connected layer.
Batch
Convolutional Max Pooling
Input Layer Activation Layer Normalisation
Layer Layer
Layer
Fully Connected
Output Layer Dense Layer Flaten Layer Dropout Layer
Layer
Python:
OpenCV:
Tkinter:
The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk
GUI toolkit. Both Tk and tkinter are available on most Unix platforms, including
macOS, as well as on Windows systems.
22
PIL:
Python Imaging Library (expansion of PIL) is the de facto image processing package
for Python language. It incorporates lightweight image processing tools that aids in
editing, creating and saving images.
Imutils:
Visual Studio Code is a lightweight but powerful source code editor which runs on
your desktop and is available for Windows, macOS and Linux. It comes with built-in
support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions
for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as
.NET and Unity). Begin your journey with VS Code with these introductory videos.
Visual Studio Code features a lightning fast source code editor, perfect for day-to-day
use. With support for hundreds of languages, VS Code helps you be instantly
productive with syntax highlighting, bracket-matching, auto-indentation, box-
selection, snippets, and more. Intuitive keyboard shortcuts, easy customization and
community-contributed keyboard shortcut mappings let you navigate your code with
ease.
For serious coding, you'll often benefit from tools with more code understanding than
just blocks of text. Visual Studio Code includes built-in support for IntelliSense code
completion, rich semantic code understanding and navigation, and code refactoring.
And when the coding gets tough, the tough get debugging. Debugging is often the one
feature that developers miss most in a leaner coding experience, so we made it
happen. Visual Studio Code includes an interactive debugger, so you can step through
source code, inspect variables, view call stacks, and execute commands in the console.
VS Code also integrates with build and scripting tools to perform common tasks
making everyday workflows faster. VS Code has support for Git so you can work
with source control without leaving the editor including viewing pending changes
diffs.
23
HARDWARE REQUIREMENT
Image Acquisition:
Kaggle dataset:
Images can be in the form of .csv (comma separated values), .dat (data) files
in grayscale, RGB, or HSV or simply in .zip file as was in the case of our
online Kaggle dataset. It contained 98 healthy MRI images and 155 tumor
infected MRI images.
24
Fig: 1.Online Kaggle dataset(above two) 2. BRaTS MICCAI dataset (below
25
Data Augmentation:
Data augmentation consists of Grey Scaling(RGB/BW to ranges of
grey),Reflection(vertical/horizontal flip),Gaussian Blur(reduces image
noise),Histogram equalisation(increases global contrast),Rotation(may not preserve
image size),Translation(moving the image along x or y axis), linear
transformation such as random rotation (0-10 degrees), horizontal and vertical
shifts, and horizontal and vertical flips. Data augmentation is done to teach the
network desired invariance and robustness properties, when only few training
samples are available.
Image Pre-Processing:
Segmentation:
Brain tumor segmentation involves the process of separating the tumor tissues
(Region ofInterest - ROI) from normal brain tissues and solid brain tumor with
the help of MRI images or other imaging modalities. Its mechanism is based on
identifying similar type of subjects insidean image and forms a group of such by
either finding the similarity measure between the objectsand group the objects
having most similarity or finding the dissimilarity measure among the objects
and separate the most dissimilar objects in the space. Segmentation algorithms
can be of two type which are bi-clusters (2 sub-parts) or multi-clustered (more
than 2 sub-parts) algorithms. Segmentation can be done by using-Edge
Detection, Region Growing, Watershed,Clustering via FCM, Spatial Clustering,
Split and Merge Segmentation and Neural Network via MLP(ANN+DWT).
In order to identify the tumor region from the brain image, Binary
Thresholding can be used (via Region Growing method), which converts a gray
scale image to binary image based on the selected threshold values. The problems
associated with such approach are that binary image results in loss of texture and
the threshold value comes out be different for different images. Hence, we are
26
looking for a more advanced segmentation algorithm, the watershed algorithm by
using Otsu Binarisation.
Feature Extraction:
Feature Extraction is the mathematical statistical procedure that extracts the
quantitative parameter of resolution changes/abnormalities that are not visible to
the naked eye. Examples ofsuch features are Entropy, RMS, Smoothness,
Skewness, Symmetry, Kurtosis, Mean, Texture,
Variance,Centroid,CentralTendency,IDM(InverseDifferenceMoment),Correlation,Ener
gy,Homogeneity,Dissimilarity,Contrast,Shade,Prominence,Eccentricity, Perimeter,
Area and many more.
Feature Extraction is identifying abnormalities. We need to extract some
features from images as we need to do classification of the images using a
classifier which needs these features to get trained on. We chose to extract GLCM
(texture-based features). Gray Level Co-occurrence Matrix (GLCM) features are
based on probability density function and frequency of occurrence of similar
pixels. GLCM is a statistical method of examining texture that considers the
spatial relationship of pixels.
After training the model, we need to validate and fine-tune the parameters and
finally test the model on unknown samples where the data undergoes feature
extraction on the basis of which the model can predict the class by matching
corresponding labels. To achieve this, we can either split our dataset in the ratio of -
60/20/20 or 70/20/10. We have used the former one.
For a given training dataset, back-propagation learning may proceed in one of the
following two basic ways:
• Pattern/Sequential/Incremental mode where the whole sequence of forward
and backward computation is performed resulting in weight adjustment for
each pattern. It again starts from the first pattern till errors are minimised,
within acceptable levels. It is done online, requires less local storage, faster
method and is less likely to be trapped in local minima.
27
• Batch mode where the weight upgradation is done after all the N training sets
or ‗epochs' are presented. After presentation of the full set, weights are
upgraded and then again the whole batch/set is presented iteratively till the
minimum acceptable error is arrived at by comparing the target and actual
outputs. Training stops when a given number of epochs elapse or when the
error reaches an acceptable level or when the error stops improving.
We have used this mode during our Machine Learning training by taking the value of
N as 30.
In unsupervised network, there is no teacher i.e. labels are not provided along with
the data to the network. Thus, the network does not get any feedback about the
errors. The network itself discovers the interesting categories or features in the input
data. In many situations, the learning goal is not known in terms of correct
answers. The only available information is in the correlation of input data or
signals. The unsupervised networks are expected to recognise the input patterns,
classify these on the basis of correlations and produce output signals
corresponding to input categories. It is a type of dynamic programming that trains
algorithm using a system of reward and punishment. Agent learns without human
interaction and examples and only by interacting with the environment. For our
purpose, we have used supervised network or Reinforced Learning for training our
model.
28
.
Fig: A diagram showing Unsupervised (left) and Supervised Learning Network (right)
29
IMPLEMENTATION METHODOLOGY:
Figure 1
Home Page
31
Select image
32
Test Result
33
Tumor Region B&W
34
Tumor Region Colour
35
CONCLUSION
Chances over over-fitting the dataset is higher when training the model
from scratch rather than using pre-trained Keras.Keras also provides an easy
interface for data augmentation.
Amongst the Keras models, it is seen that ResNet 50 has the best overall
accuracy as well as F1 score.ResNet is a powerful backbone model that is used
very frequently in many computer vision tasks. Precision and Recall both cannot
be improved as one comes at the cost of the other .So, we use F1 score too.
Transfer learning can only be applied if low-level features from Task
1(image recognition) can be helpful for Task 2(radiology diagnosis).
For a large dataset, Dice loss is preferred over Accuracy. For small size of
data, we should use simple models, pool data, clean up data, limit
experimentation, use regularisation/model averaging ,confidence intervals and
single number evaluation metric.
36
FUTURE SCOPE
For more complex datasets, we can use U-Net architecture rather than CNN
where the max pooling layers are just replaced by upsampling ones. Ultimately
we would like to use very large and deep convolutional nets on video sequences
where the temporal structure provides very helpful information that is missing or
far less obvious in static images. Unsupervised transfer learning may attract more
and more attention in the future.
37
BIBLIOGRAPHY
[9]. Sergio Pereira, Adriano Pinto, Victor Alves, and Carlos A. Silva ―Brain
TumorSegmentation Using Convolutional Neural Networks in MRI
Images‖IEEE TRANSACTIONSON MEDICAL IMAGING, VOL. 35, NO. 5,
MAY 2016
38
[11]. S.C. Turaga, J.F. Murray, V. Jain, F. Roth, M. Helmstaedter, K.
Briggman,W. Denk, and H.S. Seung. Convolutional networks can learn to
generate affinity graphs for imagesegmentation. Neural Computation,
22(2):511–538, 2010
[12] A Reliable Method for Brain Tumor Detection Using Cnn Technique
NeethuOuseph C1,Asst. Prof. Mrs.Shruti K2 1(Digital electronics ECE,
Malabar Institute of Technology, India)2(Electronics and Communication
Engineering, Malabar Institute of Technology, India)
39
[20] MinuSamantaray ,MilleePanigrahi, K.C .Patra ,AvipsaS.Panda and Rina
Mahakud ―An adaptive filtering technique filtering technique for brain tumor
analysis and detection‖,10th International Conference on Intellligent and Control
(ISCO),2016.
[21] S.U. Aswathy, G.Glan Deva Dhas and S.S. Kumar ―A Survey on detection of
brain tumor from MRI Brain images‖, 7th International Conference on Cloud
Computing, Data Science & Engineering -Confluence 2017.
40
REFERENCES
[1] https://keras.io/applications/
[2] https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-
the-eli5-way-3bd2b1164a53
[3] https://towardsdatascience.com/transfer-learning-from-pre-trained-models-f2393f124751
[4] https://simpleitk.org
[5]https://neurohive.io/en/popular-networks/resnet/
[6]https://scikit-learn.org/stable/modules/svm.html
[7]http://builtin.com/data-science/transfer-learning
[8]https://openreview.net/forum?id=BJIRs34Fvr
[9]https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6640210
[10] https://arxiv.org/pdf/1409.1556.pdf
[11] https://www.cse.ust.hk/~qyang/Docs/2009/tkde_transfer_learning.pdf
[12] https://arxiv.org/pdf/1409.4842.pdf
[13] https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-
networks.pdf
[14] https://arxiv.org/pdf/1512.03385.pdf
41