$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
This study used a publicly available, anonymized dataset; therefore, informed consent was not required. The proposed approach comprises six components: preprocessing, convolution module, attention module, integration of convolution and attention modules, and fully connected (FC) layers. Figure 1 illustrates the complete workflow of our method.
Dataset acquisition
Labeled brain MRI images are obtained from a publicly available Kaggle dataset comprising four tumor categories and normal tissue.
Data preprocessing
Images are resized to a uniform resolution and intensity normalized. Optional augmentation (rotation, flipping, zooming) is applied to improve generalization. The dataset is split into training (70%) and testing (30%) sets.
Model architecture
Three backbone CNNs pre-trained on ImageNet—MobileNetV2, EfficientNetV1, and Inception-ResNet-V2—were used to classify brain tumors into four categories using MRI images. MobileNetV2 and EfficientNetV1 were configured with an input dimension of 224 × 224 pixels, while Inception-ResNet-V2 required an input size of 299 × 299 pixels. In the transfer learning process, the initial convolutional layers were frozen at the start to retain generalized image features, while the upper layers were fine-tuned to tailor the model for brain tumor classification. Each backbone was paired with a lightweight classification head that included Global Average Pooling, dense layers, dropout for regularization, and a Softmax activation function to predict four classes. Dropout was implemented to mitigate overfitting and enhance generalization. The designed architecture effectively merged efficient feature extraction with lower computational demands, facilitating precise classification while remaining suitable for deployment in resource-limited and proof-of-concept scenarios.
Attention-based feature extraction
Input images are processed through an initial convolutional layer followed by a custom attention module. Parallel max pooling and average pooling capture salient and contextual features, which are concatenated and refined via convolution to emphasize tumor-relevant regions.
Convolutional backbone and fusion
Attention-weighted features are forwarded to pre-trained backbones (MobileNetV2, EfficientNetV1, or Inception-ResNet-V2). High-level convolutional layers are logically fused to reduce memory access and improve computational efficiency.
Classification
Flattened features are passed through fully connected layers with ReLU6 activation and dropout, producing a compact representation for final four-class softmax classification.
Evaluation
Model performance is assessed on the test set using accuracy, precision, recall, F1-score, and confusion matrices.
Framework development
The proposed solution is implemented in Python and uses Keras for execution. Table 1 illustrates the hyperparameters. The dataset is split into a training set and a test set following a 70:30 ratio. Five different arbitrary splits of trains/tests are used to display the final balanced performance for each data set.
Preprocessing
The input images must be updated because the MobileNetV2 framework serves as the foundation for the proposed solution. To extract high-resolution features from photographs, the pre-trained MobileNetV2 model is used with its input dimension. Each input image is then scaled to 224×224 pixels in the range [-1, 1].
The convolution model
MobileNetV2 enhances image recognition by leveraging an efficient Convolutional Neural Network (CNN) architecture designed to minimize computational demands. While traditional CNNs achieve high accuracy, they often require substantial memory and processing power. MobileNetV1 introduced the concept of depthwise separable convolution, which separates standard convolution into two distinct operations: depthwise convolution for filtering inputs and pointwise convolution for integrating features. MobileNetV2 builds on this idea by incorporating bottleneck residual blocks that consist of expansion layers, depthwise convolution, projection layers, and residual connections. The projection layer compresses feature channels, while residual connections facilitate better information flow throughout the network. To improve stability and enhance learning performance, ReLU6 activation and batch normalization are applied after convolutional operations.
In this research, MobileNetV2, pre-trained on ImageNet, was used as the backbone model to extract features, delivering effective high-level semantic representations while keeping computational costs low for brain tumor classification. After every convolution layer, there is a ReLU6 activation layer, which is an adaptation of the ReLU activation function, where the size is maximized at six, and a batch normalization layer. The common 1x1 convolution, average pooling, and classification layers are applied to 17 of the remaining bottleneck blocks, forming the full MobileNetV2 architecture. We used MobileNetV2 as the backbone network pre-trained on ImageNet. In such a case, the convolutional map is obtained from the last residual block after passing through the MobileNetV2 convolutional layer. Lower-level residual blocks produce smaller feature maps. Such blocks do not contribute to our research because they do not collect high-level data for overall image identification. During model building and training, the layers preceding the convolutional layers that generate a 7 × 7 3D feature map are kept fixed. In mathematical terms, this is expressed as below in Eq (1):
F1(I) = Conv(I) (1)
Here, F1(I) represents the convolutional feature extracted from the input image, I.
The focus module
The human brain's attention mechanism, which implies that people naturally focus more on significant visual inputs than on every detail in an image, serves as the basis for this transformation network's design. Numerous attention-based models have been created in deep learning research because of this idea. The spatial correlations seen in brain tumor representations are highlighted by the suggested attention mechanism. While the channel attention module captures the most important tumor-related information across feature channels, the regional attention unit identifies the most informative regions of the MRI image. Using a structured attention method, the suggested focus unit focuses on areas that contain discriminative tumor information.
To improve feature representation, techniques such as Top Activation Pooling and balanced feature extraction are used prior to the spatial feature detection phase. This strategy enhances the model's ability to emphasize clinically significant tumor regions while minimizing irrelevant background details, thereby improving classification accuracy and the efficiency of feature learning. The second is the concatenation of the max-pooled and average-pooled tensors. Lastly, the sigma activation function, combined with a 7x7 convolutional filter, shall be used to activate visual stimuli within the visuals. The different stages of the focus module are indicated in equations (2) and (3). where balanced Pool(F) ∈ RHxWx1 represents the average pooling operation and MaxPool(F) ∈ RHxWx1 describes the max pooling operation.
F2(I) = [AvgPool(F);MaxPool(F)] (2)
These two element maps can be combined in 3D to create an element map
F2(I) = ∈ RHxwx1. F3(I) = σ(f7x7(F2(I))) (3)
where σ is the activation function indicating sigma. The attention characteristics, which are represented by a HxWxC Height-encoded tensor (V), breadth (W), and thickness (C), are represented by F3(I), while f7x7 represents the filter size convolution operation (7x7).
Fusion of attention and a convolution model
In contrast to a network that relies on a single encoder, a multimodal Merging Unit could extract much more efficient and comprehensive information for the vast majority of modalities. The fusion block is intended to guide toward the maximum essential Cross-modal features; hence, it will pinpoint areas of attention for Tumor region extraction. This is a simple concatenation of individual latent representations, but some information would be lost. A combined object map was thus generated by combining the feature maps of the convolution and observation modules using the basic feature concatenation method of Sitaula et al. These two feature maps captured differences in various image properties, so we decided to use a simple concatenation method rather than max, min, or sum-based strategies. This also makes it computationally lighter than the alternative methods that use bilinear methods as a form of tensor product computation. When such two features are combined, the resultant is called a feature tensor. The mathematical expression of the aggregated tensor output of characters T is given by Equation (4).
[F1(I), F3(I)] = T(I) (4)
Where F1(I) ∈ RHxWx1 and F2(I) ∈ RHxWx1280. These are 3D tensors with the same width (W) and height (H). Further, they can be concatenated in 3D k creation of 3D tensors, where T(I) ∈ LxWx1281.
Fully Connected Layers (FC)
We used a series of FC layers after feature fusion to convert a volumetric tensor reshaped into a linear feature vector. The classification head consists of a Global Average Pooling layer, fully connected dense layers, dropout regularization, and a Softmax output layer. The ReLU6 activation function is used, with 128 units and a dropout probability of 50%.