Download examples/visualizer_code/source/demo/scale4d_view_count/template.html from facebook/SCALE4D: direct link, hf CLI and curl.
- Browser
- Download file 15 kB
-
https://huggingface.co/facebook/SCALE4D/resolve/main/examples/visualizer_code/source/demo/scale4d_view_count/template.html
- Command line
-
hf download hf://facebook/SCALE4D/examples/visualizer_code/source/demo/scale4d_view_count/template.html
-
curl -L -o template.html https://huggingface.co/facebook/SCALE4D/resolve/main/examples/visualizer_code/source/demo/scale4d_view_count/template.html
15 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="color-scheme" content="dark"> | |
| <title>SCALE4D · matched prediction overlays</title> | |
| <link rel="icon" href="data:,"> | |
| <style>/* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. */ | |
| :root { | |
| color-scheme: dark; | |
| --bg: #0f1115; | |
| --bar: #1c1e21; | |
| --control: #2b2e33; | |
| --panel: #050608; | |
| --line: #35383d; | |
| --text: #e8e8ea; | |
| --muted: #a5a7ac; | |
| --danger: #ff8f88; | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; | |
| } | |
| * { box-sizing: border-box; } | |
| html { min-width: 320px; background: var(--bg); } | |
| body { | |
| min-height: 100vh; | |
| margin: 0; | |
| color: var(--text); | |
| background: var(--bg); | |
| } | |
| button, select, input { font: inherit; } | |
| button, select { | |
| height: 28px; | |
| min-width: 0; | |
| padding: 2px 7px; | |
| border: 1px solid #4a4d53; | |
| color: var(--text); | |
| background: var(--control); | |
| } | |
| button { cursor: pointer; } | |
| button:hover:not(:disabled) { border-color: #777b82; background: #35383a; } | |
| button:disabled, select:disabled, input:disabled { cursor: not-allowed; opacity: .55; } | |
| button:focus-visible, select:focus-visible, input:focus-visible, canvas:focus-visible { | |
| outline: 1px solid #ddd; | |
| outline-offset: 1px; | |
| } | |
| .topbar { | |
| position: sticky; | |
| z-index: 20; | |
| top: 0; | |
| display: flex; | |
| align-items: center; | |
| gap: 9px; | |
| min-height: 42px; | |
| padding: 6px 9px; | |
| border-bottom: 1px solid #000; | |
| background: var(--bar); | |
| } | |
| h1 { | |
| flex: none; | |
| margin: 0; | |
| font-size: 14px; | |
| line-height: 28px; | |
| font-weight: 700; | |
| white-space: nowrap; | |
| } | |
| .identity { display: none; } | |
| .controls { | |
| display: flex; | |
| flex: 1; | |
| align-items: center; | |
| gap: 7px; | |
| min-width: 0; | |
| } | |
| .field, .timeline-field { | |
| display: flex; | |
| align-items: center; | |
| gap: 4px; | |
| min-width: 0; | |
| } | |
| .field > span, .timeline-field > label { | |
| color: var(--muted); | |
| font-size: 11px; | |
| line-height: 1; | |
| white-space: nowrap; | |
| } | |
| .scene-field { flex: 0 1 205px; } | |
| .scene-field select { width: 100%; } | |
| .chunk-field { flex: 0 1 205px; } | |
| .chunk-field select { width: 100%; } | |
| .primary { | |
| display: inline-flex; | |
| flex: none; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 4px; | |
| font-weight: 600; | |
| } | |
| #play-icon { display: none; } | |
| .timeline-field { flex: 1 1 180px; } | |
| .timeline-field input { | |
| flex: 1; | |
| min-width: 70px; | |
| margin: 0; | |
| accent-color: #c7c9cd; | |
| cursor: ew-resize; | |
| } | |
| .timeline-field output { | |
| flex: none; | |
| min-width: 68px; | |
| color: var(--text); | |
| font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; | |
| text-align: right; | |
| white-space: nowrap; | |
| } | |
| #reset-camera { flex: none; } | |
| main { padding: 3px; } | |
| .loading { | |
| max-width: 620px; | |
| margin: 8px auto; | |
| padding: 6px 8px; | |
| border: 1px solid var(--line); | |
| color: var(--muted); | |
| background: var(--bar); | |
| font-size: 12px; | |
| } | |
| .loading.done { display: none; } | |
| .loading-copy { display: flex; align-items: baseline; gap: 6px; } | |
| .loading-copy strong { color: var(--text); font-weight: 600; } | |
| .loading-copy span:not(.spinner) { margin-left: 4px; } | |
| .spinner { display: none; } | |
| .loading-track { height: 2px; margin-top: 5px; background: #303238; } | |
| .loading-track span { display: block; width: 4%; height: 100%; background: #aaa; } | |
| .viewer-grid { | |
| display: grid; | |
| grid-template-columns: repeat(2, minmax(0, 1fr)); | |
| gap: 3px; | |
| align-items: start; | |
| background: #000; | |
| } | |
| .panel { | |
| display: grid; | |
| grid-template-rows: 27px auto 23px; | |
| min-width: 0; | |
| overflow: hidden; | |
| border: 1px solid #292b2f; | |
| background: var(--panel); | |
| } | |
| .panel-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: 8px; | |
| min-width: 0; | |
| height: 27px; | |
| padding: 3px 7px; | |
| border-bottom: 1px solid #292b2f; | |
| background: var(--bar); | |
| } | |
| .panel-header h2 { | |
| min-width: 0; | |
| margin: 0; | |
| overflow: hidden; | |
| font-size: 13px; | |
| line-height: 20px; | |
| font-weight: 700; | |
| text-overflow: ellipsis; | |
| text-transform: none; | |
| white-space: nowrap; | |
| } | |
| .panel-status { | |
| overflow: hidden; | |
| color: var(--muted); | |
| font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| } | |
| .media-stage, .point-panel canvas { | |
| display: block; | |
| width: 100%; | |
| aspect-ratio: 16 / 10; | |
| min-height: 0; | |
| background: #000; | |
| } | |
| .media-stage { position: relative; overflow: hidden; } | |
| .media-stage video { display: block; width: 100%; height: 100%; object-fit: contain; } | |
| .point-panel canvas { cursor: grab; touch-action: none; } | |
| .point-panel canvas:active { cursor: grabbing; } | |
| .panel > footer { | |
| height: 23px; | |
| min-width: 0; | |
| overflow: hidden; | |
| padding: 4px 7px; | |
| border-top: 1px solid #292b2f; | |
| color: var(--muted); | |
| font: 10px/14px ui-monospace, SFMono-Regular, Menlo, monospace; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| } | |
| .frame-chip strong { color: var(--text); font-weight: 600; } | |
| .provenance { | |
| margin-top: 3px; | |
| border-top: 1px solid var(--line); | |
| color: var(--muted); | |
| font-size: 11px; | |
| } | |
| .provenance > details > summary { padding: 6px 4px; color: var(--text); } | |
| .test-status { color: var(--muted); } | |
| .test-status.passed { color: #b8d8c1; } | |
| .test-status.failed, .provenance-summary .missing dd { color: var(--danger); } | |
| .provenance-summary { margin: 3px 4px 8px; } | |
| .provenance-summary > div { | |
| display: grid; | |
| grid-template-columns: 130px minmax(0, 1fr); | |
| gap: 6px; | |
| padding: 2px 0; | |
| } | |
| .provenance-summary dt { color: var(--muted); } | |
| .provenance-summary dd { | |
| margin: 0; | |
| overflow-wrap: anywhere; | |
| color: var(--text); | |
| font-family: ui-monospace, SFMono-Regular, Menlo, monospace; | |
| } | |
| .details-grid { margin: 0 4px 6px; border-top: 1px solid var(--line); } | |
| .details-grid details { border-bottom: 1px solid var(--line); } | |
| summary { cursor: pointer; } | |
| .details-grid summary { padding: 5px 0; color: var(--text); } | |
| pre { | |
| max-height: 420px; | |
| margin: 0; | |
| overflow: auto; | |
| padding: 5px 0 8px; | |
| color: #c5c7cb; | |
| font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; | |
| white-space: pre-wrap; | |
| overflow-wrap: anywhere; | |
| tab-size: 2; | |
| } | |
| .error-overlay { | |
| position: fixed; | |
| z-index: 100; | |
| inset: 0; | |
| place-items: center; | |
| padding: 16px; | |
| background: rgb(0 0 0 / 88%); | |
| } | |
| .error-overlay:not([hidden]) { display: grid; } | |
| .error-card { | |
| display: grid; | |
| grid-template-columns: auto minmax(0, 1fr); | |
| gap: 10px; | |
| width: min(620px, 100%); | |
| padding: 12px; | |
| border: 1px solid #85423e; | |
| background: #191214; | |
| } | |
| .error-card h2 { margin: 0; color: #f2d2cf; font-size: 15px; } | |
| .error-card p { margin: 5px 0; color: #d4b2af; font-size: 12px; } | |
| .error-card pre { max-height: 42vh; margin: 6px 0; padding: 5px; border: 1px solid #643633; color: #ffc8c1; background: #100a0b; } | |
| .error-mark { color: var(--danger); font-size: 18px; font-weight: 700; } | |
| @media (max-width: 900px) { | |
| .topbar { align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; } | |
| h1 { width: 100%; line-height: 18px; } | |
| .controls { width: 100%; flex-wrap: wrap; } | |
| .scene-field, .chunk-field { flex-basis: 180px; } | |
| .viewer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } | |
| } | |
| @media (max-width: 560px) { | |
| .topbar { position: static; padding: 5px; } | |
| .controls { gap: 4px; } | |
| .scene-field, .chunk-field { flex: 1 1 145px; } | |
| .timeline-field { order: 10; flex-basis: 100%; } | |
| .viewer-grid { grid-template-columns: minmax(0, 1fr); } | |
| .media-stage, .point-panel canvas { aspect-ratio: 16 / 10; } | |
| .provenance-summary > div { grid-template-columns: 1fr; gap: 0; } | |
| } | |
| @media (prefers-reduced-motion: reduce) { | |
| *, *::before, *::after { scroll-behavior: auto ; } | |
| } | |
| .comparison-title{margin:0;padding:6px 7px;background:var(--bar);font-size:13px;line-height:20px;font-weight:700}.comparison-set+.comparison-set{margin-top:3px}.media-stage canvas{display:block;width:100%;height:100%}.gt-toggle{display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:11px}.topbar{flex-wrap:wrap;align-items:flex-start}.controls{flex:1 1 100%;flex-wrap:wrap;gap:8px} | |
| .field select{min-width:90px}.scene-field{flex:0 1 245px}.scene-field select{min-width:190px} | |
| #dataset-select{min-width:100px}#display-camera{min-width:135px}.timeline-field{min-width:220px} | |
| .field>span,.timeline-field>label{font-size:12px} | |
| .field[hidden]{display:none} | |
| </style> | |
| </head> | |
| <body> | |
| <header class="topbar"> | |
| <h1>SCALE4D · prediction overlays</h1> | |
| <section class="controls" aria-label="Master timeline controls"> | |
| <label class="field"><span>dataset</span><select id="dataset-select"><option value="pstudio">PStudio</option><option value="show3d">Show3D</option></select></label><label class="field scene-field"> | |
| <span>example</span> | |
| <select id="scene-select" aria-label="Example"></select> | |
| </label> | |
| <label class="field" hidden><span>primary weights</span><select id="primary-model"></select></label><label class="field" hidden><span>teacher input · both layers</span><select id="paired-camera"><option value="off">3 views · camera OFF</option><option value="on">3 views · camera ON</option></select></label><label class="field"><span>primary</span><select id="primary-view"><option value="1">1 views</option><option value="2">2 views</option><option value="3">3 views</option><option value="4">4 views</option><option value="5">5 views</option><option value="6">6 views</option><option value="7">7 views</option><option value="8">8 views</option><option value="9">9 views</option><option value="10" selected>10 views</option></select></label><label class="field"><span>primary conditioning</span><select id="primary-camera"><option value="on" selected>ON</option><option value="off">OFF</option></select></label><label class="field" hidden><span>compare weights</span><select id="comparison-model"></select></label><label class="field"><span>compare</span><select id="comparison-view"><option value="0">None</option><option value="1" selected>1 views</option><option value="2">2 views</option><option value="3">3 views</option><option value="4">4 views</option><option value="5">5 views</option><option value="6">6 views</option><option value="7">7 views</option><option value="8">8 views</option><option value="9">9 views</option><option value="10">10 views</option></select></label><label class="field"><span>compare conditioning</span><select id="comparison-camera"><option value="on" selected>ON</option><option value="off">OFF</option></select></label><label class="field"><span>RGB camera</span><select id="display-camera"></select></label><label class="field"><span>trail</span><select id="history-select"><option value="0">None</option><option value="4" selected>4 frames</option><option value="8">8 frames</option></select></label><label class="gt-toggle"><input id="rgb-colors" type="checkbox">RGB colour</label><label class="gt-toggle"><input id="dense-context" type="checkbox" checked>Context</label><button id="play-button" class="primary" type="button" disabled aria-label="Play"> | |
| <span id="play-icon" aria-hidden="true">▶</span> | |
| <span id="play-label">Play</span> | |
| </button> | |
| <label class="field chunk-field"> | |
| <span>chunk</span> | |
| <select id="chunk-select" aria-label="Owned-window chunk" disabled></select> | |
| </label> | |
| <div class="timeline-field"> | |
| <label for="timeline">frame</label> | |
| <input id="timeline" type="range" min="0" max="0" value="0" step="1" disabled> | |
| <output id="frame-output" for="timeline">0 / 0</output> | |
| </div> | |
| <label class="gt-toggle"><input id="show-gt" type="checkbox" checked> Green GT</label><label class="gt-toggle" title="Show queries with visible ground truth at the displayed frame"><input id="gt-visible-only" type="checkbox">GT-visible queries</label><label class="field"><span>query density</span><select id="query-density"><option value="0">All queries</option><option value="256">256 fixed queries</option><option value="128">128 fixed queries</option><option value="64">64 fixed queries</option></select></label><button id="reset-camera" type="button" title="Reset orbit camera" disabled>Reset</button> | |
| </section> | |
| <div id="identity" class="identity" aria-live="polite"></div> | |
| </header> | |
| <div id="selected-example" class="comparison-title"></div> | |
| <main> | |
| <div id="loading" class="loading" role="status" aria-live="polite"> | |
| <div class="loading-copy"> | |
| <span class="spinner" aria-hidden="true"></span> | |
| <div> | |
| <strong id="loading-title">Loading scenes.json</strong> | |
| <span id="loading-detail">Checking exact wire metadata…</span> | |
| </div> | |
| </div> | |
| <div class="loading-track" aria-hidden="true"><span id="loading-progress"></span></div> | |
| </div> | |
| <section class="comparison-set"><section id="viewer-grid" class="viewer-grid"> | |
| <article class="panel input-panel"><header class="panel-header"><h2>Projected query tracks</h2><span id="input-status" class="panel-status"></span></header><div class="media-stage"><video id="source-video" style="display:none" muted playsinline preload="auto"></video><canvas id="single-input" aria-label="Calibrated RGB-camera overlay"></canvas></div><footer>Frame <strong id="video-frame">0</strong> · cyan primary · orange comparison · green GT</footer></article> | |
| <article data-model="overlay" class="panel point-panel" data-mode="raw"><header class="panel-header"><h2 id="model-title">SCALE4D overlays</h2><span class="panel-status" data-role="status"></span></header><canvas tabindex="0" aria-label="SCALE4D 3D view-count overlays"></canvas><footer data-role="scale"></footer></article> | |
| </section></section> | |
| <section class="provenance" aria-labelledby="provenance-title"> | |
| <details> | |
| <summary><span id="provenance-title">Provenance</span> · <span id="self-test-status" class="test-status">wire self-test pending</span></summary> | |
| <dl id="provenance-summary" class="provenance-summary"></dl> | |
| <div class="details-grid"> | |
| <details> | |
| <summary>Full-clip scores by input count</summary> | |
| <pre id="window-details"></pre> | |
| </details> | |
| <details> | |
| <summary>Mean errors and scores</summary> | |
| <pre id="report-details"></pre> | |
| </details> | |
| <details> | |
| <summary>Inference protocol</summary> | |
| <pre id="provenance-details"></pre> | |
| </details> | |
| </div> | |
| </details> | |
| </section> | |
| </main> | |
| <div id="error-overlay" class="error-overlay" hidden role="alertdialog" aria-modal="true" aria-labelledby="error-title"> | |
| <div class="error-card"> | |
| <span class="error-mark" aria-hidden="true">!</span> | |
| <div> | |
| <h2 id="error-title">Viewer failed closed</h2> | |
| <p>The sample could not be loaded. Details are below.</p> | |
| <pre id="error-message"></pre> | |
| <button id="retry-button" type="button">Retry</button> | |
| </div> | |
| </div> | |
| </div> | |
| {{INLINE_ASSETS}} | |
| <script></script> | |
| </body> | |
| </html> | |