BrainScan AI

Brain Tumor Detection AI

A personal deep learning project to explore TensorFlow and Keras capabilities in medical image analysis

Brain Tumor Detection Project Banner
Personal Project

Project Overview

BrainScan AI is a personal project aimed at learning and mastering TensorFlow and Keras through practical application. The project focuses on developing a Convolutional Neural Network (CNN) for automated brain tumor classification from MRI scans. This self-directed learning experience helped me gain hands-on experience with deep learning frameworks while tackling a meaningful medical imaging challenge.

Learning Objectives

  • Master TensorFlow framework and Keras API
  • Understand CNN architecture design and optimization
  • Apply deep learning to medical image analysis
  • Learn model evaluation and performance metrics

Technical Details

Python CNN TensorFlow Keras Deep Learning OpenCV

Key Features

  • 94% overall classification accuracy
  • Multi-class tumor classification
  • Custom CNN architecture
  • Optimized for 256x256 MRI scans

Model Performance

Confusion Matrix

Confusion Matrix

Detailed classification results across tumor types

Classification Accuracy by Type

  • Glioma: 93.6% accuracy
  • Meningioma: 87.7% accuracy
  • No Tumor: 98.0% accuracy
  • Pituitary: 96.7% accuracy

Technical Implementation

Model Architecture

Model: Sequential
_________________________________________________________________
Layer (type)                Output Shape              Param #   
=================================================================
rescaling (Rescaling)       (None, 256, 256, 3)      0         
conv2d (Conv2D)            (None, 256, 256, 16)     448       
max_pooling2d (MaxPooling)  (None, 128, 128, 16)     0         
...
dense_1 (Dense)            (None, 4)                516       
=================================================================
                        

Training Progress

Training Progress Graphs

Model accuracy and loss evolution during training

Example Predictions

Example MRI Predictions

Sample predictions across different tumor types

Confidence Analysis

Confidence Distribution

Distribution of model confidence for correct predictions

Complete Implementation Details

Below is the complete implementation of the brain tumor detection model, including data processing, model architecture, training, and evaluation.