Spaces:
Running
Running
Download connect.html from SharpMeow/snapped-labels: direct link, hf CLI and curl.
- Browser
- Download file 13.9 kB
-
https://huggingface.co/spaces/SharpMeow/snapped-labels/resolve/main/connect.html
- Command line
-
hf download hf://spaces/SharpMeow/snapped-labels/connect.html
-
curl -L -o connect.html https://huggingface.co/spaces/SharpMeow/snapped-labels/resolve/main/connect.html
13.9 kB
| <section class="scc" id="connect" aria-label="Connect your tool"><style>.scc{--a:var(--scc-accent,#4ea8de);color:inherit;font:inherit;line-height:1.5;max-width:60rem} | |
| .scc h2{font-size:1.15em;margin:.2em 0 .3em}.scc h3{font-size:1em;margin:0 0 .2em} | |
| .scc p{margin:.3em 0}.scc a{color:var(--a)} | |
| .scc .scc-src{border:1px solid color-mix(in srgb,currentColor 18%,transparent);border-radius:10px;padding:.7em .9em;margin:.7em 0;background:color-mix(in srgb,currentColor 4%,transparent)} | |
| .scc .scc-meta{font-size:.85em;opacity:.8} | |
| .scc details{border-top:1px solid color-mix(in srgb,currentColor 12%,transparent);padding:.35em 0} | |
| .scc summary{cursor:pointer;font-weight:600;list-style-position:inside} | |
| .scc .scc-b{font-weight:400;font-size:.75em;padding:.05em .5em;border-radius:99px;margin-left:.5em;border:1px solid currentColor;opacity:.75;white-space:nowrap} | |
| .scc .scc-b.ok{color:#3fb37f}.scc .scc-b.src{color:var(--a)}.scc .scc-b.warn{color:#e0a030} | |
| .scc .scc-code{position:relative;margin:.4em 0 .2em} | |
| .scc pre{margin:0;padding:.7em .8em;border-radius:8px;overflow:auto;font-size:.82em;background:color-mix(in srgb,currentColor 9%,transparent);white-space:pre} | |
| .scc code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace} | |
| .scc button.scc-copy{all:unset;box-sizing:border-box;position:absolute;top:.35em;right:.35em;font-size:.75em;line-height:1.4;padding:.1em .6em;border-radius:6px;border:1px solid color-mix(in srgb,currentColor 30%,transparent);background:color-mix(in srgb,currentColor 8%,transparent);color:inherit;cursor:pointer} | |
| .scc button.scc-copy:hover{border-color:var(--a)} | |
| .scc .scc-url{position:relative}.scc .scc-url pre{padding-right:4.5em;white-space:pre-wrap;word-break:break-all} | |
| .scc .scc-go{display:inline-block;margin:.3em 0;padding:.25em .8em;border-radius:6px;border:1px solid var(--a);text-decoration:none} | |
| .scc footer{font-size:.8em;opacity:.75;margin-top:.6em}</style> | |
| <h2>Connect your tool</h2> | |
| <p>The snapped meshes, their records and the CT they sit on read straight from these URLs, logged out. Every segment is a tifxyz folder, so VC3D, villa and anything that reads tifxyz opens it as it is.</p> | |
| <div class="scc-src" id="connect-data"><h3>Snapped labels: every segment, with index.json and checksums</h3> | |
| <p class="scc-meta">CC BY-NC 4.0 (derived from Vesuvius Challenge open data) 路 One folder per segment, SCROLL/SEGMENT/: snapped.tifxyz, abstain.tif, confidence.tif, reason.tif, source.tif (finesnap), release_mask.tif and release.json (source URLs, sha256 of every file, summary). index.json lists every segment; viewer/ holds the page's cross sections.</p> | |
| <div class="scc-url"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://huggingface.co/datasets/SharpMeow/vesuvius-snapped-labels</code></pre></div> | |
| <details><summary>Python (huggingface_hub)<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install huggingface_hub | |
| from huggingface_hub import hf_hub_download, snapshot_download | |
| path = hf_hub_download("SharpMeow/vesuvius-snapped-labels", "index.json", repo_type="dataset") # one file, cached | |
| folder = snapshot_download("SharpMeow/vesuvius-snapped-labels", repo_type="dataset")</code></pre></div></details> | |
| <details><summary>Command line (hf)<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>pip install -U huggingface_hub | |
| hf download SharpMeow/vesuvius-snapped-labels index.json --repo-type dataset --local-dir vesuvius-snapped-labels</code></pre></div></details> | |
| <details><summary>curl<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>curl -L -O https://huggingface.co/datasets/SharpMeow/vesuvius-snapped-labels/resolve/main/index.json</code></pre></div></details> | |
| </div> | |
| <div class="scc-src" id="connect-mesh"><h3>One snapped mesh (tifxyz): PHerc0841 w00</h3> | |
| <p class="scc-meta">CC BY-NC 4.0 (derived from Vesuvius Challenge open data) 路 Same grid and voxel frame as the published mesh it came from (release.json names it), so the two line up vertex for vertex; -1 where there is no vertex or it was held back.</p> | |
| <div class="scc-url"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://huggingface.co/datasets/SharpMeow/vesuvius-snapped-labels/resolve/main/PHerc0841/20260220213127-w00/snapped.tifxyz</code></pre></div> | |
| <details><summary>Python (numpy, tifffile)<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install numpy tifffile | |
| import io, json, urllib.request | |
| import numpy as np, tifffile | |
| T = "https://huggingface.co/datasets/SharpMeow/vesuvius-snapped-labels/resolve/main/PHerc0841/20260220213127-w00/snapped.tifxyz" | |
| meta = json.load(urllib.request.urlopen(T + "/meta.json")) # scale, bbox, format | |
| get = lambda c: tifffile.imread(io.BytesIO(urllib.request.urlopen(f"{T}/{c}.tif").read())) | |
| xyz = np.stack([get(c) for c in "xyz"], -1) # xyz[i, j] = (x, y, z) in scan voxels; -1 = no surface</code></pre></div></details> | |
| </div> | |
| <div class="scc-src" id="connect-ct"><h3>The CT that mesh is in, PHerc0841 9.366 um</h3> | |
| <p class="scc-meta">CC BY-NC 4.0 (Vesuvius Challenge open data) 路 Read live from the open-data bucket, never copied here. Mesh coordinates are level-0 voxels of this scan. 路 <a href="https://scrollprize.org/data_browser/PHerc0841" target="_blank" rel="noopener">browse</a></p> | |
| <div class="scc-url"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0841/volumes/20250821151531-9.366um-1.2m-113keV-masked.zarr</code></pre></div> | |
| <details><summary>Python (zarr)<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install "zarr>=3" fsspec aiohttp | |
| import zarr | |
| root = zarr.open_group("https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0841/volumes/20250821151531-9.366um-1.2m-113keV-masked.zarr", mode="r") # OME-Zarr, zarr v2 | |
| a = root["2"] # level 0 is full resolution; level L is 2**L times coarser | |
| print(a.shape, a.dtype, a.chunks) | |
| block = a[3600:3664, 600:664, 500:564] # (z, y, x); reads only the chunks it touches</code></pre></div></details> | |
| <details><summary>villa's vesuvius package<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code># pip install "vesuvius[volume-only]" | |
| from vesuvius import Volume | |
| v = Volume(type="zarr", path="https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0841/volumes/20250821151531-9.366um-1.2m-113keV-masked.zarr/2") # one pyramid level | |
| block = v[3600:3664, 600:664, 500:564]</code></pre></div></details> | |
| <details><summary>VC3D<span class="scc-b src">from villa's source</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>In VC3D (villa's volume-cartographer), open or create a project, then | |
| File > Attach Remote Zarr... and paste: | |
| https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0841/volumes/20250821151531-9.366um-1.2m-113keV-masked.zarr | |
| It accepts http, https and s3 OME-Zarr roots.</code></pre></div></details> | |
| <details><summary>neuroglancer<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <a class="scc-go" href="https://neuroglancer-demo.appspot.com/#!%7B%22layers%22%3A%5B%7B%22type%22%3A%22image%22%2C%22source%22%3A%22zarr%3A%2F%2Fhttps%3A%2F%2Fvesuvius-challenge-open-data.s3.us-east-1.amazonaws.com%2FPHerc0841%2Fvolumes%2F20250821151531-9.366um-1.2m-113keV-masked.zarr%2F%22%2C%22name%22%3A%22The%20CT%20that%20mesh%20is%20in%2C%20PHerc0841%209.366%20um%22%7D%5D%2C%22layout%22%3A%224panel%22%7D" target="_blank" rel="noopener">Open in neuroglancer</a> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://neuroglancer-demo.appspot.com/#!%7B%22layers%22%3A%5B%7B%22type%22%3A%22image%22%2C%22source%22%3A%22zarr%3A%2F%2Fhttps%3A%2F%2Fvesuvius-challenge-open-data.s3.us-east-1.amazonaws.com%2FPHerc0841%2Fvolumes%2F20250821151531-9.366um-1.2m-113keV-masked.zarr%2F%22%2C%22name%22%3A%22The%20CT%20that%20mesh%20is%20in%2C%20PHerc0841%209.366%20um%22%7D%5D%2C%22layout%22%3A%224panel%22%7D</code></pre></div></details> | |
| <details><summary>curl<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>curl -s https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0841/volumes/20250821151531-9.366um-1.2m-113keV-masked.zarr/.zattrs # OME multiscales metadata | |
| curl -s https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0841/volumes/20250821151531-9.366um-1.2m-113keV-masked.zarr/2/.zarray # one level: shape, chunks, dtype, codec</code></pre></div></details> | |
| </div> | |
| <div class="scc-src" id="connect-page"><h3>This page's own files</h3> | |
| <p class="scc-meta">Page code Apache 2.0; data as above 路 In the browser console, window.snappedLabels.segments() lists the index and window.snappedLabels.open(SEGMENT, Z) opens a segment at a plane; ?seg=SEGMENT&z=Z links to a view.</p> | |
| <div class="scc-url"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>https://sharpmeow-snapped-labels.static.hf.space/</code></pre></div> | |
| <details><summary>Links and embed<span class="scc-b ok">tested 2026-10-24</span></summary> | |
| <div class="scc-code"><button type="button" class="scc-copy" data-testid="connect-copy" onclick="navigator.clipboard&&navigator.clipboard.writeText(this.parentNode.querySelector('code').innerText).then(()=>{this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1200)})">Copy</button><pre><code>The dataset card: https://huggingface.co/datasets/SharpMeow/vesuvius-snapped-labels | |
| A segment's cross sections for the viewer (float32 rows, see the .json beside it): https://huggingface.co/datasets/SharpMeow/vesuvius-snapped-labels/resolve/main/viewer/PHerc0841/20260220213127-w00.json | |
| Page source: https://github.com/ChaseHendrick/Scrolls/tree/main/spaces/snapped-labels</code></pre></div></details> | |
| </div> | |
| <footer>Machine-readable: <a href="https://huggingface.co/spaces/SharpMeow/snapped-labels/blob/main/connect.json" target="_blank" rel="noopener">connect.json</a> and <a href="https://huggingface.co/spaces/SharpMeow/snapped-labels/blob/main/CONNECT.md" target="_blank" rel="noopener">CONNECT.md</a>. Checked 2026-10-27. "Tested" means the snippet ran against this public data on that date. Scan data keeps its own license (the Vesuvius Challenge open data is CC BY-NC 4.0).</footer></section> | |