Brain Tumour Classification using CNNs
research · 2026
Multiclass brain tumour classification from MRI scans comparing two custom CNNs and fine-tuned ResNet50V2, with Grad-CAM and LIME explainability.
Topics:
Overview:
This project was completed in collaboration with a partner. It classifies brain MRI scans into four categories: Glioma, Meningioma, Pituitary, and No Tumour. Three deep learning architectures were built and compared, with Explainable AI applied to the best-performing model.
The dataset contained 12,064 T1-weighted MRI images from Mendeley Data. EDA uncovered mixed colour spaces (Grayscale, RGB, RGBA) and inconsistent resolutions. A hash-based duplicate check identified 3,060 duplicates (25% of the dataset), which were removed after preprocessing to avoid inflated validation metrics. The cleaned dataset was split 85/15 for training and validation. Preprocessing used a six-stage OpenCV pipeline: Gaussian blur, binary thresholding, morphological erosion and dilation, contour detection, and bounding-box cropping to isolate the brain region before resizing to 224x224. Augmentation was applied to training images only, using rotation (±15°), horizontal flip, brightness adjustment, and salt-and-pepper noise to simulate scanner variability and patient positioning differences. Three models were trained: a 4-conv custom CNN baseline, a 3-conv CNN with L2 regularisation and dual dropout, and a fine-tuned ResNet50V2 using a two-phase strategy (frozen base then top-40-layer fine-tuning). ResNet50V2 achieved 93.67% validation accuracy, outperforming both custom CNNs by roughly 8%. Grad-CAM and LIME were applied to verify the model attended to tumour tissue rather than background artefacts.
Links & Docs: