At a glance
| Upstream model |
microsoft/rad-dino
(Microsoft Health Futures — Pérez-García et al., Nature Machine Intelligence 2025,
fine-tuned from facebook/dinov2-base)
|
|---|---|
| Browser ONNX repo |
onnx-community/rad-dino-ONNX
(onnx/model_quantized.onnx 90,948,899 B + config.json
986 B + preprocessor_config.json 442 B =
90,950,327 B / 90.95 MB, catalogue 91.0 MB)
|
| License & intended use | MIT · Research purposes only (not intended for clinical diagnosis or patient care) |
| Task & architecture |
image-feature-extraction · Dinov2Model (dinov2,
86.6M params, 12 layers, 768-d hidden, 12 heads, 3072 MLP, GELU, QKV bias,
patch size 14, 0 register tokens)
|
| Radiograph preprocessing |
BitImageProcessor: bicubic resize shortest edge 518, center crop
518×518, rescale 1/255, radiograph normalization mean
[0.5307, 0.5307, 0.5307], std [0.2583, 0.2583, 0.2583]
|
| Output tensor shape |
last_hidden_state shape [1, 1370, 768] (1,052,160 floats):
index 0 = [CLS] (1×768) · indices 1..1369 =
37×37 = 1,369 spatial patch tokens (1369×768)
|
| Runtime & backend |
Shared Transformers.js pin (../../lib/webai.js,
@huggingface/transformers@3.7.5 ) · CPU WASM q8 (90.95 MB, universal;
off-main-thread Web Worker in worker.js)
|
1. Live 37×37 Thoracic Phantom Encoder
Choose a procedural 518×518 thoracic X-ray phantom below, drop a local research PNG/JPEG here,
or paste from clipboard (Ctrl/⌘+V). All inference stays strictly on your device.
Initialise RAD-DINO above to encode the 518×518 procedural phantom into [1, 1370, 768] features.
See Inside · Live [1, 1370, 768] Tensor Anatomy
RAD-DINO emits 1,370 tokens (0 registers): index 0 is the global
[CLS] token (768-d) and indices 1..1369 map directly to the
37×37 radiograph patch grid (each patch = 14×14 px).
[CLS] (1×768)
Anatomical Lung-Zone Mean Patch Norms
CLS[0..4] sample and bilateral hemithorax symmetry will appear after inference.
Why RAD-DINO matters for research
Unlike text-supervised vision-language models that learn only what radiology reports mention,
microsoft/rad-dino applies pure image-only DINOv2 self-supervised learning at
high 518×518 resolution over chest radiographs. At 90.95 MB in MIT-licensed
CPU WASM, researchers can inspect dense radiograph features locally with zero cloud upload:
- Zero-egress dataset exploration: cluster and retrieve similar anonymized research chest scans locally inside the browser tab.
- Dense 37×37 spatial patch probing: test whether focal opacities, cardiac contours, or metallic pacing hardware localize cleanly across the
1,369spatial tokens without fine-tuning. - Perturbation & shortcut auditing: quantify how monochrome polarity flips, rotation, exposure shifts, and synthetic medical-device artifacts shift
[CLS]and patch features. - Multi-model vision + clinical-LM research: pair RAD-DINO visual zone telemetry with locally cached
Bio_ClinicalBERTmasked clinical-term scoring.
Use-case ladder
1. Basics · 37×37 Spatial Patch Probe
Click or hover any lung quadrant to plot cosine similarity across all 1,369 patches and compare [CLS] vs Mean-Patch pooling.
2. Practical · Research-Phantom Organizer
Pause / Resume / Cancel batch indexing of procedural or local anonymized plates into a k-NN similarity gallery with CSV/JSON export.
3. Wild · Artifact & Perturbation Audit
Measure [CLS] drift and 37×37 patch stability across rotation, contrast inversion, synthetic pacing-wire artifact, and exposure shift.
4. Multi-model · RAD-DINO → Bio_ClinicalBERT
Chain 90.95 MB RAD-DINO visual zone features with 131 MB Bio_ClinicalBERT clinical-term scoring for research study-note matching.
How the API works
Load onnx-community/rad-dino-ONNX once via the shared Transformers.js
image-feature-extraction pipeline on WASM q8, pass a
RawImage.fromCanvas(...) inside a dedicated Web Worker, and slice
[1, 1370, 768] into [CLS] (index 0) and
37×37 spatial patches (indices 1..1369).