Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Brain Tumor Detection Using Deep Learning


🎯 Motivation

Brain tumors pose a significant global health challenge, impacting individuals across all age groups. Early and precise diagnosis is critical for effective treatment planning and enhancing patient outcomes. The variability in tumor appearance and the complexity of brain structures make manual examination prone to errors. The availability of advanced datasets and the opportunity to contribute to healthcare and interdisciplinary research inspired this project.

🎯 Objectives

  1. πŸš€ Enhance the efficiency and accuracy of deep learning (DL) models for brain tumor classification.
  2. πŸ“Š Compare multiple DL models to determine the optimal approach for real-world application.

πŸ§ͺ Methodology

πŸ“ Dataset

The dataset, sourced from Kaggle. It comprises 3,264 MRI scans of brain tumors categorized as:

  • Glioma Tumors (926 images)
  • Meningioma Tumors (937 images)
  • Pituitary Tumors (901 images)
  • No Tumors (500 images)

πŸ› οΈ Preprocessing

Steps taken to prepare the data for model training:

  1. βœ‚οΈ Cropping: Removed irrelevant regions to focus on tumor areas
  2. πŸ“ Resizing: Standardized image size to 225Γ—225Γ—3
  3. βš–οΈ Normalization: Scaled pixel values to a range of [0, 1]

πŸ”„ Data Augmentation

To boost dataset diversity and reduce overfitting:

  • πŸ”„ Rotation (Β±30Β°)
  • πŸͺž Shear (0.2)
  • πŸ” Zoom (0.05)
  • ↔️ Horizontal Flip

πŸ€– Model Training

Two models were employed:

  1. Custom CNN:

    • 5 convolutional layers with increasing filters: 16 β†’ 32 β†’ 64 β†’ 128 β†’ 512
    • MaxPooling2D, ReLU activations, and dropout layers (rates: 0.2 and 0.5)
    • Fully connected layer with 512 units and softmax output for classification
  2. EfficientNet-B0:

    • Advanced scalable architecture for efficient training and high accuracy

βš™οΈ Training Parameters

  • Batch size: 64
  • Epochs: 30
  • Loss function: Categorical Cross-Entropy
  • Optimizer: Adam

πŸ“ˆ Results

EfficientNet-B0 outperformed the custom CNN with:

  • βœ… Validation Accuracy: 97.55%
  • πŸ“‰ Validation Loss: 0.10
  • πŸ§ͺ Training Accuracy: 99.74%

It provided a superior balance between performance and computational efficiency.

🧾 Conclusion

This project highlights the potential of deep learning, especially EfficientNet-B0, in automating brain tumor classification from MRI scans. Such systems can assist radiologists by:

  • 🩺 Increasing diagnostic accuracy
  • πŸ§‘β€βš•οΈ Reducing workload
  • πŸ•’ Accelerating treatment timelines

Contributors

  • Alishba Zulfiqar
  • Bushra Tanveer
  • Zahra Batool

About

A 🧠 brain tumor classifier using both βš™οΈ Custom CNN and πŸ€– EfficientNet-B0 to compare conventional and state-of-the-art deep learning models. Built with πŸ§ͺ TensorFlow/Keras and tested on an MRI dataset from Kaggle to support AI-driven πŸ₯ healthcare diagnostics.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages