Skip to content

soloiaros/mri-examination-neurobridge

 
 

Repository files navigation

NeuroBridge — HNSCC Clinical Decision Support MVP

A hackathon MVP for AI-powered brain MRI analysis. Combines two EfficientNet-B3 models (Alzheimer's staging + Brain Tumor classification) with Grad-CAM explainability, MC Dropout uncertainty estimation, and DeepSeek-powered clinical reports & AI chat.

Quick Start

# From the repo root
bash start.sh

Then open http://localhost:5173.

Manual Setup

Backend

cd backend
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Copy and edit env (add your DeepSeek API key)
cp .env.example .env

# Start server (models load from ../alz_best.pt and ../tumor_best.pt)
uvicorn app:app --reload --port 8000

Frontend

cd frontend
npm install
npm run dev

Features

  • Patient Management — Add/remove patient profiles, filter by status (Living / Deceased / Recurrence), persist in localStorage
  • Dual Model Analysis — Brain Tumor (Glioma / Meningioma / No Tumor / Pituitary) and Alzheimer's (4 stages) on the same upload
  • Uncertainty Estimation — MC Dropout (20 passes) + Test-Time Augmentation (5 views)
  • Grad-CAM Heatmaps — Visual explanation of model attention on the final EfficientNet block
  • DeepSeek Reports — Auto-generated structured clinical narrative per analysis
  • AI Chat Assistant — Streaming chat with full patient + analysis context via DeepSeek
  • Settings Modal — Configure DeepSeek API key and check backend connection health

Models

Model Architecture Classes Dropout
alz_best.pt EfficientNet-B3 Mild / Moderate / Non / Very Mild Demented 0.3
tumor_best.pt EfficientNet-B3 Glioma / Meningioma / No Tumor / Pituitary 0.5

Input: 224×224 RGB, ImageNet normalization.

API Endpoints

Method Path Description
GET /api/health Backend + model status
GET/POST /api/patients List / create patients
PUT/DELETE /api/patients/{id} Update / delete patient
POST /api/analyze Run inference (returns prediction + Grad-CAM)
POST /api/report Generate DeepSeek clinical report
POST /api/chat/stream Streaming AI chat (SSE)
GET/PUT /api/settings View / update DeepSeek API key

Environment Variables

DEEPSEEK_API_KEY=sk-...          # Required for reports & chat
ALZ_CHECKPOINT=../alz_best.pt    # Path to Alzheimer model checkpoint
TUMOR_CHECKPOINT=../tumor_best.pt # Path to Tumor model checkpoint

Disclaimer

For research purposes only — not a clinical diagnostic tool. All AI outputs require physician review.

About

Medical software featuring built-in image-recognition model for MRI scans assessment. Built for lab the environment, with transparency and strict LLM guidelines in mind. For a more extensive commit history - https://github.com/soloiaros/sabanci-thon (split due to hackathon reqs)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 99.7%
  • Other 0.3%