How rieyanshi/automated-brain-tumor works
This repository trains a two-class brain MRI classifier and exposes image upload and prediction through Flask. Although the README describes segmentation, the sampled code predicts tumor/no-tumor classes. Training, web inference, and TFLite conversion are distinct workflows; the available files do not establish that training produces the H5 model used by the app.
Main entry points: app.py Flask routes · modelConverter.py TFLite converter · mainTrain.py Image preparation · BrainTumor10Epochs.h5 H5 inference model
Components 12
Model training
- Training images
mainTrain.py - Image preparation
mainTrain.py - CNN training
mainTrain.py - Categorical H5 model
BrainTumor10EpochsCategorical.h5
Web inference
- Flask routes
app.py - Image preprocessing
app.py - Class prediction
app.py - Tumor label
app.py - H5 inference model
BrainTumor10Epochs.h5
Model conversion
- TFLite converter
modelConverter.py - TFLite model
model.tflite
Other components
- Image uploader
Connections 11
- Training images → Image preparation: loads and resizes
- Image preparation → CNN training: supplies image data
- CNN training → Categorical H5 model: saves weights
- Image uploader → Flask routes: uploads image
- Flask routes → Image preprocessing: calls getResult
- Image preprocessing → Class prediction: prepares input
- Class prediction → H5 inference model: predicts with
- Flask routes → Tumor label: maps prediction
- Tumor label → Image uploader: returns label
- TFLite converter → H5 inference model: loads model
- TFLite converter → TFLite model: writes model