Brain_Tumor_Detection_Using_a_Deep_CNN_Model
Brain_Tumor_Detection_Using_a_Deep_CNN_Model
Research Article
Brain Tumor Detection Using a Deep CNN Model
1
InnoV’COM Laboratory-Sup’Com, University of Carthage, Carthage, Tunisia
2
Department of Computer Science, College of Computing and Information Technology, Shaqra University, Shaqra, Saudi Arabia
Copyright © 2024 Sonia Ben Brahim et al. Tis is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly
cited.
Te diagnosis of brain tumors through magnetic resonance imaging (MRI) has become highly signifcant in the feld of medical
science. Relying solely on MR imaging for the detection and categorization of brain tumors demands signifcant time, efort, and
expertise from medical professionals. Tis underscores the need for an autonomous model for brain tumor diagnosis. Our study
involves the application of a deep convolutional neural network (DCNN) to diagnose brain tumors from MR images. Te
application of these algorithms ofers several benefts, including rapid brain tumor prediction, reduced errors, and enhanced
precision. Te proposed model is built upon the state-of-the-art CNN architecture VGG16, employing a data augmentation
approach. Te dataset utilized in this paper consists of 3000 brain MR images sourced from Kaggle, with 1500 images reported to
contain tumors. Trough training and testing, the pretrained CNN model achieves a precision and classifcation accuracy rate of
96%, and the loss is 1%. Moreover, it achieves an average precision, recall, and F1-score of 98.7%, 97.44%, and 98.06%, re-
spectively. Tese evaluation metric values demonstrate the efectiveness of the proposed solution.
intricate features directly from images. Tis has established achieved is 95.10%, then it indicates a high level of per-
CNNs as leading algorithms in computer vision, especially in formance in the classifcation task.
medical imaging applications. Teir profciency in detecting Te study described in reference [12] tackled the difcult
signifcant features within intricate images makes CNN- task of identifying brain tumors in MRI scans by leveraging
based approaches particularly well suited for tasks like a vast dataset of brain tumor images. Te authors showcased
brain tumor segmentation [6], consistently ranking highly in the efectiveness of fne-tuning a cutting-edge YOLOv7
various image understanding challenges. model via transfer learning, which led to substantial en-
In this context, the proposed approach involves hancements in detecting various types of brain tumors such
deploying a machine learning (ML) algorithm based on as gliomas, meningiomas, and pituitary tumors. Deep
CNNs for brain tumor detection and classifcation [7–9]. By learning models, such as CNNs, can efectively learn hier-
harnessing the capabilities of CNNs, this approach aims to archical representations of features directly from raw data,
elevate the accuracy and efciency of brain tumor detection which is particularly benefcial when dealing with complex
and classifcation, thereby contributing to enhanced medical and high-dimensional data like medical images.
diagnosis and treatment planning. Moreover, the develop- Reference [13] presents an efcient method for di-
ment of robust brain tumor extraction methods based on agnosing brain tumors from MRI images utilizing deep
image processing represents a signifcant advancement in convolutional neural networks (DCNNs). Brain tumors pose
medical imaging and healthcare. Te primary contribution signifcant challenges in diagnosis and treatment, necessi-
of this paper lies in devising a reliable method for detecting tating accurate and timely detection [7, 14]. Te self-learning
brain tumors from medical images using the VGG model process involves the model automatically learning to discern
and Adam optimizer. Such advancements hold promise for relevant patterns and features during the training phase [15].
enabling early detection and treatment of brain tumors, Te primary limitation identifed in the research con-
ultimately leading to improved patient outcomes. ducted in [16] is their exclusive focus on binary classifcation
of brain tumors, neglecting the consideration of multiclass
2. Related Works classifcation [17, 18]. Tis limitation necessitates further
analysis to ascertain the specifc type of tumor, restricting the
In the medical feld, the segmentation of brain tumors is scope of the fndings in terms of providing comprehensive
a critical process that aids doctors in precisely identifying information about diferent tumor categories.
distinct parts of the tumor. To streamline this process, Some widely recognized CNNs, including AlexNet [19],
several automatic brain tumor detection techniques have VGG [5], and ResNet [20], have gained prominence in the
been developed. domain of medical image classifcation, particularly in tasks
Te authors in [3] proposed an efcient modifed U-Net related to brain tumor classifcation. Tis section delves into
architecture, known as EMU-Net, which was created and recent studies that provide detailed insights into the ap-
used on the BraTS 2020 dataset. Tis dataset comprises plication of these CNNs for the classifcation of brain tu-
a total of 369 patient images, although there have been mors. In [1, 21–23], a DCNN architecture was employed for
reports indicating concerns regarding its quality. Indeed, detecting the multiclass classifcation of brain tumors using
segmentation plays a crucial role in medical imaging, es- MRI. In [24], the authors described the implementation of
pecially in tasks like identifying and delineating brain tu- a DCNN for diagnosing brain tumors from MR images. Te
mors. Manual segmentation, while considered the gold dataset used in this study comprises 253 brain MR images,
standard, is labor-intensive and prone to variability between with 155 images indicating the presence of tumors. Te
diferent observers. model developed in this research achieves an overall ac-
In [10], the authors proposed a hierarchical deep lear- curacy of 96% in correctly identifying MR images with
ning–based brain tumor (HDL2BT) classifcation system tumors.
that leverages CNNs for the detection and classifcation of In [7], the authors introduced a novel deep feature
brain tumors. Tis innovative system categorizes tumors fusion–based framework designed for classifying brain tu-
into four distinct types: glioma, meningioma, pituitary, and mors from MR images. Data augmentation is crucial in
no tumor. Tis suggested model demonstrates noteworthy training robust and efective deep learning models for
performance metrics, achieving a precision of 92.13% and detecting brain cancer from medical images such as MRI
a miss rate of 7.87%. scans. Tis performance superiority over previous methods
Te integration of deep learning and traditional ML in detecting and augmenting brain tumors positions the
techniques, as described in paper [11], involves a multistep proposed system as an impactful advancement in the feld.
process: feature extraction using deep learning techniques Te study aims to address several key motivations in the feld
(AlexNet and ResNet-18), feature representation and clas- of brain tumor diagnosis and classifcation. Te authors in
sifcation using softmax, and SVM. By combining deep [8] investigated the efcacy of convolutional deep learning
learning for feature extraction and traditional ML for (CDL) methods and selected ML techniques for MRI-based
classifcation, this approach aims to leverage the strengths of brain tumor detection. Leveraging a dataset of MRI scans,
both methodologies to achieve robust and accurate classi- preprocessing techniques such as skull stripping and in-
fcation results, particularly in complex tasks like medical tensity normalization were employed.
image analysis, such as brain tumor segmentation and In reference [25], the authors utilized deep learning
classifcation. However, if we assume that the accuracy techniques to identify and segment brain tumor MRI
Applied Computational Intelligence and Soft Computing 3
images. Tey employed a combination of CNN and fully • Magnetic feld strength: Higher magnetic feld
convolutional network (FCN) methodologies in a sequential strengths generally provide better resolution and
manner. Te key discovery of their work is the utilization of signal-to-noise ratio, which can enhance the model’s
YOLO-CNN for tumor area detection and localization, performance. However, models trained on high-feld
followed by segmentation of the identifed tumor region strength images might not perform as well on images
using the FCN-U-Net architecture. Tis approach allowed from lower-feld strength machines without proper
for both accurate detection and precise delineation of the domain adaptation techniques.
tumor boundaries in MRI images. • Resolution and protocols: Diferent resolutions and
Several research papers have delved into leveraging imaging protocols (e.g., T1-weighted, T2-weighted,
adversarial approaches to tackle imbalanced data in ML and FLAIR) impact the appearance of brain tumors in
[26, 27]. Tese methods are geared toward bolstering the the images. Models need to be robust enough to
robustness and generalization capabilities of deep learning generalize across these variations or be retrained/fne-
models trained on imbalanced datasets by directly honing in tuned on diverse datasets to ensure consistent
on the decision boundary and training process. Specifcally, performance.
in paper [26], the authors focus on confronting the challenge
of imbalanced data classifcation through deep learning To address these issues, techniques like transfer learning,
techniques enriched with noise augmentation. domain adaptation, and data augmentation can be employed
Recent advancements include the use of EfcientNet and to adapt models to diferent imaging conditions. Ensuring
Vision Transformers (ViTs) for medical image classifcation a diverse training dataset that includes images from various
tasks. EfcientNet, known for its scalable and efcient ar- MRI machines and settings can also help improve the
chitecture, has been shown to provide high accuracy with model’s generalizability.
fewer parameters compared to traditional CNNs. Studies
such as [28] demonstrate the application of EfcientNet in
3.2. Patient Demographics. Patient demographics, including
brain tumor classifcation, achieving an accuracy rate of
age, gender, and genetic background, can infuence the
96.5% on the BraTS 2019 dataset. ViTs, which rely on self-
presentation and characteristics of brain tumors. For ex-
attention mechanisms rather than convolutional layers, have
ample, certain brain tumors are more prevalent in specifc
also been explored for their potential in medical imaging.
age groups or genders.
Reference [29] discusses the use of ViTs in brain tumor
classifcation, achieving competitive results with an accuracy • Age: Pediatric brain tumors difer signifcantly from
rate of 97.2% on a similar dataset. those in adults, both in terms of tumor types and
In Table 1, a comparative analysis of the performances of imaging characteristics. Models trained on adult data
the related methods, including EfcientNet and ViTs, is might not perform well on pediatric cases without
provided. additional training.
Tese studies integrate noise into the training process of • Gender and genetic background: Variations in genetic
deep learning models to improve classifcation performance factors and gender-specifc prevalence of certain tu-
on imbalanced datasets. Te introduction of noise en- mor types can also afect model performance. It is
courages the model to acquire more robust and discrimi- crucial to include a balanced representation of de-
native features, particularly for minority class samples, mographic groups in the training dataset to ensure the
mitigating the efects of class imbalance. model is unbiased and performs well across diferent
Our model aims to accurately detect brain tumors and patient populations.
classify them using various techniques involving medical
image processing, pattern analysis, and computer vision
using the VGG model and Adam optimizer. By in- 3.3. Clinical Settings. Te application of brain tumor clas-
corporating recent advancements such as EfcientNet and sifcation models in clinical settings must consider the
ViTs, our approach leverages the strengths of these state- workfow and integration with existing medical systems.
of-the-art models to enhance the segmentation, classif- Real-world deployment requires the following:
cation, and overall diagnostic process for brain tumor
• Integration with Picture Archiving and Communi-
identifcation.
cation System (PACS): Te model should seamlessly
integrate with PACS to allow radiologists to access and
3. Real-World Applications and Challenges analyze the predictions within their routine workfow.
3.1. Performance Under Diferent MRI Machines. One sig- • User interface: A user-friendly interface is essential for
nifcant aspect of deploying brain tumor classifcation clinicians to interact with the model, review the results,
models in real-world settings is their performance across and make informed decisions. Tis includes clear vi-
MRI machines from diferent manufacturers and varying sualizations of tumor segmentations and classifcation
technical specifcations. MRI machines difer in terms of outputs.
magnetic feld strength (1.5 T, 3 T, and 7 T), resolution, and • Regulatory and ethical considerations: Compliance
imaging protocols, which can afect the quality and char- with regulatory standards (e.g., FDA and CE) and
acteristics of the MRI images. addressing ethical concerns related to patient data
4
privacy and informed consent are critical for clinical ensures that models can handle larger datasets and varying
adoption. image qualities without compromising performance.
Addressing scalability involves both computational ef-
ciency and the ability to generalize across diverse datasets.
3.4. Practical Challenges and Model Adaptations.
Deploying brain tumor classifcation models in real-world
settings presents several practical challenges, including the 4.1. Handling Larger Datasets. As the availability of medical
following: imaging data grows, models must be capable of efciently
processing and learning from large volumes of data. Tis
• Data quality and annotation: High-quality, annotated scalability can be achieved through several strategies:
datasets are essential for training accurate models.
Inconsistent or inaccurate annotations can lead to 1. Distributed computing: Leveraging distributed com-
poor model performance. Collaborative eforts be- puting frameworks, such as Apache Spark or Ten-
tween radiologists and data scientists are necessary to sorFlow’s distributed training capabilities, allows for
ensure the quality of the training data. the parallel processing of large datasets across mul-
• Handling class imbalance: Brain tumor datasets often tiple nodes, signifcantly reducing training time.
exhibit class imbalance, with certain tumor types being 2. Data parallelism and model parallelism: Implement-
underrepresented. Techniques such as oversampling, ing data parallelism, where the same model is trained
synthetic data generation, and weighted loss functions on diferent subsets of data concurrently, and model
can help address this issue. parallelism, where diferent parts of the model are
• Model interpretability: Clinicians need to understand trained on diferent devices, can enhance scalability.
the model’s decision-making process to trust its pre- 3. Efcient data management: Utilizing optimized data
dictions. Techniques like Gradient-Weighted Class storage solutions, such as hierarchical data formats
Activation Mapping (Grad-CAM) can provide visual (HDF5) or databases designed for large-scale image
explanations for the model’s predictions, aiding in storage, ensures efcient data retrieval and
interpretability. preprocessing.
• Continuous learning and adaptation: As new data 4. Incremental learning: Implementing incremental
become available, the model should be periodically learning techniques allows the model to update itself
retrained and updated to maintain its performance. with new data without retraining from scratch,
Tis requires a robust pipeline for data collection, making it feasible to handle continuously growing
annotation, and model training. datasets.
4.3. Cited Works on Scalability and Image Quality However, EHR systems vary widely in their design and
functionality, leading to compatibility challenges.
1. Distributed deep learning for large-scale image
datasets: Reference [30] discusses the implementation • Standardization: Ensuring that the AI models can
of distributed deep learning techniques to handle communicate with diferent EHR systems requires
large-scale image datasets efciently. Te study adherence to standardized protocols, such as Health
highlights the importance of scalable computing re- Level 7 (HL7) and Fast Healthcare Interoperability
sources and optimized algorithms to process vast Resources (FHIR).
amounts of data without sacrifcing performance. • API integration: Developing robust APIs that allow AI
2. Handling diverse medical image datasets: Reference models to interface with EHR systems enables real-
[31] explores methods for improving the generaliza- time data exchange and integration. Tis includes the
tion of medical image classifcation models across ability to fetch patient data, update records with AI-
diverse datasets. Te paper emphasizes domain ad- generated results, and trigger alerts for clinicians.
aptation and robust preprocessing techniques to
manage variations in image quality.
5.1.2. PACS. PACS is used to store and access medical
3. Scalable CNNs for image classifcation: Reference [32] imaging data, making its integration with AI models es-
presents a scalable approach to CNNs that can ef- sential for processing and analyzing MRI images.
ciently process large image datasets. Te research
underscores the signifcance of model architecture • Digital Imaging and Communications in Medicine
optimization and efcient data handling in achieving (DICOM) compatibility: Ensuring the AI models can
scalability. handle DICOM standards is critical for seamless image
retrieval and storage.
4. Transfer learning and data augmentation for medical
imaging: Reference [33] discusses the application of • Workfow integration: AI models should be integrated
transfer learning and data augmentation to enhance into the PACS workfow to enable automatic pro-
model performance on medical images with varying cessing of images as they are acquired, providing real-
qualities. Te study provides insights into how these time analysis and feedback to radiologists.
techniques can improve the robustness and accuracy
of classifcation models. 5.2. Data Interoperability. Data interoperability is the ability
5. Efcient medical image analysis using distributed to exchange and use information across diferent systems
systems: Reference [34] focuses on the use of dis- and platforms. It is a signifcant challenge in healthcare due
tributed systems for efcient medical image analysis. to the diversity of data formats, standards, and sources.
Te paper highlights the role of scalable computing
frameworks in managing large datasets and ensuring
consistent model performance across diferent im- 5.2.1. Heterogeneous Data Sources. Medical data are col-
aging conditions. lected from various sources, including diferent imaging
modalities, laboratory tests, and clinical notes. Ensuring
By implementing these strategies and leveraging insights interoperability across these heterogeneous sources is es-
from recent research, brain tumor classifcation models can sential for comprehensive analysis.
achieve scalability, efciently handling larger datasets and
varying image qualities. Tis scalability is crucial for real- • Unifed data formats: Converting data from diferent
world applications, where the diversity and volume of formats into a unifed, standard format helps in
medical imaging data continue to grow. seamless integration and analysis. Tis often involves
preprocessing steps such as normalization, standard-
ization, and annotation harmonization.
5. Integration Challenges in Brain Tumor • Metadata handling: Proper handling of metadata,
Classification Models including patient demographics, imaging parameters,
and clinical context, is crucial for accurate analysis and
Integrating brain tumor classifcation models into existing
interpretation of results.
healthcare systems presents several challenges that must be
addressed to ensure smooth adoption and efective utili-
zation. Key issues include compatibility with current 5.2.2. Semantic Interoperability. Beyond syntactic in-
healthcare infrastructure, data interoperability, and work- teroperability, which deals with data formats, semantic in-
fow integration. teroperability ensures that the meaning of the data is
preserved and understood consistently across systems.
5.1. Compatibility With Current Healthcare Systems • Ontologies and standards: Utilizing medical ontol-
ogies and standards like Systematized Nomenclature
5.1.1. Electronic Health Record (EHR) Systems. Integrating AI of Medicine—Clinical Terms (SNOMED CT) and
models with EHR systems is crucial for accessing patient Logical Observation Identifers Names and Codes
history, storing results, and facilitating seamless workfows. (LOINC) helps in achieving semantic interoperability.
Applied Computational Intelligence and Soft Computing 7
• Mapping and transformation: Implementing mapping comprises three folders: Te frst folder contains 1500 MRI
and transformation tools that convert data between scans showcasing brain tumors and the second folder
diferent standards and ontologies ensures that the AI contains 1500 MRI scans of healthy brains. Additionally,
models can understand and use the data correctly. there is a folder containing unlabeled MRI scans intended
for testing purposes. Consequently, the fnal database is
constructed from the frst two folders, comprising 3000
5.3. Workfow Integration. Successfully integrating AI models images in total. Tese images are distributed as follows: 1500
into clinical workfows requires careful consideration of how images with tumors and 1500 images without tumors.
these tools will be used by healthcare professionals. Figure 1 illustrates sample images from the dataset. It
contains two MRI scan images:
5.3.1. User Interface and Experience. Developing intuitive • MRI scan with brain tumor: Tis image shows a brain
and user-friendly interfaces for AI tools is critical for their MRI scan with a visible tumor. Te highlighted area
adoption by clinicians. Tis includes clear visualizations, indicates abnormal tissue growth, which the model
easy navigation, and actionable insights. needs to detect and classify accurately.
• Visualization tools: Providing advanced visualization • MRI scan of a healthy brain: Tis image depicts a brain
tools that highlight AI-detected anomalies, segmen- MRI scan without any signs of a tumor. It represents
tations, and classifcation results helps clinicians normal brain tissue, helping the model to diferentiate
quickly interpret the fndings. between healthy and tumor-afected regions.
• Interactive interfaces: Allowing clinicians to interact
with the AI model, such as adjusting parameters or 6.1. Data Augmentation and Image Preprocessing. To im-
verifying results, enhances trust and usability. prove contrast intensity, normalization techniques are
employed to narrow down intensity values to a stable range,
5.3.2. Clinical Decision Support. AI models should com- thereby reducing variability. Tis process aims to stan-
plement, not replace, the clinician’s expertise. Integrating dardize the mean intensity value to zero and the standard
decision support features that provide recommendations deviation toward one. Initially, the images undergo
while allowing clinicians to make the fnal decisions is key. thresholding using a threshold value of 45, followed by
a sequence of erosions and dilations to eliminate small
• Alert systems: Implementing alert systems that notify regions of noise. Subsequently, the images are normalized by
clinicians of critical fndings or discrepancies ensures identifying the largest contour within each image and
timely intervention. cropping the images based on the extreme points of the
• Explainability: Ensuring that AI models provide ex- contour in the top, bottom, left, and right directions. Tis
planations for their predictions helps clinicians un- normalization process helps to enhance the quality and
derstand and trust the results. Techniques like Grad- consistency of the images, facilitating more accurate analysis
CAM and Local Interpretable Model-Agnostic Ex- and interpretation. Te entire normalization process is il-
planations (LIME) can be used to provide visual and lustrated in Figure 2 that contains 4 captions:
textual explanations.
• Caption 1: original image—Tis is the initial brain
MRI scan before any processing. Tis image contains
5.3.3. Regulatory and Ethical Considerations. Compliance variable intensity values and noise that can afect
with regulatory standards (e.g., FDA and CE) and addressing subsequent analysis.
ethical concerns related to patient data privacy and informed • Caption 2: fnding the biggest contour—Te largest
consent are critical for clinical adoption. contour within the image is identifed. Tis contour
• Data privacy: Implementing robust data privacy highlights the main region of interest in the scan,
measures, such as encryption and anonymization, typically the brain or signifcant features.
ensures that patient information is protected. • Caption 3: identifying extreme points—Te extreme
• Regulatory approval: Obtaining regulatory approval points (top, bottom, left, and right) of the largest
for AI models involves rigorous testing and validation contour are determined. Tese points defne the
to ensure their safety and efcacy in clinical settings. boundaries for cropping, focusing on the region of
interest.
By addressing these integration challenges, brain tumor • Caption 4: cropped image—Te MRI scan is cropped
classifcation models can be efectively deployed in health- based on the extreme points of the largest contour.
care systems, enhancing diagnostic accuracy and improving Tis step enhances the image by removing irrelevant
patient outcomes. background and standardizing the region of interest,
preparing it for accurate analysis.
6. Dataset Description
Tese captions explain each step in the normalization
Te dataset used in this study is Brain MRI Images for Brain process, demonstrating how it improves image quality and
Tumor Detection obtained from https://kaggle.com [6]. It consistency for more reliable analysis and interpretation.
8 Applied Computational Intelligence and Soft Computing
Step 1. Get the original image Step 2. Find the biggest contour Step 3. Find the extreme points Step 4. Crop the image
Data augmentation methods [35] prove benefcial in adds diversity to the dataset, improving the model’s
addressing the imbalance and scarcity of data in certain ability to generalize across diferent orientations.
classes when dealing with limited and uneven datasets. Tis • Caption 4: cropped image—Tis is the original MRI
approach proves particularly useful for achieving a balance scan after cropping. Cropping focuses on specifc re-
in the number of images across diferent MRI classes related gions of the image, which can help the model learn
to brain tumors and for expanding the overall dataset. important features more efectively.
Various augmentation techniques, including rotation,
• Caption 5: zoomed image—Tis is the original MRI
cropping, height and width adjustments, flling operations,
scan after applying zooming. Zooming in on the image
zooming, and horizontal rotation brightening, are employed
allows the model to detect fne details within the scan,
to augment images and rectify class imbalances. Te MR
enhancing its accuracy in identifying tumors.
images obtained from the dataset exhibited varying sizes. As
these images served as the input layer for the networks, they Tese captions describe each augmentation technique ap-
were resized to dimensions of 80 × 80 pixels. To augment the plied to the MRI images, illustrating how these transformations
dataset, each image underwent two transformations. Firstly, contribute to a more diverse and balanced dataset, essential for
the images were rotated by 90°, and secondly, they were robust model training and accurate brain tumor detection.
fipped vertically.
By applying these transformations, the chosen dataset
was augmented threefold, resulting in a total of 9792 images 7. Proposed Methodology
for further analysis and processing.
Te proposed methodology utilizes a DCNN architecture as
Figure 3 provides a visual representation of a subset of
the foundation for brain tumor detection in brain MRI
image samples from the brain tumor dataset after the ap-
images. Te approach comprises several key steps:
plication of data augmentation. It contains fve captions for
fve diferent images: • Input and preprocessing: Initially, the brain MRI
image serves as the input. Te frst step in pre-
• Caption 1: original image—Tis is the initial brain
processing involves data normalization to ensure
MRI scan before any augmentation. It serves as the
consistency across the images. Tis includes image
reference image for subsequent transformations.
thresholding to remove background noise and di-
• Caption 2: rotated image (90°)—Te original MRI lations to eliminate small noise regions. After noise
scan is rotated by 90°. Tis transformation helps in reduction, images are further processed through
increasing the variability of the dataset, allowing the normalization techniques to standardize the intensity
model to recognize brain tumors from diferent values, bringing the mean intensity value to zero and
angles. the standard deviation to one. Tis step is crucial for
• Caption 3: vertically fipped image—Te original MRI stabilizing the training process and ensuring that the
scan is fipped vertically. Tis augmentation technique input data are in a consistent format.
Applied Computational Intelligence and Soft Computing 9
• Data augmentation: To address the issue of limited and MRI images. Te architecture of VGG16 is illustrated
imbalanced data, data augmentation techniques are in Figure 4.
employed. Tese techniques include rotation, crop- • Overftting mitigation: Overftting correction is
ping, height and width adjustments, flling operations, addressed through four techniques: data augmenta-
zooming, and horizontal rotation. Te augmented tion, dropout, batch normalization, and pooling. Data
dataset helps in improving the model’s generalization augmentation, as mentioned earlier, increases the
by providing diverse variations of the input images, diversity of the training data. Dropout involves ran-
thereby reducing the risk of overftting. Each image is domly setting a fraction of input units to zero during
resized to 80 × 80 pixels, and additional trans- training to prevent overreliance on certain features.
formations, such as a 90° rotation and vertical fipping, Batch normalization standardizes the inputs to each
are applied to further augment the dataset, tripling its layer, which accelerates training and improves model
size to 9792 images. stability. Pooling layers reduce the dimensionality of
• Feature extraction with VGG16: Our study employs the feature maps, retaining essential information while
the VGG16 model as the feature extraction com- reducing computational complexity.
ponent. VGG16 is a renowned CNN-based model • Model training with Adam optimizer: Te training
pretrained on extensive datasets like ImageNet, process involves using the Adam optimization
which contains over one million images. Tis pre- function, which is an adaptive learning rate opti-
training equips VGG16 with the capability to ef- mization algorithm designed specifcally for train-
fectively learn and extract relevant features from new ing deep neural networks. Adam combines the
images. Te architecture of VGG16, illustrated in advantages of two other extensions of stochastic
Figure 4, was originally proposed by [24], members gradient descent, namely, Adaptive Gradient Al-
of the Visual Geometry Group, during the 2014 gorithm (AdaGrad) and Root Mean Square Prop-
ImageNet Competition. Teir submissions secured agation (RMSProp). It computes adaptive learning
frst and second places in the felds of classifcation rates for each parameter, which enhances training
and localization, respectively. Te use of VGG16 efciency and convergence. Te CNN model, in-
allows our model to leverage these prelearned fea- corporating VGG16 for feature extraction and the
tures, enhancing its performance in classifying brain Adam optimizer, is trained to classify images into
10 Applied Computational Intelligence and Soft Computing
Conv-2
Conv-3
Conv-4
Conv-5
FC-1
28 × 28 FC-2
× 512 Softmax
56 × 56 × 14 × 14 ×
256 51
7×7×5
112 × 1 12 1 × 1 × 4096 1×1×1
12 × 12 000
8
224 × 224 × 64
two categories: YES (tumor present) and NO (no classifed 305 positive cases of brain tumors and accurately
tumor). identifed 283 nontumorous brain images as belonging to the
• Evaluation: Te performance of the trained model is negative class. Tese values, namely, true positives (TP), true
evaluated using various metrics, including precision, negatives (TN), false positives (FP), and false negatives (FN),
recall, sensitivity, specifcity, accuracy, and F1-score. obtained from the confusion matrix, are subsequently uti-
Tese metrics provide a comprehensive assessment of lized by the code for calculating the loss metrics, including
the model’s efectiveness in detecting brain tumors accuracy, precision, and sensitivity.
from MRI images. Te evaluation process involves Our experimental results illustrate that the proposed
testing the model on a separate dataset to ensure its CNN model exhibits superior convergence compared to the
generalization capability and robustness. ANN approach, random forest classifer, transfer learning
algorithms, and other CNN models. As indicated in Table 2,
Te proposed methodology, depicted in Figure 5, out- our model attained the highest accuracy rate of 98% and the
lines the entire process from data collection and pre- best F1-score of 98.06%, along with a precision of 98.7%.
processing to model training and evaluation. By integrating Te values attained by our proposed CNN model stand
advanced techniques such as VGG16 for feature extraction, out for their exceptional performance, surpassing those
data augmentation to enhance the dataset, and the Adam achieved by the previously mentioned models. Trough
optimizer for efcient training, our approach aims to achieve a comparative analysis presented in Table 3, it becomes
high accuracy in brain tumor detection while maintaining evident that our model outperforms others, securing the
computational efciency and robustness. highest rank in terms of accuracy. Tis underscores the
efcacy and reliability of our approach in accurately
8. Results and Discussion detecting brain tumors from MRI scans.
While our proposed CNN model demonstrates out-
In this section, the experimental results of the proposed standing performance with a high accuracy rate of 98%,
model will be presented. Te process begins by uploading the there are several limitations and potential risks that should
MRI brain image. Upon submission of the MRI brain image, be considered:
the model commences the analysis using learning models to
ascertain the presence of a brain tumor. Upon successful • Computational overhead: Te CNN model, especially
identifcation of a tumor, a message will afrmatively declare when using advanced architectures and optimizers like
“Brain Tumor Detected.” the Adam optimizer, can be computationally intensive.
Figure 6 displays the training and validation accuracy of Training such models requires signifcant computa-
the proposed method using 32 epochs. Conversely, Figure 7 tional resources, including high-performance GPUs
illustrates the loss function. and extensive memory. Tis can pose a challenge for
Our proposed model outperforms the previously de- institutions or individuals with limited access to these
veloped approaches demonstrating accuracy of 98%. Based resources.
on the results depicted in the confusion matrix in Figure 8, it • Trade-ofs between accuracy and efciency: Achieving
is observed that out of 600 cases, the model correctly high accuracy often involves complex models with
Applied Computational Intelligence and Soft Computing 11
Preprocessing
Data collection Data preprocessing
Resizing Feature
MRI scan extraction
Brain MRI
image data Data Adam
augmentation optimizer
Model training
Training dataset CNN/VGG Prediction
Tumor
Nontumor
1.0 1.0
0.9 0.8
0.8
Accuracy
0.6
Loss
0.7
0.4
0.6
0.2
0.5
0 5 10 15 20 25 30
Epochs 0.0
0 5 10 15 20 25 30
Train Epochs
Val
Train
Figure 6: Te training and validation accuracy over the epochs. Val
Figure 7: Te training and validation loss over the epochs.
a large number of parameters, leading to increased
training and inference times. While our model
achieves superior accuracy, the trade-of is that it must be carefully balanced against the need for high
may be less efcient in terms of speed and com- accuracy.
putational cost compared to simpler models. For • Data dependency: Te performance of our model
real-time applications or deployment in resource- heavily depends on the quality and quantity of the
constrained environments, this efciency trade-of training data. While data augmentation techniques
12 Applied Computational Intelligence and Soft Computing
Confusion matrix
Yes 305 8
True labels
No 4 283
Yes No
Predicted labels
Figure 8: Confusion matrix.
Table 2: Performance of the proposed model. quantization, and knowledge distillation can be
employed to reduce the model size and enhance
Evaluating metrics Performance (%) inference speed.
Precision 98.7
• Utilizing efcient hardware: Leveraging specialized
Sensitivity 97.44
F1-score 98.06
hardware like Tensor Processing Units (TPUs) or
Specifcity 97.25 optimizing the model for deployment on edge devices
can help balance the trade-of between accuracy and
efciency.
have been employed to enhance the dataset, any biases • Hybrid approaches: Combining our CNN model with
or inconsistencies in the data can afect the model’s other ML techniques, such as assembling with less
generalization ability. Additionally, the model may not computationally intensive models, can achieve a bal-
perform as well on data from diferent sources or with ance between high accuracy and efciency.
diferent imaging protocols. • Scalable training: Implementing scalable training
• Risk of overftting: Although our model has shown techniques, such as distributed training and leveraging
excellent results on the validation set, there is always cloud-based platforms, can address the computational
a risk of overftting, especially with high-capacity demands during the training phase.
models. Overftting occurs when the model learns
Ensuring ethical standards in our research is paramount,
the noise in the training data instead of the actual
especially when dealing with sensitive medical data. We have
underlying patterns, which can lead to poor perfor-
implemented stringent measures to comply with ethical
mance on unseen data. Regularization techniques and
guidelines and regulations. All patient data used in this study
cross-validation are essential to mitigate this risk.
were obtained with explicit informed consent, guaranteeing
• Interpretability: Deep learning models, including that participants were fully informed about the study’s
CNNs, are often seen as “black boxes” due to their objectives, procedures, and the use of their data. Tis process
complex nature. Understanding and interpreting the involved providing clear and detailed information to par-
decision-making process of the model can be ticipants, ensuring they understood their rights and the
challenging, which is a signifcant limitation in purpose of the research:
critical applications like medical diagnosis. Eforts to
improve the interpretability of the model’s pre- • Data handling and patient consent: Handling medical
dictions are necessary to build trust and facilitate data involves signifcant ethical considerations. En-
clinical adoption. suring patient consent for the use of their data in
research is paramount. Our study strictly adheres to
Addressing computational overhead and trade-ofs in- ethical guidelines by obtaining informed consent from
volves optimizing model efciency, leveraging specialized all participants whose data were included in the
hardware, employing hybrid approaches, and implementing dataset. Data anonymization techniques are employed
scalable training techniques: to protect patient privacy and confdentiality.
• Optimizing model architecture: To mitigate compu- • Compliance with ethical standards: Our research
tational overhead, optimizing the model architecture complies with all relevant ethical standards and reg-
for efciency without compromising accuracy is ulations, including institutional review board (IRB)
crucial. Techniques such as model pruning, approvals where applicable. Ensuring the ethical use of
Applied Computational Intelligence and Soft Computing 13
data and maintaining transparency in our research management. Te deployment of IoT-enabled wearable
practices is fundamental to the integrity of our study. devices and smart sensors for continuous monitoring can
revolutionize how patient data are collected and analyzed.
Although our proposed CNN model achieves state-of-
Tese devices can track vital signs and neurological ac-
the-art performance in brain tumor detection, acknowl-
tivity in real time, providing a continuous stream of data
edging and addressing its limitations and potential risks is
that AI algorithms can process to detect early signs of
essential for practical deployment. By optimizing compu-
brain tumors or neurological changes. Such real-time
tational efciency, ensuring high-quality data, mitigating
monitoring systems can facilitate early diagnosis and
overftting, and enhancing interpretability, we can improve
intervention, signifcantly improving patient outcomes.
the model’s robustness and applicability in real-world sce-
Additionally, the development of AI-driven predictive
narios. Additionally, addressing ethical implications
models using these data can help in identifying at-risk
through proper data handling and patient consent ensures
patients and enabling preventive measures tailored to
compliance with ethical standards and maintains the in-
individual needs.
tegrity of our research.
Moreover, integrating AI with IoT in diagnostic imaging
devices can enhance the accuracy and efciency of brain
9. Conclusion tumor diagnosis. Smart imaging devices equipped with edge
Tis paper introduces a CNN model tailored for segmenting AI capabilities can perform real-time image processing and
MRI images depicting brain tumors into two classes: those analysis, reducing the time between image acquisition and
with tumors and those without. Its primary contribution lies diagnosis. Tis can be particularly benefcial in emergency
in the development of a robust method for detecting brain and remote settings where quick and accurate diagnostics
tumors from medical images, potentially leading to signif- are critical. Future research can also explore the creation of
icant advancements in early tumor detection and treatment, unifed health data platforms that integrate data from var-
thus improving patient outcomes. ious IoT devices, EHRs, and imaging systems. Such plat-
Te proposed model is built upon the state-of-the-art forms would ensure seamless data exchange and create
CNN architecture VGG16, employing a data augmentation comprehensive patient profles, aiding in more informed
approach. Our primary objective is to utilize CNNs as a ML and holistic clinical decision making. Addressing ethical
approach for brain tumor detection and classifcation. considerations, such as data privacy, informed consent, and
Furthermore, we advocate for the integration of the Adam bias in AI models, will be essential in building patient trust
optimization function to construct predictive models uti- and ensuring compliance with regulatory standards. By
lizing a dataset comprising 3000 high-resolution MRI im- focusing on these areas, future research can pave the way for
ages, with subsequent evaluation employing various metrics. more efective, personalized, and equitable healthcare
Results demonstrate the superior accuracy of the proposed solutions.
model compared to other neural network models, achieving
an impressive accuracy rate of 98%. CNN emerges as the
Appendix
most efective technique for predicting brain tumors within
the dataset. Te study includes a detailed analysis of per- Te code was collected from Kaggle, available at this link:
formance evaluation metrics and curve analysis, showcasing https://www.kaggle.com/code/arunchechi/brain-tumor-
the CNN network’s profciency in detecting and classifying detection-using-cnn.
brain tumors with heightened accuracy. Te paper elucidates
the architecture of CNNs and highlights their efcacy when Data Availability Statement
applied to a refned database of brain images.
Future research should focus on the integration of IoT Te datasets were collected from Kaggle, available at this
and AI to signifcantly advance healthcare applications, link: https://www.kaggle.com/datasets/abhranta/brain-tumor-
particularly in the realm of brain tumor detection and detection-mri.
14 Applied Computational Intelligence and Soft Computing