AI Based Brain Stroke Prediction Using MRI Images and Vision Transformer Models

Authors

  • L BUJII BABU Department of Computer Science & Engineering, DNR College of Engineering & Technology, Balusumudi, Bhimavaram -534 202, W.G. Dist , Andhra Pradesh, INDIA. Author
  • K. SUSHMA Student, Department of Computer Science & Engineering, DNR College of Engineering & Technology, Balusumudi, Bhimavaram -534 202, W.G. Dist , Andhra Pradesh, INDIA. Author
  • P. HARSHITHA Student, Department of Computer Science & Engineering, DNR College of Engineering & Technology, Balusumudi, Bhimavaram -534 202, W.G. Dist , Andhra Pradesh, INDIA. Author
  • M. AKHILESH Student, Department of Computer Science & Engineering, DNR College of Engineering & Technology, Balusumudi, Bhimavaram -534 202, W.G. Dist , Andhra Pradesh, INDIA. Author
  • K. SAROJA Student, Department of Computer Science & Engineering, DNR College of Engineering & Technology, Balusumudi, Bhimavaram -534 202, W.G. Dist , Andhra Pradesh, INDIA. Author

Keywords:

Brain Stroke Prediction, Vision Transformer (ViT), MRI Classification, Deep Learning, CNN, ResNet, PyTorch, Streamlit, Medical Image Analysis, Transfer Learning.

Abstract

Stroke is a severe neurological condition that requires early and accurate diagnosis to improve patient outcomes. This paper presents an AI-based brain stroke classification system using Vision Transformers (ViT-B/16) to classify brain MRI scans into Normal and Haemorrhagic categories. The dataset is preprocessed and augmented using techniques including random horizontal flip, rotation, and colour jitter to enhance model generalisation. We compare three architectures — Convolutional Neural Networks (CNN), ResNet-18, and Vision Transformer (ViT) — finding that ViT significantly outperforms both baselines. The ViT-B/16 model achieves 97.59% accuracy, surpassing VGG-16 (90%), ResNet-50 (87%), InceptionV3 (82%), and VGG-19 (81%), with precision, recall, and F1-scores all exceeding 0.96. The system leverages PyTorch's torchvision library with pre-trained ViT-B/16 weights fine-tuned on the stroke MRI dataset. A Streamlit-based web application enables clinical staff to upload MRI images and receive real-time stroke classification predictions without programming knowledge, demonstrating the viability of Vision Transformers for automated medical image analysis and clinical decision support.

Downloads

Published

2026-06-14

Issue

Section

Articles