Development of a Brain Tumor Detection System Based on the Vision Transformer (Vit-Base/16) Model

Authors

  • Clinton Chikezie Ugorji Ogbonnaya Onu Polytechnic, Aba formerly Abia State Polytechnic, Aba
  • Nnamdi Chimaobi Ezenwegbu Chukwuemeka Odumegwu Ojukwu University Uli Anambra State Nigeria

Keywords:

Brain Tumor Detection, Vision Transformer, Deep Learning, Magnetic Resonance Imaging

Abstract

Brain tumors are one of the deadliest diseases necessitating immediate diagnosis for effective treatment and increased chances of a patient’s survival. Though Magnetic Resonance Imaging (MRI) is the preferred choice for brain tumor diagnosis, interpreting MRI scans manually can be time-consuming and error-prone. This paper proposes a brain tumor detection system that leverages Vision Transformer (ViT-Base/16) to classify brain MRI images for tumor detection. A public repository of brain MRI images was used in the experiment with 7,200 total images divided equally into 4 classes. Each image was resized to 224×224, normalized, and subjected to image augmentation. The ViT-Base/16 computer vision model was fine-tuned using transfer learning, with 70% of the data used for training, 15% for validation, and 15% for testing. The model’s performance was evaluated using accuracy, precision, recall, F1-score, specificity, AUC-ROC, and confusion matrix as metrics. The experimental results demonstrated that the proposed method achieved a test accuracy of 93.06%, precision of 93.23%, recall of 93.06%, F1-score of 93.10%, specificity of 97.69%, and a macro-averaged AUC-ROC of 99.83%. Comparative analysis revealed that the proposed computer vision model outperformed existing convolutional neural networks such as VGG-16, ResNet-50, Inception-v3, MobileNet-v2, DenseNet-121, and EfficientNet-B0 on the same dataset. Compared to CNNs, Vision Transformers offer the advantage of capturing both local and global image features using attention mechanisms resulting in higher accuracy in detecting tumors in MRI scans. The proposed method is a reliable computer-aided diagnostic system for identifying brain tumors and can be useful in assisting radiologists with tumor detection and treatment decisions.

DOI: https://doi.org/10.5281/zenodo.21873962 

Downloads

Published

2026-08-10