## 3 Methodology  
The proposed methodology for brain tumor classification involves integrating state-of-the-art machine learning techniques with comprehensive data preparation and augmentation. The first stage of this approach involves preprocessing the MRI scans to improve their quality and ensure that the data are clean enough for model training. In order to ensure a balanced evaluation of the model performance, the dataset undergoes preprocessing and is divided into training, validation, and testing sets, with proportions of 80%, 10%, and 10%, respectively. Different augmentation techniques are used to enhance the efficiency and diversity of the dataset. To enhance the model's ability to apply acquired knowledge to unknown data, it is exposed to a variety of adjustments applied to the original images, including brightness adjustments, volume changes, and vertical and horizontal flipping. We use a Swin Transformer to extract features, which enables the model to effectively collect local and global information by processing image patches in several stages. The Swin Transformer architecture consists of linear modulation, patch modulation, and several Swin Transformer blocks. These components improve the accuracy and depth of the feature map and continually improve the feature representation over time. The ResNet50V2 model is used along with transfer learning to extract additional features in combination with the Swin Transformer. The deep convolutional layers of ResNet50V2 consist of meta- and convolutional blocks that effectively capture hierarchical information from images. This enhances the model's ability to distinguish between different forms of brain tumors. The evaluation of our methodology is performed using two datasets: the Kaggle dataset, which consists of glioma, pituitary, meningioma, and normal categories, and the BraTS 2021 dataset, which comprises tumor and normal categories. This dual evaluation ensures the robustness and adaptability of our method across different brain tumor datasets. To demonstrate the effectiveness of our proposed methodology, we perform a comparative analysis between its results and those of various well-trained models, such as VGG16, MobileNetV2, and traditional CNNs. This comparison highlights the superior performance of using a Swin Transformer and ResNet50V2 together for feature extraction in the field of brain tumor classification. It emphasizes the improvements our technology offers in terms of accuracy and stability in the classification of brain tumors. This work provides an innovative architecture for the classification of images that integrates the benefits of ResNet 50V2 and the Swin Transformer. In the initial phase of deep feature extraction, the robust self-attention mechanism of the Swin Transformer allows it to effectively represent both local and global relationships within the input data. The Swin Transformer divides the input image into non-overlapping patches using a hierarchical approach, then employs shifting window-based multi-head self-attention to derive feature representations at various scales. This method produces a comprehensive, high-dimensional feature set by providing meticulous feature extraction that discovers complex relationships within the image. ResNet50V2, acting as a classifier within this architecture, receives deep features extracted by the Swin Transformer. Here, we employ ResNet not for its traditional role as a feature extractor but for its powerful feature refining and classification capabilities. While processing the high-level features given by the Swin Transformer, the Res-Net50V2