This project implements convolutional neural networks (CNNs) for binary brain tumor classification using Keras with a TensorFlow backend.
The goal is to compare different CNN architectures and evaluate their performance on an imbalanced medical image dataset.
- Images are resized to 256×256
- Binary classification: tumor / no tumor
- Class distribution is checked before training
Three CNN architectures are implemented and trained:
- Simple CNN – baseline model
- Deeper CNN – more convolutional layers and parameters
- BatchNorm CNN – uses batch normalization for more stable training
All models use:
- Adam optimizer
- Binary cross-entropy loss
- Metrics: accuracy, recall, precision
- Each model is trained for 20 epochs
- Learning curves are plotted:
- loss
- accuracy
- recall
Because the dataset is imbalanced, recall is treated as the main metric.
- Python
- TensorFlow / Keras
- NumPy
- Matplotlib
- Seaborn
- scikit-learn