Next Article in Journal
The Potential of a New Natural Vessel Source: Decellularized Intercostal Arteries as Sufficiently Long Small-Diameter Vascular Grafts
Next Article in Special Issue
Identification of Anomalies in Lung and Colon Cancer Using Computer Vision-Based Swin Transformer with Ensemble Model on Histopathological Images
Previous Article in Journal
Using the Probability Density Function-Based Channel-Combination Bloch–Siegert Method Realizes Permittivity Imaging at 3T
Previous Article in Special Issue
Utilizing Nearest-Neighbor Clustering for Addressing Imbalanced Datasets in Bioengineering
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Integrating Convolutional Neural Networks with Attention Mechanisms for Magnetic Resonance Imaging-Based Classification of Brain Tumors

1
School of Electronics and Information Engineering, Harbin Institute of Technology, Harbin 150001, China
2
Department of Computer Engineering, Gachon University, Sujeong-gu, Seongman 13120, Republic of Korea
3
School of Computing, Skyline University College, University City Sharjah, Sharjah 1797, United Arab Emirates
4
Applied Science Research Center, Applied Science Private University, Amman 11931, Jordan
5
Jadara University Research Center, Jadara University, Irbid 21110, Jordan
6
Department of Health Informatics, College of Public Health and Health Informatics, Qassim University, Qassim 51452, Saudi Arabia
7
Department of Basic Medical Sciences, College of Applied Medical Sciences, King Khalid University, Abha 61421, Saudi Arabia
*
Author to whom correspondence should be addressed.
Bioengineering 2024, 11(7), 701; https://doi.org/10.3390/bioengineering11070701
Submission received: 17 June 2024 / Revised: 5 July 2024 / Accepted: 7 July 2024 / Published: 10 July 2024
(This article belongs to the Special Issue Computer Vision and Machine Learning in Medical Applications)

Abstract

:
The application of magnetic resonance imaging (MRI) in the classification of brain tumors is constrained by the complex and time-consuming characteristics of traditional diagnostics procedures, mainly because of the need for a thorough assessment across several regions. Nevertheless, advancements in deep learning (DL) have facilitated the development of an automated system that improves the identification and assessment of medical images, effectively addressing these difficulties. Convolutional neural networks (CNNs) have emerged as steadfast tools for image classification and visual perception. This study introduces an innovative approach that combines CNNs with a hybrid attention mechanism to classify primary brain tumors, including glioma, meningioma, pituitary, and no-tumor cases. The proposed algorithm was rigorously tested with benchmark data from well-documented sources in the literature. It was evaluated alongside established pre-trained models such as Xception, ResNet50V2, Densenet201, ResNet101V2, and DenseNet169. The performance metrics of the proposed method were remarkable, demonstrating classification accuracy of 98.33%, precision and recall of 98.30%, and F1-score of 98.20%. The experimental finding highlights the superior performance of the new approach in identifying the most frequent types of brain tumors. Furthermore, the method shows excellent generalization capabilities, making it an invaluable tool for healthcare in diagnosing brain conditions accurately and efficiently.

1. Introduction

An abnormal cell that proliferates within brain tissues can result in the transformation of a brain tumor. Tumors are the second most common cause of mortality globally, as reported by the World Health Organization [1,2]. Brain tumors are primarily characterized as benign or malignant. Benign tumors are often not considered a significant threat to a person’s health. The main reasons include their inability to infiltrate neighboring tissues or cells, slower growth compared to malignant tumors, and limited spreading. In addition, recurrence after surgically removing benign tumors is typically rare.
On the other hand, malignant tumors tend to infect nearby organs and tissues more than benign tumors. They can significantly disrupt normal bodily functions if not treated swiftly and effectively. Early detection is crucial for the survival of patients with brain tumors, which are primarily classified into three forms: meningioma, glioma, and pituitary tumors. Moreover, meningioma and pituitary tumors are classified as benign, whereas glioma tumors are recognized as malignant. Furthermore, meningioma tumors arise from the meninges, the three layers of tissue covering the brain and spinal cord. Gliomas develop from ependymal cells, oligodendrocytes, and astrocytes, and pituitary tumors develop in the pituitary gland [3,4,5].
Consequently, it is crucial to discriminate between different tumor types to identify a patient precisely and select the most suitable treatment. Magnetic resonance imaging (MRI) is frequently used to identify various types of cancer despite the obstacles associated with human interpretation and managing huge quantities of data. Biopsies are commonly employed for the diagnosis and treatment of brain lesions.
However, the radiologist’s proficiency greatly impacts their ability to identify brain cancers quickly. Developing a diagnostic mechanism is essential for diagnosing cancers using MR imaging [6]. Implementing this method will maintain the objectivity of the diagnostic process and effectively decrease the chances of handed procedures. Artificial intelligence (AI) and machine learning (ML) have greatly revolutionized the healthcare industry [7,8,9,10,11]. The advent of technologies has brought forth innovative methodologies for radiologists in classifying MRI images, effectively tackling numerous health-related obstacles [12,13]. Medical imaging methods are acknowledged for their efficacy and are extensively used to identify cancer. The approach is significant because of its non-invasive nature, as it does not require intrusive processes [14,15].
Medical imaging is significant in healthcare, particularly for attaining all-inclusive visualization of brain tissue, which is essential in classifying brain tumors. The tumors vary in shape, size, and density. The tumors that appear similar may have different clinical characteristics. The large number of images in medical databases makes it complicated to classify MRI scans using neural networks effectively. Advances in generating MRI images from various perspectives could significantly increase the data sizes. In order to achieve better classification precision, the data must be preprocessed before feeding into different networks. CNNs are known for their robust characteristics, which include reduced preprocessing requirements and improved feature extraction abilities. Simpler network structures save resources during setup and training while increasing operating efficiency. Nonetheless, the use of these methods in clinical diagnostics and handheld tools may be limited by resource constraints. The appropriate approach is important for routine clinical evaluation of brain tumors.
The main contributions of this study are delineated as follows:
  • This study presents a novel approach that combines hybrid attention with convolution neural networks to improve the efficiency of diagnosing glioma, meningioma, pituitary, and no-tumor cases.
  • The objective of this study is to emphasize the effectiveness of the proposed method in comparison to previous studies, showcasing its capacity to provide effective results with fewer resources. Moreover, the method’s capacity for usage in a clinical research context is thoroughly evaluated.
  • The findings from this study demonstrate that the proposed method surpasses the previous studies in terms of performance, as demonstrated on the benchmark dataset. Additionally, the study evaluates the prediction competencies of the framework by comparing it to pre-trained models, ultimately improving diagnostics methodologies and clinical necessities.
This article contains several sections. Section 2 of this study provides an overview of the literature. Section 3 highlights the dataset, methodology, and optimization approach. Section 4 presents the results derived from the experiments. Section 5 entails a discussion, and finally, Section 6 provides a conclusion.

2. Literature Review

Due to the above considerations, it may be difficult to distinguish between different forms of brain tumors. The authors explored the use of deep learning in the field of radiology, detailing the essential steps for implementing DL projects within this area. In addition, they explored the possible applications of DL in various medical sectors. Although DL has shown potential in some radiology applications, it is still not advanced enough to take over the roles played by radiologists [16,17]. However, there is potential for combining radiologists with deep learning procedures to improve diagnostic efficacy and precision. Various research approaches have been used to explore the effectiveness of MRI in the classification of brain tumors. Gumaei et al. proposed a strategy for classifying brain tumors that combines hybrid feature extraction techniques with RELM. The authors attained an accuracy of 94.23% by preprocessing brain images with min–max normalization and features extracted by the hybrid method and classifying them using the RELM method [18]. Srujan et al. constructed a deep learning system of sixteen CNN layers. This system included the Rectified Linear Unit (ReLU) as an activation function, and utilized the Adam optimizer within its architecture. The system attained a 95.36% accuracy rate, demonstrating its ability to classify various primary types of cancers [19]. Kaplan et al. introduced a novel classification method for identifying brain malignancies utilizing nLBP and αLBP for feature extraction. This approach particularly achieved a notable accuracy rate of 95.56% when combined with the nLBPD = 1 feature extraction method with the KNN classifier [14].
Huang et al. developed a CNNBCN network to categorize brain tumors. The method was evaluated using a randomly generated graph algorithm, which yielded an accuracy rate of 95.49% [20]. Deepak et al. employed a combination of CNN and SVM methods to categorize medical images depicting brain tumors based on a fivefold cross-validation method; the automated system demonstrated a notable accuracy rate of 95.82%, surpassing the performance of the state-of-the-art approaches [21]. Ghassemi et al. suggested a deep learning framework as a potential treatment method for classifying brain cancers. The framework extracted robust features from MRI images using pre-trained networks as GAN discriminators and achieved a 95.6% accuracy rate. In addition, the framework was involved in fivefold cross-validation, data augmentation, and dropout [22]. Ayadi et al. suggested brain tumor classification algorithms that included normalization, dense speeded-up robust features, and the histogram of gradient methods to improve the image quality and provide distinctive features. Additionally, the authors utilized Support Vector Machines (SVMs) as a classifier and attained a classification accuracy of 90.27% on the benchmarked dataset [23].
Noreen et al. reformed pre-trained networks, namely InceptionV3 and Xception, for classifying brain tumors. The models were combined with various ML classifiers, such as softmax, Random Forest, KNN, and SVM, and attained 94.34% accuracy with the InceptionV3 ensemble [24]. Ahmad et al. suggested a deep generative neural network as a classifier to categorize brain tumors. The method used generative adversarial networks combined with a variational auto-encoder to generate realistic tumor MRI images, which attained 96.25% accuracy [25]. Swati et al. proposed block-wise transfer learning to employ a pre-trained deep convolutional neural network (CNN) model. This approach was evaluated through 5-fold cross-validation using a representative dataset of T1-weighted images with minimal preprocessing approaches and eliminated manually designed features. The method attained an accuracy of 94.82% with VGG19, 94.65% with VGG16, and 89.95% with AlexNet [26]. Satyanarayana et al. proposed a method integrating CNN with mass correlation analysis (MCA). Initially, the Average Mass Elimination Algorithm (AMEA) removed unwanted noise. Subsequently, the CNN model was trained on these features, and MCA played a critical role in determining the weight measures assumed and maximizing the model performance. The strategy yielded an impressive 94% accuracy rate [27].
Deepak et al. proposed a class-weighted focal loss to solve the unbalanced training data problem in CNN-based tumor classification data. The authors investigated the effect of the loss on feature learning. They proposed two methods for improving the performance: majority voting, which involved aggregating classifier prediction from feature sets, and deep feature fusion, which involved combining features from CNNs trained using different loss functions. Furthermore, SVM and KNN models attained 94.9% and 95.6% accuracy, respectively, outperforming typical CNNs trained with cross-entropy loss [28]. Rezaei et al. introduced an integrated method for segmenting and classifying brain tumors using Figshare data. The methodologies encompassed feature extraction, noise reduction, Support Vector Machine (SVM)-based implementation for segmentation, and differentiation extraction (DE) selection. The classification of tumor slices was performed using WSVM, HIK-SVM, and KNN classifiers. When combined with MODE-based ensemble approaches, these classifiers demonstrated a precision rate of 92.46% [29].

3. Materials and Methods

The present study introduces an innovative methodology comprising several stages: The framework commenced by resizing the dimensions of the input data in order to achieve consistency in aspect ratio. Subsequently, a process of labeling was used to ensure a uniform distribution of data. The dataset was distributed into two subsets: 80% was used for training purposes, and the remaining 20% was reserved for testing. Following this, the model was trained through 5-fold cross-validation [30] using the Adam optimizer [31,32], which integrated callbacks for learning rate adjustment during the training procedure. Various metrics were employed to assess the efficacy of the model, including accuracy, precision, recall, and the F1-score, specifically for classification tasks. The procedural framework of the suggested methodology is illustrated in Figure 1.

3.1. Dataset

This study utilized an openly available MRI data set from the Kaggle repository [33]. The dataset integrates three publicly accessible sources: Figshare [34], SARTAJ [35], and BR35H [36]. It comprises 7023 grayscale and jpg format MRIs of the human brain, covering primary brain tumor types such as glioma, meningioma, and pituitary, as well as images without tumors. Figure 2 illustrates the various tumor types included in the dataset.

3.2. Proposed Architecture

In this study, a novel convolutional neural network is employed, incorporating advanced attention mechanisms to enhance the feature extraction for brain tumor classification. The proposed architecture consists of a convolutional block and a hybrid attention block. The convolutional block, as shown in Figure 3, is an integral module of the proposed model that comprises convolutional layers, batch normalization, ReLU, and skip connections. The block utilized two distinct convolutional operations, each followed by batch normalization (BN) [37], to optimize learning efficiency and model stability. Initially, input was processed through a convolutional operation using kernel size 3 × 3, stride size of 1, “same” padding, and L2 regularization (10−3), extracting spatial features while preserving the input dimension. The output was normalized using batch normalization (BN). This was followed by the ReLU activation function which introduced non-linearity, enhancing the network’s ability to learn the complex pattern.
Following the initial convolutional process, the second convolutional operation was performed using a 1 × 1 kernel and regularized by L2 10−3. This convolutional primarily aids in increasing feature map depth without altering the spatial dimension of the data. Subsequently, a batch normalization layer was employed, which further assists in stabilizing the model by ensuring a normalized feature map before activation. Furthermore, shortcut path adjustments were configured; if the number of filters or stride did not match between the shortcut path and the output from the convolutional layers, the shortcut was adjusted with (1 × 1 convolution, stride = 1, same padding, and L2 10−3 followed by batch normalization) to match the main path’s stride and padding. This ensures the smooth addition of the shortcut, preserves essential information, and improves training stability. Finally, the output of the main path and adjusted shortcut were merged using an element-wise addition followed by a ReLU activation [38]. This combination allows for effective integration of features and enhances the stability and robustness of the training process. Moreover, max-pooling layers with a 2 × 2 pool size and stride of two were strategically positioned after certain convolutional blocks in the model to decrease the spatial dimension.
As shown in Figure 4, convolutional blocks involve increasing filter sizes: 16, 32, 64, 128, and 256 filters. After the max pooling layer, Algorithm 1 was employed to integrate the hybrid attention mechanism enhancing the model’s ability to recognize a relevant feature of brain tumor, the mechanism employed both channel and spatial attention, focusing the model processing capacity on the most informative parts of the features maps [39], which is essential for precise brain tumor classification. The architecture concluded with a robust classification head, which transforms the refined feature maps into a compact vector by utilizing a global average pooling layer. This vector feeds into a dense layer of 512 neurons, which is further processed with dropout for regularization [40,41].
In the end, a dense layer with softmax activation [41] was employed to determine the probability score for each class, classifying the decision labels as to whether the input images contained glioma, meningioma, pituitary, or no tumor cases. The pseudo-code for the hybrid attention mechanism is given below:
Algorithm 1: Pseudo-code for Hybrid Attention Mechanism
Input:
      •
F: Input feature map of dimension C × H × W
      •
Ratio: reduction factor in channel attention, set to 2
Output:
      •
F : Refined output features map after applying hybrid attention
1. 
C h a n n e l   A t t e n t i o n :
  • Reduce channel:  F R  = ReLU(BN(Conv(F, max( C r a t i o , 1 ), 1 × 1)))
  • Pooling:  A a v g  = GAP( F R ),   A m a x  = GMP( F R )
  • Reshape:  A F  = Reshape(Concat( A a v g , A m a x ), [1, 1, 2 × max( C r a t i o , 1 )])
  • Scale: S = Sigmoid(Conv( A F , C, 1 × 1))
  • F′ = F (F S)
2. 
Spatial Attention:
  • Condense to single Channel:  F C   = ReLU(BN(Conv(F′, 1, 1 × 1)))
  • Multi-Scale convolution:  C 1 = Conv( F C , 1, 3 × 3,’ same’),  C 2 = Conv( F C , 1, 5 × 5,’same’)
  • Attention map: A = Sigmoid(Conv(Concat( C 1 , C 2 ), 1, 3 × 3,’same’))
  • Apply: F″ = F′ (F′ A)
3. 
Combine with original input:
  • F″ = F F″
Return F″

3.3. Activation and Losses Functions

The Rectified Linear Unit (ReLU) was employed in the presented framework as an activation function, which introduces non-linearity into a neural network architecture [38]. It processes an input value by returning the maximum between 0 and the input. This operation is mathematically desrcribed as follows:
R e L U ( x ) = m a x ( 0 , x )
where x is the input to the ReLU function. This setup ensures that positive inputs retain their original value, thereby maintaining their complete impact within the network. For inputs that are zero or negative, the function outputs zero, which effectively prevents negative values from affecting the subsequent layers of the network. The sigmoid function used in the attention mechanism normalizes scores to a range between 0 and 1. This normalization reflects the relative importance of the channel, enabling the network to prioritize the most significant feature of the task. The sigmoid function is denoted as follows:
σ ( x ) = 1 1 + e x
where σ ( x ) has a characteristic sigmoid curve, e is the base of the natural logarithms, and x is the input variable. Moreover, the softmax function was applied at the output layer of the presented model. This function transforms a set of real values into a probability distribution over brain tumor classes. The mathematical expression for the softmax role is as follows:
σ ( z ) i = e Z i j = 1 K e Z j
where σ denotes softmax, z represents the input vector to function, e Z i applies the standard exponential function to each element i of the input vector, and K denotes the total number of classes into which the inputs can be classified. Additionally, e Z j computes the exponential for each element j of the output vector, used in the denominator to normalize the results. Figure 5 illustrates the function of softmax as the output layer [41].
The categorical cross entropy was utilized for classification to measure the disparity between the predictions made by the algorithm’s actual values. The formulation of categorical cross entropy C E involves determining the error rate through the utilization of an equation.
C E = i N y t r u e [ i ] · log ( y p r e d [ i ] )
where y t r u e [ i ] symbolizes the true class probabilities, y p r e d [ i ] represents the predicted probabilities of each class, and N is the number of classes.

3.4. Optimization Techniques

The developed model employed various optimization techniques to specifically address the critical issue of overfitting in neural networks [42]. Overfitting is significant because it leads to a model that performs well on training data but does not generalize effectively to unseen data. To mitigate this, techniques such as dropout, L2 regularization, and ReduceLROnPlateau callbacks were incorporated. The dropout strategy is employed to selectively deactivate a portion of neurons wherein outputs were randomly set to zero during the training process [43]. This method reduces the model’s dependence on specific neurons, hence facilitating the development of a more robust feature representation and permitting a more general learning approach. By incorporating a 50% dropout rate, the model’s flexibility was enhanced and its ability to generalize effectively on unseen data was boosted. Figure 6 illustrates an example of a 50% dropout rate used in the proposed method.
L2 regularization [42], also known as weight decay, is employed in the neural network to mitigate the issue of overfitting and enhance performance. This technique was utilized in the proposed model due to its usefulness among the other regularization methods. The presented framework sets the hyperparameter 10−3 to regularization strength effectively. L2 regularization can be expressed as follows:
L 2   R e g u l a r i z a t i o n   ( w e i g h t   d e c a y ) C o s t   f u n c t i o n = l o s s   f u n c t i o n + λ i = 1 N w i 2
where λ is a hyperparameter that regulates the regularization strength, N represents the total number of parameters, w i signifies the ith parameters, and summation encompasses all parameters. The cost function combined with the loss represents the difference between the predictions and actual target values to form an objective function. The proposed model integrated the ReduceLROnPlateau callback with the Adam optimizer, as defined in Keras [44]. The callback is involved in dynamically adjusting the learning rate when a plateau in the target metric, such as validation loss. This adjustment ultimately enhanced the optimization process of the model. During the training process, it tracks the metric. If the metric does not demonstrate improvement over a predetermined number of epochs, the callback activates a reduction in the learning rate. The adjustment to the learning rate, denoted as L R n e w , can be calculated using the following equation.
L R n e w = L R c u r r e n t × f a c t o r
where L R c u r r e n t denotes the learning rate of 0.001 before adjustment, and the f a c t o r represents the reduction factor that is applied to the learning rate set at 0.4 to prevent an excessive decrease in the learning rate and to ensure that the training process remains within operational limits.

3.5. Pre-Trained Models

Pre-trained neural networks, which have been trained on large-scale datasets like ImageNet that contain a wide range of image categories, have demonstrated their immense value in applications like as image classification and object recognition. These models are vastly proficient at analyzing intricate data patterns, facilitating their use as an initial framework for subsequent analytical tasks without requiring extensive training from scratch. The present study examined five pre-trained models, namely Xception [45], ResNet50V2, ResNet101V2 [46], DenseNet201, and DenseNet169 [47].
The Xception model improves the design of convolutional neural networks by substituting standard convolutions with depth-wise separable convolutions. This adjustment distinctly separates the process of spatial features and channel correlations into two phases. Initially, a pointwise convolution that modifies the dimension of the channel. Subsequently, depth-wise spatial convolution operates independently across each channel, thereby reducing the computational power and model complexity. The Residual Network (ResNet) architecture tackles the difficulties of training deep neural networks by including a residual learning framework. This method includes skip connections that help alleviate the problem of vanishing gradient. ResNet employed two primary types of blocks: identity blocks, which ensure dimensional consistency, and convolutional blocks, which adapt dimension as a requisite. ResNetV2 is an improved version that enhances the efficiency of identity mapping across skip connections, enhancing data transfer speed within blocks and offering variants like ResNet50V2 and ResNet101V2 with different layer counts to accommodate varying computational requirements.
Dense Convolutional Networks (DenseNets) utilize architectural features in which each layer is connected directly to subsequent layers in a feed-forward technique. DenseNets are structured into dense blocks. The pattern of these dense blocks varies between the models, such as DenseNet169 and DenseNet201, persuading their capacity for feature extraction. DenseNet169 comprises four dense blocks with layers distributed as 6, 12, 32, and 32, respectively. In contrast, DenseNet201 expands on the third block using a configuration of 6, 12, 48, and 32 layers. The arrangement of these blocks, coupled with downsampling, ensures that the model variant can optimally balance the depth and computational demand.

4. Experimental Results

The primary objective of this study is to perform classification on extensive data comprising 7023 MRI scans that illustrate glioma, meningioma, pituitary, and no-tumor cases. Classification development was achieved by incorporating the categorical cross-entropy loss function and softmax activation in order to achieve precise classification of MRI data. Initially, the data preparation involved resizing, labeling, and dividing data into 80% for training and 20% for testing with a random state value of 101, which was applied to shuffle the data effectively. The frameworks were trained over 50 epochs with eight batch sizes, including fivefold cross-validation [30] with Adam optimizer, and learning rate reduction was employed using the ReduceLROnPlateau callback to optimize the performance.
The platform employed well-known libraries, TensorFlow, Keras, Pandas, Numpy, Matplotlib, and Sklearn, facilitating the model building and analyzing data. For efficient training and optimization of models, the system included an NVIDIA GeForce GTX1080Ti GPU with Intel (R) Core (TM) i7-7800 CPU 3.5 GHz and 32 GB RAM. Python 3.7 was chosen as the programming language because of its comprehensive capabilities in data handling, analysis, and visualization. Algorithm 2 outlines the training and evaluation process.
Algorithm 2: 5-Fold Cross-Validation for Model Evaluation
1. 
Initialize Metrics collection
  • M [] initialize list for evaluation metrics
2. 
5-Fold Cross-validation
  • D Training data
  • For each  k   ϵ { 1,2 , 3,4 , 5 } :
2.1. 
Data Division
  • T r a i n k  =   D D k
  • V a l k = D k
2.2. 
Model Training
  • Train model using  T r a i n k   (D) and V a l k ( D k )
  • Setup (callbacks and optimizer)
2.3. 
Evaluate on testing set (T)
  • t e m p M m o d e l . e v a l u a t e ( T )
  • Append  t e m p M  to M
2.4. 
Compute Average Metrics
  • Final metrics 1 5 k = 1 5 M [ k ]
3. 
Output Results
  • Final metrics hold the average values on the set T

4.1. Evaluation Matrices

The effectiveness of the proposed framework was assessed using a range of measures. The framework employed precision, recall, F1-score, and accuracy for classification. These measures are crucial for evaluating the model’s ability to predict positive outcomes for various types of brain tumors accurately. Equations (7)–(10) provide the mathematical expressions for Precision, Recall, F1-score, and Accuracy.
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1 - S c o r e = 2 × R e c a l l × P r e c i s i o n R e c a l l + P r e c i s i o n
A c c u r a c y = T P + T N T P + T N + F P + F N
Table 1 presents a comprehensive evaluation of both proposed and pre-existing models, highlighting a presented model improved with a hybrid attention mechanism. This advanced model achieved an exceptional accuracy of 98.33%, with precision and recall both at 98.30% and F1-score of 98.20%. In contrast, ResNet101V2 demonstrated suboptimal performance with an accuracy of 86.51%, precision of 86.10%, and recall and F1-score of 86.15%. The diminished efficacy of ResNet101V2 may be attributed to its distinct architectural attributes, which do not adequately accommodate the distinctive traits of the dataset employed in the study. The proposed model without attention also shows commendable results, attaining an accuracy of 96.97%, precision of 96.85%, recall of 96.75%, and F1-score of 96.80%, indicating robust base model capabilities. Furthermore, DenseNet169 outperformed other pre-trained architectures, achieving the highest metrics among them with an accuracy of 95.29%, precision and F1-score of 94.90%, and recall of 95.00%. Models such as DenseNet169, DenseNet201, and Xception showed better results compared to ResNet50V2. The models DenseNet169, DenseNet201, ResNet50V2, and ResNet101V2 were all trained using images with a size of 224 × 224 pixels. On the other hand, the Xception model was trained using images with a size of 299 × 299 pixels. In order to preserve the weights, the layers in these base models were kept non-trainable. The efficiency of the proposed model is evidenced by its training time of 460.17 s, indicating not only superior performance but also operational effectiveness compared to pre-trained models. The metrics clearly highlighted that the proposed model, particularly with the addition of the hybrid attention mechanism, is highly effective and demonstrates the potential for generalization across similar tasks.

4.2. Confusion Matrices

A confusion matrix is an essential tool for evaluating classification methods [48]. The network developed in this study showed exceptional results in classifying different forms of brain tumors, consistently and correctly detecting each type during the testing phase. Figure 7 illustrates a visual comparison between the proposed mode and pre-trained models, highlighting the improved performance of the presented model. The findings demonstrate that the suggested method surpassed the performance of the pre-trained models with impressive accuracy scores: 98% for glioma, 96% for meningioma, 99% for pituitary tumors, and a flawless 100% for no-tumor cases. These accomplishments exceed the standards established by the presented model. Nevertheless, it is essential to recognize that the efficacy of glioma and meningioma falls behind the precision of the exceptional diagnostic prominence, demonstrating the pressing requirement for more study and thorough exploration in future investigations.

5. Discussion

This study introduces a novel methodology for evaluating the benchmark dataset, which consists of a comprehensive collection of 7023 primary brain tumor cases and normal brain cases. The proposed framework marked a significant advancement over methodologies that relied on extensive preprocessing and manual interventions to identify regions of interest. By reducing the need for complex preprocessing, the presented method not only simplifies the classification process but also enhances efficiency. Furthermore, Table 2 presents the results obtained from prior investigations that have examined similar brain tumor forms, although employing distinct methodologies for classification. Gumaei et al. proposed a hybrid approach that combined PCA, NGIST, and RELM. Although this hybrid method endeavored to capture an inclusive feature set, PCA might not consistently capture the non-linear pattern characteristic in MRI, possibly omitting essential tumor details and resulting in lower accuracy [18]. Swati et al. and Noreen et al. employed techniques that focused on improving generic architectures, particularly cutting-edge models [24,26]. The process of fine-tuning deep networks can take a significant amount of time. Due to the need to adjust numerous parameters in these enormous networks, the initiative process is arduous and requires a significant amount of resources. Perversely, the suggested approach is intentionally designed for brain tumor classification. The proposed approach effectively captures tumor-specific features while minimizing the processing requirements commonly concomitant with deep architectures.
Kaplan et al. primarily depend on traditional feature extraction methods, which are computationally challenging yet may inadvertently disregard subtle features and patterns in magnetic resonance (MR) images, resulting in lower accuracy [14]. Huang et al. developed the CNNBCN, a neural network architectural model that utilized a randomly generated graph approach, resulting in 95.49% classification accuracy [20]. Conversely, our methodology demonstrated enhanced classification capabilities. Ghassemi et al. investigated the domain of Generative Adversarial Networks (GANs) through the utilization of CNN-based GANs. Although GANs excel at generating synthetic pictures, their application in classification may include false subtleties that deviate from real-world MRI changes, thus compromising the accuracy of the classification [22].
Ayadi et al. developed a combination of DSURF-HOG and SVM for classification purposes. However, the method might not adequately address the hierarchical and spatial structures present in MRI images, areas where deep learning-based models demonstrate better performance [23]. Satyanarayana et al. utilized AMEA for noise reduction. They included these characteristics in a CNN with MCA in order to optimize the overall performance [27]. Similarly, Deepak et al. incorporated class weight focus loss into a Convolutional Neural Network (CNN) and employed the K-Nearest Neighbors (KNN) algorithm with the majority voting for optimal classification [28].
In contrast, the suggested approach demonstrates superior comparative performance. Furthermore, methods such as SURF-KAZE by Almalki et al. [49] and HOG-XG Boost by Shilaskar et al. [50] could face limitations in accurately capturing spatial and hierarchical patterns in MRI images, a domain where the deep learning model has shown strong capabilities, as evidenced by this study. Although the GAN-softmax method by Asiri et al. introduced several enhancements, it might demand more computational effort [51]. Contrarily, the suggested approach attained an impressive accuracy of 98.33% without relying on the preprocessing techniques. The model demonstrated strong performance directly on input images without the need for image manipulation, which makes it more adaptable and efficient in clinical settings.
Table 2. Comparative analysis of classification performance comparing the proposed method with the previous approach.
Table 2. Comparative analysis of classification performance comparing the proposed method with the previous approach.
AuthorsDatasetClassesMethodsPrecisionRecallF1-ScoreAccuracy
Gumaei et al. [18]Figshare
3064 Images
3Hybrid
PCA-NGIST-RELM
---94.23
Swati et al. [26]Figshare
3064 Images
3VGG19-Fine tune89.52-91.7394.82
Kaplan et al. [14]Figshare
3064 Images
3NLBP-αLBP-KNN---95.56
Huang et al. [20]Figshare
3064 Images
3CNNBCN---95.49
Ghassemi et al. [22]Figshare
3064 Images
3CNN-based GAN95.29-95.1095.60
Ayadi et al. [23]Figshare
3064 Images
3DSURF-HOG-SVM-88.8489.3790.27
Noreen et al. [24]Figshare
3064 Images
3InceptionV3
Ensemble
93.0092.0092.0094.34
Satyanarayana et al. [27]Figshare
3064 Images
3AMEA-CNN-MCA---94.00
Deepak et al. [28]Figshare
3064 Images
3CNN-MV-KNN--95.0695.60
Almalki et al. [49]Kaggle 2870
Images
4SURF-KAZE-SVM---95.33
Asiri et al. [51]Kaggle 2870
Images
4GAN-Softmax92.0093.0093.0094.32
Shilaskar et al. [50] Figshare,
SARTAJ, Br35H 7023 Images
4HOG-XG Boost92.0791.82.91.8592.02
Our workFigshare, SARTAJ, Br35H, 7023 Images4CNN-Hybrid
Attention
98.3098.3098.2098.33

6. Conclusions

This study presented an advanced method for precise classification of several types of primary brain tumors, such as glioma, meningioma, pituitary, and no-tumor instances. The suggested techniques attained an outstanding accuracy of 98.33% by integrating a convolutional neural network with a hybrid attention mechanism. The proposed method improved the efficiency of brain tumor classification by reducing the feature extraction processes, resulting in a more streamlined diagnostic process. The results illustrate the suggested model’s exceptional ability to generalize, confirming its reliability and value in medical diagnostics. Moreover, it assists healthcare professionals in promptly and precisely identifying brain tumors. In the future, the aim is to enhance patient care by developing advanced systems that identify brain tumors in real-time and creating networks to analyze different forms of medical imaging in three dimensions.

Author Contributions

Conceptualization, Z.R.; Data curation, M.A.-K. and M.A.; Formal analysis, Y.-K.M., I.U., and S.S.A.; Funding acquisition, I.U.; Investigation, M.A.-K.; Methodology, Z.R.; Project administration, Y.-K.M., I.U.; Resources, M.A.-K., S.S.A., and M.A.; Software, Z.R.; Supervision, Y.-K.M.; Validation, Z.R., Y.-K.M., I.U., and S.S.A.; Visualization, Y.-K.M., S.S.A., and M.A.; Writing—original draft, Z.R.; Writing—review and editing, Y.-K.M. and I.U. All authors have read and agreed to the published version of the manuscript.

Funding

The authors extend their appreciation to the Deanship of Research and Graduate Studies at King Khalid University for funding this work through a Large Research Project under grant number RGP 2/566/44. This work was also supported by a National Research Foundation of Korea (NRF) grant funded by the Korean government (MSIT) (2021R1A2B5B02087169).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data will be available upon reasonable request from the corresponding author.

Acknowledgments

The authors extend their appreciation to the Deanship of Research and Graduate Studies at King Khalid University for funding this work through a Large Research Project under grant number RGP 2/566/44. This work was also supported by a National Research Foundation of Korea (NRF) grant funded by the Korean government (MSIT) (2021R1A2B5B02087169).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Khazaei, Z.; Goodarzi, E.; Borhaninejad, V.; Iranmanesh, F.; Mirshekarpour, H.; Mirzaei, B.; Naemi, H.; Bechashk, S.M.; Darvishi, I.; Ershad Sarabi, R.; et al. The association between incidence and mortality of brain cancer and human development index (HDI): An ecological study. BMC Public Health 2020, 20, 1696. [Google Scholar] [CrossRef] [PubMed]
  2. Ferlay, J.; Ervik, M.; Lam, F.; Colombet, M.; Mery, L.; Piñeros, M. The Global Cancer Observatory—All cancers. Int. Agency Res. Cancer—WHO 2020, 419, 199–200. Available online: https://gco.iarc.fr/today/home (accessed on 12 February 2023).
  3. Gliomas|Johns Hopkins Medicine. Available online: https://www.hopkinsmedicine.org/health/conditions-and-diseases/gliomas (accessed on 12 February 2023).
  4. Meningioma|Johns Hopkins Medicine. Available online: https://www.hopkinsmedicine.org/health/conditions-and-diseases/meningioma (accessed on 12 February 2023).
  5. Pituitary Tumors—Symptoms and Causes—Mayo Clinic. 2018. Available online: https://www.mayoclinic.org/diseases-conditions/pituitary-tumors/symptoms-causes/syc-20350548 (accessed on 18 March 2023).
  6. Tiwari, A.; Srivastava, S.; Pant, M. Brain tumor segmentation and classification from magnetic resonance images: Review of selected methods from 2014 to 2019. Pattern Recognit. Lett. 2020, 131, 244–260. [Google Scholar] [CrossRef]
  7. Kang, S.H.; Lee, Y. Motion Artifact Reduction Using U-Net Model with Three-Dimensional Simulation-Based Datasets for Brain Magnetic Resonance Images. Bioengineering 2024, 11, 227. [Google Scholar] [CrossRef] [PubMed]
  8. Rasheed, Z.; Ma, Y.; Ullah, I.; Ghadi, Y.Y.; Khan, M.Z.; Khan, M.A.; Abdusalomov, A.; Alqahtani, F.; Shehata, A.M. Brain Tumor Classification from MRI Using Image Enhancement and Convolutional Neural Network Techniques. Brain Sci. 2023, 13, 1320. [Google Scholar] [CrossRef] [PubMed]
  9. Ukwuoma, C.C.; Qin, Z.; Heyat, M.B.B.; Akhtar, F.; Smahi, A.; Jackson, J.K.; Furqan Qadri, S.; Muaad, A.Y.; Monday, H.N.; Nneji, G.U. Automated Lung-Related Pneumonia and COVID-19 Detection Based on Novel Feature Extraction Framework and Vision Transformer Approaches Using Chest X-ray Images. Bioengineering 2022, 9, 709. [Google Scholar] [CrossRef] [PubMed]
  10. Battineni, G.; Chintalapudi, N.; Hossain, M.A.; Losco, G.; Ruocco, C.; Sagaro, G.G.; Traini, E.; Nittari, G.; Amenta, F. Artificial Intelligence Models in the Diagnosis of Adult-Onset Dementia Disorders: A Review. Bioengineering 2022, 9, 370. [Google Scholar] [CrossRef] [PubMed]
  11. Altini, N.; Brunetti, A.; Puro, E.; Taccogna, M.G.; Saponaro, C.; Zito, F.A.; De Summa, S.; Bevilacqua, V. NDG-CAM: Nuclei Detection in Histopathology Images with Semantic Segmentation Networks and Grad-CAM. Bioengineering 2022, 9, 475. [Google Scholar] [CrossRef] [PubMed]
  12. Zhuang, Y.; Chen, S.; Jiang, N.; Hu, H. An Effective WSSENet-Based Similarity Retrieval Method of Large Lung CT Image Databases. KSII Trans. Internet Inf. Syst. 2022, 16, 2359–2376. [Google Scholar] [CrossRef]
  13. Deng, X.; Liu, E.; Li, S.; Duan, Y.; Xu, M. Interpretable Multi-Modal Image Registration Network Based on Disentangled Convolutional Sparse Coding. IEEE Trans. Image Process. 2023, 32, 1078–1091. [Google Scholar] [CrossRef] [PubMed]
  14. Kaplan, K.; Kaya, Y.; Kuncan, M.; Ertunç, H.M. Brain tumor classification using modified local binary patterns (LBP) feature extraction methods. Med. Hypotheses 2020, 139, 109696. [Google Scholar] [CrossRef]
  15. El-Shafai, W.; Mahmoud, A.A.; El-Rabaie, E.S.M.; Taha, T.E.; Zahran, O.F.; El-Fishawy, A.S.; Soliman, N.F.; Alhussan, A.A.; Abd El-Samie, F.E. Hybrid Segmentation Approach for Different Medical Image Modalities. Comput. Mater. Contin. 2022, 73, 3455–3472. [Google Scholar] [CrossRef]
  16. McBee, M.P.; Awan, O.A.; Colucci, A.T.; Ghobadi, C.W.; Kadom, N.; Kansagra, A.P.; Tridandapani, S.; Auffermann, W.F. Deep Learning in Radiology. Acad. Radiol. 2018, 25, 1472–1480. [Google Scholar] [CrossRef] [PubMed]
  17. Lu, S.; Yang, J.; Yang, B.; Yin, Z.; Liu, M.; Yin, L.; Zheng, W. Analysis and Design of Surgical Instrument Localization Algorithm. C.—Comput. Model. Eng. Sci. 2022, 137, 669–685. [Google Scholar] [CrossRef]
  18. Gumaei, A.; Hassan, M.M.; Hassan, M.R.; Alelaiwi, A.; Fortino, G. A Hybrid Feature Extraction Method with Regularized Extreme Learning Machine for Brain Tumor Classification. IEEE Access 2019, 7, 36266–36273. [Google Scholar] [CrossRef]
  19. Srujan, K.S.; Shivakumar, S.; Sitnur, K.; Garde, O.; Pk, P. Brain Tumor Segmentation and Classification using CNN model. Int. Res. J. Eng. Technol. 2020, 7, 4077–4080. [Google Scholar]
  20. Huang, Z.; Du, X.; Chen, L.; Li, Y.; Liu, M.; Chou, Y.; Jin, L. Convolutional Neural Network Based on Complex Networks for Brain Tumor Image Classification with a Modified Activation Function. IEEE Access 2020, 8, 89281–89290. [Google Scholar] [CrossRef]
  21. Deepak, S.; Ameer, P.M. Automated Categorization of Brain Tumor from MRI Using CNN features and SVM. J. Ambient Intell. Humaniz. Comput. 2020, 12, 8357–8369. [Google Scholar] [CrossRef]
  22. Ghassemi, N.; Shoeibi, A.; Rouhani, M. Deep neural network with generative adversarial networks pre-training for brain tumor classification based on MR images. Biomed. Signal Process. Control 2020, 57, 101678. [Google Scholar] [CrossRef]
  23. Ayadi, W.; Charfi, I.; Elhamzi, W.; Atri, M. Brain tumor classification based on hybrid approach. Vis. Comput. 2020, 38, 107–117. [Google Scholar] [CrossRef]
  24. Noreen, N.; Palaniappan, S.; Qayyum, A.; Ahmad, I.; Alassafi, M.O. Brain Tumor Classification Based on Fine-Tuned Models and the Ensemble Method. Comput. Mater. Contin. 2021, 67, 3967–3982. [Google Scholar] [CrossRef]
  25. Ahmad, B.; Sun, J.; You, Q.; Palade, V.; Mao, Z. Brain Tumor Classification Using a Combination of Variational Autoencoders and Generative Adversarial Networks. Biomedicines 2022, 10, 223. [Google Scholar] [CrossRef] [PubMed]
  26. Swati, Z.N.K.; Zhao, Q.; Kabir, M.; Ali, F.; Ali, Z.; Ahmed, S.; Lu, J. Brain tumor classification for MR images using transfer learning and fine-tuning. Comput. Med. Imaging Graph. 2019, 75, 34–46. [Google Scholar] [CrossRef] [PubMed]
  27. Satyanarayana, G.; Appala Naidu, P.; Subbaiah Desanamukula, V.; Satish kumar, K.; Chinna Rao, B. A mass correlation based deep learning approach using deep Convolutional neural network to classify the brain tumor. Biomed. Signal Process. Control 2023, 81, 104395. [Google Scholar] [CrossRef]
  28. Deepak, S.; Ameer, P.M. Brain tumor categorization from imbalanced MRI dataset using weighted loss and deep feature fusion. Neurocomputing 2023, 520, 94–102. [Google Scholar] [CrossRef]
  29. Rezaei, K.; Agahi, H.; Mahmoodzadeh, A. A Weighted Voting Classifiers Ensemble for the Brain Tumors Classification in MR Images. IETE J. Res. 2020, 68, 3829–3842. [Google Scholar] [CrossRef]
  30. Yadav, S. Analysis of k-fold cross-validation over hold-out validation on colossal datasets for quality classification. In Proceedings of the 2016 IEEE 6th International Conference on Advanced Computing (IACC), Bhimavaram, India, 27–28 February 2016. [Google Scholar] [CrossRef]
  31. Robbins, H.; Monro, S. A Stochastic Approximation Method. Ann. Math. Stat. 1951, 22, 400–407. [Google Scholar] [CrossRef]
  32. Kingma, D.P.; Ba, J.L. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference for Learning Representations ICLR 2015, San Diego, CA, USA, 7–9 May 2015; pp. 1–15. [Google Scholar]
  33. Nickparvar, M. Brain Tumor MRI Dataset. 2021. Available online: https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset (accessed on 10 May 2023).
  34. Cheng, J. Brain Tumor Dataset. 2017. Available online: https://figshare.com/articles/dataset/brain_tumor_dataset/1512427 (accessed on 10 May 2023).
  35. Brain Tumor Classification (MRI)|Kaggle. Available online: https://www.kaggle.com/datasets/sartajbhuvaji/brain-tumor-classification-mri (accessed on 10 July 2023).
  36. Br35H :: Brain Tumor Detection 2020. Available online: https://www.kaggle.com/datasets/ahmedhamada0/brain-tumor-detection?select=no (accessed on 10 May 2023).
  37. Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6–11 July 2015; Volume 1, pp. 448–456. [Google Scholar]
  38. Nair, V.; Hinton, G.E. Rectified linear units improve Restricted Boltzmann machines. In Proceedings of the ICML 2010—27th International Conference on Machine Learning, Haifa, Israel, 21–24 June 2010. [Google Scholar]
  39. Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional block attention module. In Computer Vision—ECCV 2018, Proceedings of the 15th European Conference, Munich, Germany, 8–14 September 2018; Lecture Notes in Computer Science (including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Springer: Cham, Switzerland, 2018; Volume 11211, pp. 3–19. [Google Scholar]
  40. Bin Tufail, A.; Ullah, I.; Rehman, A.U.; Khan, R.A.; Khan, M.A.; Ma, Y.K.; Hussain Khokhar, N.; Sadiq, M.T.; Khan, R.; Shafiq, M.; et al. On Disharmony in Batch Normalization and Dropout Methods for Early Categorization of Alzheimer’s Disease. Sustainability 2022, 14, 4695. [Google Scholar] [CrossRef]
  41. Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; Available online: https://www.deeplearningbook.org (accessed on 10 February 2022).
  42. Moradi, R.; Berangi, R.; Minaei, B. A Survey of Regularization Strategies for Deep Models; Springer: Amsterdam, The Netherlands, 2020; Volume 53, ISBN 0123456789. [Google Scholar]
  43. Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. J. Mach. Learn. Res. 2014, 299, 345–350. [Google Scholar] [CrossRef]
  44. ReduceLROnPlateau. Available online: https://keras.io/api/callbacks/reduce_lr_on_plateau/ (accessed on 24 May 2023).
  45. Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the Proceedings—30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, 21–26 July 2017; pp. 1800–1807. [Google Scholar]
  46. He, K.; Zhang, X.; Ren, S.; Sun, J. Identity mappings in deep residual networks. In Computer Vision—ECCV 2016, Proceedings of the 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Lecture Notes in Computer Science (including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Springer: Cham, Switzerland, 2016; Volume 9908, pp. 630–645. [Google Scholar] [CrossRef]
  47. Huang, G.; Liu, Z.; van der Maaten, L.; Weinberger, K.Q. Densely Connected Convolutional Networks. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, 21–26 July 2017; pp. 2261–2269. [Google Scholar]
  48. Ting, K.M. Confusion Matrix. In Encyclopedia of Machine Learning and Data Mining; Springer: Boston, MA, USA, 2017; p. 260. [Google Scholar] [CrossRef]
  49. Almalki, Y.E.; Ali, M.U.; Ahmed, W.; Kallu, K.D.; Zafar, A.; Alduraibi, S.K.; Irfan, M.; Basha, M.A.A.; Alshamrani, H.A.; Alduraibi, A.K. Robust Gaussian and Nonlinear Hybrid Invariant Clustered Features Aided Approach for Speeded Brain Tumor Diagnosis. Life 2022, 12, 1084. [Google Scholar] [CrossRef] [PubMed]
  50. Shilaskar, S.; Mahajan, T.; Bhatlawande, S.; Chaudhari, S.; Mahajan, R.; Junnare, K. Machine Learning based Brain Tumor Detection and Classification using HOG Feature Descriptor. In Proceedings of the International Conference on Sustainable Computing and Smart Systems (ICSCSS 2023), Coimbatore, India, 14–16 June 2023; pp. 67–75. [Google Scholar]
  51. Asiri, A.A.; Shaf, A.; Ali, T.; Aamir, M.; Usman, A.; Irfan, M.; Alshamrani, H.A.; Mehdar, K.M.; Alshehri, O.M.; Alqhtani, S.M. Multi-Level Deep Generative Adversarial Networks for Brain Tumor Classification on Magnetic Resonance Images. Intell. Autom. Soft Comput. 2023, 36, 127–143. [Google Scholar] [CrossRef]
Figure 1. Procedural structure of the proposed framework.
Figure 1. Procedural structure of the proposed framework.
Bioengineering 11 00701 g001
Figure 2. The different types of tumors contained in the dataset.
Figure 2. The different types of tumors contained in the dataset.
Bioengineering 11 00701 g002
Figure 3. Illustration of the convolution blocks utilized in the suggested design.
Figure 3. Illustration of the convolution blocks utilized in the suggested design.
Bioengineering 11 00701 g003
Figure 4. Proposed architecture for classification of brain tumors.
Figure 4. Proposed architecture for classification of brain tumors.
Bioengineering 11 00701 g004
Figure 5. Depiction of the implementation of the softmax function as the output layer for the classification of brain tumors, where the input vector x is subjected to changes through hidden layers, which ultimately produce an output vector z that represents the score for each class. Subsequently, the softmax function transforms z into a probability distribution that encompasses the brain tumors.
Figure 5. Depiction of the implementation of the softmax function as the output layer for the classification of brain tumors, where the input vector x is subjected to changes through hidden layers, which ultimately produce an output vector z that represents the score for each class. Subsequently, the softmax function transforms z into a probability distribution that encompasses the brain tumors.
Bioengineering 11 00701 g005
Figure 6. Visualization of a dropout layer on the right side, applying a 50% dropout rate.
Figure 6. Visualization of a dropout layer on the right side, applying a 50% dropout rate.
Bioengineering 11 00701 g006
Figure 7. Illustration of the confusion matrix of the presented and pre-trained model using the testing data, showing the prediction score of each model. Specifically, (a) demonstrates that the proposed model with hybrid attention attained a high accuracy of 98.33%. In comparison, (b) indicates that the Xception model attained an accuracy of 92.64%, (c) shows the ResNet50V2 model achieved 90.39%, (d) reveals the ResNet101V2 model attained an accuracy of 86.51%, (e) displays the DenseNet201 model obtained an accuracy of 93.20%, and (f) highlights that the DenseNet169 achieved an accuracy of 95.29%.
Figure 7. Illustration of the confusion matrix of the presented and pre-trained model using the testing data, showing the prediction score of each model. Specifically, (a) demonstrates that the proposed model with hybrid attention attained a high accuracy of 98.33%. In comparison, (b) indicates that the Xception model attained an accuracy of 92.64%, (c) shows the ResNet50V2 model achieved 90.39%, (d) reveals the ResNet101V2 model attained an accuracy of 86.51%, (e) displays the DenseNet201 model obtained an accuracy of 93.20%, and (f) highlights that the DenseNet169 achieved an accuracy of 95.29%.
Bioengineering 11 00701 g007aBioengineering 11 00701 g007b
Table 1. Comparative analysis of the proposed and pre-trained models.
Table 1. Comparative analysis of the proposed and pre-trained models.
ModelsParametersPrecisionRecallsF1-ScoreAccuracyTraining Time(s)
Xception22,963,75692.3592.2092.2592.641228.13
ResNet50V225,667,07690.0090.0590.1090.39614.07
DenseNet20120,293,18892.9592.7592.8593.201274.99
ResNet101V244,728,83686.1086.1586.1586.511035.39
DenseNet16914,351,94094.9095.0094.9095.29964.36
Proposed method
without Attention
829,17296.8596.7596.8096.97423.99
Proposed method
with Attention
928,68898.3098.3098.2098.33460.17
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rasheed, Z.; Ma, Y.-K.; Ullah, I.; Al-Khasawneh, M.; Almutairi, S.S.; Abohashrh, M. Integrating Convolutional Neural Networks with Attention Mechanisms for Magnetic Resonance Imaging-Based Classification of Brain Tumors. Bioengineering 2024, 11, 701. https://doi.org/10.3390/bioengineering11070701

AMA Style

Rasheed Z, Ma Y-K, Ullah I, Al-Khasawneh M, Almutairi SS, Abohashrh M. Integrating Convolutional Neural Networks with Attention Mechanisms for Magnetic Resonance Imaging-Based Classification of Brain Tumors. Bioengineering. 2024; 11(7):701. https://doi.org/10.3390/bioengineering11070701

Chicago/Turabian Style

Rasheed, Zahid, Yong-Kui Ma, Inam Ullah, Mahmoud Al-Khasawneh, Sulaiman Sulmi Almutairi, and Mohammed Abohashrh. 2024. "Integrating Convolutional Neural Networks with Attention Mechanisms for Magnetic Resonance Imaging-Based Classification of Brain Tumors" Bioengineering 11, no. 7: 701. https://doi.org/10.3390/bioengineering11070701

APA Style

Rasheed, Z., Ma, Y. -K., Ullah, I., Al-Khasawneh, M., Almutairi, S. S., & Abohashrh, M. (2024). Integrating Convolutional Neural Networks with Attention Mechanisms for Magnetic Resonance Imaging-Based Classification of Brain Tumors. Bioengineering, 11(7), 701. https://doi.org/10.3390/bioengineering11070701

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop