## 1 Introduction  
Detecting brain tumors is critical in medical diagnostics, given the severe implications these anomalies pose to patients' health and well-being [1]. Tumors pose a formidable challenge due to their extensive network of neurons and supporting structures, which makes the human brain susceptible to a wide range of pathological disorders [2]. These tumors, defined by aberrant cell growths inside the brain tissue, can affect people of any age or demographic and present in various forms, from benign to malignant. Because brain tumors can impede neurological function and cause a wide range of symptoms, including headaches, seizures, cognitive decline, and potentially life-threatening complications, it is critical to identify them accurately and promptly [3, 4, 5]. Furthermore, the timing of the identification of these abnormalities has a substantial impact on the prognosis and available treatments for individuals with brain tumors. Early detection improves the chances of a successful course of treatment. It makes it possible for medical professionals to carry out measures meant to maintain quality of life and cognitive function. Historically, the detection of brain tumors has relied heavily on conventional imaging modalities such as computed tomography (CT) and magnetic resonance imaging (MRI) [6, 7]. While these techniques have revolutionized the field of diagnostic neuroimaging, allowing for the visualization of anatomical structures with unprecedented clarity, their efficacy in discerning subtle or early-stage lesions remains limited. Furthermore, the interpretation of imaging findings often necessitates the expertise of radiologists or neurosurgeons, leading to potential delays in diagnosis and treatment initiation. In recent years, advancements in technology and computational methodologies have spurred the development of innovative approaches for brain tumor detection. Machine learning algorithms, in particular, have emerged as powerful tools for analyzing medical imaging data and extracting clinically relevant information with remarkable accuracy and efficiency [8; 9; 10]. By leveraging large datasets of annotated images, these algorithms can be trained to discern patterns indicative of brain tumors, enabling automated screening and detection processes that augment the capabilities of healthcare professionals. CNNs, one of the most new deep learning algorithms developed primarily to handle image-related tasks, are one of the cases of machine learning applied in brain tumor diagnosis [11; 12]. These networks are proficient in segmenting basic shapes and relations and difficult patterns and features in medical imaging, enabling distinguishing between normal and pathologic brain sectors. Using variants of CNNs, they can detect slight changes in picture intensity, shape, or texture, which are likely signs of a tumor, by using an iterative process of training the networks using annotated datasets. Deep learning, a subset of artificial intelligence, has emerged as a powerful tool in medical imaging, particularly for brain segmentation. Brain segmentation is a critical process in medical diagnostics and research, enabling the precise delineation of anatomical structures and pathological regions within brain images. Traditional segmentation methods, often reliant on manual annotation or conventional image processing techniques, are time-consuming and prone to variability [12]. In contrast, deep learning approaches leverage large datasets and advanced neural network architectures to automate and enhance the segmentation process, achieving high accuracy and consistency. Convolutional neural networks (CNNs), in particular, have demonstrated remarkable success in capturing intricate features and patterns within brain images, facilitating the identification of subtle differences between healthy and diseased tissues. Recent advancements in deep learning have refined brain segmentation techniques, integrating novel architectures such as U-Net, Fully Convolutional Networks (FCNs), and Transformer models.