This project implements a deep learning model using Convolutional Neural Networks (CNN) to detect brain tumors from MRI scans. It features a clean, interactive Gradio interface that allows users to upload an image and receive a classification: Tumor or No Tumor.
Brain MRI Images for Brain Tumor Detection
- Binary classes:
yes(tumor present) andno(no tumor) - Downloaded using
kagglehubwithin the notebook
Custom CNN built with TensorFlow/Keras:
- Input: 128x128 RGB image
- Layers:
- Conv2D (32 filters) β MaxPooling
- Conv2D (64 filters) β MaxPooling
- Flatten β Dropout (0.5)
- Dense (64) β Dense (2 - softmax)
- Downloads and loads MRI dataset using
kagglehub - Preprocesses and normalizes images
- Trains a CNN model to classify scans as Tumor/No Tumor
- Provides an interactive Gradio interface for image-based prediction
Tech stack: Python, TensorFlow/Keras, NumPy, OpenCV, Gradio, Google Colab, Kaggle API
- Add Grad-CAM for explainability
- Include multi-class tumor classification
- Deploy model as a Hugging Face Space
MIT License (or your choice)
