Brain Stokc
Brain Stokc
BY
Asif Mahmud
ID: 183-15-2315
AND
Raisul Islam
ID: 183-15-2319
Supervised By
Co-Supervised By
BOARD OF EXAMINERS
Name: Chairman
Designation
Department of Computer Science and Engineering
Faculty of Science & Information Technology
Daffodil International University
We hereby declare that, this project has been done by us under the supervision of Dr. S M Aminul
Haque, Associate Professor, Department of Computer Science and Engineering, Daffodil
International University. We also declare that neither this project nor any part of this project has
been submitted elsewhere for award of any degree or diploma.
Supervised by:
Co-Supervised by:
Submitted by:
Asif Mahmud
ID: -183-15-2315
Department of CSE
Daffodil International University
Raisul Islam
ID: -183-15-2319
Department of CSE
Daffodil International University
First we express our heartiest thanks and gratefulness to almighty God for His diving
blessing makes us possible to complete the final year project/internship successfully.
We really grateful and wish our profound our indebtedness to Dr. S M Aminul
Haque, Associate Professor, Department of CSE Daffodil International University,
Dhaka. Deep Knowledge & keen interest of our supervisor in the field of “Data
mining” to carry out this project. His endless patience ,scholarly guidance ,continual
encouragement, constant and energetic supervision, constructive criticism , valuable
advice ,reading many inferior draft and correcting them at all stage have made it
possible to complete this project.
We would like to express our heartiest gratitude to Md. Sabab Zulfiker, Lecturer
(Senior Scale), Department of CSE, for his kind help to finish our project and also to
other faculty member and the staff of CSE department of Daffodil International
University.
We would like to thank our entire course mate in Daffodil International University,
who took part in this discuss while completing the course work.
Finally, we must acknowledge with due respect the constant support and patients of
our parents.
Brain Hemorrhage has gotten to be an extreme issue in the world. Brain Hemorrhage is also
called ‘Brain Stroke’ in our country. The amount of the stroke may be a particularly difficult
process among all of them; the brain stroke is the toughest one. There are three types of
strokes. Hemorrhagic Stroke, Ischemic Stroke and Transient Ischemic Attack (TIA).One of
the discrete methods that emerged as a first-line, radiation-free method of diagnosing brain
stroke is magnetic resonance imaging (MRI). Most of the people (87%) are affected by
Ischemic stroke. To distinguish this hemorrhage, we got to do a lab test at therapeutic. But
that's exceptionally costly for our country. So, we choose to do something for them. After
research, we developed a project which can detect this type of hemorrhage using deep
learning neural network based algorithm. When it comes to picture identification, deep
learning has made significant progress. To do that we collected raw data (CT Scan Copy)
from a number of hospital, we preprocessed it with a help of radiologist and finally trained
our model to nail our goal which is detecting hemorrhage stroke. Right now, we have been
found that VGG-16 achieves a high rate of accuracy with a minimal level of complexity.
It’s about 93 up percentage accuracy in total.Keywords: Brain Stoke, MRI, VGG-16.
CONTENTS PAGE NO
Board of examiners i
Declaration ii
Acknowledgment iii
Abstract iv
CHAPTER
1. INTRODUCTION 1-4
1.2 Motivation 2
3.1 Introduction 10
4.1 Introduction 20
6.1 Conclusions 26
REFERENCES 27-28
1.1 Introduction
One of the most widely studied topics today is brain stroke. Strokes are defined by the World
Health Organization which is an acute, focal or diffuse, dysfunction of the brain, originating for
vessels and lasting for a period longer than a day. The brain, which has billions of cells, is one
of the body's essential organs. Stroke is the third leading disease of death in the United States .
There are 15 million people suffer stroke worldwide every year (World Health Organization).
A high-grade stroke is also referred to as malignant. Cancerous strokes are not benign
strokes. As a result, it doesn't spread to other brain regions. The cancerous stroke, however,
is a malignant stroke. Because of this, it easily and quicklyspreads to other parts of the body
with arbitrary boundaries, making it dangerous. It results in instant death, according to
medical specialists. Clinical professionals must help patients access more effective e-health
care systems because it results in immediatemortality. Health care systems are useful in a
variety of medical fields. Biomedical imaging technologies based on computer vision are
becoming more important as they give radiologists recognition data for solving treatment-
related issues more effectively. There are numerous medical imaging techniques and
approaches, including X-rays, MRIs, ultrasounds, and computerized tomography (CT),
which have a significant impact on how patients are diagnosed and treated. In particular, an
MRI image can be used to track a stroke's progression using modeling. MRI images contain
more data thanCT or ultrasound images do. A magnetic resonance imaging (MRI) image
may be usedto detect irregularities in brain tissue and offer detailed information on brain
anatomy. It affects a lot of individuals right now, and therapy is pricey. People sometimes
want to avoid having a stroke because of the high cost of treatment, but a stroke can be fatal.
We are concerned about the rising number of stroke cases in Bangladesh and around the
world. There is a lot of research being done on brain stroke right now. Patients will find it
simpler to diagnose strokes thanks to our software, and doctors will find it simpler to keep
track of their patients. In order for our software to understand brain stroke, we used a lot of
images of the brain for brain stroke as well as a lot of photographs of what causes a brain
stroke. We believe that people will get far more from our project.
Stroke with intracerebral hemorrhage (ICH) is the most fatal and incapacitating type.
Hemorrhagic strokes, which are brought on by an immediate hemorrhage, account for 15%
of acute strokes. Intracerebral hemorrhage (ICH) and subarachnoid hemorrhage, which
account for around 5% of all strokes, are the two main kinds of hemorrhagic strokes. This
page deals with intracranial hemorrhage (ICH), a potentially fatal form of stroke that robs
the brain of oxygen and blood flow.
Brain stroke is a dangerous and acute cerebrovascular illness that is a significant cause of
mortality. It can be hemorrhagic, caused by blood flowing into brain tissue through a burst
intracranial arterial, or ischemic, caused by vascular blockage in the brain due to a blood
clot (thrombosis). Visible symptoms are identical in both situations, making differentiation
exceedingly difficult without modern imaging methods. Since human neural tissue is
rapidly destroyed as ischemic stroke advances, thrombolytic (or clot-dissolving) medicines
can be used to treat ischemic stroke during the first few hours. Contrarily, thrombolytics
can be hazardous or even deadly to individuals who are experiencing hemorrhagic stroke,
making it crucial to distinguish between the two. In order to expedite clinical choices on
therapies and to accelerate the recovery of patients suffering from acute stroke, a quick and
accurate diagnosis is essential for patient triage.
CNN is a machine learning method that use neural networks with layers for result
classification. Feature extraction, segmentation, average filtering, preprocessing, CNN, and
VGG-16 were some of the processes used in these at various stages. Through categorization
and identification using data mining techniques, significant links and patterns in the data
can be found. Segmentation, classification, identification, data collection, pre-processing,
and average filtering are used in this data mining and feature extraction for CNN. The
approach utilized in this study is pre-processing, which eliminates noisy data from the data
received during data collecting. Following is the average filtering. After that, pixels-based
detection is performed using the segmentation technique. Then, many features including
PSNR, MEAN, ENTROPY, SD, etc., were retrieved. T1 and FLAIR are the MRI imaging
techniques used by CNN. They also employ Multi FD to extract the tissue-texture of brain
strokes. For greater performance, they employ support vector machines and neural
networks. segmentation, classification, identification, data gathering, pre-processing, and
average filtering for feature extraction in CNN. The technique utilized in this study is pre-
The technique utilized in this study is pre-processing, (Table 2.1.1) which eliminates noisy
data from the data received during data collecting. Following is the average filtering. After
that, pixels-based detection is performed using the segmentation technique. Then, many
features including PSNR, MEAN, ENTROPY, SD, etc, were retrieved. T1 and FLAIR are
the MRI imaging techniques used by CNN. They also employ Multi FD to extract the tissue-
texture of brain strokes. For greater performance, they employ support vector machines and
neural networks. The technique utilized in this study is pre-processing, which eliminates
noisy data from the data received during data collecting. Following is the average filtering.
After that, pixels-based detection is performed using the segmentation technique. Then,
many features including PSNR, MEAN, ENTROPY, SD, etc., were retrieved. T1 and
FLAIR are the MRI imaging techniques used by CNN. They also employ Multi FD to
extract the tissue-texture of brain strokes. For greater performance, they employ support
vector machines and neural networks. The technique utilized in this study is pre-processing,
which eliminates noisy data from the data received during data collecting. Following is the
average filtering. After that, pixels-based detection is performed using the segmentation
technique. Then, many features including PSNR, MEAN, ENTROPY, SD, etc., were
retrieved. T1 and FLAIR are the MRI imaging techniques used by CNN. They also employ
Multi FD to extract the tissue-texture of brain strokes. For greater performance, they employ
support vector machines and neural networks. The technique utilized in this study is pre-
processing, which eliminates noisy data from the data received during data collecting.
Following is the average filtering. After that, pixels-based detection is performed using the
segmentation technique. Then, many features including PSNR, MEAN, ENTROPY, SD,
etc., were retrieved. T1 and FLAIR are the MRI imaging techniques used by CNN. They
also employ Multi FD to extract the tissue-texture of brain strokes. For greater performance,
they employ support vector machines and neural networks. The technique utilized in this
study is pre-processing, which eliminates noisy data from the data received during data
collecting. Following is the average filtering. After that, pixels-based detection is performed
using the segmentation technique. Then, many features including PSNR, MEAN,
3.1 Introduction
In the field of cancer research, deep learning (DL) algorithms for deciphering magnetic
resonance imaging (MRI) pictures and forecasting brain strokes have advanced quickly. We
found that DL models' high accuracy, interpretability, and explanation varied significantly.
As a result, we describe a convolutional neural network-based explanation-driven deep
learning model.
Figure 3.5.1. Illustrates the preceding discussion that any color image contains three
channels: red, green, and blue. An image can exist in a variety of color spaces, including
grayscale, CMYK, and HSV. To keep things simple, let's only use grayscale images to show
how CNNs operate.
Figure 3.5.2. There is a convolution, as shown in the graphic above. A filter or kernel (3x3
matrix) is applied to the input picture to produce the convolved feature. This convolved
function is being passed across to the layer following table.
Figure 3.5.3. The green box is an image matrix, and the yellow box is a filter, which is a
matrix of 0s and 1s that defines a transformation. These features are combined into a feature
map as the filter passes through the picture pixels in each subregion of the input volume
using a unique type of matrix multiplication.
Figure 3.5.4. Convolutional neural networks are made of artificial neurons that are stacked
in layers. Similar to their biological counterparts, artificial neurons are mathematical
constructs that compute the activation value from the weighted sum of a set of inputs. When
an image is fed into a ConvNet, each layer generates a set of activation functions, which are
subsequently transferred to thefollowing layer.
Horizontal or diagonal edges are fundamental characteristics that are frequentlyretrieved by
the first layer. Following receipt of this output, the following layer searches for more
intricate features like corners and multiple edges. As we dig deeper, the network may
someday be able to distinguish objects, faces, and other fine characteristics.
Figure 3.5.5. Based on the activation map of the final convolution layer, the classification
layer generates a number of optimism ratings (numbers between 0 and 1), indicating how
likely it is for the image to belong to a "class". The last
Similar to the convolutional layer (figure 3.5.6), the pooling layer is in charge of reducing
thespatial size of the convolutional feature. By reducing the size, less CPU processing power
will be required to process the data. There are two types of pooling: average pooling and
maximal pooling. I've only used Max Pooling once, but so far there have been no problems.
VGG Architecture:
VGG offers two models: the VGG-16 and the VGG-19. In this blog, our dataset will be
classified using VGG-16. VGG-16 is primarily composed of convolution, pooling, and fully
linked layers. The input size of thecorresponding network is 224 by 224 [25].
● Convolution layer: In this layer, filters are used to extract features from photos.
The most important parameters are the stride and kernel size.
● The pooling layer's task is to shrink a network's spatial extent in orderto scale
back on processing and parameterization.
● Fully Connected: These connections to the preceding levels are all fully coupled
in a simple neural network.
Given figure shows the architecture of the model:
To begin this procedure, we create a clear diagram that lays out the steps we will take to
complete our task. The process was started in the order shown in the diagram, and then we
obtained data from Kaggle. Why Kaggle? Since we were unable to locate the real dataset
from any institution, we made the decision to focus on the demo datasets in order to gain
expertise before moving on to the real datasets. we keep working as per the flowchart
diagram.
Figure 3.6.10. Preprocessing of data is the process of cleaning and filtering datasets before
applying algorithms to them once they have been acquired. The data sets were then divided
into two portions: testing and training, respectively. The training (80%) percentage of the
data and the rest (20%) of the data as testing dataset. After completing the process, we have
applied two algorithms one is CNN and another one is VGG -16 to find out the associated
factors that is causes the brain stroke and the accuracy of the result. Between these two
algorithms VGG-16 perform better which isshown in the flowchart.
4.1 Introduction
In the part before, we spoke about the dataset and the methods for processing it. This section
will provide an explanation of various models' findings that make use of the prepared data.
The results of CNN and VGG-16 are being evaluated to ascertain which method offers the
most accuracy.
Predicted
No Stroke Stroke
Actual
The following performance metrics are obtained from the segmentation and
classifiedresults.
Predicted
No Stroke Stroke
Actual
No Stroke 527 51
Stroke 14 223
Predicted
No Stroke Stroke
Actual
No Stroke 557 24
Stroke 17 221
Accuracy is defined as the percentage of correctly predicted data points among all data
points. The official definition of accuracy is as follows:
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑜𝑟𝑟𝑒𝑐𝑡 𝑝𝑟𝑒𝑑𝑖𝑐𝑡𝑖𝑜𝑛𝑠
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = × 100%
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑟𝑒𝑑𝑖𝑐𝑡𝑖𝑜𝑛𝑠
𝑇𝑃 + 𝑇𝑁
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = × 100%
𝑇𝑃 + 𝑇𝑁 + 𝐹𝑃 + 𝐹𝑁
𝑇𝑃
𝑆𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦 = × 100%
𝑇𝑃 + 𝐹𝑁
𝑇𝑁
𝑆𝑝𝑒𝑐𝑖𝑓𝑖𝑐𝑖𝑡𝑦 = × 100%
𝑇𝑁 + 𝐹𝑃
Precision is defined as the ratio of True Positives to All Positives. A formula for
calculating precision is provided below:
𝑇𝑃
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = × 100%
𝑇𝑃 + 𝐹𝑃
2𝑇𝑃
𝐹1 𝑠𝑐𝑜𝑟𝑒 = × 100%
2𝑇𝑃 + 𝐹𝑃 + 𝐹𝑁
Table 4.2.4. The performance of each algorithm is described in Table 1. Based on the
efficiency and validity of different algorithms, we determined the optimal solution for our
model. Based on this F1-Score, it is obvious that VGG-16 performs the best in terms of
accuracy, sensitivity, specificity, and precision. After considering everything, this approach
can be used to optimize model performance.
Table 4.2.4: PERFORMANCE EVALUATION
After going through the entire application algorithm procedure, we finally get a result that
shows how important the F1 score, precision, sensitivity, and specificity are.