← All work

AI · medical imaging · research project

NeuroLens

NeuroLens helps a doctor review brain MRI scans. A 3D model outlines the tumor and measures each part; a 2D model suggests the tumor type and shows where it looked. The doctor works in a full-screen viewer, fixes the outline with a brush, compares it with the AI's, and approves a report written only from the measurements.

Behind it: leak-free data splits, honest test evaluation (99.4% accuracy, 0.93 Dice), models served on CPU with ONNX, role-based login with an audit log, and CI that deploys to Azure and Vercel. Research project, not a medical device.

Role
Sole developer
Team
Solo
Platform
Web app for clinics · live
Links
AI DevelopmentComputer Vision
  • PyTorch
  • MONAI
  • ONNX Runtime
  • FastAPI
  • Next.js
  • NiiVue
  • Supabase
  • Azure
  • GitHub Actions
99.4%classifier accuracy on 710 clean test images (macro-F1 99.3%)
0.93Dice, whole tumor, on 188 held-out patients (core 0.91, enhancing 0.87)
~27 sper 3D scan on a 2-vCPU server, no GPU
258tests in CI on every push

Demo

See it working

Watch on YouTube ↗
The story behind itI went to a doctor as a patient. We ended up talking about AI, and he said medicine has to get ready for it. NeuroLens started there.Read the story

Features

Built for a reading room

  • Full-screen 3D viewer (NiiVue), with findings and the report in a side panel
  • A brush to fix the AI's outline, then a synced side-by-side compare
  • When the 2D and 3D models disagree, it says so instead of guessing a type
  • A worklist with cases waiting for review first, largest tumors on top

Safe by design

  • Doctor-only login with two roles; uploads, analyses and decisions go to an audit log
  • No patient names stored; DICOM headers are dropped on upload
  • The report is written from numbers only; an LLM may reword it but can't change a number or type
  • Every result is a draft until a doctor approves it

From upload to the doctor's decision

  1. 01Upload3D MRI (FLAIR, T1, T1ce, T2 as NIfTI or DICOM), or one 2D slice
  2. 02De-identifynames, IDs and dates removed; cases get codes like NL-FCDX69
  3. 03SegmentSegResNet outlines the tumor in 3D and measures each part in cm³
  4. 04ClassifyEfficientNet-B3 suggests the type and shows where it looked
  5. 05Doctor reviewfix with a brush, compare with the AI, approve, edit or reject
  6. 06Reportwritten only from the measurements; a signed PDF after approval

Why this stack

Simple over complex

Ten classifier options were compared. One EfficientNet-B3 on brain-cropped scans tied the best two-model ensemble, so the lighter one won: one network, one pass, about half the compute.

CPU serving without PyTorch

Both models run in ONNX Runtime with numpy-only pre- and post-processing, tested to match PyTorch (3D masks agree at Dice ≥ 0.9997). A 3D scan takes about 27 s on a 2-vCPU server.

A feedback loop with a gate

Doctors' fixes are exported as a training set, and a fine-tuned model replaces the old one only if it is not worse on the held-out test split. Tested with simulated fixes (expert masks standing in for a doctor): v2 learned them (0.745 → 0.841 Dice on those cases) and is the one served.

Screens

01 / 04

Worklist: cases waiting for review, largest tumors first
Worklist: cases waiting for review, largest tumors first

Troubleshooting

01

Test scores that lied

Problem
The public dataset has duplicate images, some in both train and test, which inflates test accuracy.
Fix
Found duplicates with MD5 + perceptual hashing and removed them before training; picked models on validation only, then opened the test split.
Result
An honest 99.4% that holds on unseen images.
02

When the two models disagree

Problem
On a BraTS scan the 2D classifier said “no tumor” (81%) while the 3D model outlined one. The 2D model was trained on another dataset and sees one slice.
Fix
The app compares both and shows “Models disagree” instead of a confident type, and the report says so.
Result
The doctor sees the conflict, not a wrong label.
Next projectK-Glow SecretsKorean skincare shop in Uzbekistan, with an AI advisor that only recommends what is in stock.