Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
208 lines (195 loc) · 16.4 KB
/
Copy pathindex.html
File metadata and controls
208 lines (195 loc) · 16.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>OTSR</title>
<meta name="description" content="Resolution-independent image upscaling with Gaussians placed by optimal transport, fitted and rendered in your browser on WebGPU.">
<meta name="color-scheme" content="light dark">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M0 0h26l6 6v26H6l-6-6z' fill='%23111312'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23b8793c' stroke-width='2.5'/%3E%3Ccircle cx='16' cy='16' r='2.5' fill='%23b8793c'/%3E%3C/svg%3E">
</head>
<body data-mode="simple" class="empty">
<div id="stage">
<div class="bg" aria-hidden="true">
<i class="grid"></i><i class="ring r1"></i><i class="ring r2"></i>
<svg class="geo" viewBox="0 0 1600 1000" preserveAspectRatio="xMidYMid slice" fill="none" stroke="currentColor" stroke-width="1">
<g class="dial"><circle cx="180" cy="820" r="300" stroke-dasharray="2 12" opacity="0.55"/><circle cx="180" cy="820" r="240" stroke-width="16" stroke-dasharray="1 29" opacity="0.3"/></g>
<circle cx="180" cy="820" r="200" opacity="0.3"/>
<path d="M180 520 a300 300 0 0 1 212 88" stroke-width="3" class="copper" opacity="0.5"/>
<path d="M180 600 v24 M400 820 h-24 M180 1040 v-24" opacity="0.5"/>
<g class="reticle"><circle cx="150" cy="300" r="54" stroke-dasharray="30 10" opacity="0.5"/></g>
<circle cx="150" cy="300" r="28" opacity="0.35"/>
<path d="M150 226 v22 M150 352 v22 M76 300 h22 M202 300 h22" opacity="0.5"/>
<path d="M60 210 h20 M60 210 v20 M240 210 h-20 M240 210 v20 M60 390 h20 M60 390 v-20 M240 390 h-20 M240 390 v-20" stroke-width="2" class="copper" opacity="0.45"/>
<g class="orbit"><circle cx="1460" cy="640" r="150" stroke-dasharray="50 16" opacity="0.4"/></g>
<circle cx="1460" cy="640" r="110" opacity="0.3"/>
<circle cx="1460" cy="640" r="6" class="copper" opacity="0.5"/>
<path d="M1460 470 v24 M1460 786 v24 M1290 640 h24 M1606 640 h24" opacity="0.45"/>
<path d="M-80 60 a520 520 0 0 1 560 420" stroke-dasharray="4 10" opacity="0.35"/>
<circle cx="1300" cy="930" r="70" stroke-dasharray="2 8" opacity="0.45"/>
<path d="M1210 840 h24 M1210 840 v24 M1390 840 h-24 M1390 840 v24 M1210 1020 h24 M1210 1020 v-24 M1390 1020 h-24 M1390 1020 v-24" stroke-width="2" class="copper" opacity="0.4"/>
<circle cx="820" cy="-120" r="260" stroke-dasharray="3 9" opacity="0.4"/>
</svg>
<canvas id="stars"></canvas>
</div>
<canvas id="view"></canvas>
<canvas id="overlay" aria-hidden="true"></canvas>
<div class="vignette" aria-hidden="true"></div>
</div>
<div id="frame" class="frame" hidden><i></i><i></i><i></i><i></i><span class="tag" id="frame-tag">SAMPLE // 01</span><span class="scan"></span></div>
<header class="float brand" id="brand" title="Back to the start screen (Home) · 回到主頁" aria-label="OTSR">
<div class="row1"><h1>OTSR</h1><span class="badge">V0.1.4</span><a class="chip" id="report-chip" href="report.html" target="_blank" rel="noopener" title="Technical report · 技術報告">Report<small>技術報告</small><span class="arrow">↗</span></a></div>
<div class="row2"><span class="barcode" aria-hidden="true"></span><span class="micro">Optimal-transport Gaussian super-resolution</span></div>
</header>
<div id="command" class="float command">
<div id="cmd-idle">
<div class="runsplit">
<button id="cmd-fit" class="btn copper big" title="Fit the Gaussians to the image (F)"><span id="cmd-fit-label" class="bi"><b>Enhance</b><small>增強</small></span><span class="arrow">▶</span></button>
<button id="cmd-tier" class="btn copper menu" title="Tier · 檔位" aria-haspopup="true" aria-expanded="false"><span class="bi"><b id="cmd-tier-en">Fast</b><small id="cmd-tier-zh">快速</small></span><span class="arrow">▾</span></button>
</div>
<div id="tier-menu" class="tiermenu" hidden></div>
<div class="micro" id="cmd-sub"></div>
<div id="cmd-info" class="cmdinfo" aria-live="polite">
<div class="readout src"><div class="k" id="ci-size">Source</div><div class="v" id="ci-name">—</div></div>
<div class="readout"><div class="k">Gaussians</div><div class="v" id="ci-count">—</div></div>
<div class="readout"><div class="k">GPU mem</div><div class="v" id="ci-mem">—</div></div>
<div class="readout state"><div class="k" id="ci-state-k">State</div><div class="v" id="ci-state">—</div></div>
</div>
</div>
<div id="cmd-live" class="live" hidden>
<div class="head"><span class="micro"><span class="sq blink"></span> <span id="live-title">Fitting</span></span><span class="micro" id="live-step"></span></div>
<div class="nums" id="live-nums"><b id="live-psnr">—</b><span>dB PSNR</span><em id="live-rate"></em><em id="live-left"></em></div>
<svg id="live-curve" class="spark" viewBox="0 0 240 36" preserveAspectRatio="none" aria-hidden="true"><polyline points=""/></svg>
<div class="progress" id="live-progress"></div>
<div class="foot"><span class="micro" id="live-text"></span><button id="cmd-stop" class="textbtn" title="Stop (Esc)"><span class="bi"><b>Stop</b><small>停止</small></span><span class="arrow">×</span></button></div>
</div>
</div>
<nav class="float sysnav" aria-label="System">
<button id="nav-open" class="navbtn" title="Open an image (O)"><span class="glyph" aria-hidden="true">+</span><span class="key">O</span><span class="bi"><b>Open</b><small>開啟</small></span></button>
<button id="theme-btn" class="themebtn" title="Switch between the light and the dark theme" aria-pressed="false"><span class="ico" id="theme-ico">☾</span><span class="two"><b id="theme-en">Dark mode</b><small id="theme-zh">深色模式</small></span></button>
<button id="settings-btn" class="navbtn" title="Settings"><span class="glyph" aria-hidden="true">⚙</span><span class="bi"><b>Settings</b><small>設定</small></span><span class="key">⚙</span></button>
<button id="help-btn" class="navbtn" title="Keyboard shortcuts (?)"><span class="key">?</span><span class="bi"><b>Keys</b><small>快捷鍵</small></span></button>
</nav>
<section id="empty" class="float instrument" aria-label="Open an image">
<svg viewBox="0 0 560 560" fill="none" stroke="currentColor" aria-hidden="true">
<g class="ring-spin" stroke-width="1" opacity="0.9">
<circle cx="280" cy="280" r="250" stroke-dasharray="3 9"/>
<path d="M280 30 v14 M530 280 h-14 M280 530 v-14 M30 280 h14" stroke-width="2"/>
<path d="M280 30 a250 250 0 0 1 176.8 73.2" stroke-width="3" stroke-opacity="0.85"/>
</g>
<g class="ring-spin-r" stroke-width="1">
<circle cx="280" cy="280" r="206" stroke-opacity="0.45"/>
<path d="M74 280 a206 206 0 0 0 60.3 145.7" stroke-width="5" stroke-opacity="0.55"/>
<path d="M280 74 l0 10 M486 280 l-10 0 M280 486 l0 -10" stroke-width="1.5"/>
</g>
<circle cx="280" cy="280" r="160" stroke-width="1" stroke-opacity="0.35"/>
<circle cx="280" cy="280" r="116" stroke-width="1.5" stroke-dasharray="40 14" stroke-opacity="0.6"/>
<path d="M280 150 v30 M280 380 v30 M150 280 h30 M380 280 h30" stroke-width="1" stroke-opacity="0.6"/>
<path d="M110 110 h22 M110 110 v22 M450 110 h-22 M450 110 v22 M110 450 h22 M110 450 v-22 M450 450 h-22 M450 450 v-22" stroke-width="2"/>
</svg>
<div class="center">
<div class="micro detecting" id="empty-micro"><i class="sq blink"></i> Input detecting<span class="dots" aria-hidden="true"></span></div>
<h2 id="empty-title">Drop image</h2>
<div class="zh" id="empty-zh">拖入 · 貼上 · 選擇</div>
<div class="homeacts">
<div class="open pair"><button id="empty-sample" class="btn pale" hidden><span class="bi"><b>Load sample</b><small>載入樣本</small></span><span class="arrow">↓</span></button><button id="empty-open" class="btn copper"><span class="bi"><b>Open image</b><small>開啟圖片</small></span><span class="arrow">→</span></button></div>
<div id="empty-samples" class="samplesel" hidden></div>
<a class="report" id="empty-report" href="report.html" target="_blank" rel="noopener"><span class="bi"><b>Technical report</b><small>技術報告 · 原理與過程</small></span><span class="arrow">↗</span></a>
<a class="report repo" id="empty-repo" href="https://github.com/Aztech-Lab/OTSR" target="_blank" rel="noopener"><span class="bi"><b>Source on GitHub</b><small>原始碼 · Aztech Labs</small></span><span class="arrow">↗</span></a>
</div>
</div>
<span class="corner-note tl">// Any size<br>// Any aspect ratio</span>
<span class="corner-note tr">On-device<br>Nothing uploaded</span>
<span class="corner-note bl">PNG · JPEG · WEBP<br>AVIF · BMP · GIF</span>
<span class="corner-note br" id="corner-gpu">GPU: —</span>
</section>
<div id="boot" class="float bootlog" aria-hidden="true"></div>
<section id="syscheck" class="float syscheck" aria-label="System check" hidden></section>
<aside id="inspector" class="float console" aria-label="Controls">
<div class="console-head">
<span id="console-title">Control</span>
<span class="hatch"></span>
<div class="headseg" id="mode-head" role="radiogroup" aria-label="Mode · 模式"></div>
<button id="console-toggle" class="sheet-toggle" title="Collapse / expand · 收起 / 展開" aria-label="Collapse or expand the controls"><i>⌄</i></button>
</div>
<div id="panel" class="console-body"></div>
</aside>
<button id="console-bookmark" class="float bookmark left" title="Collapse the console · 收起"><i>‹</i></button>
<button id="left-tab" class="float paneltab left" title="Open the console · 展開控制台"><i>›</i><span>Control</span><small>控制台</small></button>
<aside id="monitor" class="float monitor" aria-label="Monitor">
<div class="console-head"><span>Active regions</span><span class="hatch"></span><span class="zh">活躍區域</span></div>
<div id="monitor-body" class="console-body"></div>
</aside>
<button id="monitor-bookmark" class="float bookmark right" title="Hide the monitor · 收起"><i>›</i></button>
<button id="right-tab" class="float paneltab right" title="Open the monitor · 展開監視器"><i>‹</i><span>Monitor</span><small>監視器</small></button>
<div class="float result-hud" id="readout">
<div class="micro">■ Enhancement complete</div>
<div class="num"><b id="readout-value">—</b><span>dB PSNR</span></div>
<div class="sub" id="readout-sub"></div>
</div>
<div id="toolbar" class="float zoombar">
<button id="tb-zoom-out" class="arrow" title="Zoom out (−)">−</button>
<div id="zoom-ticks" class="ruler" aria-label="Zoom steps"></div>
<button id="tb-zoom-in" class="arrow" title="Zoom in (+)">+</button>
<div class="val"><small>Zoom</small><span id="zoom-readout">100%</span></div>
<div class="tools">
<button id="tb-fit" class="textbtn" title="Fit to view"><span class="key">0</span><span class="bi"><b>Fit</b><small>適應</small></span></button>
<button id="tb-100" class="textbtn" title="Actual pixels"><span class="key">1</span><span class="bi"><b>1:1</b><small>原始像素</small></span></button>
<button id="tb-split" class="textbtn" title="Before / after"><span class="key">C</span><span class="bi"><b>Compare</b><small>對比</small></span></button>
<button id="tb-roi" class="textbtn" title="Region tool" hidden><span class="key">M</span><span class="bi"><b>Region</b><small>區域</small></span></button>
<div class="viewwrap">
<button id="tb-view" class="textbtn" title="View layers (V / T / G / D)"><span class="key">V</span><span class="bi"><b>View</b><small>檢視</small></span><span class="arrow">▴</span></button>
<div id="viewmenu" class="viewmenu" hidden></div>
</div>
</div>
</div>
<footer class="float statusbar">
<span class="state"><i id="status-dot" class="sq ok"></i> <span id="status-state">Idle</span></span>
<span class="fill" id="status"></span>
<span class="notice" id="notice" role="status" aria-live="polite" hidden></span>
<span class="seg-count" id="seg-count" aria-hidden="true"></span>
<span class="cursor" id="cursor">X — Y —</span>
<span class="right"><span id="adapter">GPU —</span> · <span id="clock">--:--:--</span> · <button id="reload-btn" class="textbtn"><span class="bi"><b>Reinit</b><small>重新初始化</small></span><span class="arrow">↗</span></button></span>
</footer>
<div id="drop-hint" class="drop-hint" hidden><div>Release to load · 放開以載入</div></div>
<div id="nogpu" class="nogpu" hidden>
<div class="card">
<h2>WebGPU unavailable</h2>
<p id="nogpu-msg"></p>
<dl id="nogpu-diag" class="diag"></dl>
<p>OTSR needs WebGPU: Chrome 113+, Edge 113+ or Safari 26+ on a machine with a GPU, served over http(s). On computers with two GPUs make sure the browser uses the dedicated one — see <a href="docs/troubleshooting.md">troubleshooting</a>.</p>
<button class="btn solid" onclick="location.reload()"><span class="bi"><b>Reload</b><small>重新載入</small></span><span class="arrow">↻</span></button>
</div>
</div>
<dialog id="settings" class="modal">
<div class="console-head"><span>System // Preferences</span><span class="hatch"></span><button id="settings-close" class="textbtn head"><span class="bi"><b>Close</b><small>關閉</small></span><span class="arrow">×</span></button></div>
<div class="body">
<h2>Settings<small>偏好設定</small></h2>
<div class="setting"><div class="lab">Theme<small>明暗主題</small></div><div class="seg" id="theme-seg"></div></div>
<div class="setting"><div class="lab">Mode<small>簡單模式只保留核心功能;科研模式開放全部參數與分析工具(也可在控制台標題列切換)</small></div><div class="seg" id="mode-seg"></div></div>
<div class="setting"><div class="lab">Fit animation<small>擬合動畫:傳輸網格、矢量視角、掃描線;關閉後直接顯示即時渲染</small></div><label class="switch" style="margin:0"><input type="checkbox" id="anim-toggle"><span class="tg"></span></label></div>
<div class="setting"><div class="lab">Starlight<small>星光:背景中漂浮的主題色光點</small></div><label class="switch" style="margin:0"><input type="checkbox" id="stars-toggle"><span class="tg"></span></label></div>
<div class="setting"><div class="lab">Motion<small>動效:圓環旋轉、背景、掃描線等裝飾動畫</small></div><label class="switch" style="margin:0"><input type="checkbox" id="motion-toggle"><span class="tg"></span></label></div>
<div class="setting"><div class="lab">GPU<small>此頁使用的 WebGPU 介面卡</small></div><div class="val" id="settings-gpu">—</div></div>
<div class="modal-foot"><span>OTSR 0.1.4 · MIT · runs on your GPU</span><span class="links"><a href="report.html" target="_blank" rel="noopener">Technical report · 技術報告 ↗</a><a href="docs/index.md" target="_blank">Documentation · 文件 ↗</a></span></div>
</div>
</dialog>
<dialog id="help" class="modal">
<div class="console-head"><span>System // Keyboard</span><span class="hatch"></span><button id="help-close" class="textbtn head"><span class="bi"><b>Close</b><small>關閉</small></span><span class="arrow">×</span></button></div>
<div class="body">
<h2>Shortcuts<small>快捷鍵</small></h2>
<table><tbody id="help-table"></tbody></table>
<div class="modal-foot"><span>Drag to pan · scroll to zoom · drop or paste anywhere</span><a href="docs/README.md" target="_blank">README ↗</a></div>
</div>
</dialog>
<dialog id="alert" class="modal alert">
<div class="console-head"><span>System // Error</span><span class="hatch"></span><span class="zh">錯誤</span></div>
<div class="body">
<h2>Something went wrong<small>出錯了</small></h2>
<div id="alert-msg" class="alert-msg"></div>
<div class="modal-foot"><span>The status strip keeps the last message</span><button id="alert-close" class="btn solid"><span class="bi"><b>OK</b><small>確定</small></span><span class="arrow">↵</span></button></div>
</div>
</dialog>
<script type="module" src="/src/app/main.ts"></script>
</body>
</html>