This is a final-year academic project aimed at predicting the likelihood of ischemic stroke using a hybrid deep learning model that combines CNN and LSTM architectures. The system integrates a Django-based web frontend for user interaction and RESTful API endpoints for prediction, backed by trained deep learning models.
To build a robust, accurate, and interpretable prediction model for ischemic stroke using a combination of temporal and spatial health data.
📆 stroke-prediction-deep-fusion
🔹 BACKEND/
🔹 └── Ischemic_Stroke.ipynb # Model training & evaluation notebook (CNN, LSTM, CNN-LSTM)
🔹 FRONTEND/
🔹 ├── self/ # Django project configuration
🔹 └── webapp/ # Django app with views, templates, URLs
🔹 DATASET/ # Stroke dataset CSV
🔹 cnn.pkl # Trained CNN model
🔹 lstm.pkl # Trained LSTM model
🔹 cnn_lstm.pkl # Trained CNN-LSTM hybrid model
🔹 requirements.txt # Python dependencies
🔹 stroke-prediction-deep-fusion.pdf.pdf # Full project documentation
- CNN: Captures spatial patterns in structured/tabular data.
- LSTM: Models temporal health data dependencies.
- CNN-LSTM: Combines both for improved performance.
All models are trained and saved as .pkl files and can be loaded for predictions via Django views.
- Homepage:
index.html– Welcome screen - Input Page:
input.html– Collects user health parameters - Result Page:
output.html– Displays stroke risk prediction
The prediction logic is implemented using a
predict()function insideviews.py, which loads the appropriate.pklmodel and returns the stroke risk prediction.
- Data is collected from users via forms.
- Data is preprocessed (normalized, encoded).
- The selected model is used to generate a risk prediction.
- Output is rendered on
output.html.
pip install -r requirements.txtOr manually:
- Django 3.0.8
- pandas, numpy
- scikit-learn
- tensorflow, keras
- matplotlib, seaborn
- djangorestframework
- joblib, Pillow
git clone https://github.com/AnandKumar56/stroke-prediction-deep-fusion.git
cd stroke-prediction-deep-fusion
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txtcd FRONTEND
python manage.py migrate
python manage.py runserverAccess at: http://127.0.0.1:8000
| Model | Training Accuracy | Validation Accuracy |
|---|---|---|
| CNN | 92.35% | 88.76% |
| LSTM | 84.40% | 81.92% |
| CNN-LSTM | 96.47% | 94.53% |
- K. Goutham – Model Implementation
- K. Arun Kumar – Frontend Developer
- D. Anand Kumar – Backend Developer
- M. Jaswanth – Data Research & Analysis
A detailed write-up of this project is available in the file stroke-prediction-deep-fusion.pdf. It includes the system overview, model architectures, preprocessing steps, project structure, implementation logic, and testing considerations.
This project is intended for academic use only.