Project Report
Project Report
T E AKILAN (URK22EC6042)
VETRIVEL G (URK22EC6009)
MOHAMED ASHIK BASHA M (URK22EC6007)
ALEN STEPHEN BRAHMASINGH (URK22EC6021)
of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMPUTER ENGINEERING
under the supervision of
(Deemed to be university)
Karunya Nagar, Coimbatore - 641 114. INDIA
April 2026
II
BONAFIDE CERTIFICATE
This is to certify that the project report entitled, “ Hybrid Deep Learning Model
bonafide record of work of the following candidates who carried out the project
T E AKILAN (URK22EC6042)
VETRIVEL G (URK22EC6009)
MOHAMED ASHIK BASHA M (URK22EC6007)
ALEN STEPHEN BRAHMASINGH (URK22EC6021)
………………………. ……………………..
(Internal Examiner) (External Examiner)
III
ABSTRACT
Brain tumor diagnosis from Magnetic Resonance Imaging (MRI) is a critical task that
requires high accuracy and timely analysis. Manual assessment by medical experts is
often time-consuming and prone to variability, motivating the need for automated and
approach for brain tumor classification and segmentation using MRI images,
integrates a convolutional neural network (CNN) for tumor classification and a UNet-
based architecture for precise tumor segmentation. The workflow includes image
feature extraction and hybrid model inference. The system is trained and evaluated on
the BraTS dataset, ensuring robustness across different tumor types and MRI modalities.
The classification model predicts tumor categories with high accuracy, while the
segmentation model identifies tumor regions at the pixel level, providing detailed
conventional models. Overall, the proposed hybrid model enhances diagnostic accuracy,
supports clinical decision-making, and contributes to efficient and reliable brain tumor
analysis.
ACKNOWLEDGEMENT
First and foremost, we would like to thank Almighty God for all the
blessings He has bestowed upon us to work thus far and finish this project. We are
grateful to our most respected founder (late) Dr. D.G.S. Dhinakaran, C.A.I.I.B,
Ph.D., and honorable chancellor Dr. Paul Dhinakaran, M.B.A, Ph.D., for their
grace and blessing.
Our sincere and special thanks to our guide, Dr. J. Jenkin Winston,
[Link]., Ph.D., Assistant Professor, for his immense help and guidance. We would
like to extend a thankful heart for her constant support throughout the entire project.
Finally, we would like to extend our deepest appreciation to our family and
friends for all that they did for us during the project period.
V
TABLE OF CONTENTS
ABSTRACT iii
ACKNOWLEDGEMENT iv
TABLE OF CONTENTS v
LIST OF TABLES ix
LIST OF ABBREVIATIONS x
1 INTRODUCTION 1
1.1 Background 1
1.2 Objective 2
1.3 Significance 2
2 LITERATURE REVIEW 4
3 METHODOLOGY 6
5 CONCLUSION 58
REFERENCES 61
DECLARATION 62
VII
LIST OF FIGURES
Figure No. Title Page No.
Overview of the BraTS 2024 dataset showing
3.1 data distribution, MRI modalities, and tumor 6
segmentation labels
3.2 System Architecture of Proposed Hybrid Model 8
Architecture of the proposed hybrid U-Net
3.3 model showing encoder–decoder structure with 9
attention mechanisms and skip connections
Preprocessing Pipeline (Normalization, Skull
3.4 10
Stripping)
Preprocessing pipeline illustrating steps such as
co-registration, skull stripping, normalization,
3.5 10
augmentation, and patch extraction for MRI data
preparation
3.6 Data Augmentation Techniques 13
End-to-end workflow of the proposed system
3.7 from MRI upload to tumor 13
segmentation,visualization, and analysis
3.8 2D U-Net Architecture 16
3.9 Swin Transformer Architecture 18
3.10 EfficientNet-B2 Architecture 21
3.11 Hybrid Model Integration 23
Web application interface for uploading MRI
3.12 25
scans and initiating tumor classification
Classification report showing predicted tumor
3.13 type, confidence score, and class-wise 26
probability distribution
Segmentation quality analysis showing true
3.14 positives, false positives, and false negatives for 29
each tumor class
Technology stack and training configuration
3.15 used for implementing the proposed hybrid deep 31
learning model
VIII
LIST OF TABLES
LIST OF ABBREVIATIONS
AI Artificial Intelligence
DL Deep Learning
ET Enhancing Tumor
WT Whole Tumor
TC Tumor Core
SE Squeeze-and-Excitation
TP True Positive
FP False Positive
FN False Negative
TN True Negative
LR Learning Rate
XI
Brain tumors are among the most critical and life-threatening neurological disorders,
requiring accurate and early diagnosis for effective treatment planning. Magnetic
Resonance Imaging (MRI) is widely used as a non-invasive imaging technique for
detecting brain abnormalities due to its high contrast and detailed visualization of soft
tissues. However, manual analysis of MRI scans by radiologists is time-consuming,
subjective, and prone to inter-observer variability, especially when dealing with large
volumes of data.
With the rapid advancement of Artificial Intelligence (AI) and Deep Learning (DL),
automated medical image analysis has gained significant attention in recent years. Deep
learning models, particularly Convolutional Neural Networks (CNNs), have demonstrated
remarkable performance in image classification and segmentation tasks. In the context of
brain tumor analysis, classification helps in identifying the type of tumor, while
segmentation focuses on accurately locating and delineating the tumor region within the
MRI image.
In this project, a hybrid deep learning model integrating 2D U-Net, Swin Transformer, and
EfficientNet-B2 is proposed for brain tumor classification and segmentation. The U-Net
architecture enables precise pixel-level segmentation, while the Swin Transformer
enhances feature representation by capturing long-range dependencies. EfficientNet-B2 is
employed for efficient and accurate tumor classification. The system is implemented as a
web-based application, allowing users to upload MRI images and obtain real-time
diagnostic results, thereby improving accessibility and usability.
1
This integrated approach aims to assist medical professionals by providing accurate, fast,
and reliable analysis of brain tumors, ultimately contributing to improved clinical
decision-making and patient outcomes.
1.2 Objective
The primary objective of this project is to develop an efficient and accurate hybrid deep
learning-based system for brain tumor classification and segmentation using MRI images.
The system aims to automate the process of tumor detection by integrating advanced deep
learning architectures and providing reliable diagnostic results through a user-friendly web
interface.
1. To design and implement a hybrid deep learning model combining 2D U-Net, Swin
Transformer, and EfficientNet-B2 for improved performance.
2. To perform accurate classification of brain tumors using EfficientNet-B2 based
feature extraction.
3. To achieve precise segmentation of tumor regions using the 2D U-Net architecture.
4. To enhance feature representation by incorporating Swin Transformer for capturing
global contextual information.
5. To preprocess MRI images using techniques such as normalization and resizing for
better model performance.
6. To evaluate the performance of the proposed model using metrics such as accuracy,
Dice score, and Intersection over Union (IoU).
7. To develop a web-based application that allows users to upload MRI images and
obtain real-time classification and segmentation results.
1.3 Significance
The significance of this project lies in its ability to provide an automated, accurate, and
efficient solution for brain tumor analysis using advanced deep learning techniques. Early
2
detection and precise localization of brain tumors are crucial for effective treatment
planning and improving patient survival rates.
Overall, this project contributes to the field of medical image analysis by offering a
scalable, cost-effective, and intelligent diagnostic tool that supports clinical decision-
making and reduces the workload of healthcare professionals.
3
CHAPTER 2
LITERATURE REVIEW
Brain tumor detection and analysis using Magnetic Resonance Imaging (MRI) has been an
active area of research due to its critical role in medical diagnosis. In recent years, the
application of Artificial Intelligence (AI) and Deep Learning (DL) techniques has
significantly improved the accuracy and efficiency of tumor classification and
segmentation.
With the emergence of machine learning techniques, researchers began using algorithms
such as Support Vector Machines (SVM), K-Nearest Neighbors (KNN), and Random
Forest for tumor classification. These methods improved classification accuracy compared
to traditional techniques; however, they still relied heavily on handcrafted features, which
limited their ability to generalize across diverse datasets.
For segmentation tasks, U-Net has become one of the most widely used architectures in
biomedical image processing. Ronneberger et al. proposed the U-Net model, which uses
an encoder–decoder structure with skip connections to achieve precise pixel-level
segmentation [6]. U-Net has shown excellent performance in identifying tumor boundaries
and has been extensively used in brain tumor segmentation challenges such as the BraTS
dataset. Further improvements such as UNet++ have enhanced segmentation accuracy by
4
refining skip connections [10].Despite the success of CNN-based models, they primarily
focus on local feature extraction and often fail to capture global contextual relationships
within the image. To overcome this limitation, transformer-based architectures have been
introduced in computer vision. The Vision Transformer (ViT) has demonstrated superior
performance by capturing long-range dependencies and improving feature representation
in medical images [2].
Recent research has explored hybrid deep learning models that combine CNN-based
architectures with transformer-based models. These hybrid approaches leverage the
strengths of both techniques—CNNs for local feature extraction and transformers for
global context understanding. Studies have shown that such hybrid models outperform
traditional CNN-only models in both classification and segmentation tasks [9].
In this project, a hybrid deep learning model combining 2D U-Net, Vision Transformer
principles, and EfficientNet-B2 is proposed to address these limitations. The system
performs both classification and segmentation in a unified framework and is deployed as a
web-based application, enabling real-time analysis of MRI images. This approach
enhances diagnostic accuracy, improves efficiency, and provides an accessible tool for
medical image analysis.
5
CHAPTER 3
METHODOLOGY
The dataset used in this project is the Brain Tumor Segmentation (BraTS) dataset, which
is a widely recognized benchmark dataset for brain tumor classification and segmentation
tasks. The BraTS dataset is publicly available and has been extensively used in medical
image analysis research due to its high-quality annotated MRI scans.
The dataset consists of multi-modal MRI images collected from patients with brain tumors,
primarily gliomas. Each case includes four different MRI modalities: T1-weighted (T1),
T1-weighted with contrast enhancement (T1c), T2-weighted (T2), and Fluid Attenuated
Inversion Recovery (FLAIR). These modalities provide complementary information about
the tumor structure, enabling more accurate analysis.
The MRI images in the dataset are preprocessed to ensure consistency, including skull
stripping, co-registration, and resampling to a uniform resolution. Each image is
accompanied by a ground truth segmentation mask that labels different tumor regions. The
tumor is typically divided into three main regions: enhancing tumor (ET), tumor core (TC),
and whole tumor (WT), which includes edema and necrotic regions.
Figure 3.1: Overview of the BraTS 2024 dataset showing data distribution, MRI
modalities, and tumor segmentation labels.
6
The dataset contains a large number of 3D MRI volumes, which are further converted into
2D slices for training the proposed model. This conversion reduces computational
complexity while preserving important spatial features required for classification and
segmentation tasks.
In this project, the BraTS dataset is used for both classification and segmentation purposes.
The classification task involves identifying the presence and type of tumor, while the
segmentation task focuses on accurately delineating tumor regions at the pixel level. The
dataset is divided into training, validation, and testing sets to ensure proper evaluation of
the model’s performance.
The use of the BraTS dataset ensures that the proposed hybrid deep learning model is
trained on diverse and standardized medical images, improving its robustness,
generalization capability, and reliability in real-world applications.
The proposed system is a hybrid deep learning-based framework designed for brain tumor
classification and segmentation using MRI images. The architecture integrates multiple
advanced models, namely 2D U-Net, Swin Transformer, and EfficientNet-B2, to leverage
both local and global feature representations for improved performance.
The overall system follows a structured pipeline consisting of several stages: data input,
preprocessing, feature extraction, model inference, and output visualization. Initially, MRI
images are provided as input through a web-based interface. These images undergo
preprocessing to enhance quality and ensure consistency before being fed into the hybrid
model.
The segmentation task is primarily handled by the 2D U-Net architecture, which performs
pixel-wise classification to accurately identify tumor regions. The encoder-decoder
structure of U-Net, combined with skip connections, helps retain spatial information and
improves segmentation accuracy.
7
To enhance feature extraction, the Swin Transformer is integrated into the architecture. It
captures global contextual information and long-range dependencies within MRI images,
which are often missed by conventional convolutional networks. This improves the
model’s ability to detect complex tumor patterns.
The outputs from these components are combined to produce both classification results
and segmentation maps. The system also generates visualization outputs such as
segmented tumor regions and attention maps for better interpretability. Finally, the results
are displayed through a user-friendly web interface, enabling real-time analysis.
8
Figure 3.3: Architecture of the proposed hybrid U-Net model showing encoder–decoder
structure with attention mechanisms and skip connections.
Data preprocessing is a crucial step in the proposed system, as it ensures that MRI images
are standardized and suitable for training deep learning models. Proper preprocessing
improves model performance, reduces noise, and enhances the quality of feature
extraction.
1. Image Normalization:
MRI images are normalized to a standard intensity range to reduce variations caused
by different imaging conditions. This helps the model learn consistent features across
all samples.
2. Resizing:
All MRI images are resized to a fixed dimension to match the input requirements of
the deep learning models. This ensures uniformity and reduces computational
complexity.
3. Skull Stripping:
Non-brain tissues such as skull and background are removed to focus only on the
9
brain region. This improves the accuracy of tumor detection by eliminating irrelevant
information.
4. Noise Reduction:
Noise present in MRI images is reduced using filtering techniques, which enhances
image clarity and improves segmentation performance.
5. Slice Extraction:
Since the BraTS dataset consists of 3D MRI volumes, they are converted into 2D
slices for efficient processing using the proposed 2D model architecture.
6. Data Augmentation:
Techniques such as rotation, flipping, and scaling are applied to increase dataset
diversity and prevent overfitting during training.
These preprocessing steps ensure that the input data is clean, consistent, and optimized for
the hybrid deep learning model, thereby improving the overall accuracy and reliability of
the system.
Figure 3.4: Preprocessing pipeline illustrating steps such as co-registration, skull stripping,
normalization, augmentation, and patch extraction for MRI data preparation.
10
3.2.2 Data Augmentation
Data augmentation is an essential step in the proposed system to improve the robustness
and generalization capability of the deep learning model. Since medical imaging datasets
such as BraTS are limited in size, augmentation techniques are applied to artificially
increase the diversity of training data and reduce overfitting.
In this project, various augmentation techniques are applied to the MRI images during the
training phase. These transformations help the model learn invariant features and improve
its performance on unseen data. The following augmentation methods are used:
1. Rotation:
MRI images are rotated at different angles to simulate variations in image orientation.
This helps the model become invariant to positional changes of the tumor.
2. Horizontal and Vertical Flipping:
Images are flipped along horizontal and vertical axes to increase dataset diversity and
improve the model’s ability to recognize tumors in different spatial arrangements.
3. Scaling and Zooming:
Images are scaled or zoomed in and out to simulate variations in tumor size and image
resolution, enabling the model to learn features at multiple scales.
4. Translation:
Small shifts are applied to images along horizontal and vertical directions, helping the
model learn spatial robustness.
5. Intensity Variation:
Brightness and contrast adjustments are applied to account for differences in MRI
acquisition conditions, ensuring the model performs well under varying imaging
environments.
6. Noise Injection:
Random noise is added to images to make the model more resilient to noisy inputs and
improve generalization.
All augmentation techniques are applied in a controlled manner to preserve the anatomical
structure of the MRI images while increasing data variability. These augmented images
11
are used during model training, while the validation and testing datasets remain unchanged
to ensure fair evaluation.
The data augmentation techniques and their corresponding parameters used in this study
are summarized in Table 3.1
Mean,
Gaussian Noise Mean = 0, Var = 0.01 Reduces overfitting
Variance
Brightness Intensity
0.8 – 1.2 Handles lighting variations
Adjustment Factor
The use of data augmentation significantly enhances the performance of the hybrid deep
learning model by preventing overfitting, improving accuracy, and enabling better
generalization across diverse MRI datasets.
12
Figure 3.5 – Data Augmentation Techniques
Figure 3.6: End-to-end workflow of the proposed system from MRI upload to tumor
segmentation, visualization, and analysis.
13
3.2.3 Hybrid Deep Learning Model (2D U-Net + Swin Transformer +
EfficientNet-B2)
The proposed system utilizes a hybrid deep learning architecture that combines the
strengths of convolutional neural networks and transformer-based models to achieve
accurate brain tumor classification and segmentation. The hybrid model integrates three
key components: 2D U-Net, Swin Transformer, and EfficientNet-B2, each contributing to
different aspects of the task.
Skip connections between corresponding encoder and decoder layers help retain spatial
information, which is crucial for accurately identifying tumor boundaries. The output of
the U-Net is a pixel-wise segmentation mask that highlights the tumor regions within the
MRI image.
14
Component Parameter Value / Description
Activation ReLU
Activation ReLU
Activation ReLU
Activation ReLU
Activation Sigmoid
15
Component Parameter Value / Description
It enhances the feature representation by modeling global relationships within the MRI
image, which improves the detection of complex tumor structures. The combination of
16
local features from U-Net and global features from the Swin Transformer leads to
improved segmentation accuracy.
The configuration details of the Swin Transformer used for feature extraction are
presented in Table 3.3
Number of Heads 3
Number of Heads 6
Number of Heads 12
Number of Heads 24
17
Component Parameter Value / Description
EfficientNet-B2 extracts high-level features from the MRI images and classifies them into
different tumor categories with high accuracy. Its optimized architecture ensures better
18
performance while maintaining lower computational cost, making it suitable for real-time
applications.
Stride 2
Filters 16
Repeats 1
Filters 24
Repeats 2
Filters 48
Repeats 2
Filters 88
Repeats 3
19
Component Parameter Value / Description
Filters 120
Repeats 3
Filters 208
Repeats 4
Filters 352
Repeats 1
20
Figure 3.9 – EfficientNet-B2 Architecture
The hybrid model integrates the outputs of U-Net, Swin Transformer, and EfficientNet-B2
into a unified framework. The preprocessing module prepares the input MRI images,
which are then passed through the segmentation and classification pipelines.
The U-Net generates segmentation maps, while the Swin Transformer enhances feature
extraction. EfficientNet-B2 performs classification based on the extracted features. The
combined outputs provide both tumor localization and classification results
simultaneously.
This integration enables the system to leverage both local spatial details and global
contextual information, resulting in improved performance compared to traditional single-
model approaches.
21
The training hyperparameters used for the proposed hybrid deep learning model are
presented in Table 3.5
22
Figure 3.10 – Hybrid Model Integration
Overall, the proposed hybrid deep learning model significantly improves the efficiency
and accuracy of brain tumor analysis, making it suitable for real-world medical
applications.
23
3.2.4 Classification Module
The classification module in the proposed system is responsible for identifying the type of
brain tumor present in the MRI image. This module plays a crucial role in assisting
medical diagnosis by categorizing tumors into specific classes based on learned features.
In this project, EfficientNet-B2 is used as the primary classification model due to its high
accuracy and computational efficiency. EfficientNet-B2 is a convolutional neural network
that employs compound scaling to optimize depth, width, and resolution simultaneously,
resulting in improved performance with fewer parameters compared to traditional CNN
architectures.
Feature Extraction
The classification process begins with feature extraction from preprocessed MRI images.
EfficientNet-B2 automatically learns hierarchical features such as edges, textures, and
complex patterns associated with tumor regions. These features are essential for
distinguishing between different tumor types.
Classification Process
The extracted features are passed through fully connected layers, followed by a
Softmax activation function to generate probability scores for each tumor class. The
class with the highest probability is selected as the predicted output.
The classification module works in parallel with the segmentation module. While the 2D
U-Net focuses on identifying the exact tumor region, EfficientNet-B2 classifies the MRI
image based on the extracted features. The Swin Transformer enhances feature
representation before classification, improving overall accuracy.
24
Performance Optimization
Figure 3.11 : Web application interface for uploading MRI scans and initiating tumor
classification.
25
Output Representation
This information is displayed through the web interface, allowing users to easily interpret
the results.
Figure 3.12 : Classification report showing predicted tumor type, confidence score, and
class-wise probability distribution.
The segmentation module is a key component of the proposed system, responsible for
accurately identifying and delineating tumor regions within MRI images. Unlike
classification, which predicts the type of tumor, segmentation focuses on pixel-level
analysis to highlight the exact location and boundaries of the tumor.
In this project, the segmentation task is performed using the 2D U-Net architecture, which
is widely used in biomedical image segmentation due to its ability to produce precise and
detailed segmentation maps.
Architecture of 2D U-Net
Skip connections between corresponding encoder and decoder layers allow the model to
retain fine-grained spatial information. This is essential for accurately capturing tumor
boundaries and small structures that may otherwise be lost during downsampling.
Segmentation Process
The preprocessed MRI image is passed through the U-Net model, which produces a
segmentation mask indicating tumor regions. Each pixel in the output mask is classified as
either tumor or non-tumor, or into multiple tumor sub-regions depending on the labeling
scheme.
27
The segmentation output highlights different tumor regions such as:
This detailed segmentation provides valuable insights into tumor size, shape, and location.
The segmentation model is trained using loss functions such as Dice Loss and Binary
Cross-Entropy, which are effective for handling class imbalance in medical images.
Optimization is performed using the Adam optimizer to achieve faster convergence and
improved accuracy.
28
Figure 3.13: Segmentation quality analysis showing true positives, false positives, and
false negatives for each tumor class.
Output Representation
These results are displayed in the web interface, allowing users to visually analyze tumor
regions.
29
Advantages of the Segmentation Module
Overall, the segmentation module plays a vital role in the system by enabling accurate
tumor localization, which is essential for diagnosis, treatment planning, and monitoring
disease progression.
System Overview
Frontend Design
The frontend of the application is developed using web technologies such as HTML, CSS,
and Bootstrap. It provides an intuitive user interface with the following features:
The interface ensures that users can easily interact with the system without requiring
technical expertise.
Backend Implementation
The backend is developed using Python and the Flask framework, which handles the
processing of user requests and integration with the deep learning models. The backend
performs the following tasks:
The processed results are then sent back to the frontend for display.
Figure 3.14: Technology stack and training configuration used for implementing the
proposed hybrid deep learning model.
31
Model Integration
The trained models are saved and loaded during runtime to ensure efficient prediction. The
classification module (EfficientNet-B2) and segmentation module (U-Net with Swin
Transformer) are integrated within the backend to work simultaneously. This allows the
system to provide both tumor type classification and tumor region segmentation in a single
workflow.
Output Display
The application presents the results in a clear and structured format, including:
This enhances the interpretability of the results and helps users understand the model
predictions.
32
Figure 3.15 – Web Application Interface
Overall, the web application implementation makes the proposed system practical,
scalable, and user-friendly, enabling efficient deployment of advanced deep learning
techniques for brain tumor analysis.
33
CHAPTER 4
The performance of the proposed hybrid deep learning model is evaluated using standard
metrics for both classification and segmentation tasks. These metrics help in assessing the
accuracy, reliability, and effectiveness of the model in detecting and localizing brain
tumors from MRI images.
Classification Metrics
For the classification module, which uses EfficientNet-B2, the following evaluation
metrics are used:
Accuracy:
Accuracy measures the overall correctness of the model by calculating the ratio of
correctly predicted samples to the total number of samples. It provides a general
indication of the model’s performance.
Precision:
Precision measures the proportion of correctly predicted positive cases among all
predicted positive cases. It indicates how reliable the model is when it predicts a tumor.
Recall (Sensitivity):
Recall measures the ability of the model to correctly identify actual positive cases. It
indicates how well the model detects tumors.
34
F1-Score:
The F1-score is the harmonic mean of precision and recall, providing a balanced
measure of the model’s performance.
Confusion Matrix:
A confusion matrix is used to visualize the classification performance by showing the
number of true positives, true negatives, false positives, and false negatives.
ROC Curve (Receiver Operating Characteristic):
The ROC curve illustrates the trade-off between true positive rate and false positive
rate. A higher area under the curve (AUC) indicates better model performance.
Segmentation Metrics
For the segmentation module, which uses the 2D U-Net with Swin Transformer, the
following metrics are used:
Pixel Accuracy:
Pixel accuracy measures the proportion of correctly classified pixels in the
segmentation output.
35
Training Performance Metrics
Training Configuration
Training–Testing Split :
The dataset used for training and evaluation was divided into training and testing sets to
ensure proper generalization of the model. A typical split of 80% for training and 20%
for testing was used.
Number of Epochs: 30
Batch Size: 8
The training process was monitored using loss and accuracy metrics, ensuring
convergence and avoiding overfitting.
36
4.2 Classification Performance Analysis
The classification performance of the proposed hybrid deep learning model is evaluated
using EfficientNet-B2 as the primary classification backbone. The model is trained on
preprocessed MRI images and tested on unseen data to assess its generalization capability.
The classification module is responsible for identifying the type of brain tumor present in
the MRI image. The performance is analyzed using standard evaluation metrics such as
accuracy, precision, recall, F1-score, and confusion matrix.
Accuracy Analysis
The EfficientNet-B2 model achieves high classification accuracy, indicating its ability to
correctly classify MRI images into different tumor categories. The use of compound
scaling in EfficientNet-B2 enables efficient feature extraction, leading to improved
performance compared to traditional CNN models.
The confusion matrix provides a detailed breakdown of classification results, showing the
number of correct and incorrect predictions for each class. It helps in identifying
misclassification patterns between tumor types.
37
From the confusion matrix:
The model demonstrates high precision, indicating that the predictions made by the model
are reliable and contain fewer false positives. High recall values show that the model is
effective in detecting most of the actual tumor cases, minimizing false negatives.
This balance between precision and recall ensures that the model is both accurate and
sensitive, which is crucial in medical diagnosis.
F1-Score Analysis
The F1-score provides a balanced evaluation of precision and recall. The high F1-score
obtained by the model indicates consistent performance across different tumor classes.
38
ROC Curve Analysis
The Receiver Operating Characteristic (ROC) curve demonstrates the model’s ability to
distinguish between different classes. A high Area Under the Curve (AUC) value indicates
strong classification capability and effective decision boundaries.
The ROC curves for different tumor classes demonstrate the model’s ability to distinguish
between classes effectively. The proposed model achieves high Area Under the Curve
(AUC) values, particularly for pituitary and glioma classes, indicating strong classification
performance. The meningioma class shows slightly lower performance due to overlapping
features, but overall results confirm the robustness of the model.
39
Training Performance
The training and validation accuracy curves show a steady increase during training, while
the loss curves decrease progressively. This indicates that the model is learning effectively
without significant overfitting.
The integration of the Swin Transformer enhances feature extraction by capturing global
contextual information, which improves classification accuracy. Additionally,
preprocessing and data augmentation techniques contribute to better generalization of the
model.
Overall, the classification module demonstrates high accuracy and reliability in identifying
brain tumor types from MRI images. The use of EfficientNet-B2, combined with advanced
preprocessing and hybrid feature extraction, results in improved performance compared to
conventional models.
The segmentation performance of the proposed hybrid deep learning model is evaluated
using the 2D U-Net integrated with the Swin Transformer. This module is responsible for
accurately identifying and delineating tumor regions in MRI images at the pixel level.
The effectiveness of the segmentation model is assessed using standard evaluation metrics
such as Dice coefficient, Intersection over Union (IoU), and pixel accuracy. These metrics
provide a comprehensive understanding of how well the predicted segmentation masks
match the ground truth.
The segmentation model was trained using labeled MRI datasets, where each image is
associated with a corresponding ground truth mask. These masks indicate tumor regions
such as enhancing tumor, edema, and necrotic [Link] ground truth masks are essential
for supervised learning and are used to compute evaluation metrics such as Dice
40
coefficient and Intersection over Union (IoU).The dataset used (BraTS) provides expert-
annotated ground truth labels, ensuring high-quality segmentation performance evaluation.
Figure 4.4 : Segmentation output showing original MRI image, predicted tumor mask, and
overlay visualization of tumor regions.
The segmentation performance of the proposed model is evaluated using Dice score and
IoU metrics, as summarized in Table 4.1
Dice IoU
Tumor Region Description
Score Score
Enhancing Tumor
0.94 0.88 Accurately detects active tumor regions
(ET)
Tumor Core (TC) 0.78 0.70 Detects necrotic and core tumor structures
41
Dice Coefficient Analysis
The Dice coefficient is one of the most important metrics for evaluating medical image
segmentation. It measures the overlap between the predicted tumor region and the ground
truth mask.
The proposed model achieves a high Dice score, indicating strong similarity between
predicted and actual tumor regions. This demonstrates the model’s ability to accurately
capture tumor boundaries and shapes.
Additionally, Dice scores are analyzed for different tumor regions such as:
The results show consistent performance across all tumor regions, with slightly lower
scores for complex or irregular tumor structures.
The per-class Dice scores for different tumor regions are presented in Table 4.2
Dice
Tumor Region Interpretation
Score
Enhancing Tumor (ET) 0.7832 Good overlap with active tumor regions
Tumor Core (Necrotic) (TC) 0.6843 Lower accuracy due to complex structure
42
Figure 4.5 : Dice score comparison across tumor classes.
The Dice score graph illustrates the segmentation performance across different
tumor regions. The model achieves the highest Dice score for enhancing tumor,
followed by edema and necrotic/core regions, indicating strong segmentation
capability.
43
Figure 4.6 : Volumetric analysis of tumor regions showing enhancing, edema, and necrotic
volumes along with overall tumor occupancy.
Figure 4.7: Per-class Dice score analysis showing segmentation performance for
enhancing tumor, whole tumor, and tumor core regions.
44
Intersection over Union (IoU) Analysis
IoU measures the ratio of the intersection area to the union area between predicted and
ground truth masks. The model achieves high IoU values, confirming effective
segmentation performance.
The IoU results indicate that the predicted tumor regions closely match the actual tumor
areas, with minimal false positives and false negatives.
The per-class Intersection over Union (IoU) scores for different tumor regions are
presented in Table 4.3
IoU
Tumor Region Interpretation
Score
Tumor Core (TC) 0.70 Slightly lower overlap due to complex structure
45
Figure 4.8 : IoU score comparison across tumor classes.
The IoU score graph shows the overlap between predicted and ground truth tumor regions
across different classes. The results indicate strong segmentation performance, with the
highest IoU observed for enhancing tumor regions.
Pixel accuracy evaluates the percentage of correctly classified pixels in the segmentation
output. The model achieves high pixel accuracy, indicating reliable performance in
distinguishing tumor and non-tumor regions.
46
Figure 4.9 : Training and validation Dice score and loss curves demonstrating model
convergence over epochs.
Figure 4.10 :Training and validation loss curves showing steady decrease and convergence
of the model during training
The training and validation loss curves show a gradual decrease over epochs, indicating
effective learning of the model. The smooth convergence of both curves suggests that the
model is well-optimized and does not exhibit significant overfitting or underfitting.
47
Figure 4.11 : Training and validation accuracy curves showing steady improvement and
convergence of the model over epochs
The training and validation accuracy curves show a steady increase over epochs,
indicating effective learning of the model. The close alignment between training and
validation accuracy suggests that the model generalizes well and does not suffer from
significant overfitting.
Figure 4.12 : Overall performance metrics of the proposed model including Dice score,
IoU, sensitivity, and specificity.
48
Visualization of Segmentation Results
The results show that the model successfully highlights tumor regions with clear
boundaries and minimal noise. Overlay images provide better interpretability by showing
how accurately the tumor is localized within the MRI scan.
49
Training Performance
The training and validation loss curves show a steady decrease, indicating effective
learning. The model demonstrates good generalization with minimal overfitting, thanks to
preprocessing and data augmentation techniques.
Overall, the segmentation module achieves high accuracy and reliability in identifying
tumor regions within MRI images. The combination of 2D U-Net and Swin Transformer
significantly improves segmentation performance by capturing both local and global
features. The results confirm that the proposed hybrid model is effective for precise tumor
localization, which is essential for medical diagnosis and treatment planning.
Visualization plays a crucial role in understanding and interpreting the predictions made
by deep learning models, especially in medical applications. In the proposed system,
visualization techniques are used to provide clear insights into both classification and
segmentation results, enhancing the reliability and transparency of the model.
Grad-CAM Visualization
The Grad-CAM results show that the model focuses on relevant tumor regions rather than
background areas. This confirms that the classification model (EfficientNet-B2) is
learning meaningful features from the MRI images.
The heatmaps are overlaid on the original MRI images, providing a visual explanation of
the model’s decision-making process. This improves interpretability and builds trust in the
system, which is essential in medical diagnosis.
50
Segmentation Output Visualization
The segmentation module produces pixel-wise masks that highlight tumor regions. These
outputs are visualized in multiple forms:
The predicted segmentation results are compared with ground truth masks to evaluate the
model’s performance visually. The comparison shows a high level of similarity between
predicted and actual tumor regions, confirming the effectiveness of the model.
The visualization results are integrated into the web application, allowing users to view:
51
Interpretability and Clinical Relevance
The use of visualization techniques enhances the interpretability of the model, making it
easier for medical professionals to understand and validate the results. Grad-CAM and
segmentation overlays help in identifying critical tumor regions, supporting better clinical
decision-making.
Overall , The visualization results demonstrate that the proposed hybrid model not only
provides accurate predictions but also offers clear and interpretable outputs. The
integration of Grad-CAM and segmentation visualization improves the transparency and
usability of the system, making it a reliable tool for brain tumor analysis.
Hardware Specification :
Component Specification
RAM 16 GB
52
Software Specification :
The software tools and frameworks used in this project facilitate model development,
training, visualization, and deployment of the brain tumor analysis system.
Visualization Matplotlib
To evaluate the effectiveness of the proposed hybrid deep learning model, its performance
is compared with existing models commonly used for brain tumor classification and
segmentation. These models include traditional Convolutional Neural Networks (CNN),
standard U-Net, Attention U-Net, and other deep learning approaches.
53
Comparison Criteria
Classification Accuracy
Dice Coefficient (Segmentation)
Intersection over Union (IoU)
Computational Efficiency
Model Complexity
Traditional CNN-based models are effective in feature extraction and classification tasks.
However, they primarily focus on local features and lack the ability to capture global
contextual information. As a result, their performance in complex medical image
segmentation tasks is limited.
The standard U-Net architecture performs well in segmentation tasks due to its encoder–
decoder structure. However, it relies solely on convolutional operations and may struggle
to capture long-range relationships in MRI images.
The proposed model improves upon standard U-Net by integrating the Swin Transformer,
which enhances segmentation accuracy by incorporating global contextual information.
This results in better delineation of tumor boundaries and improved performance on
complex tumor structures.
54
Comparison with Attention U-Net
The proposed hybrid model outperforms Attention U-Net by combining both attention-like
mechanisms (via Swin Transformer) and efficient feature extraction. This leads to better
generalization and improved segmentation results.
Pure transformer-based models are capable of capturing global features but often require
large computational resources and extensive training data. They may also struggle with
fine-grained spatial details.
Transformer-based
High High High High complexity
Model
55
Model Accuracy Dice Score IoU Remarks
Proposed Hybrid
Very High Very High Very High Best overall performance
Model
Figure 4.14 : Comparison of the proposed hybrid model with state-of-the-art methods
based on Dice scores and model parameters.
The computational efficiency and training time of the proposed model are compared with
existing models in Table 4.7
56
Training Total Inference
Parameters
Model Time (per Training Time (per Remarks
(Millions)
epoch) Time image)
Good segmentation
U-Net ~35 sec ~30 min 7M ~0.04 sec
performance
Overall , The comparison results demonstrate that the proposed hybrid deep learning
model outperforms existing models in both classification and segmentation tasks. By
integrating 2D U-Net, Swin Transformer, and EfficientNet-B2, the system effectively
addresses the limitations of traditional approaches and provides a more accurate and
efficient solution for brain tumor analysis.
57
CHAPTER 5
CONCLUSION
In this project, a hybrid deep learning-based system for brain tumor classification and
segmentation using MRI images has been successfully developed and implemented. The
proposed system integrates advanced architectures, namely 2D U-Net, Swin Transformer,
and EfficientNet-B2, to achieve improved performance in both classification and
segmentation tasks.
The system also incorporates visualization techniques such as segmentation overlays and
Grad-CAM heatmaps, which improve the interpretability of the model’s predictions.
These visual outputs help in understanding the regions of interest and support better
clinical decision-making.
58
The comparison with existing models demonstrates that the proposed hybrid approach
outperforms traditional CNN-based and standalone segmentation models by effectively
combining local and global feature extraction. The integration of multiple deep learning
techniques results in improved accuracy, robustness, and generalization.
Overall, the findings of this project confirm that the proposed hybrid deep learning model
is an effective and reliable solution for automated brain tumor analysis, contributing to
advancements in medical image processing and supporting early diagnosis and treatment
planning.
Limitations
Despite the effectiveness of the proposed hybrid deep learning model, there are certain
limitations that need to be considered:
Dataset Dependency:
The model is trained primarily on the BraTS dataset, which, although comprehensive,
may not fully represent all variations in real-world clinical data. This can affect the
generalization of the model to unseen datasets.
Computational Requirements:
The integration of multiple architectures such as 2D U-Net, Swin Transformer, and
EfficientNet-B2 increases computational complexity, requiring higher processing
power and memory during training and inference.
2D Slice-Based Processing:
The model processes MRI data as 2D slices rather than full 3D volumes. This may
result in the loss of spatial information between slices, potentially affecting
segmentation accuracy.
Limited Clinical Validation:
The system has not been tested in real-time clinical environments. Further validation
with medical professionals is required before deployment in healthcare settings.
Dependence on Image Quality:
The performance of the model is influenced by the quality of MRI images. Noisy or
59
low-resolution images may lead to reduced accuracy in classification and
segmentation.
Future Scope
The proposed system can be further improved and extended in several ways:
3D Model Implementation:
Future work can involve the use of 3D deep learning models to process volumetric
MRI data, which would preserve spatial continuity and improve segmentation
accuracy.
Integration with Real-Time Clinical Systems:
The system can be integrated with hospital information systems and radiology
workflows to enable real-time diagnosis and clinical usage.
Expansion of Dataset:
Incorporating more diverse datasets from different sources can improve the robustness
and generalization capability of the model.
Model Optimization:
Techniques such as model pruning, quantization, and lightweight architectures can be
applied to reduce computational complexity and enable deployment on low-resource
devices.
Mobile and Cloud Deployment:
The system can be extended to mobile applications or cloud-based platforms to
increase accessibility and scalability.
Advanced Explainability Techniques:
Further improvements in model interpretability can be achieved by integrating
advanced explainable AI techniques beyond Grad-CAM.
Multi-Disease Detection:
The system can be extended to detect and analyze other neurological disorders using
MRI images.
60
REFERENCES
Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., & Zheng, X. (2016) “TensorFlow:
A System for Large-Scale Machine Learning”, Proceedings of the 12th USENIX Symposium on
Operating Systems Design and Implementation, 265–283.
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., &
Houlsby, N. (2021) “An Image is Worth 16x16 Words: Transformers for Image Recognition at
Scale”, International Conference on Learning Representations (ICLR).
He, K., Zhang, X., Ren, S., & Sun, J. (2016) “Deep Residual Learning for Image Recognition”,
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 770–
778.
Isensee, F., Jaeger, P., Kohl, S., Petersen, J., & Maier-Hein, K. (2021) “nnU-Net: A Self-
Configuring Method for Deep Learning-Based Biomedical Image Segmentation”, Nature
Methods, 18, 203–211.
Oktay, O., Schlemper, J., Le Folgoc, L., Lee, M., Heinrich, M., Misawa, K., & Glocker, B. (2018)
“Attention U-Net: Learning Where to Look for the Pancreas”, arXiv preprint arXiv:1804.03999.
Ronneberger, O., Fischer, P., & Brox, T. (2015) “U-Net: Convolutional Networks for Biomedical
Image Segmentation”, International Conference on Medical Image Computing and Computer-
Assisted Intervention (MICCAI), 234–241.
Tan, M., & Le, Q. (2019) “EfficientNet: Rethinking Model Scaling for Convolutional Neural
Networks”, Proceedings of the International Conference on Machine Learning (ICML), 6105–
6114.
Tustison, N., Avants, B., Cook, P., Yuanjie, Z., Egan, A., Yushkevich, P., & Gee, J. (2014)
“N4ITK: Improved N3 Bias Correction”, IEEE Transactions on Medical Imaging, 29(6), 1310–
1320.
Wang, G., Li, W., Ourselin, S., & Vercauteren, T. (2019) “Automatic Brain Tumor Segmentation
Using Cascaded Anisotropic Convolutional Neural Networks”, BrainLes Workshop, 178–190.
Zhou, Z., Siddiquee, M., Tajbakhsh, N., & Liang, J. (2018) “UNet++: A Nested U-Net
Architecture for Medical Image Segmentation”, Deep Learning in Medical Image Analysis, 3–11.
61