A custom-trained deep learning model to classify brain MRI images into various stroke types or detect the absence of stroke. Built with transfer learning using VGG19 and deployed using Streamlit for instant web-based predictions.
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!
Ready-to-use brain MRI samples for testing:
- π©Έ Hemorrhagic Stroke samples
- π§ Ischemic Stroke samples
- β No Stroke samples
- π Organized by category for easy identification
Use these test images to explore the model's capabilities!
Feature | Details |
---|---|
Model Type | Custom-trained VGG19 with Transfer Learning |
Input Format | Brain MRI scans (PNG, JPEG, JPG) |
Output Classes | Hemorrhagic Stroke, Ischemic Stroke, No Stroke |
Framework | TensorFlow + Keras |
Training Platform | Google Colab (T4 GPU Runtime) |
Dataset | Brain Stroke Dataset - Teknofest 2021 |
Deployment | Streamlit Cloud β |
Model Repository | Hugging Face |
- Base Model: Pretrained VGG19 (ImageNet weights)
- Custom Head: Dense layers for stroke classification
- Data Augmentation: Rotation, zoom, flip for robust training
- Training Environment: Google Colab T4 GPU
- Fine-tuning: Specialized for medical imaging
π Training Notebook:
Brain_Stroke.ipynb
πΈ Training Insights:Images/
folder contains model performance visualizations
- Intuitive Interface: Clean, professional medical-grade UI
- File Upload: Seamless drag-and-drop functionality
- Real-time Processing: Instant analysis upon upload
- Visual Feedback: Progress indicators and loading states
- Confidence Scores: Percentage-based prediction reliability
- Interactive Charts: Bar graphs showing class probabilities
- Risk Assessment: Detailed prediction summaries
- Medical Insights: Educational information about stroke types
- Image Preprocessing: Automatic resizing and normalization
- Model Integration: Direct connection to Hugging Face model
- Error Handling: Robust file validation and error messages
- Performance Optimized: Fast inference with caching
Simply visit: brain-stroke-predictor-ajayvasan.streamlit.app
# Clone the repository
git clone https://github.com/AjayVasan/Brain-Stroke-Predictor.git
cd Brain-Stroke-Predictor
# Install dependencies
pip install -r requirements.txt
# Launch Streamlit app
streamlit run app.py
Note: Ensure you're using Python 3.10 as specified in
runtime.txt
Brain-Stroke-Predictor/
β
βββ π app.py # Main Streamlit application
βββ π Brain_Stroke.ipynb # Model training notebook (Colab)
βββ π Images/ # Training visualizations & insights
βββ π requirements.txt # Python dependencies
βββ π runtime.txt # Python version specification
βββ π LICENSE # MIT License
βββ π³ .devcontainer/ # Development container setup
βββ π README.md # This file
Frontend & Deployment:
- Streamlit - Interactive web application framework
- Streamlit Cloud - Hosting and deployment platform
Machine Learning:
- TensorFlow/Keras - Deep learning framework
- VGG19 - Convolutional neural network architecture
- Hugging Face - Model hosting and distribution
Development:
- Google Colab - GPU-accelerated training environment
- Python 3.10 - Programming language
- GitHub - Version control and collaboration
Resource | Link |
---|---|
π Live Streamlit App | brain-stroke-predictor-ajayvasan.streamlit.app |
π§ͺ Testing Images | Google Drive - Test Samples |
π€ Hugging Face Model | Ajay007001/Brain-Stroke-Prediction |
π» GitHub Repository | AjayVasan/Brain-Stroke-Predictor |
π Dataset Source | Kaggle - Brain Stroke Dataset |
Ajay Vasan
Machine Learning Developer | Medical AI Enthusiast
- π Portfolio: ajayvasan.github.io/Portfolio
- πΌ GitHub: @AjayVasan
- π€ Hugging Face: @Ajay007001
- πΌ LinkedIn: @ajayvasan
This project is licensed under the MIT License - see the LICENSE file for details.
Important: This application is designed for educational and research purposes only. It should not be used as a substitute for professional medical diagnosis, advice, or treatment. Always consult with qualified healthcare professionals for medical decisions.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Give a β if this project helped you learn about medical AI and Streamlit deployment!
Made with β€οΈ+π§ and deployed with Streamlit