Basics Β· 37Γ—37 Spatial Patch Similarity Probe Β· 90.95 MB WASM q8

Interactive 37Γ—37 Patch Cosine Probe & Pooling Comparison

RAD-DINO divides a 518Γ—518 thoracic plate into 1,369 spatial patches (37Γ—37 grid, 14Γ—14 px each). Click, hover, or jump to any lung quadrant to plot exact cosine similarity against all 1,369 patches, then compare [CLS] vs Mean Patch vs Fused global pooling against a reference phantom.

1. Spatial Patch Cosine Heatmap & Quadrant Probe

Click or glide your pointer across the radiograph canvas (or press lung-quadrant quick-jump buttons below) to recompute cosine similarity over all 1,369 spatial tokens at 60 fps.

Initialise RAD-DINO above to run the 37Γ—37 patch cosine probe and pooling comparison.

Query Patch(23, 10)
Query ZoneRight Lower Lung
Patches β‰₯ 0.65 Cos–
Mean Grid Cosine–
[CLS] vs Ref–
Mean Patch vs Ref–
Fused vs Ref–
Tensor NaN Count–

37Γ—37 Patch Cosine Heatmap (Click / Hover / Arrows)

Click or hover any lung quadrant after encoding

Zone-Mean Similarity to Active Patch

Mean cosine similarity from your probed patch to each anatomical quadrant on the 37Γ—37 grid β€” notice symmetric contralateral lung fields vs localized opacities or hardware.

Top Remote Matching Patches (distance β‰₯ 2 cells)

Global Pooling Comparison vs Reference ([CLS] vs Mean Patch vs Fused)

Compare how RAD-DINO's self-supervised [CLS] token (index 0), global Mean Patch (average of indices 1..1369), and Fused vector score the active plate against the selected reference phantom.

Show the code

Show the code β€” rad-core.mjs: computePatchToPatchHeatmap() (1,369-patch cosine probe)