🧠 Brain Stroke Classification using VGG19 Transfer Learning

License: MIT TensorFlow Keras Dataset

A high-accuracy image classification model trained on medical brain scans using VGG19 (ImageNet pretrained) to distinguish different stroke types. Achieves 89% accuracy on the Teknofest 2021 Brain Stroke dataset.

🎯 Training Configuration

  • Image Size: 250x250 pixels (optimal resolution)
  • Epochs: 15 (best performance achieved)
  • Batch Size: Standard training configuration
  • Data Augmentation: Applied for robust training

🌟 Model Performance

Confusion Matrix

Confusion Matrix ### Model Training Performance Model Training Performance ### ROC curve ROC curve

🌟 Live Streamlit Demo

πŸ‘‰ πŸš€ Launch the Interactive Web App

Experience the power of AI-driven medical imaging analysis:

  • πŸ“€ Drag & Drop your MRI scan (PNG, JPEG)
  • ⚑ Instant Predictions with confidence scores
  • πŸ“Š Interactive Visualizations and risk analysis
  • πŸ“± Mobile & Desktop responsive interface
  • 🎯 Real-time Classification of stroke types

No installation required - just upload and predict!


πŸ§ͺ Testing Images

πŸ‘‰ πŸ“ Download Test Images from Google Drive

Ready-to-use brain MRI samples for testing this model:

  • 🩸 Hemorrhagic Stroke samples
  • 🧠 Ischemic Stroke samples
  • βœ… No Stroke samples
  • πŸ“‹ Organized by category for easy identification

Use these test images to evaluate the model's performance and capabilities!


πŸš€ Highlights

  • βœ… Transfer learning with VGG19
  • 🧠 Medical image classification for stroke diagnosis
  • πŸ“Š Accuracy: 89%, F1-Score: 88%
  • πŸ”¬ Trained on colorized brain stroke CT/MRI images
  • πŸ“ Dataset: Teknofest 2021, Kaggle

πŸ“‚ Dataset


πŸ—οΈ Model Details

  • Base: VGG19 with frozen early layers
  • Custom Head: Dense, Dropout, Softmax
  • Optimizer: Adam | Loss: Sparse Categorical Crossentropy
  • Input Size: 250x250 | Framework: Keras + TensorFlow 2.x

πŸ“ˆ Performance Metrics

Metric Value
Accuracy 89%
F1-Score 88%
Precision 87%
Recall 88%

πŸ§ͺ Usage

This model is ready for integration into clinical AI pipelines or academic research.
To load the .h5 file and run predictions, refer to colab notebook β†— (see predict.py or notebooks/).

Quick Links:


πŸ“‹ License

MIT License – free to use, modify, and distribute.

πŸ‘€ Author

Ajay Vasan S
Machine Learning Engineer
πŸ”— GitHub | πŸ“§ LinkedIn

πŸ“‚ GitHub Project: AjayVasan/Brain-Stroke-Predictor

⭐ Star this repo if it helped you β€” and feel free to open issues for feedback!

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Evaluation results

  • accuracy on Brain Stroke Colorized Dataset - Teknofest 2021
    self-reported
    0.890
  • f1 on Brain Stroke Colorized Dataset - Teknofest 2021
    self-reported
    0.880
  • precision on Brain Stroke Colorized Dataset - Teknofest 2021
    self-reported
    0.870
  • recall on Brain Stroke Colorized Dataset - Teknofest 2021
    self-reported
    0.880