Skip to content

dhananjay2403/neuro-lens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuroLens - MRI Brain Tumor Detection & Segmentation Pipeline

BraTS Tumor Subregions


Overview

An end-to-end deep learning solution for automated brain tumor detection and segmentation in MRI scans, developed during my research internship at DRDO-INMAS.

This project accelerates radiological workflows using 2D/3D MRI datasets and scalable AI pipelines. The pipeline includes detection (YOLOv8), 3D U-Net segmentation.


Architecture

Brain Tumor Detection and Segmentation Pipeline


BraTS2020 Dataset Overview

  • Gold standard for brain tumor segmentation (MICCAI BraTS challenge)
  • 369 multi-institutional 3D MRI volumes (T1, T1ce, T2, FLAIR)
  • Expert-annotated masks: necrotic core, edema, enhancing tumor
  • 240×240×155 voxels, 1mm³ isotropic, skull-stripped, co-registered
  • Used for training, validation, and benchmarking of segmentation models

YOLOv8 for Brain Tumor Detection

While the main focus of this project is on 3D U-Net-based segmentation using the BraTS dataset, we also explored YOLOv8 for fast tumor detection on 2D MRI slices. YOLOv8 enables rapid localization of tumor regions, which can be useful for pre-screening or as a first step before detailed segmentation.

Key Features:

  • Fast detection of tumor types in 2D MRI slices.
  • Useful for rapid triage and as a pre-processing step for 3D segmentation.
  • Visualizations of detection results and training metrics included.

3D U-Net for Tumor Segmentation

The core of this project is a 3D U-Net model trained on the BraTS2020 dataset for voxel-wise segmentation of brain tumor subregions.

Key Features:

  • Multi-class segmentation: necrotic core, edema, enhancing tumor.
  • High Dice scores on all tumor regions.
  • Streamlit app for interactive inference and visualization.

Predictions & Results

YOLOv8 Detection Results

Glioma No Tumor Meningioma Pituitary
Glioma No Tumor Meningioma Pituitary

3D U-Net Segmentation Result (BraTS2020)

U-Net Segmentation
U-Net Prediction

Key Metrics (BraTS2020 & Pipeline)

Task Metric Value
Detection mAP@50 91.4%
Detection Precision 90.8%
Detection Recall 86.5%
Segmentation Dice Score (mean) 0.98
Region-wise Dice (Enhancing Tumor) 0.79
Region-wise Dice (Tumor Core) 0.83
Region-wise Dice (Whole Tumor) 0.87

Usage

All model training and experiments were conducted on Kaggle Notebooks for GPU acceleration and easy dataset access.

  1. Open the notebooks directly on Kaggle:

  2. To run locally (optional):

    • Download the notebooks and datasets from Kaggle.
    • Create and activate a conda environment:
      conda create -n brats python=3.8 -y
      conda activate brats
    • Install dependencies:
      pip install -r requirements.txt
    • Launch Jupyter Notebook:
      jupyter notebook notebooks/u-net-brain-tumor-segmentation.ipynb
      jupyter notebook notebooks/yolov8-brain-tumor-detection.ipynb

Note: For best results and GPU support, use Kaggle Notebooks with the provided datasets.


References

About

Deep learning pipeline to detect and localize brain tumors in MRI scans using 3D U-Net & YOLOv8.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors