A brain stroke, also known as a cerebrovascular accident (CVA), occurs when blood flow to a part of the brain is interrupted, leading to brain cell damage. Symptoms may include sudden numbness, difficulty speaking, and severe headache. Timely diagnosis and treatment are critical, as early intervention can significantly improve recovery outcomes.
A brain tumor is an abnormal growth of cells within the brain or surrounding tissues. Tumors can be benign (non-cancerous) or malignant (cancerous) and can arise from brain cells or spread from other parts of the body.
This project is a comprehensive and efficient Brain Stroke and Tumor Detection System built using advanced machine learning and medical imaging techniques. It aims to aid medical professionals in the early diagnosis of strokes and brain tumors, potentially improving patient outcomes through timely intervention.
- Enhanced MLP Neural Network: Utilizes a Multi-Layer Perceptron (MLP) model to predict the likelihood of a brain stroke based on various input features.
- Classification of Brain Stroke: Implements a Convolutional Neural Network (CNN) to analyze MRI/CT images and classify brain strokes as either ischemic or hemorrhagic once predicted.
- U-Net Model for Segmentation: Employs a U-Net architecture to segment brain tumors in medical images. This model is specifically trained to identify and classify the following features:
- No Tumor: Indicates the absence of any tumor.
- Necrotic/Core: Represents dead or dying tissue within a tumor, suggesting advanced tumor progression.
- Edema: Detects swelling caused by excess fluid around the tumor, which can indicate the tumor's impact on surrounding brain tissue.
- Enhancing: Identifies areas of the tumor that show abnormal blood vessels and a disrupted blood-brain barrier.
- Frontend Technologies: Developed using HTML, JavaScript, and CSS, providing a user-friendly interface for interaction.
- Backend Framework: Utilizes Flask to handle requests and manage the backend logic of the application, including model predictions and image processing.
- Predictive Analysis: Provides predictions on stroke likelihood based on user-input features, aiding in early diagnosis.
- Tumor Feature Identification: Helps in identifying specific tumor characteristics, which can guide treatment decisions.
Technologies used -
- Frontend: HTML, CSS, JavaScript
- Backend: Python, Flask
- Machine Learning: NumPy, Pandas, scikit-learn, TensorFlow or Keras
- Deep Learning: Convolutional Neural Networks (CNN), U-Net architecture, Multi-Layer Perceptron (MLP)
- Data Visualization: Matplotlib
- Brain Stroke Dataset
- CT Scan Image Dataset
- BRATS 2020 Training Data
- Replication Data for: Prediction of Cerebral Stroke
- Data Augmentation was performed on MRI Scans in order to prevent overfitting and and memoization.
- Rescaling and Resize was performed for better segmentations.
- Normalization was performed for faster convergence and reduced risk of Exploding/Vanishing Gradients.
- Accuracy
- Precision
- Recall
- Confusion Matrix
- F1-score
- ROC-AUC
- Validation Loss
- Sensitivity
- Specificity
Multi-Layer Perceptron (MLP):
- Accuracy: 94.67%
- Precision: 0.91
- F1 Score: 0.95
- Validation Loss: 0.0136
CNN Architecture:
- Test Accuracy: 98.1%
- Test Loss: 0.627
U-Net Architecture:
- Test Accuracy: 99.26%
- Precision: 99.4%
- Specificity: 99.79%
- Sensitivity: 99.04%
- Avyukth Inna
- Ayman Khan
- Brijesh S G
- Samraat Dabolay








