How shreyasskrishna/brain_tumour_prediction works
This repository is an MRI tumor-classification demo with a Gradio upload workflow and a separate Colab-style model-training and evaluation script. In the app, an uploaded scan is preprocessed, passed to a hybrid ResNet50/VGG16 classifier, and turned into a class, stage, and recovery-plan message. The training script builds and fits a model, then evaluates it on the test set. The README describes augmentation and evaluation capabilities; source inspection shows the app configures data generators but does not train or load a saved model. Dataset wiring is based on the shown paths; the app’s hard-coded path may need adjustment.
Main entry points: backend.py Augmentation and training · app.py Prediction handler · Training Training MRI data · Testing Testing MRI data
Components 12
Upload and Results
- Gradio interface
app.py - Prediction handler
app.py - Class and recovery guidance
app.py
App Inference
- Image preprocessing
app.py - ResNet50/VGG16 classifier
app.py
Model Training
- Training MRI data
dataset/Training/Training - Testing MRI data
dataset/Testing/Testing - Augmentation and training
accuracy/backend.py - ResNet50/InceptionV3 model
accuracy/backend.py
Evaluation
- Metrics and visualizations
accuracy/backend.py - Reported performance
README.md
Other components
- MRI user
Connections 11
- MRI user → Gradio interface: uploads scan
app.py - Gradio interface → Prediction handler: invokes handler
app.py - Prediction handler → Image preprocessing: preprocesses image
app.py - Prediction handler → ResNet50/VGG16 classifier: requests prediction
app.py - Prediction handler → Class and recovery guidance: formats result
app.py - Image preprocessing → ResNet50/VGG16 classifier: supplies image
app.py - Augmentation and training → Training MRI data: reads batches
accuracy/backend.py - Augmentation and training → Testing MRI data: reads validation batches
accuracy/backend.py - Augmentation and training → ResNet50/InceptionV3 model: fits model
accuracy/backend.py - Augmentation and training → Metrics and visualizations: evaluates predictions
accuracy/backend.py - Metrics and visualizations → Reported performance: summarized by
README.md