REAL MODEL · REAL WEIGHTS · RUNS ON YOUR DEVICE
Module 07 · Neuro-imaging

Watch a real neural network find a tumor, live, in your browser.

A genuine U-Net — 7.76M trained parameters, published research weights — segmenting brain MRI abnormalities. No server round-trip, no simulated output. Drop in a scan and watch the mask converge in real time.

7.76Mtrained parameters, running entirely client-side
<2sinference time on a laptop CPU
0images ever leave your device
Preview · FLAIR MRIMODEL READY
Sample brain MRI with tumor overlay
TCGA_CS_4944 · 256×256Try it below
The lab

Drop in a scan. The model does the rest.

This runs a real ONNX export of a trained U-Net directly in your browser via WebAssembly. Try the bundled sample, or upload any FLAIR-style MRI slice.

Model not loaded
Drop an MRI slice here
PNG or JPG, any size — the model resamples automatically. Grayscale or FLAIR-style scans work best.
— OR —
Detection threshold
Confidence cutoff0.65
Live metrics
Flagged region
Peak confidence
% of slice
Inference time
Layers
Detected region outline
Confidence wash
Grid reticle
From mask to measurement

A boundary alone isn't clinically useful. A measurement is.

The segmentation paper this module is inspired by (Singh et al., 2021, IEEE Access) makes exactly this point about the fetal cerebellum: the mask is a means, not an end — clinicians need a number, plotted against a norm. This panel derives that number from the live mask above.

Flagged region area
pixels above threshold, from the live mask
Equivalent diameter
diameter of a circle with the same area — the standard clinical proxy measurement
Boundary irregularity
perimeter² ÷ area, normalized — higher values flag ragged, non-circular margins
What the source paper does with this step

In the referenced work, an equivalent transcerebellar-diameter measurement — derived the same way, from a segmentation mask — is compared against a gestational-age growth chart to flag values outside the expected percentile range. This demo computes the geometry live; it does not have that clinical growth-chart reference table wired in, and makes no diagnostic claim.

Model internals

What's actually running under the hood

No black box. Here is the exact architecture, training data, and preprocessing this module runs — so you can defend every number on this page in a viva.

01

Architecture

U-Net encoder-decoder, 4 downsampling stages, skip connections between mirrored encoder/decoder blocks. 32 initial features, doubling per stage. 7,763,041 trainable parameters.

02

Training data

The LGG Segmentation Dataset — pre-operative FLAIR MRI from 110 patients in TCIA's Low-Grade Glioma collection, with expert-annotated tumor masks (Buda, Saha & Mazurowski, 2019, Computers in Biology and Medicine).

03

Preprocessing

Percentile rescale to the [10th, 99th] intensity range per channel, then z-score normalization using the mean/std across all three channels jointly. Getting this step wrong is the difference between a working model and a flat, meaningless output — verified directly during this build.

04

Inference path

PyTorch weights → ONNX export (opset 13) → ONNX Runtime Web, WASM backend, single-threaded. Runs entirely in this tab. Verified pixel-identical output against the original PyTorch model before shipping.

Provenance

Where this model actually comes from

This module was built after reading Singh, Sridar, Kim et al., "Semantic Segmentation of Cerebellum in 2D Fetal Ultrasound Brain Images Using Convolutional Neural Networks," IEEE Access, 2021 — the ResU-Net-c paper that inspired the biometry framing above. That paper's own trained weights and 734-image clinical fetal-ultrasound dataset are not public, so this module runs a different, genuinely public and independently verifiable model instead: a standard U-Net trained on public brain MRI data (Buda et al., 2019), rather than a fabricated or simulated result standing in for the original paper's architecture.

Every number on this page — the parameter count, the inference time, the confidence values, the pixel areas — comes from that model actually running, in your browser, on whatever image you give it. Nothing here is scripted or pre-rendered.

Singh, V., Sridar, P., Kim, J., Nanan, R., Poornima, N., Priya, S., Reddy, G.S., Chandrasekaran, S., & Krishnakumar, R. (2021).
Semantic Segmentation of Cerebellum in 2D Fetal Ultrasound Brain Images Using Convolutional Neural Networks.
IEEE Access, 9, 85864–85873. doi:10.1109/ACCESS.2021.3088946
Buda, M., Saha, A., & Mazurowski, M.A. (2019).
Association of genomic subtypes of lower-grade gliomas with shape features automatically extracted by a deep learning algorithm.
Computers in Biology and Medicine, 109, 218–225.