π§ Brain Stroke Classification using VGG19 Transfer Learning
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
### Model Training Performance
### 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
- Source: Teknofest 2021 Brain Stroke Dataset
- Type: Colorized medical images
- Split:
train/
,test/
with multiple stroke classes
ποΈ 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:
- π Live Streamlit Demo - Test the model instantly
- π Testing Images - Sample MRI scans for evaluation
π 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 2021self-reported0.890
- f1 on Brain Stroke Colorized Dataset - Teknofest 2021self-reported0.880
- precision on Brain Stroke Colorized Dataset - Teknofest 2021self-reported0.870
- recall on Brain Stroke Colorized Dataset - Teknofest 2021self-reported0.880