Inspiration

In sub-Saharan Africa, the structural gap in neuro-oncology is severe. Nigeria has fewer than 10 practicing neurosurgeons per 100 million people, and MRI scanners are concentrated in a handful of tertiary hospitals in cities like Lagos and Abuja. When a scan is acquired at a smaller facility, it can sit unread for weeks because there is no radiologist on site to triage it. For aggressive diseases like Glioblastoma, every week of diagnostic delay is clinically meaningful. We wanted to build a tool for the general physician at a district hospital who has no reliable way to look at an MRI and determine if a patient needs an urgent specialist transfer today, or if they can wait.

What it does

NeuroVista AI is a fully offline clinical decision support system designed for non-specialist clinicians. The system accepts a standard ZIP of DICOM series, runs local AI inference, and returns a comprehensive clinical dashboard. This includes:

  • An interactive 3D mesh of the segmented tumor and its sub-regions.
  • Quantitative volumes for edema, necrotic core, and enhancing tumor (in mm³).
  • A triage band (URGENT / EXPEDITED / ROUTINE) derived from validated volumetric thresholds.
  • WHO grade probability estimates and a malignancy likelihood score.

Finally, it uses a locally-served LLM to generate a plain-language narrative restating the findings for a non-specialist reader. Because it requires no cloud dependency, no patient data ever leaves the hospital network.

How we built it

We architected a full-stack platform prioritizing low-resource environments:

  • Backend & Model: We used FastAPI and PyTorch to serve a 3D U-Net (via MONAI) trained on the BraTS 2020 dataset. We deliberately kept the parameter count conservative so it fits comfortably under 2 GB of GPU VRAM, allowing it to run on consumer-grade hardware or gracefully fall back to CPU inference.
  • Post-Processing: We implemented a custom four-stage deterministic CPU pipeline (including confidence thresholding and spatial coherence filtering) to mathematically enforce biological constraints and remove false-positive tumor fragments.
  • Explainability: We integrated a locally-served quantized LLM via a llama.cpp server (evaluating both Phi-3.5 and Gemma-3). Using Q4_K_M quantization allowed us to fit the LLM within standard 8GB RAM limits while maintaining excellent prose generation.
  • Frontend: The interface was built with Next.js 16 and React 19, rendering a responsive layout featuring a Google <model-viewer> for the 3D GLB meshes generated directly from the backend.

Challenges we ran into

Our biggest hurdle was strict hardware constraints. We had to ensure the entire pipeline could run on a standard 8 GB hospital workstation without internet access. We initially explored larger models like nnU-Net and Swin UNETR, but their massive memory footprints ruled them out for our target deployment.

Additionally, handling real-world DICOM heterogeneity was tough. African hospital scanners often have non-standard intensity ranges, forcing us to build a detection and linear rescaling heuristic to normalize voxel intensities before inference. Finally, the raw 3D U-Net output naturally produced ectopic false-positive fragments, which we solved by designing a rigorous spatial coherence filter anchored directly to the tumor's edema.

Accomplishments that we're proud of

We are incredibly proud of achieving a fully offline, cloud-independent architecture. Building a system that successfully orchestrates advanced 3D computer vision and local LLM text generation entirely on consumer-grade hardware is a massive win for data privacy and healthcare accessibility. We're also proud of our custom post-processing pipeline, which runs on a CPU in under 500 ms and drastically improves the clinical reliability of the 3D meshes. Bridging this complex Python AI backend with a sleek, interactive Next.js frontend into a cohesive tool is the culmination of a lot of hard work.

What we learned

We learned a tremendous amount about the strict trade-offs required for edge AI in healthcare. We discovered that for deterministic narrative generation, highly quantized LLMs (Q4_K_M) offer indistinguishable quality from full-precision models while saving gigabytes of RAM. We also learned how crucial deterministic post-processing is; raw deep learning output is rarely ready for clinical consumption without enforcing real-world biological constraints (like our 60mm spatial anchor).

What's next for NeuroVista AI

The immediate next step is rigorous clinical validation. The current model was trained on the BraTS 2020 dataset (primarily North American and European scans). We need to validate and fine-tune it on a held-out African clinical dataset to account for local scanner protocol differences. We also plan to prospectively validate our rule-based CDSS triage thresholds in partnership with local neuro-oncologists, and further optimize our CPU inference speeds to make the tool even faster for under-resourced clinics.

Built With

Share this project:

Updates