← all work

Brain Tumor MRI Classifier

97.15% test accuracy, after augmentation first made it worse.

  • TensorFlow
  • Keras
  • CNN
  • Flask
confusion matrix on the test set: nearly all scans fall on the diagonal for glioma, meningioma, no tumor and pituitary
confusion matrix on the test set: nearly all scans fall on the diagonal for glioma, meningioma, no tumor and pituitary
why
a basic CNN trained from scratch needed augmentation to generalize, but natural-photo-strength augmentation distorted the exact regions MRI diagnosis depends on.
how it works
four conv/pool blocks, mild rotation/zoom/brightness augmentation tuned specifically for MRI, trained with early stopping and checkpointing.
what i learned
the first augmentation pass dropped accuracy to 92.5%. turning the strength down to roughly a third fixed it and beat the no-augmentation baseline on every class.
results
97.15% test accuracy, 94.3% meningioma F1, documented end to end in the README.

limitations are documented in the README, not claiming clinical validity.

brain-tumor-classifier / src/train.py
layers.RandomRotation(0.02),
layers.RandomZoom(0.05),
layers.RandomBrightness(0.05),
layers.Rescaling(1.0 / 255),