Abstract A brain tumor is one of the most fatal and dangerous diseases that can affect both adults and children. It is an abnormal growth of cells in the nervous system that restricts the brain's normal function. Detection of brain tumors is generally carried out using CT scans or MRI of the head. While MRIs provide excellent views of soft tissues, they can take up to an hour and can be a significant financial burden. Therefore, one alternative to detect brain tumors is to use image-based Deep Learning MRI. A model for classifying images that makes use of the Transformer architecture is called the Vision Transformer. It divides an image into small patches, flattens them, embeds them into a D-dimensional space, adds a class token and positional embeddings, and processes them using the Transformer for classification. The aim of this study is to build a model to detect brain tumors using the Vision Transformer method based on a MATLAB data format dataset of 1050 T1-weighted contrast-enhanced MRI images. The model has achieved its best results with an accuracy of 0.93 and an F1 score of 0.93 for the test data.
Keywords: Brain tumor, MRI, Vision Transformer.