You are on page 1of 29

A SEMINAR REPORT ON

”BRAIN TUMOR CLASSIFICATION


USING DEEP LEARNING NETWORKS”

SUBMITTED TO SAVITRIBAI PHULE PUNE UNIVERSITY FOR THE PARTIAL


FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF

BACHELOR OF ENGINEERING

IN

ELECTRONICS AND TELECOMMUNICATION ENGINEERING

Submitted by
SATYAM KATAKWAR (Exam No: 71900942B)
SHAHBAZ ALAM (Exam No: 71901003K)
NEHA MOTHE (Exam No: 71901009J)

Under the Guidance of

PROF. DR. P.G. SHETE SIR

Department of Electronics and Telecommunication Engineering


Pune Vidyarthi Griha’s College of Engineering and Technology G K
Pate(Wani) Institute of Management, Pune -411009
UNDERTAKING

We, the students of Department of Electronics and Telecommunication Engineering, PVG’s College
of Engineering and Technology G K Pate(Wani) Institute of Management, Parvati, Pune-411009

1. Satyam Katakwar 71900942B


2. Shahbaz Alam 71901003K
3. Neha Mothe 71901009J

do hereby undertake on 01.06.2019 the following:

1. We are aware of the University Grants Commission (Promotion Of Academic Integrity and
Prevention of Plagiarism In Higher Educational Institutions) Regulations, 2018 and Plagiarism
Policy of Savitribai Phule Pune University Pune,

2. We are also aware that Department of Electronics and Telecommunication Engineering, PVG’s
College of Engineering and Technology G K Pate(Wani) Institute of Management, Parvati,
Pune has established Departmental Academic Integrity Panel (DAIP) as per UGC regulations
2018 as mentioned above in (1),

3. We are aware of the consequences if found guilty of doing any act of plagiarism defined in the
UGC regulations 2018 as mentioned above in (1),

4. We shall abide by the rules, regulations and code of conducts for the students of UGC, SPPU
and Department of ETC,

5. We further undertake and declare that the thesis submitted by us is scanned using anti-plagiarism
software as decided by the department and report of the same has been submitted and is free
from any kind of plagiarism mentioned above (1) in UGC REGULATIONS, 2018,

6. I understand that non-compliance of the Academic Integrity and Prevention of Plagiarism may
result in disciplinary action on us as per the University Grants Commission (Promotion of Aca-
demic Integrity and Prevention of Plagiarism in Higher Educational Institutions) Regulations,
2018.
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

”Department of Electronics and Telecommunication Engineering


Pune Vidyarthi Griha College of Engineering and Technology G K
Pate(Wani) Institute of Management, Pune -411009”

Certificate

We, the students of Department of Electronics and Telecommunication Engineering, PVG’s College

of Engineering and Technology G K Pate(Wani) Institute of Management, Parvati, Pune-411009 .

1. Satyam Katakwar 71900942B

2. Shahbaz Alam 71901003K

3. Neha Mothe 71901009J

towards the partial fulfillment of the degree of Bachelor of Engineering in Electronics and

Telecommunication Engineering to be awarded by the Savitribai Phule Pune University,

Pune at Pune Vidyarthi Griha’s College of Engineering and Technology G K Pate (Wani)

Institute of Management, Pune during the academic year 2021-2022

(Prof. Dr. P.G. Shete


(Prof. Dr. Y. B. Thakare sir) (Dr. M. R. Tarambale sir)
sir)
Head, Department of E TC Principal
Project Guide

Page 2
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

ACKNOWLEDGEMENT

First and foremost, I would like to thank our Project Guide Prof. Dr. P.G. Shete sir who guided

us in doing these projects. He provided us with invaluable advice and helped us in difficult periods.

His motivation and help contributed tremendously to the successful completion of the project.

Besides, we would like to thank HOD Dr. Y.B. Thakre sir, Prof V.U. Gongane mam and all the

teachers who helped us by giving us advice and providing the knowledge which we needed.

Also I would like to thank my family and friends for their support. Without that support we

couldn’t have succeeded in completing this project.

At last but not in least, we would like to thank everyone who helped and motivated us to work on

this project.

Satyam Katakwar

Shahbaz Alam

Neha Mothe

Page 3
Abstract

For successful treatment of the disease, accurate and early detection of brain tumours is essential.

Neuro-oncologists are benefiting in many ways by the advent of Computer-Aided Diagnosis and

biomedical informatics.This is generally done by extracting features through a convolutional neu-

ral network (CNN) and then classifying using a fully connected network. The work involves the

approach of deep neural network and incorporates a CNN based model to classify the MRI scans.

Deep learning(DL) is a subfield of machine learning and recently showed a remarkable performance

especially in classification problems. In this paper, a DL model based on a convolutional neural net-

work is to classify different brain tumor types using publicly available datasets. The model classifies

tumors into (meningioma, glioma, and pituitary tumor and no tumor). This project also explores the

application of transfer learning techniques, i.e., fine-tune and freeze using MRI slices of brain tumor

dataset—Figshare. The data augmentation techniques are applied to the MRI slices for generalization

of results, increasing the dataset samples and reducing the chance of over-fitting. And finally develop

an end to end web application that takes input test image and our GUI gives output the type of tumor

class it is present.
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

Abbreviations and Acronyms

CAD Computer Aided Diagnosis

CNN Convolutional Neural Network

DL Deep Learning

MRI Magnetic Resonance Imaging

ReLU Rectified Linear Unit

ADAM Adaptive Moment Estimation

TP True Positive

TN True Negative

FP False Positive

FN False Negative

GUI Graphical User Interface

RAM Random Access Memory

CUDA Compute Unified Device Architecture

CPU Central Processing Unit

SSD Solid State Drive

Page 1
Contents

1 Introduction 4

1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 Expected Outcomes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.4 Social relevance of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.5 Organization of the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.6 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 LITERATURE SURVEY 6

2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Takings from surveyed papers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2.1 Takings from Paper 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2.2 Takings from Paper 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2.3 Takings from Paper 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Design of System 9

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1.1 Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1.2 Life cycle Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1.3 Project Cost and Time Estimation . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.1.4 3.9 Software Requirements Specification Document . . . . . . . . . . . . . . . . 11

3.2 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.2.1 Explanation of block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.2.2 Working of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2.3 Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2.4 Pre-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.2.5 CNN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.2.6 Performance Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.3 Specifications of the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3.1 Dataset Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3.2 CNN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.3.3 Inception model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.3.4 Efficient Net model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.3.5 Resnet50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.3.6 AlexNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.3.7 System requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.3.8 Graphical user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 SIMULATION AND TESTING 20

4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.2 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 RESULT ANALYSIS And CONCLUSIONS 22

5.0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.0.2 Result Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.0.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Page 3
Chapter 1

Introduction

Brain tumor can be defined as unnatural and uncontrolled growth in brain cells. Since the human

skull is a rigid and volume limited body, consequently, any unexpected growth may affect a human

function according to the involved part of the brain. Brain tumors can be classified in many ways,

Normal, Glioma, Meningioma, Pituitary. Early detection and classification of brain tumors turn into

a vital task and accordingly help in selecting the most convenient treatment method to save patients’

lives. The classification stage may be a confusing and tedious task for physicians or radiologists in

some cases. This task relatively consumes time, and that’s why there is a need for a Computer

Aided Diagnosis (CAD) system such as Deep Learning (DL) to early detect brain tumors in much

less time without human intervention. The advantages of CNNs are feature learning and providing

unlimited accuracy rather than traditional machine learning which may be achieved by increasing

training samples and therefore leads to a more robust and accurate model.

1.1 Motivation

The motivation of the application is to aid neurosurgeons and radiologists in detecting brain tumors in

an inexpensive and non-invasive manner which will help in proper treatment methods to save patients’

lives.

1.2 Objectives

To develop an end to end web application of brain tumor multi classification system using Deep

Learning Model. Our project aims to enhance the current accuracy of digital MRI scans using the

best CNN model. Also to improve efficiency, specificity by detecting the presence of a tumor and

classifying using a Deep Learning (DL) mode using best CNN architecture.

4
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

1.3 Expected Outcomes

An end to end web application of brain tumor multi classification system to classify the brain tumors

into their types if tumor is present, such as Glioma, Meningioma, Pituitary, otherwise it classifies it

into no tumor category.

1.4 Social relevance of the project

Brain tumor occurs owing to uncontrolled and rapid growth of cells. If not treated at an initial phase,

it may lead to death. Despite many significant efforts and promising outcomes in this domain, accurate

detection and classification remain a challenging task. A major challenge for brain tumor detection

arises from the variations in tumor location, shape, and size. The objective is to accurately and faster

detect the brain tumor through magnetic resonance imaging to help the doctors, patient or radiologist.

1.5 Organization of the report

Brain tumor is classified into one of its four types of classes by use of deep learning. Images are

augmented to increase the dataset by a factor of 5 and normalization is applied and image is feeded

to an appropriate CNN model to extract features and classify into its type.

1.6 Problem Statement

To detect brain tumor at an early stage by taking input as brain MRI image and detect and predict

the type of tumor present by using appropriate CNN model to provide best improved treatment by

determining its location, its size, and impact on the surrounding areas by faster and accurate detection.

To increase the chances of tumor infected patient survival by accurate early detection and treatment.

Page 5
Chapter 2

LITERATURE SURVEY

2.1 Introduction

Here are some of the takings from different papers we have surveyed for the project. Main points

being about Transfer learning Multi-classification and Deep neural networks.

2.2 Takings from surveyed papers

2.2.1 Takings from Paper 1

(Multi-classification of Brain Tumor Images using Deep Neural Network) A DL model based on a

convolutional neural network is to classify different brain tumor types using two publicly available

datasets. The former one classifies tumors into (meningioma, glioma, and pituitary tumor). The

other one differentiates between three glioma grades (Grade II, Grade III, and Grade IV).The network

structure achieves a significant performance with a best overall accuracy of 96.13

There are 4 main stages in the method. 1. Data Set 2. Pre-Processing stage 3. CNN architecture

4. Regularization techniques and optimization algorithm In the first stage preprocessing is done to

eliminate the noisy data from images. CNN architecture is the main stage of this project as all the deep

learning algorithms will work in this stage. This stage includes features selection and down-sampling

(convolution, Rectified Linear Unit (ReLU), normalization and pooling layers).

Many techniques have been used to avoid overfitting during preprocessing and training phases.

First, data augmentation is used to avoid overfitting by making a geometric and color distortion on

the original images. Optimization is used mainly to update network parameters.

6
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

2.2.2 Takings from Paper 2

(Brain Tumor Detection and Classification Using Convolutional Neural Network and Deep Neural

Network)

Computer-aided mechanisms are applied to obtain better results as compared with manual tra-

ditional diagnosis practices. This is generally done by extracting features through a convolutional

neural network (CNN) and then classifying using a fully connected network. The work involves the

approach of deep neural networks and incorporates a CNN based model to binary classify the MRI as

“TUMOUR DETECTED” or “TUMOUR NOT DETECTED”.

In this paper, they proposed a model consisting of 3-layered CNN Architecture. Through CNN

architecture, to predict performance, each input image is filtered by a series of layers such as convolu-

tion, pooling, and fully connected layers. It uses the function Softmax to classify.Various Activation

Functions have been used in the, they are:- 1) Rectified linear units (ReLU) 2) Hyperbolic Tangent

function- Tanh 3) Sigmoid Activation function Some of the perceptron has been dropped off in order

to prevent overfitting. The loss function utilized the “binary crossentropy” whereas the optimiser is

ADAM.

2.2.3 Takings from Paper 3

(Automatic Brain Tumors Classification Using Transfer Learning The computer-aided tumor detection

systems and convolutional neural networks provided success stories and have made important strides

in the field of machine learning. The deep convolutional layers extract important and robust features

automatically from the input space as compared to traditional predecessor neural network layers. In

the proposed framework, we conduct three studies using three architectures of convolutional neural

networks (AlexNet,GoogLeNet, and VGGNet) to classify brain tumors such as meningioma, glioma,

and pituitary.

Each study explores the transfer learning techniques, i.e., fine-tune and freeze using MRI slices of

brain tumor dataset—Figshare. The data augmentation tech-niques are applied to the MRI slices for

generalization of results, increasing the dataset samples and reducing the chance of over-fitting. In

the proposed studies, the fine-tuneVGG16 architecture attained highest accuracy up to 98.69 in terms

of classification and detection.

Page 7
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

Page 8
Chapter 3

Design of System

3.1 Introduction

Our multi classification of brain tumors using deep learning will classify brain tumors into one of four

types of brain tumor and this project will be developed into end to end web application where users

can input images and detect the type of tumor present.

It will be an end to end web application where the user takes an input brain MRI image and after

processing it will predict the type of tumor it is. Our study deals with automated brain tumor multi

classification. Normally the anatomy of the brain can be viewed by MRI scan for diagnosis. Brain

tumors usually cause unpredictable neurological harm to the body making detection of the tumor

crucial for its treatment.

It is important to predict the tumor and classify it so that appropriate treatment can be planned

at an early stage. Different types of CNN architecture will be used for brain tumor detection and

classification.

3.1.1 Feasibility

Economic Feasibility: Python is a Free and Open Source language and is widely used my millions

of programmers and is available for everyone to use.

Technical Feasibility: Technology assesses the current resources (such as software) and technology,

which are required to accomplish user requirements in the software within the allocated time and bud-

get (free). Software used for project implementation is Python and frameworks like keras, tensorflow

etc.

Schedule Feasibility: The project till now has taken over 4 months and will need 2-3 more month

to be completed end to end.

9
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.1.2 Life cycle Model

Waterfall model is non-iterative design process where System requirements are known initially and

final outcome is determined. It progresses steadily downwards through above given faces.

When to use waterfall model:

• This model is used only when the requirements are very well known, clear and fixed.

• Product definition is stable.

• Technology is understood.

• There are no ambiguous requirements

• Ample resources with required expertise are available freely

Fig 1 Waterfall Model.

Functionality 2: Design

• Designing the process overview from applying Augmentation, Preprocessing, Models Testing

Training.

Functionality 3: Implementation

• Implementing all models in Google colab.

Functionality 4: Verification

Page 10
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

• Verifying it by testing it on minimum 50 datasets of scans.

Functionality 5: Maintenance·

• Maintaining from time to time for its efficiency.

Project deliverables:

• Software Project Management Plan

• Software Requirements specifications

• Software Design Description

• System Test Document

• User Interface Module

• Final Product

3.1.3 Project Cost and Time Estimation

No cost because project soft-wares are open source

3.1.4 3.9 Software Requirements Specification Document

Our objective is to develop a system incorporating image processing, and computer vision techniques

for enhancement of brain tumors. Our study aims at enhancing the current accuracy (diagnostic)

of digital MRI scans using industry standard simulation software tool, Python and framework like

Tensorflow, Keras and the online dataset.

These techniques involve pre-processing of digital MRI scans by resizing them and then apply the

CNN model to classify it into its class. The system is expected to improve the efficiency, sensitivity

and specificity of brain tumor screening, and possibly reduce health

Page 11
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.2 Block Diagram

Fig 1 Block Diagram of system.

3.2.1 Explanation of block diagram

The block diagram of brain tumor multi classification by deep learning is as shown above. The CNN

based brain tumor multi classification is divided into two phases i.e. training and testing phase. Here

we splitted dataset into 68

The number of images is divided into different categories by using labels such as Glioma, Pituitary

and Meningioma. In the training phase, preprocessing, feature extraction and classification with Loss

function is performed to make a prediction model.

And in this phase this system loads and extracts images from training image dataset and label

from datasets raw files and then makes preprocessing and augmentation techniques. Then we use CNN

models which learn features from input data and extract features directly from images. The relevant

features are not pretrained; they are learned while the network trains on a collection of images. This

automated feature extraction makes deep learning models highly accurate for computer vision tasks

to classify tumors. The features are then used to create a model that categorizes the tumors in the

image. With a deep learning workflow, relevant features are automatically extracted from images.

In addition, deep learning performs “end-to-end learning” – where a network is given raw data and

a task to perform, such as classification, and it learns how to do this automatically. A key advantage

of deep learning networks is that they often continue to improve as the size of data increases. Now

Page 12
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

in the second phase we load the test images and apply preprocessing on it, then predict their classes

using the prediction model.

3.2.2 Working of the project

Our project is end to end development of web application of brain tumors multi classification using

deep learning networks. Here we will develop a graphical user interface to take a test image (or any

raw brain tumor MRI image) as input to our pretrained prediction model, then it will predict the

output after processing and will show it on our web application about which class of tumor it is.

Fig 2 Class Diagram

3.2.3 Dataset

For the image dataset we have chosen a brain tumor database containing 3064 T1 weighted contrast-

enhanced MRI images acquired from Nanfang. It has 3 types of tumor namely glioma, meningioma,

pituitary in three planes i.e. sagittal, axial and coronal plane.

We are also going to work on a second brain tumor image dataset (No tumor, Glioma, Pituitary

meningioma ) available on kaggle having 5712 training MRI images and 1311 test MRI images.

3.2.4 Pre-Processing

We have an original MRI image with 512x512x1 pixels and will not downsize the original image, so

that we do not lose important features because our convolution method for classification requires big

resolutions and will give us high accuracy. We augment the images of dataset so that the system can

identify them as new ones, and that is usually used to avoid overfitting and increase model robustness.

We augment this by flipping around the x-axis, right/left mirroring, adding salt noise and image

rotation by 45 degrees. Now we have 15,320 images. Now we normalise the image pixel in the range

0-1 to fastly process inputs using small weights.

Page 13
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.2.5 CNN Architecture

Here we will be using multiple CNN architectures like EfficientNetB0, B1, B2, . . . B7, Resnet50,

InceptionV3 and find the appropriate best model which gives highest accuracy in predicting the

tumor.

A typical CNN model consists of two parts: feature extraction and classification. CNN performs

feature extraction and classification through sequentially trainable layers placed one after the other.

Feature extraction part of the CNN generally includes the convolutional and pooling layers, whereas

the classification part includes the fully connected and classification layers. We will feed the image to

our model after augmentation and normalisation. CNN model is designed to classify a given image into

4 classes, the output layer has four neurons. The last fully connected layer, which is a four-dimensional

feature vector, is given as an input to the classifier, which makes the final prediction about the tumor

type.

3.2.6 Performance Evaluation

It is very important to evaluate the classification performance in image classification studies to sci-

entifically support the results of the study. There are various performance evaluation metrics that

have been used for a long time in image classification studies and have become standard performance

evaluation metrics in similar studies. These are accuracy, specificity, sensitivity and precision. These

metrics that are accepted as standard performance evaluation metrics in image classification studies

are also used to measure the accuracy and reliability of the classification process. TP, TN, FP and

FN are true positive, true negative, false positive and false negative, respectively.

Formulas:

Accuracy = (TP + TN) / (TP + TN + FP + FN)

Specificity = TN / (TN + FP)

Sensitivity = TP / (TP + FN)

Precision = TP / TP + FP

Page 14
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.3 Specifications of the system

To detect brain tumor at an early stage by taking input as brain MRI image using 512x512x1 pixel as

input image to CNN model.To detect and predict the type of tumor(glioma, meningioma, pituitary &

no tumor) present after training by using appropriate CNN model to provide best improved treatment

by determining its location.

3.3.1 Dataset Specification

1. Dataset 1

– 3064 T1 weighted contrast-enhanced MRI images

– 3 types of tumor namely glioma, meningioma, pituitary

– Image format is .mat file and dimension is 512 x 512 x 1 pixel

– Size of dataset is 880 mb and size of each image is 200-300 kb

– Horizontal and vertical resolution are 100 dpi each and bit depth of 24

2. Dataset 2

– This image dataset (No tumor, Glioma, Pituitary meningioma ) available on kaggle have 5712

training MRI images and 1311 test MRI images

– Total size of the dataset is 158 mb size of each image is 20-30kb

– Dimension of images is 512 x 512 x 1

3. Dataset input to model

– We will use the original size 512 x 512 x 1 image input to our model and will not downsize the

image to have higher accuracy

– So that we do not lose important features because our convolution method for classification

requires big resolutions and will give us high accuracy but will take more computational time

for training

4. Augmentation and Normalisation

– We augment the images (increase no. of images) by a factor of 5 by flipping around the x-axis,

right/left mirroring, adding salt noise and image rotation by 45 degrees

– Normalize the image pixel in the range 0-1 to fastly process inputs using small weights

Page 15
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.3.2 CNN Architecture

Will be using multiple CNN architectures like EfficientNetB0, B1, B2, . . . B7, Resnet50, In-

ceptionV3 and find the appropriate best model which gives highest accuracy in predicting the

tumor.

Table 1 Models parameters and their accuracy .

3.3.3 Inception model

Inception v3 is a widely-used image recognition model that has been shown to attain greater

than 78.1% accuracy on the ImageNet dataset. The model is the culmination of many ideas

developed by multiple researchers over the years. The model itself is made up of symmetric

and asymmetric building blocks, including convolutions, average pooling, max pooling, concats,

dropouts, and fully connected layers. Batchnorm is used extensively throughout the model and

applied to activation inputs. Loss is computed via Softmax

Fig 3 Inception Model

Page 16
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.3.4 Efficient Net model

EfficientNet is a convolutional neural network architecture and scaling method that uniformly

scales all dimensions of depth/width/resolution using a compound coefficient. Unlike conven-

tional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly

scales network width, depth, and resolution with a set of fixed scaling coefficients.

Fig 4 EfficientNet Model

3.3.5 Resnet50

ResNet, short for Residual Networks is a classic neural network used as a backbone for many

computer vision tasks. This model was the winner of ImageNet challenge in 2015. The funda-

mental breakthrough with ResNet was it allowed us to train extremely deep neural networks

with 150+layers successfully. Prior to ResNet training very deep neural networks was difficult

due to the problem of vanishing gradient

3.3.6 AlexNet

AlexNet is a leading architecture for any object-detection task and may have huge applications

in the computer vision sector of artificial intelligence problems. In the future, AlexNet may be

adopted more than CNNs for image tasks.

Page 17
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

Fig 5 Model Parameters vs accuracy

– As you can see, even the baseline B0 model starts at a much higher accuracy, which only goes

on increasing, and that too with fewer parameters. For instance, EfficientB0 has only 5.3 million

parameters!

– In the high-accuracy regime, our EfficientNet-B7 reaches state-of-the-art 84.4% top-1 / 97.1 %

top-5 accuracy on ImageNet, while being 8.4x smaller and 6.1x faster on CPU inference than

the previous Gpipe. Compared with the widely used ResNet-50, our EfficientNet-B4 uses similar

FLOPS, while improving the top-1 accuracy from 76.3% of ResNet-50 to 82.6% (+6.3%).

– EfficientNet models achieve both higher accuracy and better efficiency over existing CNNs,

reducing parameter size and FLOPS by an order of magnitude.

Page 18
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

3.3.7 System requirement

1) GPU

– An NVIDIA GPU is preferable because of the available frameworks and APIs (CUDA and

CuDNN) compatible with major deep learning frameworks such as TensorFlow and PyTorch.

– Minimum 2GB, More the GPU size faster the computations processing of data

2) RAM

– Although a minimum of 8GB RAM can do the job, 16GB RAM and above is recommended for

most deep learning tasks

– The larger the RAM the higher the amount of data it can handle, leading to faster processing.

With more RAM you can use your machine to perform other tasks as the model trains.

3) CPU

– Minimum of 7th generation (Intel Core i7 processor) is recommended. However, getting Intel

Core i5 with Turbo Boosts can do the trick.

4) Memory

– SSD is recommended for its speed and efficiency

– Storage depends upon the data (ours 256 GB SSD minimum)

3.3.8 Graphical user interface

– Creating flask web app for serving the model

– Easier in rendering server-side or using a Single Page Application model

– Flask, being a micro framework, is much more tolerant of custom code.

– In comparison Django is a more tightly integrated framework that can create unnecessary com-

plexity when implementing custom code for built-in functions.

– So, Flask is used mainly because of its simplicity.

Page 19
Chapter 4

SIMULATION AND TESTING

4.1 Introduction

In our learning phase we learnt basic image classification using convolutional neural network.

For simulation we tried handwritten digit classification on MNIST dataset

MNIST (Modified National Institute of Standards and Technology) is a well-known dataset used

in Computer Vision that was built by Yann Le Cun et. al. It is composed of images that are

handwritten digits (0-9), split into a training set of 50,000 images and a test set of 10,000 where

each image is of 28 x 28 pixels in width and height.

This dataset is often used for practicing any algorithm made for image classification as the

dataset is fairly easy to conquer. Hence, I recommend that this should be your first dataset if

you are just foraying in the field.

The basic steps to build an image classification model using a neural network are:

1) Flatten the input image dimensions to 1D (width pixels x height pixels)

2) Normalize the image pixel values (divide by 255)

3) One-Hot Encode the categorical column

4) Build a model architecture (Sequential) with Dense layers

5) Train the model and make predictions

20
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

4.2 Simulation

Fig 3 Simulation

Even though our max validation accuracy by using a simple neural network model was around

97%, the CNN model is able to get 98% with just a single convolution layer! in MNIST digit

classification.

And we got 97% train accuracy and 74% test accuracy in tumor multi classification using CNN.

Here we got this amazing result because we are using pre trained models which are much faster

than human made models layer by layer and is very efficient in giving us high accuracy. Along

with this we optimized the model by augmenting our images in different ways by flipping ,

cutmix, mixup, rotating etc and used K fold cross optimization which enhanced our overall

model.

Page 21
Chapter 5

RESULT ANALYSIS And


CONCLUSIONS

5.0.1 Introduction

In our project brain tumor classification using deep learning . We did research on various

CNN architectures and found out that EfficientNet backbones architectures perform the best

out of other models present like Resnet, VGG16, Inception, Alexnet etc. So we have chosen the

EfficientNet model as our CNN architecture to achieve highest accuracy.

5.0.2 Result Analysis

In this work, we have presented a CAD system for the classification of brain tumor MRI images

into four types (meningioma, glioma, and pituitary and no tumor) in one study, and The network

is constructed from 16 layers starting from the input layer which holds the preprocessed images

passing through the convolution layers and their activation functions (3 convolution, 3 ReLU,

normalization and 3 Max Pooling layers). We also performed CNN image classification on

MNIST dataset and with simple neural network model validation accuracy was around 97%, the

CNN model is able to get 98% with just a single convolution layer!

Additionally, two dropout layers are used to prevent overfitting followed by a fully connected

layer and a softmax layer to predict the output and finally a classification layer that produces

the predicted class. Although the dataset is relatively not big (due to the variety of imaging

views), data augmentation helped to show better results and hence overcome this problem.

Our architecture has achieved the highest accuracy of 97.13% and 74% in training and testing

accuracy respectively

22
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

5.0.3 Conclusion

Brain tumor classification is very crucial in the domain of medical science. In this paper, we

concentrated on developing a CNN classifier which classifies among three important tumor classes

(glioma, meningioma, pituitary and no tumor). This system classifies the images using the CNN

model. Initially, the proposed system preprocesses the image datasystem and classifies the

images using the CNN model. The CNN classifier will be very significant in the medical field

and in saving precious lives.

Page 23
Brain tumor classification Dept. of ETC, PVG’s COET GKPIM, Pune

Reference

[1] Hossam H. Sultan, Nancy M. Salem, Walid Al-Atabany “Multi-classification of Brain Tumor

Images using Deep Neural Network” IEEE International Conference on Communications , May 2019

[2] Chirodip Lodh Choudhury, Brojo Kishore Mishra , Chandrakanta Mahanty, Raghvendra Ku-

mar “Brain Tumor Detection and Classification Using Convolutional Neural Network and Deep Neural

Network” IEEE 2020 International Conference on Computer Science, Engineering and Applications

(ICCSEA)

[3] Arshia Rehman, Saeeda Naz, Muhammad Imran Razzak. A Deep Learning-Based Framework

for Automatic Brain Tumors Classification Using Transfer Learning.Springer, 2020 Circuits Syst Sig-

nal Process.

[4] Mahmoud Khaled Abd-Ellah, Ali Ismail Awad, Ashraf A. M. Khalaf, and Hesham F. A. Hamed

“Design and Implementation of a Computer-Aided Diagnosis System for Brain Tumor Classifica-

tion”2016 28th International Conference on Microelectronics (ICM)

[5] Dataset 1 The image database, provided as a set of slices, contains 3064 T1-weighted contrast-

enhanced MRI images acquired from Nanfang. There are three types of tumors: meningioma (708

images), glioma (1426 images), and pituitary tumor (930 images).

https://www.kaggle.com/jarvisgroot/brain-tumor-classification-mri-images

[6] Dataset 2 Training testing images of no tumor, glioma, meningioma, pituitary: 1222, 400 respec-

tively. https://www.kaggle.com/sartajbhuvaji/brain-tumor-classification-mri

Page 24

You might also like