Repository navigation
Expand file tree
/
Copy pathreport.html
More file actions
463 lines (413 loc) · 75.2 KB
/
Copy pathreport.html
File metadata and controls
463 lines (413 loc) · 75.2 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OTSR — Technical report</title>
<meta name="description" content="How OTSR turns a picture into an optimal-transport mesh of Gaussians and renders it at any resolution on your own GPU: the method told plainly, nine live demonstrations, the engine, and the research behind it.">
<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">
<script>try{var p=JSON.parse(localStorage.getItem('otsr.prefs.v1'));if(p&&p.theme&&p.theme!=='auto')document.documentElement.setAttribute('data-theme',p.theme)}catch(e){}</script>
</head>
<body>
<header class="top">
<a class="wordmark" href="./" title="Back to the app · 回到應用">OTSR<span class="badge">V0.1.4</span></a>
<span class="title">Technical report<small>技術報告 · 原理、演示、引擎與延伸閱讀</small></span>
<nav class="actions" aria-label="Page">
<button id="theme-btn" class="themebtn" title="Switch between the light and the dark theme"><span class="ico" id="theme-ico">☾</span><span id="theme-label">Dark · 深色</span></button>
<a class="btn copper" href="./"><span class="bi"><b>Open the app</b><small>開啟應用</small></span><span class="arrow">→</span></a>
</nav>
</header>
<div class="page">
<aside class="toc" aria-label="Contents">
<div class="micro">Contents · 目錄</div>
<ol>
<li class="grp">The idea</li>
<li><a href="#abstract"><span class="n">00</span>In short</a></li>
<li><a href="#intro"><span class="n">01</span>The problem: pixels, vectors and the pictures in between</a></li>
<li><a href="#model"><span class="n">02</span>A picture made of Gaussians</a></li>
<li class="grp">Placement</li>
<li><a href="#where"><span class="n">03</span>Where should the Gaussians go?</a></li>
<li><a href="#transport"><span class="n">04</span>Moving a mesh with optimal transport</a></li>
<li><a href="#compute"><span class="n">05</span>Solving it in forty milliseconds</a></li>
<li><a href="#relayout"><span class="n">06</span>A second look: the error-driven re-layout</a></li>
<li class="grp">Fitting</li>
<li><a href="#renderer"><span class="n">07</span>Blending, and why the mesh needs a renderer of its own</a></li>
<li><a href="#fitting"><span class="n">08</span>The fit</a></li>
<li><a href="#sr"><span class="n">09</span>Any size: super-resolution without training</a></li>
<li><a href="#measured"><span class="n">10</span>What the paper measured</a></li>
<li><a href="#editing"><span class="n">11</span>Toward vector graphics: editing through the mesh</a></li>
<li><a href="#limits"><span class="n">12</span>Limits, honestly</a></li>
<li class="grp">Engine</li>
<li><a href="#engine"><span class="n">13</span>The engine, pass by pass</a></li>
<li><a href="#port"><span class="n">14</span>From a research pipeline to a browser tab</a></li>
<li class="grp">Appendix</li>
<li><a href="#refs"><span class="n">15</span>Reading on</a></li>
</ol>
<div class="links">
<a href="docs/method.md">docs/method.md ↗</a>
<a href="docs/engine.md">docs/engine.md ↗</a>
<a href="docs/tutorial-porting.md">docs/tutorial-porting.md ↗</a>
<a href="https://github.com/Aztech-Lab/OTSR">github.com/Aztech-Lab/OTSR ↗</a>
</div>
</aside>
<main class="article">
<p class="kicker">■ Optimal-transport Gaussian super-resolution</p>
<h1>How OTSR works<small>OTSR 的原理、演示與引擎</small></h1>
<p class="lead">OTSR represents a picture as a few hundred thousand stretched Gaussians, placed by optimal transport and refined by gradient descent, and renders that continuous model at any resolution. This page explains the idea the way a magazine would, with nine live demonstrations and a live run of the whole pipeline, all computed in the page, the numbers the research measured, what the app does on your GPU and how the engine does it in seconds — and a reading list for the curious.</p>
<p class="meta">Aztech Labs · OTSR 0.1.4 · November 2026 · the method is from our workshop paper, under review</p>
<div class="numbers">
<div><b>9</b><span>floats per Gaussian</span></div>
<div><b>1 / 10 px</b><span>default budget</span></div>
<div><b>3000</b><span>Adam steps</span></div>
<div><b>≈ 6 s</b><span>2048² on an RTX 4090</span></div>
<div><b>0 B</b><span>uploaded anywhere</span></div>
</div>
<section id="abstract">
<h2><span class="idx">00</span>In short<span class="zh">摘要</span></h2>
<div class="abstract">
<div><div class="micro">English</div>
<p>Most upscalers do one of two things. The classical ones — bicubic, Lanczos — treat a picture as samples of a smooth signal and fill in between them: instant, honest, and blurry. The learned ones have seen millions of images and guess what the missing pixels probably looked like: sharp, sometimes wrong, and heavy. OTSR takes a third road. It turns the picture into a few hundred thousand small, stretched Gaussian blobs — a vector representation — and asks each blob to sit exactly where the picture needs it. A continuous model like that has no resolution of its own: render it at 2×, 4× or 16× and the strokes stay strokes. Two ideas make it work: placement by <strong>optimal transport</strong>, a 240-year-old question about moving earth, answered here on a GPU in forty milliseconds, and a <strong>renderer</strong> that blends the blobs so that they never fight each other. Everything runs in your browser, on your own GPU; nothing leaves your machine.</p></div>
<div><div class="micro">繁體中文</div>
<p class="zh">放大一張圖,通常只有兩條路。古典的插值(bicubic、Lanczos)把圖當成平滑訊號的採樣,在樣本之間補值:即時、誠實、但模糊。學習式的超解析度看過上百萬張圖,猜測缺失的像素原本長什麼樣:銳利、偶爾猜錯、而且很重。OTSR 走第三條路:把圖變成幾十萬個小而拉長的高斯斑點——一種向量表示——並讓每個斑點坐在圖像真正需要它的地方。這樣的連續模型沒有自己的解析度:以 2×、4× 或 16× 渲染,筆畫仍然是筆畫。讓它成立的兩個想法:用<strong>最優傳輸</strong>決定位置(一個關於搬運土方的兩百多年老問題,在 GPU 上四十毫秒內算出答案),以及一個讓斑點彼此不打架的<strong>渲染器</strong>。一切都在瀏覽器裡、在你自己的 GPU 上完成,資料不離開你的機器。</p></div>
</div>
<div class="callout"><div class="micro">How to read this page</div><p>The method comes from our workshop paper (under review); this page tells it the way a magazine would, with the paper's results quoted in prose and its sources in the reading list at the end. Nine live demonstrations (Demo A–I) and the strip under Figure A compute what they show, in the page, on your CPU — press Play, drag the sliders, or drag the mesh of Demo I. A copper <span class="tag app">In the app</span> tag marks what the OTSR app does on your GPU right now; a plain <span class="tag paper">Paper</span> tag marks what the paper shows but the app does not do yet.</p></div>
</section>
<section id="intro">
<h2><span class="idx">01</span>The problem: pixels, vectors and the pictures in between<span class="zh">問題:像素、向量,與夾在中間的圖</span><span class="tag app">In the app</span></h2>
<p>Look closely at an animation frame or an illustration. Most of it is nearly flat colour. The rest is thin, high-contrast line work: an eyelid, a strand of hair, the edge of a sleeve. That mixture is what makes these pictures hard to upscale. Interpolation spreads every edge over the new pixels and the strokes go soft. A neural upscaler sharpens them, but it also invents: texture that was never there, a line that bends the wrong way. Neither treats the picture as what it secretly is — a drawing that was rasterised once.</p>
<p>Gaussian images undo the rasterisation. Following the idea of 3D Gaussian splatting <a class="cite" href="#r1">[1]</a>, a 2-D image can be represented by a fixed budget of Gaussians in continuous coordinates — GaussianImage <a class="cite" href="#r2">[2]</a> and Image-GS <a class="cite" href="#r3">[3]</a> showed that a few hundred thousand of them reproduce a picture at better than 40 dB and render at over a thousand frames per second. Because the Gaussians live in continuous coordinates, a fit to a small image can be rendered on any larger raster. That is the door to super-resolution without training data; how well it works depends on one question that sounds trivial and is not: <em>where should the Gaussians go?</em></p>
<p>Existing methods place them in one of three ways. At random, as GaussianImage does. By sampling an importance map built from the image gradients, as Image-GS does. Or by a trained network that predicts the layout, as Instant-GI <a class="cite" href="#r5">[5]</a> and Fast-2DGS <a class="cite" href="#r8">[8]</a> do — fast, but tied to the training data. Sampling, learned or not, follows the intended density only on average: samples clump in some places and leave holes in others, and the clumps and holes do not go away when you add more samples. A deterministic warp of a grid, the Knothe–Rosenblatt rearrangement, reproduces the density exactly but shears the cells into needles. What we wanted was a layout with the regularity of a grid and the adaptivity of sampling.</p>
<div class="pull">Optimal transport gives exactly that: a uniform mesh carried onto the picture's importance by the map that moves it the least. Every Gaussian gets the same share of the picture, the mesh never folds, and each cell's deformation hands its Gaussian a shape — thin along a stroke, round in a flat region — before any optimisation starts.</div>
<p>The rest of the page follows the pipeline below, stage by stage. In the app every stage runs on the GPU of the machine that opened the page; the timings under the boxes are measured for a 2048 × 2048 image on an RTX 4090 — a discrete laptop GPU takes 5–20× longer, an integrated one a minute or two for a 2-megapixel image, and a recent phone fits the bundled 1024 × 815 sample in a few seconds. The strip under the boxes runs the same six stages right here, on your CPU, on a small copy of that sample.</p>
<figure class="fig demo" data-demo="stages"><div class="demo-stage"><svg viewBox="0 0 760 136" role="img" aria-label="The OTSR pipeline: image, edge density, optimal-transport map, Gaussians, fit, render at any scale" fill="none" stroke="currentColor">
<polygon points="12,28 114,28 124,38 124,86 22,86 12,76" stroke-width="1.2" data-stage="0"/>
<text x="68.0" y="53" text-anchor="middle" class="cap" stroke="none" font-size="12">Image</text>
<text x="68.0" y="72" text-anchor="middle" class="mu" stroke="none">W × H pixels</text>
<line x1="126.0" y1="57.0" x2="129.0" y2="57.0" class="cu" stroke-width="1.4"/><polygon points="135.0,57.0 127.8,60.5 127.8,53.5" class="cuf" stroke="none"/>
<polygon points="137,28 239,28 249,38 249,86 147,86 137,76" stroke-width="1.2" data-stage="1"/>
<text x="193.0" y="53" text-anchor="middle" class="cap" stroke="none" font-size="12">Density</text>
<text x="193.0" y="72" text-anchor="middle" class="mu" stroke="none">|∇Y| + uniform</text>
<line x1="251.0" y1="57.0" x2="254.0" y2="57.0" class="cu" stroke-width="1.4"/><polygon points="260.0,57.0 252.8,60.5 252.8,53.5" class="cuf" stroke="none"/>
<polygon points="262,28 364,28 374,38 374,86 272,86 262,76" stroke-width="1.2" class="soft" data-stage="2"/>
<text x="318.0" y="53" text-anchor="middle" class="cap" stroke="none" font-size="12">OT map</text>
<text x="318.0" y="72" text-anchor="middle" class="mu" stroke="none">Sinkhorn, GPU</text>
<line x1="376.0" y1="57.0" x2="379.0" y2="57.0" class="cu" stroke-width="1.4"/><polygon points="385.0,57.0 377.8,60.5 377.8,53.5" class="cuf" stroke="none"/>
<polygon points="387,28 489,28 499,38 499,86 397,86 387,76" stroke-width="1.2" data-stage="3"/>
<text x="443.0" y="53" text-anchor="middle" class="cap" stroke="none" font-size="12">Gaussians</text>
<text x="443.0" y="72" text-anchor="middle" class="mu" stroke="none">one per cell</text>
<line x1="501.0" y1="57.0" x2="504.0" y2="57.0" class="cu" stroke-width="1.4"/><polygon points="510.0,57.0 502.8,60.5 502.8,53.5" class="cuf" stroke="none"/>
<polygon points="512,28 614,28 624,38 624,86 522,86 512,76" stroke-width="1.2" class="soft" data-stage="4"/>
<text x="568.0" y="53" text-anchor="middle" class="cap" stroke="none" font-size="12">Fit</text>
<text x="568.0" y="72" text-anchor="middle" class="mu" stroke="none">Adam, exact ∇</text>
<line x1="626.0" y1="57.0" x2="629.0" y2="57.0" class="cu" stroke-width="1.4"/><polygon points="635.0,57.0 627.8,60.5 627.8,53.5" class="cuf" stroke="none"/>
<polygon points="637,28 739,28 749,38 749,86 647,86 637,76" stroke-width="1.2" data-stage="5"/>
<text x="693.0" y="53" text-anchor="middle" class="cap" stroke="none" font-size="12">Render S×</text>
<text x="693.0" y="72" text-anchor="middle" class="mu" stroke="none">+ edge pass</text>
<path d="M12 102 v6 H374 v-6" class="faint" stroke-width="1"/><text x="193.0" y="126" text-anchor="middle" class="mu" stroke="none">initialisation ≈ 0.5 s</text>
<path d="M512 102 v6 H624 v-6" class="faint" stroke-width="1"/><text x="568.0" y="126" text-anchor="middle" class="mu" stroke="none">fit ≈ 5 s</text>
<path d="M637 102 v6 H749 v-6" class="faint" stroke-width="1"/><text x="693.0" y="126" text-anchor="middle" class="mu" stroke="none">export 4× ≈ 1.3 s</text>
</svg></div><div class="demo-ctl"></div><figcaption><b>Figure A</b>The pipeline, and under every box its stage run live in the page on a 112-pixel copy of the app's sample picture: the picture; its importance density on the transport grid; the OT mesh unfolding along the map; the Gaussians of the mesh, each in a random colour times its brightness (the vector view); the fit — the blend, the exact gradients and the Adam schedule of §§ 07–08, 400 steps; and a crop rendered at 12× with the edge pass, against its pixels. The first time you see it, the strip shows the computation as it happens, then it replays the stages. The two tinted boxes are where the method is; the timings are those of a 2048 × 2048 image on an RTX 4090 (419 k Gaussians, 3000 steps).</figcaption></figure>
<div class="callout"><div class="micro">What you see while it runs</div><p>The animation during a fit is the process, not an illustration of it. The mesh that settles on the picture is the real mesh after every stage of the transport solver (§ 05); the coloured blobs that then grow are the real Gaussians, drawn by the engine from the parameters the optimiser is changing, each in a random colour times its own brightness; the scan line at the end only hands the true colours back.</p></div>
</section>
<section id="model">
<h2><span class="idx">02</span>A picture made of Gaussians<span class="zh">由高斯構成的圖</span><span class="tag app">In the app</span></h2>
<p>Each Gaussian is nine numbers: a centre, two widths, a rotation, a colour and a weight. In the engine they are stored exactly so:</p>
<div class="tablewrap"><table>
<tr><th>parameter</th><th>size</th><th>meaning</th></tr>
<tr><td><code>uv</code></td><td class="num">2</td><td>the centre in continuous image coordinates, (x, y) ∈ [0, 1]²</td></tr>
<tr><td><code>log_s</code></td><td class="num">2</td><td>log standard deviations along the two principal axes, in units of the long side L = max(W, H)</td></tr>
<tr><td><code>rot</code></td><td class="num">1</td><td>the rotation of the principal axes, in radians</td></tr>
<tr><td><code>color</code></td><td class="num">3</td><td>RGB</td></tr>
<tr><td><code>log_w</code></td><td class="num">1</td><td>log weight</td></tr>
</table></div>
<p>At a point <strong>x</strong> a Gaussian with centre <strong>m</strong> and covariance Σ contributes a bell alpha(x) = exp(−½ (x − m)ᵀ Σ⁻¹ (x − m)), and the picture is the <strong>weight-normalised blend</strong> of all of them — a weighted average of the colours that cover the pixel, in the spirit of EWA splatting <a class="cite" href="#r41">[41]</a>:</p>
<pre>out(x) = Σᵢ wᵢ alphaᵢ(x) cᵢ / ( Σᵢ wᵢ alphaᵢ(x) + ε ), wᵢ = exp(log_wᵢ), ε = 1e-4</pre>
<p>Three things follow, and all three matter for a product.</p>
<ul>
<li><strong>There is no order.</strong> The blend is a sum: no depth, no sorting, no "which Gaussian is in front". Every Gaussian is independent of the others, which is what makes the gradients cheap and the render deterministic.</li>
<li><strong>There is no native resolution.</strong> Everything is in continuous coordinates. The same Gaussians describe the picture at any output size; rendering at a scale S just evaluates the blend on a grid S times finer. Zooming in the app re-renders the model at the exact zoom, every frame.</li>
<li><strong>Edges are as small as the fit allows.</strong> The model is fitted at the native resolution, so a Gaussian never needs to be smaller than about 0.2 px. At 8× such a Gaussian is a soft blob 1.6 output pixels wide — the one thing the plain render cannot avoid, and what § 09 is about.</li>
</ul>
<p>In the engine the support of every Gaussian is cut at its 4σ ellipse with a shift that keeps the function continuous, <code>alpha = max(exp(−q) − exp(−8), 0)</code>, for fitting and display alike. The research rasteriser culls per 16 × 16-pixel tile at a radius that depends on the output raster; for a product whose premise is resolution independence, that is the one thing we changed (§ 14).</p>
<figure class="fig demo" data-demo="anyres"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo A</b>A handful of Gaussians — a ring of ten elongated ones, a stroke, two dots — and the 40 × 26 pixels they were fitted to. Left: the pixels, magnified S times; a pixel image has a native resolution. Right: the same Gaussians evaluated at S×; the model has none. The edge pass is on, as in the app at magnification (§ 09); switch it off to see the plain render.</figcaption></figure>
</section>
<section id="where">
<h2><span class="idx">03</span>Where should the Gaussians go?<span class="zh">高斯該放在哪裡</span><span class="tag paper">Paper</span></h2>
<p>Start with a density ρ that says how densely Gaussians should be placed: a little everywhere, a lot along the strokes. OTSR uses the Image-GS importance density <a class="cite" href="#r3">[3]</a> — the luma gradient magnitude, mixed with a uniform share so that flat regions are never emptied — but any map would do, including a learned one.</p>
<p>Now think of each Gaussian as responsible for the pixels closer to its centre than to any other centre: its Voronoi cell <a class="cite" href="#r38">[38]</a>. A fair layout gives every Gaussian the same share of ρ, one K-th of the total. This is the <em>equidistribution principle</em> of adaptive meshing <a class="cite" href="#r12">[12]</a>: the budget per unit of difficulty is constant, no Gaussian is spent on a region its neighbours already cover, and no region is left to too few.</p>
<div class="pull">Sampling cannot give equal shares, however many samples you draw. The cells of independent samples follow the Poisson–Voronoi law: their sizes scatter with a coefficient of variation of about 0.53 at every budget.</div>
<p>That law <a class="cite" href="#r27">[27]</a> is the catch in the sampling approach. Draw K points independently from ρ and locally they form a Poisson process; the masses of their cells are then approximately Gamma-distributed with shape 3.57, and the spread of that distribution does not shrink as K grows. A fixed fraction of the Gaussians is nearly redundant (2.6 % carry less than a quarter of their share) and a fixed fraction of the picture is under-served (11.9 % of the mass lies in cells carrying more than twice their share). On the paper's 33 anime images, sampling gives a coefficient of variation of 0.60 at 4,096 Gaussians and 0.59 at 16,384, with 16.6 % and 15.7 % of the mass under-served. More Gaussians make the cells smaller, not more even.</p>
<figure class="fig demo" data-demo="shares"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo B</b>Equal shares in one dimension. The curve is a density with three ridges. Copper ticks: the K positions of the transport map, which in one dimension is simply the quantile function — every cell between neighbours carries the same mass (the bars). Grey ticks: K independent samples of the same density, drawn afresh every few seconds; their cells are uneven at every K.</figcaption></figure>
<p>Two dimensions are the same story, computed for real below: a small entropic transport (§ 05) moves a 12 × 8 mesh onto a density with a ridge and a blob, and random samples of the same density sit next to it. Each point's cell is coloured by the share it carries. The transported mesh is not perfect — the paper measures a coefficient of variation of 0.32 and 0.30 on real images, half that of sampling, with 0.7 % and 1.2 % of the mass under-served instead of 16.6 % and 15.7 % — but the difference is visible at a glance.</p>
<figure class="fig demo" data-demo="shares2d"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo C</b>Equal shares in two dimensions, computed in the page. Left: a 12 × 8 mesh carried onto the density (a ridge and a blob) by a real entropic optimal-transport solve. Right: 96 independent samples of the same density, redrawn every few seconds. Cells are nearest-centre regions, coloured by the density mass they carry relative to the fair share: red carries too much (under-served), blue too little (redundant), white is fair.</figcaption></figure>
<p>There is an iterative way to even the shares out: Lloyd's relaxation towards a centroidal Voronoi tessellation <a class="cite" href="#r36">[36]</a>, <a class="cite" href="#r37">[37]</a> moves each point to the centroid of its cell, over and over. Thirty iterations from the samples give cells as even as the mesh's (a coefficient of variation of 0.28) — at 5 to 6 seconds per layout on the CPU against 0.2 seconds for the transport, and with no mesh to speak of: the points sit in compact, round cells with no shared structure. With positions frozen, that layout ends 1.34 and 0.54 dB below the transported mesh at 4,096 and 16,384 Gaussians. Even shares are necessary; they are not all that matters.</p>
</section>
<section id="transport">
<h2><span class="idx">04</span>Moving a mesh with optimal transport<span class="zh">用最優傳輸搬動網格</span><span class="tag app">In the app</span></h2>
<p>In 1781 Gaspard Monge asked how to move a pile of earth into a hole of the same volume with the least total effort <a class="cite" href="#r30">[30]</a>. Kantorovich made the question tractable in 1942 by allowing the earth to be split and merged <a class="cite" href="#r31">[31]</a>; Brenier showed in 1991 that, for the squared-distance cost, the cheapest way to move one density onto another is a single map, and that this map is the gradient of a convex function <a class="cite" href="#r10">[10]</a>. Two textbooks tell the whole story <a class="cite" href="#r32">[32]</a>, <a class="cite" href="#r33">[33]</a>. OTSR uses that map to place Gaussians.</p>
<p>Take a uniform mesh of g<sub>y</sub> × g<sub>x</sub> ≈ K vertices over the picture (the aspect ratio of the mesh follows the picture's). Look for the map T that pushes the uniform density onto ρ and moves the mesh the least, and put Gaussian <em>i</em> at T(ξ<sub>i</sub>). By Brenier's theorem T = ∇ψ for a convex potential ψ, which solves the Monge–Ampère equation det ∇²ψ = 1 / ρ(∇ψ) — the same equation that moving-mesh methods in numerical analysis use to adapt a mesh to a solution with sharp features <a class="cite" href="#r12">[12]</a>, <a class="cite" href="#r13">[13]</a>, <a class="cite" href="#r25">[25]</a>. The layout inherits their properties:</p>
<ol class="steps">
<li><strong>Equal shares.</strong> Every mesh cell has the same area, and T carries it onto a region of ρ-mass exactly 1/K. The Monge–Ampère equation also fixes the size of the cells: a cell's area after the map is inversely proportional to the density it lands in.</li>
<li><strong>No shear, no rotation.</strong> The Jacobian J = ∇²ψ is symmetric and positive definite, so each cell is stretched along two orthogonal axes and never sheared. (The Knothe–Rosenblatt map, by contrast, has a triangular Jacobian and shears the cells into needles — an aspect ratio of 78 at the 95th percentile on the paper's images, against 8.7 for the transport.)</li>
<li><strong>No folding, at every stage.</strong> T is a diffeomorphism: neighbours stay neighbours and no two cells overlap. The same holds on the way there — the straight path (1 − t) ξ + t T(ξ) is the gradient of the convex function (1 − t)|ξ|²/2 + tψ for every t in [0, 1], McCann's displacement interpolation <a class="cite" href="#r26">[26]</a> — so the mesh unfolds onto the picture without two cells ever crossing. That is the animation the app plays, and the demonstration below.</li>
<li><strong>Least motion.</strong> Among all maps that satisfy the first property, T moves the mesh the least.</li>
</ol>
<p>Properties 1 and 4 are the definition and Brenier's theorem; 2 and 3 follow from Caffarelli's regularity theory <a class="cite" href="#r18">[18]</a>. A discretised solver satisfies them approximately: with the paper's float32 solver 0.03 % of the cells fold at 4,096 Gaussians — about one per image — and none at 50,000.</p>
<figure class="fig demo" data-demo="unfold"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo D</b>The mesh unfolding along the map. The map here is the gradient of a convex potential — a uniform mesh pulled onto a ridge and a blob — and the slider moves along the displacement interpolation (1 − t) ξ + t T(ξ). No two cells ever cross. Switch <em>Gaussians from the cells</em> on: each cell becomes an ellipse with the covariance (0.6 h)² J Jᵀ of its own deformation — compressed across the ridge, stretched along it, large in the empty regions.</figcaption></figure>
<h3>Shapes and colours</h3>
<p>Each Gaussian inherits the deformation of its cell: Σ = (σ₀ h)² J Jᵀ with the mesh spacing h and σ₀ = 0.6. Across a stroke the density is high and narrow, so the map compresses cells across it and stretches them along it, and the initial Gaussians are elongated and aligned with the line work before any optimisation. For a linear feature this geometry can be derived exactly <a class="cite" href="#r25">[25]</a>. Because J is symmetric, its eigenvectors give each Gaussian's axes directly; the colour is sampled from the picture at the centre, and every weight starts at one. On a 2048² illustration with 160,000 Gaussians the mesh hugs eyelids and hair strands.</p>
<div class="callout"><div class="micro">In the app</div><p>The app computes exactly this layout for every image you open: the importance density with a uniform share λ that depends on the mesh spacing (0.3 for dense meshes, down to 0.1 for sparse ones), the mesh with g<sub>x</sub> = round(√(K W / H)) columns, the map and its finite-difference Jacobian, the covariance (0.6 h / L)² J Jᵀ with scales clamped to at least 0.35 px, the bilinearly sampled colour, weight one. The budget K is the preset: one Gaussian per 20, 10 or 7 pixels for Fast, Standard and Best.</p></div>
</section>
<section id="compute">
<h2><span class="idx">05</span>Solving it in forty milliseconds<span class="zh">四十毫秒內解出</span><span class="tag app">In the app</span></h2>
<p>The exact transport problem is expensive. The trick that makes it cheap is <em>entropic regularisation</em> <a class="cite" href="#r14">[14]</a>, <a class="cite" href="#r23">[23]</a>: smooth the problem a little, and its solution becomes a scaling of a fixed kernel that two alternating normalisations — Sinkhorn's iterations, known since 1967 <a class="cite" href="#r34">[34]</a> — find in a few hundred passes. Shrinking the smoothing step by step, ε-scaling <a class="cite" href="#r35">[35]</a>, keeps the iterations stable and brings the answer close to the exact map; working in the log domain keeps float32 from overflowing.</p>
<p>OTSR discretises the uniform density and ρ on a coarse grid with n = clip(L/4, 128, 256) cells along the long side — 256 for 1–2K images, where 128 cells would be 8–16 px wide and blur thin strokes. The schedule starts ε at the size of the domain squared and shrinks it by 0.6 per stage, six iterations per stage and thirty at the final ε = (1.5 cells)²: about 150 iterations in all. The quadratic cost on a grid is separable, so every iteration is two one-dimensional log-sum-exp passes <a class="cite" href="#r15">[15]</a> instead of a dense matrix product. The map itself is the barycentric projection T(x) = E[y | x] of the transport plan, interpolated to the mesh vertices together with its finite-difference Jacobian.</p>
<figure class="fig demo" data-demo="sinkhorn"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo E</b>Sinkhorn with ε-scaling on a one-dimensional problem of 48 cells: a uniform density (bottom) transported to a three-peaked one (left). The copper field is the entropic transport plan at the current ε; the line is its barycentric projection T(x) = E[y | x]. As ε shrinks by 0.6 per stage, the plan concentrates on a monotone curve — the map — and the mesh vertices are read off it. These are real log-domain iterations, warm-started from stage to stage, exactly as the engine runs them in two dimensions.</figcaption></figure>
<div class="callout"><div class="micro">In the app</div><p>The solver runs in float32 on the GPU: two tiny kernels, the two one-dimensional log-sum-exps, dispatched a few hundred times inside a single submit — about 40 milliseconds for a 256 × 256 transport grid, independent of the number of Gaussians. The map differs from a float64 solution by up to 1.6 × 10⁻³ box units (0.3 px on a 2K image, with an rms ten times smaller), the same error as the paper's float32 solver, which was measured to change the fitted PSNR by less than 0.05 dB. The fit animation plays the mesh after every stage of this schedule, in the order the solver produced them.</p></div>
<p>The 256-cell cap is set by float32: at 512 cells the solver becomes unreliable, and on 2048² images the 8-px cells are coarser than the finest strokes — which is why, in one of the paper's eleven native-resolution groups, the mesh ends 0.24 dB behind per-pixel sampling. A multiscale or semi-discrete solver <a class="cite" href="#r39">[39]</a>, <a class="cite" href="#r40">[40]</a> would lift the cap; it is on the list.</p>
</section>
<section id="relayout">
<h2><span class="idx">06</span>A second look: the error-driven re-layout<span class="zh">第二次傳輸:誤差驅動的重排</span><span class="tag paper">Paper</span></h2>
<p>The importance density only <em>predicts</em> where the fit will have trouble. After a short fit of 300 steps, the residual — the blurred squared error between the render and the picture — shows where Gaussians are actually missing. The paper updates the density to ρ₂ ∝ ρ · (E / Ē + 0.1)<sup>½</sup>, more where error remains and less where the fit is already good, solves a second transport, re-initialises the Gaussians on the new mesh and fits for the remaining steps. In moving-mesh terms this is one equidistribution step <a class="cite" href="#r12">[12]</a>.</p>
<p>One thing does not work: moving the fitted Gaussians along the composition of the two maps. The global map shifts every cell, and the fitted colours no longer match their new positions. So the attributes restart, and the re-layout costs the 300 steps already spent. It pays them back: at the same number of steps it adds 0.19 to 0.29 dB on anime images, most of it on line art, and it is the most effective single component at dense budgets, where a single mesh falls behind per-pixel sampling and one re-layout puts it ahead again by 0.3 to 1.2 dB.</p>
<figure class="fig demo" data-demo="relayout"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo F</b>The re-layout, sketched. The mesh of the first map settles on the ridge and the blob; a short fit leaves error in a region the gradient density did not flag (the glow); the second transport, to the error-weighted density, moves cells there and thins them where the fit was already good. Drag the slider between the two layouts.</figcaption></figure>
<div class="callout"><div class="micro">Not yet in the app</div><p>The app does one layout and one fit. The re-layout is a candidate for a later version: it costs one more solve — about 40 ms here — and the 300 steps already spent.</p></div>
</section>
<section id="renderer">
<h2><span class="idx">07</span>Blending, and why the mesh needs a renderer of its own<span class="zh">混合方式:網格為何需要自己的渲染器</span><span class="tag app">In the app</span></h2>
<p>The mesh puts many small, overlapping Gaussians along each stroke, elongated and rotated from the start. Two common renderer choices handle this badly, and finding that out cost the paper a detour.</p>
<p>The first is <strong>additive blending</strong>, as in GaussianImage <a class="cite" href="#r2">[2]</a>: the colours of overlapping Gaussians simply add up, clamped at white. To reproduce the inside of a stroke, the Gaussians that cover it must then <em>cancel</em> each other — their colours become coupled, and the optimiser has a hard time. With additive blending the mesh keeps its lead over random positions but falls behind sampled layouts at dense budgets: 0.19 dB ahead at 10,000 Gaussians, 0.60 dB behind at 50,000. Weight-normalised blending makes every pixel a convex combination of the colours that cover it; neighbours no longer work against each other, the gain of the layout comes through, and the blend is 0.5 to 0.8 dB better than the top-10 normalisation of Image-GS for every layout.</p>
<figure class="fig demo" data-demo="blend"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo G</b>Two overlapping Gaussians of different colours, blended two ways. Top strip: the additive sum, clamped — where the Gaussians overlap the colours add up and saturate, and to reproduce a plain stroke the optimiser would have to make them cancel. Bottom strip: the weight-normalised blend of § 02 — a convex combination of the colours that cover the pixel, so neighbours never fight. Below: the two weights and their sum. Drag <em>distance</em>, or let it breathe.</figcaption></figure>
<p>The second is <strong>the gradients of the shapes</strong>. The tile rasteriser shared by Image-GS and Fast-2DGS returns wrong gradients for scale and rotation in its projection. Fitting with them costs a random start 2.0 dB and the mesh 3.8 dB at 10,000 Gaussians — the mesh's Gaussians start anisotropic and need correct shape gradients to be refined. With one learning rate for everything instead of per-parameter rates the loss is larger still (5.3 and 4.7 dB for the mesh). Both fixes help every layout; the mesh needs them most.</p>
<div class="callout"><div class="micro">In the app</div><p>The WebGPU engine of the app is this renderer, written from scratch: the weight-normalised blend in the forward pass, and the gradients of all nine parameters derived by hand and reproduced by the kernels to about 10⁻⁶ relative (§ 13, § 14) — without a framework. It is what lets the app fit 419,000 Gaussians in about five seconds on an RTX 4090.</p></div>
</section>
<section id="fitting">
<h2><span class="idx">08</span>The fit<span class="zh">擬合</span><span class="tag app">In the app</span></h2>
<p>From the layout, every parameter of every Gaussian is optimised against the pixels with Adam <a class="cite" href="#r19">[19]</a> on the mean squared error — no densification, no pruning, no network. The learning rates differ by parameter type, each multiplied by a cosine schedule from 1 to 0.05 over the run, and the parameters are clamped after every step so that no Gaussian leaves the picture, vanishes or explodes: uv ∈ [−0.02, 1.02], log_s ∈ [log(0.2 / L), log 0.5], log_w ∈ [−8, 8].</p>
<div class="tablewrap"><table>
<tr><th>uv</th><th>log_s</th><th>rot</th><th>color</th><th>log_w</th></tr>
<tr><td class="num">0.25 / L — a quarter pixel</td><td class="num">0.02</td><td class="num">0.02</td><td class="num">0.01</td><td class="num">0.02</td></tr>
</table></div>
<p>The gradients are exact, derived by hand. With uᵢ = wᵢ alphaᵢ, D = Σ uᵢ + ε and G = ∂loss/∂out:</p>
<pre>∂loss/∂cᵢ = G uᵢ / D
qᵢ = Σ_ch G_ch (cᵢ,ch − out_ch) / D (= ∂loss/∂uᵢ)
∂loss/∂wᵢ = Σₓ qᵢ alphaᵢ, ∂loss/∂q = −qᵢ wᵢ exp(−q) (inside the support)
∂q/∂m = (a dx + b dy, b dx + d dy), ∂q/∂(a, b, d) = (dx²/2, dx dy, dy²/2)</pre>
<p>then the chain rule to the scales and the angle. Writing them out is what lets one GPU kernel compute every gradient of every Gaussian in one pass. Quality rises fast and then slowly: on the 2048 × 2048 reference image the fit reaches 51.8 dB after 500 steps, 52.5 dB after 1500 and 52.75 dB after 3000. The presets trade the budget and the step count against time:</p>
<div class="tablewrap"><table>
<tr><th>preset</th><th>Gaussians</th><th>steps</th><th>for</th></tr>
<tr><td><b>Fast</b></td><td class="num">1 per 20 px</td><td class="num">1500</td><td>a quick look, laptops and phones</td></tr>
<tr><td><b>Standard</b></td><td class="num">1 per 10 px</td><td class="num">3000</td><td>the default</td></tr>
<tr><td><b>Best</b></td><td class="num">1 per 7 px</td><td class="num">4000</td><td>fine textures</td></tr>
</table></div>
<p>PSNR, the figure the app reports, is measured between the model rendered at 1× and the source: it says how faithfully the vector model reproduces the picture it was fitted to. A model that reproduces its source at 50 dB has captured every edge it will later magnify. An L1 variant of the loss (Charbonnier) is available in research mode, together with the PSNR curve of every fit.</p>
</section>
<section id="sr">
<h2><span class="idx">09</span>Any size: super-resolution without training<span class="zh">任意尺寸:免訓練的超解析度</span><span class="tag paper">Paper</span> <span class="tag app">In the app</span></h2>
<p>Here is the catch of the resolution-free model, and the paper's answer to it. Fit a small picture with Gaussians and render it four times larger, and you get — interpolation. The fit treated every input pixel as a point sample of the picture, so the Gaussians faithfully reproduce the blur the input already had, and the large render is no sharper than Lanczos <a class="cite" href="#r43">[43]</a> or bicubic <a class="cite" href="#r42">[42]</a>. The paper measures it: the fit alone lands within −1.6 and +0.1 dB of Lanczos on anime images.</p>
<p>The paper's remedy is a short second fit with a different question. Instead of "match the input pixels", ask "match the input once your large render is degraded the way the input was" — rendered at S×, downsampled with the standard antialiased bicubic filter, compared with the input. Five hundred steps of that, on the low-resolution picture alone, let the Gaussians become sharper than the input wherever a few anisotropic Gaussians explain the data. The small budget is the prior: the refinement cannot add structure the Gaussians cannot express, and stopping early keeps it from fitting the null space of the downsampling.</p>
<div class="pull">With 0.19 Gaussians per input pixel — still fewer numbers than the input has — OTSR is ahead of Lanczos at every factor from 2× to 16× on both of the paper's sets: by 1.0 to 2.8 dB on 2K anime images and 0.7 to 1.2 dB on 4K posters, with better LPIPS at every factor.</div>
<p>At the budget of the other Gaussian representations, 0.038 per input pixel, it beats GaussianImage, Image-GS, SAD and Fast-2DGS on every image and at every factor, by 1.0 to 2.7 dB on anime and 0.8 to 2.0 dB on posters, and Bézier Splatting <a class="cite" href="#r28">[28]</a> where that was run. Against Lanczos at that budget it gains most where there are strokes to sharpen and enough input to constrain them — +2.1 dB at 4× and +1.1 dB at 8× on anime — and falls slightly behind at 2×, where the input still holds fine texture, and at 16×, where a 128² input gets 625 Gaussians. Most of the gain comes from the refinement (+0.45 to +2.07 dB on every image); the layout matters less here than for fitting, but a random start still ends 0.24 to 0.85 dB lower. Fits and refinements take 20 to 30 seconds per image on an RTX 4090, against milliseconds for interpolation.</p>
<p>Two details keep the large render consistent with the fit, and they are the kind of thing that costs a day when missed: pixels must be sampled at their centres, so that input pixel j and output pixels Sj … Sj + S − 1 cover the same interval, and the rasteriser must not cut the Gaussians' tails earlier at S× than it did while fitting. Rasterisers that sample pixel j at x = j shift the large render by (S − 1)/2 pixels; the paper shifts them back for every baseline. The engine of the app sidesteps both: the exact 4σ support of § 02 is the same function at every scale.</p>
<h3>What the app does at magnification</h3>
<p><span class="tag app">In the app</span> The app renders the fitted Gaussians at any scale, tile by tile. It does not run the refinement yet; instead, at magnification, it sharpens the render with a <strong>distance-field edge pass</strong> — the trick that keeps vector fonts crisp when they are magnified from a signed-distance field <a class="cite" href="#r29">[29]</a>, generalised from a binary coverage mask to colour images:</p>
<ol class="steps">
<li>In a window of radius r = round(0.75 S) around each output pixel, find the darkest and the brightest pixels by luma and take their actual colours <strong>D</strong> and <strong>B</strong>.</li>
<li>t = (Y − Y_min) / (Y_max − Y_min) is a locally normalised field whose 0.5 level is the edge.</li>
<li>Re-threshold it with a smoothstep whose half-width w = ½ · edge_px · |∇t| is the change of t over edge_px output pixels — so the transition is edge_px pixels wide at <em>every</em> magnification: alpha = smoothstep(½ − w, ½ + w, t), sharp = D + (B − D) alpha. All three channels share one curve, so no colour fringes appear.</li>
<li>Blend the result in only where the local contrast is real: gate = smoothstep(0.08, 0.2, Y_max − Y_min); out = img + gate · (sharp − img). Flat regions and smooth gradients are untouched.</li>
</ol>
<figure class="fig demo" data-demo="edge"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo H</b>Across an edge at S×. Grey: the plain Gaussian render, a ramp that widens with S. Copper: the same edge after the pass, a transition of edge_px output pixels at any S — the slider in research mode; smaller is harder, larger softer. Demo A applies the same pass to a rendered glyph.</figcaption></figure>
<p>The pass costs about a millisecond per megapixel and is applied to every export and, from 1.5× upwards, to the viewer. It needs a clean, continuous input, which the Gaussian render is; applied to a Lanczos upscale it would sharpen the ringing too. The refinement of the paper and the edge pass are not exclusive — the first makes the Gaussians themselves sharper, the second re-thresholds the render — and a later version can run both.</p>
</section>
<section id="measured">
<h2><span class="idx">10</span>What the paper measured<span class="zh">論文量到了什麼</span><span class="tag paper">Paper</span></h2>
<p>The numbers below are from the paper; every one of them was measured against the released code of the methods compared, with their default settings, on the same RTX 4090, under the protocol of Fast-2DGS <a class="cite" href="#r8">[8]</a>: 512 × 512 crops, 10,000, 50,000 or 100,000 primitives, PSNR after initialisation and after 1, 2, 5 and 10 seconds of wall-clock time, and at the end of each method's own schedule. The data: 33 anime images (the 9 of Image-GS <a class="cite" href="#r3">[3]</a> and 24 DanbooRegion illustrations <a class="cite" href="#r16">[16]</a>), 8 digital posters, and the 24 Kodak photographs <a class="cite" href="#r22">[22]</a> as a check outside anime.</p>
<h3>Against the field</h3>
<p>At 50,000 Gaussians on anime, the OT mesh with re-layout ends at 58.7 dB. SAD <a class="cite" href="#r17">[17]</a>, whose CUDA trainer converges in about a second, reaches 53.0 dB and stops improving; Fast-2DGS ends at 48.2 dB, Instant-GI <a class="cite" href="#r5">[5]</a> at 48.6 dB with the 25,000 Gaussians it chooses for itself, Image-GS at 43.0 dB after 35 seconds of progressive additions, GaussianImage at 41.5 dB. Our fitting passes 51 dB within the first second and overtakes SAD after about 1.5 seconds. The gap is largest on line art: 59.3 dB against 49.4 for SAD and below 45 for the learned initialisations. The ranking holds at every budget — 4.2 dB above SAD at 10,000 Gaussians, 8.1 dB at 100,000 — and on the Kodak photographs, where SAD stays ahead until about 4 seconds and ends 3.5 dB lower.</p>
<h3>Where the gain comes from</h3>
<p>A ladder that changes one thing at a time, from a GaussianImage-like recipe to the full method, attributes the margin. On anime at 10,000 Gaussians: exact shape gradients +2.8 dB, weight-normalised blending +4.7 dB, importance sampling instead of random positions +4.7 dB, the OT mesh instead of the samples +0.36 dB, one re-layout +0.31 dB — 12.9 dB in all, 6.7 dB at 50,000. The honest reading: most of the margin over the field is the renderer and the optimiser; the layout is a smaller, consistent gain on top. Isolated with everything else fixed, the mesh beats random positions by 2.4 to 5.5 dB at every budget from 1,000 to 50,000 Gaussians, and samples of exactly the same density by 0.2 to 0.3 dB, stable across sampling seeds; against Image-GS sampling its lead shrinks with the budget, from 0.7–0.9 dB at 1,000–2,000 Gaussians to 0.17 dB at 50,000, as the optimiser repairs more of a dense start. With positions frozen, so that the layout alone decides where the Gaussians are, the mesh is 4.6 to 5.2 dB ahead of random positions and 1.3 and 0.7 dB ahead of Image-GS sampling.</p>
<h3>Sizes, shapes, plug-ins</h3>
<p>At native resolution, from 0.02 to 4 megapixels and at 0.038 Gaussians per pixel, the fitting leads the best baseline by 2.3 dB on Kodak, 3.3 dB on DIV2K, 2.9 dB on 2K anime, 5.2 dB on Clipart1K and 6.3 dB on DanbooRegion, and the aspect ratio makes no difference from 9:16 to 3:1: the mesh simply gets as many columns per row as the picture asks for. Against Bézier Splatting <a class="cite" href="#r28">[28]</a> at the same number of parameters it gains 1.4 to 4.6 dB on Kodak and 5.5 and 10.4 dB on illustrations, in a tenth of the time. Dropped into the official code of other methods, the layout is neutral in Image-GS, whose own error-guided additions erase the better start, and worth +1.7 dB in GaussianImage at 10,000 Gaussians — but −7.5 dB at 50,000, where GaussianImage's clamped, unnormalised sum saturates under a dense mesh. Which is the renderer story of § 07 told from the other side.</p>
<h3>What it costs</h3>
<p>One transport solve takes about 0.17 s in the research code regardless of the number of Gaussians, 0.7 % of a 24-second fit. The transport grid matters more than the shapes: a 64² grid ends 1.05 dB lower on line art, shapes from the Jacobian start 0.73 dB higher than isotropic ones but end level, because at dense budgets the optimiser finds the shapes on its own. The layout's value lies in the positions.</p>
</section>
<section id="editing">
<h2><span class="idx">11</span>Toward vector graphics: editing through the mesh<span class="zh">走向向量圖形:透過網格編輯</span><span class="tag paper">Paper</span></h2>
<p>A fitted Gaussian image is an unordered set. Its Gaussians have no neighbours and no structure beyond their own nine numbers, which is the deep reason it is not yet a vector graphic: there is nothing to grab. The OT mesh gives every Gaussian four neighbours — but free fitting does not keep them in order. The Gaussians move less than a mesh spacing, yet neighbours cross, and 43 % of the cells fold.</p>
<p>The paper adds a penalty on folded cells to the loss — a hinge on the signed area of the two triangles of every cell relative to their area in the layout. It removes the folds (0.03 % of the cells instead of 43 %) at a cost of about 0.3 dB. The fitted Gaussians then form a valid mesh, and the picture can be edited the way a gradient mesh is edited in vector-graphics tools: drag a vertex, its neighbours follow with a smooth fall-off, and every Gaussian's covariance follows the local affine map of the mesh, Σ′ = J Σ Jᵀ. The edited picture stays clean. It is a step from an unordered set of Gaussians toward vector rendering; Bézier Splatting <a class="cite" href="#r28">[28]</a> takes the other route, starting from curves and paying for it in fidelity.</p>
<figure class="fig demo" data-demo="edit"><div class="demo-stage"></div><div class="demo-ctl"></div><figcaption><b>Demo I</b>Editing through the mesh. The Gaussians of the layout of Demo D, drawn as ellipses on their mesh. Drag any vertex: neighbours within 72 px follow with a Gaussian fall-off, and every ellipse follows the local affine map of its cell. Drag hard enough and cells fold — they turn red — which is what the paper’s penalty prevents during fitting. Reset puts the mesh back.</figcaption></figure>
<div class="callout"><div class="micro">Not yet in the app</div><p>The app's fits have no fold penalty, so their mesh is valid only at the start (the <em>OT mesh</em> layer of the View menu shows it over the image). Editing through the mesh is the direction the product is heading: a Gaussian image that is also an editable vector graphic.</p></div>
</section>
<section id="limits">
<h2><span class="idx">12</span>Limits, honestly<span class="zh">誠實的限制</span><span class="tag paper">Paper</span> <span class="tag app">In the app</span></h2>
<ul>
<li><strong>No learned prior.</strong> OTSR sharpens what the input implies — strokes, edges, flat regions — and cannot restore texture the input has lost. Learned super-resolution networks, trained on large image collections, are expected to be stronger on content like their training data; the paper's comparison is among per-image representations and classical interpolation. Flat art, line art, text, interfaces and animation frames are the home ground; film grain comes back as what it is, smooth noise.</li>
<li><strong>The refinement assumes the degradation is known</strong> (antialiased bicubic, as in the standard benchmarks); another kernel would have to be known or estimated. At 0.038 Gaussians per input pixel the fit is a lossy compression of the input, which limits the result at 2× and 16×; five times as many Gaussians lift the limit at little extra time.</li>
<li><strong>The layout inherits its density.</strong> A gradient heuristic serves well; learned or saliency-based monitors could do better, and the network densities of Instant-GI or Fast-2DGS could be transported instead of sampled. At 100,000 Gaussians on a 512² crop, where the mesh spacing approaches the pixel size, a single layout falls behind per-pixel sampling outside anime and the re-layout compensates — a regime the paper does not yet understand. The 256-cell transport grid is capped by float32 (§ 05).</li>
<li><strong>PSNR, above all on line art.</strong> The density follows the gradient magnitude and the re-layout follows the squared error; both raise PSNR and line-art fidelity more than perceptual scores, and the re-layout can lower LPIPS slightly by moving Gaussians from flat regions to strokes. A perceptual monitor is the natural next step.</li>
<li><strong>The app today:</strong> fits at native resolution, so large images on small GPUs take minutes rather than seconds (about 400 B per Gaussian and 32 B per pixel while fitting; images above 8.5 megapixels ask for confirmation); no colour management (sRGB as displayed, alpha ignored); and none of the re-layout, the refinement or the fold penalty yet (§§ 06, 09, 11).</li>
</ul>
</section>
<section id="engine">
<h2><span class="idx">13</span>The engine, pass by pass<span class="zh">引擎:一遍一遍地看</span><span class="tag app">In the app</span></h2>
<p>The engine is a thin TypeScript layer that owns GPU buffers and encodes passes; all arithmetic is in WGSL compute shaders on WebGPU <a class="cite" href="#r45">[45]</a>. There are sixteen compute pipelines and a single render pass, the one that puts the finished image on the canvas. No framework, no weights, no server: the page is about 50 kB of JavaScript.</p>
<figure class="fig"><svg viewBox="0 0 760 236" role="img" aria-label="Two Gaussians over a grid of 16 by 16 pixel tiles; the tiles their extents touch are listed per tile" fill="none" stroke="currentColor">
<rect x="52" y="54" width="36" height="36" class="soft" stroke="none"/>
<rect x="88" y="54" width="36" height="36" class="soft" stroke="none"/>
<rect x="124" y="54" width="36" height="36" class="soft" stroke="none"/>
<rect x="160" y="54" width="36" height="36" class="soft" stroke="none"/>
<rect x="52" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="88" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="124" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="160" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="196" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="232" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="268" y="90" width="36" height="36" class="soft" stroke="none"/>
<rect x="196" y="126" width="36" height="36" class="soft" stroke="none"/>
<rect x="232" y="126" width="36" height="36" class="soft" stroke="none"/>
<rect x="268" y="126" width="36" height="36" class="soft" stroke="none"/>
<rect x="196" y="162" width="36" height="36" class="soft" stroke="none"/>
<rect x="232" y="162" width="36" height="36" class="soft" stroke="none"/>
<rect x="268" y="162" width="36" height="36" class="soft" stroke="none"/>
<line x1="16" y1="18" x2="376" y2="18" class="faint" stroke-width="0.8"/>
<line x1="16" y1="54" x2="376" y2="54" class="faint" stroke-width="0.8"/>
<line x1="16" y1="90" x2="376" y2="90" class="faint" stroke-width="0.8"/>
<line x1="16" y1="126" x2="376" y2="126" class="faint" stroke-width="0.8"/>
<line x1="16" y1="162" x2="376" y2="162" class="faint" stroke-width="0.8"/>
<line x1="16" y1="198" x2="376" y2="198" class="faint" stroke-width="0.8"/>
<line x1="16" y1="18" x2="16" y2="198" class="faint" stroke-width="0.8"/>
<line x1="52" y1="18" x2="52" y2="198" class="faint" stroke-width="0.8"/>
<line x1="88" y1="18" x2="88" y2="198" class="faint" stroke-width="0.8"/>
<line x1="124" y1="18" x2="124" y2="198" class="faint" stroke-width="0.8"/>
<line x1="160" y1="18" x2="160" y2="198" class="faint" stroke-width="0.8"/>
<line x1="196" y1="18" x2="196" y2="198" class="faint" stroke-width="0.8"/>
<line x1="232" y1="18" x2="232" y2="198" class="faint" stroke-width="0.8"/>
<line x1="268" y1="18" x2="268" y2="198" class="faint" stroke-width="0.8"/>
<line x1="304" y1="18" x2="304" y2="198" class="faint" stroke-width="0.8"/>
<line x1="340" y1="18" x2="340" y2="198" class="faint" stroke-width="0.8"/>
<line x1="376" y1="18" x2="376" y2="198" class="faint" stroke-width="0.8"/>
<rect x="56.1" y="58.7" width="123.7" height="66.5" class="cu" stroke-width="1" stroke-dasharray="4 3"/>
<ellipse cx="118" cy="92" rx="66" ry="24" transform="rotate(-22 118 92)" class="cu" stroke-width="1.8"/>
<text x="118" y="97" text-anchor="middle" class="cap cut" stroke="none" font-size="13">A</text>
<rect x="220.7" y="101.4" width="82.6" height="69.2" class="cu" stroke-width="1" stroke-dasharray="4 3"/>
<ellipse cx="262" cy="136" rx="50" ry="20" transform="rotate(38 262 136)" class="cu" stroke-width="1.8"/>
<text x="262" y="141" text-anchor="middle" class="cap cut" stroke="none" font-size="13">B</text>
<text x="16" y="222" class="mu" stroke="none">16 × 16-pixel tiles · dashed: the axis-aligned extent of the 4σ ellipse · tinted: the tiles it is listed in</text>
<text x="416" y="36" class="cap" stroke="none" font-size="11">per tile, after the counting sort</text>
<text x="416" y="58" class="mu" stroke="none">tile (1, 1)</text><text x="506" y="58" class="mu" stroke="none">→</text>
<rect x="528" y="46" width="22" height="16" class="soft" stroke="none"/><text x="539" y="58" text-anchor="middle" class="cap cut" stroke="none">A</text>
<text x="416" y="78" class="mu" stroke="none">tile (2, 1)</text><text x="506" y="78" class="mu" stroke="none">→</text>
<rect x="528" y="66" width="22" height="16" class="soft" stroke="none"/><text x="539" y="78" text-anchor="middle" class="cap cut" stroke="none">A</text>
<text x="416" y="98" class="mu" stroke="none">tile (5, 2)</text><text x="506" y="98" class="mu" stroke="none">→</text>
<rect x="528" y="86" width="22" height="16" class="soft" stroke="none"/><text x="539" y="98" text-anchor="middle" class="cap cut" stroke="none">B</text>
<text x="416" y="118" class="mu" stroke="none">tile (6, 2)</text><text x="506" y="118" class="mu" stroke="none">→</text>
<rect x="528" y="106" width="22" height="16" class="soft" stroke="none"/><text x="539" y="118" text-anchor="middle" class="cap cut" stroke="none">B</text>
<text x="416" y="186" class="mu" stroke="none">forward: one workgroup per tile, its list</text>
<text x="416" y="202" class="mu" stroke="none">streamed through shared memory, 256 at a time</text>
<text x="416" y="234" class="mu" stroke="none">backward: the same lists, partial gradients per</text>
<text x="416" y="250" class="mu" stroke="none">slot, summed per Gaussian in a fixed order</text>
</svg><figcaption><b>Figure B</b>Tile binning. The output raster is cut into 16 × 16-pixel tiles; each Gaussian is listed in the tiles its 4σ extent touches; a workgroup per tile then evaluates only the Gaussians in its own list. The same lists drive the backward pass.</figcaption></figure>
<h3>Per rendered frame</h3>
<ol class="steps">
<li><strong>preprocess</strong> — one thread per Gaussian: centre and conic in output pixels, the axis-aligned extent of the 4σ ellipse, the range of tiles it touches, an atomic count per tile.</li>
<li><strong>scan</strong> — exclusive prefix sums <a class="cite" href="#r44">[44]</a> of the tile counts and of the per-Gaussian counts.</li>
<li><strong>fill</strong> — one thread per Gaussian: a counting sort of its index into every tile list in its rectangle, and a record of each slot in its own range.</li>
<li><strong>forward</strong> — one workgroup of 256 threads per tile, one thread per pixel. The tile's Gaussians are streamed through workgroup memory in batches of 256; every thread evaluates q for every Gaussian and accumulates Σ u c and Σ u where q < 8.</li>
</ol>
<h3>Per fit step</h3>
<ol class="steps">
<li><strong>loss</strong> (every 25 steps) — per-workgroup partial sums of the squared error; the host adds them and reports PSNR.</li>
<li><strong>backward</strong> — one workgroup per tile. It stages g = ∂loss/∂out / D and the render for the tile's 256 pixels, then assigns P threads to each Gaussian in the list (the largest power of two with n · P ≤ 256, so all threads work even when a tile holds few Gaussians); each thread sums its share of the pixels into nine accumulators, the P partial sums are reduced in workgroup memory, and the result goes to that Gaussian's slot in the tile list. <strong>No floating-point atomics</strong>, so the result is deterministic.</li>
<li><strong>reduce_grad</strong> — one thread per Gaussian sums its slots in a fixed order and applies the chain rule to the nine parameters.</li>
<li><strong>adam</strong> — one thread per parameter float: the update with bias correction, the per-type learning rate and the clamps.</li>
</ol>
<p>Build, forward, loss, backward and Adam are one command buffer per step; the CPU queues steps ahead and a periodic read-back of the loss keeps it from running away. The number of (tile, Gaussian) entries changes as Gaussians grow and shrink; the lists never overflow silently — the host reads one 4-byte total every few dozen steps and grows the buffers when needed.</p>
<h3>Numbers</h3>
<div class="tablewrap"><table>
<tr><th>stage, RTX 4090, 2048 × 2048, 0.1 Gaussians / px</th><th>result</th></tr>
<tr><td>OT initialisation (419,256 Gaussians, 256 × 256 transport grid, 156 Sinkhorn iterations)</td><td class="num">0.52 s</td></tr>
<tr><td>fit, 3000 steps (565 steps / s), 1.51 M tile entries = 3.6 per Gaussian</td><td class="num">5.3 s · 52.75 dB</td></tr>
<tr><td>export 4× with edges, 8192 × 8192, 2048-px tiles, before PNG encoding</td><td class="num">1.27 s</td></tr>
<tr><td>GPU memory while fitting: ≈ 400 B per Gaussian + 32 B per pixel</td><td class="num">≈ 300 MB</td></tr>
<tr><td>forward pass vs a float64 dense reference · gradients vs float64 autograd · Adam vs PyTorch</td><td class="num">10⁻⁶ · 1.4 × 10⁻⁶ · 10⁻⁷</td></tr>
</table></div>
<p>Everything is float32 and stays within the WebGPU <em>defaults</em> — 16 KB of workgroup memory, eight storage buffers per stage — so it runs on integrated GPUs and phones, only slower. The viewer re-renders the model at the exact zoom on every frame and reads nothing back; the exporter renders 2048-pixel tiles with an overlap of the edge window, which makes the tiled result identical to an untiled render. The GPU tests run the same kernels in Node through Dawn's bindings, against golden data from the Python reference.</p>
</section>
<section id="port">
<h2><span class="idx">14</span>From a research pipeline to a browser tab<span class="zh">從研究流程到瀏覽器分頁</span><span class="tag app">In the app</span></h2>
<p>The research pipeline of the paper was PyTorch with a CUDA rasteriser, spread over experiment scripts. Turning it into something that runs in a browser tab followed a fixed order, which is the part worth copying:</p>
<ol class="steps">
<li><strong>Write the semantics down, not the code.</strong> Every definition that determines the output — the nine parameters and their units, the blend, the optimiser, the initialisation, the edge pass — became a formula with every constant pinned, taken from the final experiment scripts rather than library defaults.</li>
<li><strong>Decide the one thing you are allowed to change.</strong> The research renderer culled Gaussians per tile at a raster-dependent radius; for a product whose premise is resolution independence that had to go. The exact 4σ cut-off of § 02 is the single deliberate difference, documented in three places; everything else was kept bit for bit.</li>
<li><strong>Build the reference first, dense and in float64.</strong> A forty-line PyTorch evaluation of the blend with no tiles and no tricks, whose autograd gives every gradient. It produces deterministic golden test cases — random Gaussians including degenerate ones, a synthetic image with hard edges, an OT initialisation, forty fitting steps — that the kernels are measured against.</li>
<li><strong>Get a real GPU into the test runner.</strong> The kernels run under the test runner in Node through the same Dawn implementation the browser uses, so a test failure means the kernel, not the browser.</li>
<li><strong>Derive, then verify every column.</strong> The gradients were derived by hand and checked column by column against float64 autograd: 1.4 × 10⁻⁶. The only real bug of the port was a buffer created without the right usage flag, which WebGPU reports as a validation error and not as wrong numbers — the lesson being to read the GPU's error before the assertion that caught its consequence.</li>
<li><strong>Know what "correct" means in float32.</strong> The GPU transport map first failed its test against the float32 PyTorch map; computing the float64 answer showed both were equally far from it. The test now measures against float64 and derives its tolerances rather than tuning them.</li>
</ol>
<p>The port — reference, kernels, interface, tests and documentation — took one working day, and most of it went into the reference and the tests. The kernels themselves matched the reference on their first run, because the conventions had been fixed before the first line of WGSL.</p>
<h3>Two checks that closed the loop</h3>
<figure class="fig"><img src="docs/figures/cuda_vs_webgpu.jpg" alt="Two Kodak crops upscaled four times by the research CUDA pipeline and by the WebGPU engine, with their difference maps" loading="lazy"><figcaption><b>Figure C</b>Same protocol — OT initialisation, 0.1 Gaussians per pixel, 3000 Adam steps, RTX 4090 — research CUDA pipeline against the WebGPU engine, two independent fits on two Kodak images (768 × 512, 39,366 Gaussians). 43.62 vs 43.55 dB and 46.49 vs 46.48 dB: equivalent within the run-to-run noise. The difference maps between the two renders are structured along edges, where two fits legitimately settle differently, with a mean of 2.1 and 0.8 / 255. The fits took 33 s in the research pipeline and 0.6 s in the engine; the 60× is not the kernels but the absence of Python, autograd and per-kernel synchronisation.</figcaption></figure>
<figure class="fig"><img src="docs/figures/sad_vs_otsr.jpg" alt="PSNR against wall-clock time for four images: SAD's CUDA trainer and the OTSR WebGPU engine" loading="lazy"><figcaption><b>Figure D</b>Same GPU (RTX 5070 Ti), same budget (0.1 sites or Gaussians per pixel): the official CUDA trainer of SAD (4000 iterations, its own initialisation not counted) against the OTSR engine (3000 steps, OT initialisation included), PSNR over wall-clock seconds. The engine ends higher on all four images — 43.55 vs 40.10, 46.48 vs 44.75, 52.44 vs 46.31 and 47.82 vs 41.18 dB — in 38–60 % of the time, and its curve is above from 0.2 s on. The quality comes from the representation and the initialisation; the time from the pipeline: no sorting, one-pass exact gradients, no densify-and-prune machinery.</figcaption></figure>
<h3>The research tools in the app</h3>
<p>Research mode exposes the views used while the method was being developed, on any image you open: the <strong>vector view</strong> (every Gaussian in its own colour times its luma), the <strong>OT mesh</strong> of the initialisation over the image, the <strong>1σ outlines</strong> of the Gaussians in view, the <strong>error map</strong> |model − source| on an inferno scale, a shared <strong>region</strong> tool, the <strong>PSNR curve</strong>, the budget and step count, the edge width and the choice of loss. The monitor during a fit shows the three regions with the strongest gradient as live renders.</p>
</section>
<section id="refs" class="refs">
<h2><span class="idx">15</span>Reading on<span class="zh">延伸閱讀</span></h2>
<p>The first twenty-eight entries are the paper's own references; the rest are the books and papers this page leans on, each with a line on why it is here.</p>
<ol class="refs">
<li id="r1">B. Kerbl, G. Kopanas, T. Leimkühler, G. Drettakis. 3D Gaussian Splatting for Real-Time Radiance Field Rendering. ACM TOG, 2023.</li>
<li id="r2">X. Zhang, X. Ge, T. Xu, D. He, Y. Wang, H. Qin, G. Lu, J. Geng, J. Zhang. GaussianImage: 1000 FPS Image Representation and Compression by 2D Gaussian Splatting. ECCV, 2024.</li>
<li id="r3">Y. Zhang, B. Li, A. Kuznetsov, A. Jindal, S. Diolatzis, K. Chen, A. Sochenov, A. Kaplanyan, Q. Sun. Image-GS: Content-Adaptive Image Representation via 2D Gaussians. SIGGRAPH Conference Papers, 2025.</li>
<li id="r4">L. Zhu et al. Large Images are Gaussians: High-Quality Large Image Representation with Levels of 2D Gaussian Splatting. AAAI, 2025.</li>
<li id="r5">Z. Zeng, Y. Wang, T. Guan, C. Yang, L. Ju. Instant GaussianImage: A Generalizable and Self-Adaptive Image Representation via 2D Gaussian Splatting. ICCV, 2025.</li>
<li id="r6">Entropy-Aware Image Representation via 2D Gaussian Splatting. Signal Processing, 2026.</li>
<li id="r7">Structure-Guided Allocation of 2D Gaussians for Image Representation and Compression. arXiv:2512.24018, 2025.</li>
<li id="r8">Fast 2DGS: Efficient Image Representation with Deep Gaussian Prior. WACV, 2026.</li>
<li id="r9">B. Zhang et al. GaussianCube: Structuring Gaussian Splatting using Optimal Transport for 3D Generative Modeling. NeurIPS, 2024.</li>
<li id="r10">Y. Brenier. Polar factorization and monotone rearrangement of vector-valued functions. Comm. Pure Appl. Math., 1991.</li>
<li id="r11">F. de Goes, K. Breeden, V. Ostromoukhov, M. Desbrun. Blue Noise through Optimal Transport. ACM TOG (SIGGRAPH Asia), 2012.</li>
<li id="r12">C. J. Budd, W. Huang, R. D. Russell. Adaptivity with moving grids. Acta Numerica, 2009.</li>
<li id="r13">C. J. Budd, J. F. Williams. Moving mesh generation using the parabolic Monge–Ampère equation. SIAM J. Sci. Comput., 2009.</li>
<li id="r14">M. Cuturi. Sinkhorn Distances: Lightspeed Computation of Optimal Transport. NeurIPS, 2013.</li>
<li id="r15">J. Solomon et al. Convolutional Wasserstein Distances: Efficient Optimal Transportation on Geometric Domains. ACM TOG (SIGGRAPH), 2015.</li>
<li id="r16">L. Zhang, Y. Ji, C. Liu. DanbooRegion: An Illustration Region Dataset. ECCV, 2020.</li>
<li id="r17">L. Iinbor, Z. Dou, W. Matusik. Soft Anisotropic Diagrams for Differentiable Image Representation. ACM TOG (SIGGRAPH), 2026.</li>
<li id="r18">L. A. Caffarelli. The regularity of mappings with a convex potential. J. Amer. Math. Soc., 1992.</li>
<li id="r19">D. P. Kingma, J. Ba. Adam: A Method for Stochastic Optimization. ICLR, 2015.</li>
<li id="r20">Z. Wang, E. P. Simoncelli, A. C. Bovik. Multiscale Structural Similarity for Image Quality Assessment. Asilomar, 2003.</li>
<li id="r21">R. Zhang, P. Isola, A. A. Efros, E. Shechtman, O. Wang. The Unreasonable Effectiveness of Deep Features as a Perceptual Metric. CVPR, 2018.</li>
<li id="r22">Kodak Lossless True Color Image Suite. https://r0k.us/graphics/kodak/</li>
<li id="r23">G. Peyré, M. Cuturi. Computational Optimal Transport. Foundations and Trends in Machine Learning, 2019.</li>
<li id="r24">M. Balzer, T. Schlömer, O. Deussen. Capacity-Constrained Point Distributions: A Variant of Lloyd's Method. ACM TOG (SIGGRAPH), 2009.</li>
<li id="r25">C. J. Budd, R. D. Russell, E. Walsh. The Geometry of r-Adaptive Meshes Generated Using Optimal Transport Methods. J. Comput. Phys., 2015.</li>
<li id="r26">R. J. McCann. A Convexity Principle for Interacting Gases. Advances in Mathematics, 1997.</li>
<li id="r27">F. Járai-Szabó, Z. Néda. On the Size Distribution of Poisson Voronoi Cells. Physica A, 2007.</li>
<li id="r28">X. Liu, C. Zhou, N. Zhao, S. Huang. Bézier Splatting for Fast and Differentiable Vector Graphics Rendering. NeurIPS, 2025.</li>
<li id="r29">C. Green. Improved alpha-tested magnification for vector textures and special effects. ACM SIGGRAPH 2007 Courses. — The distance-field trick behind crisp magnified fonts; the app's edge pass generalises it to colour images.</li>
<li id="r30">G. Monge. Mémoire sur la théorie des déblais et des remblais. Histoire de l'Académie Royale des Sciences de Paris, 1781. — The original question: how to move a pile of earth with the least effort. The whole field starts here.</li>
<li id="r31">L. V. Kantorovich. On the translocation of masses. Doklady Akademii Nauk SSSR, 1942. — The relaxation that made the question solvable, and the start of linear programming.</li>
<li id="r32">C. Villani. Optimal Transport: Old and New. Springer, 2009. — The reference monograph; chapters 1–6 are the ones behind § 04.</li>
<li id="r33">F. Santambrogio. Optimal Transport for Applied Mathematicians. Birkhäuser, 2015. — The friendlier book, with the discrete and semi-discrete methods applied work actually uses.</li>
<li id="r34">R. Sinkhorn, P. Knopp. Concerning nonnegative matrices and doubly stochastic matrices. Pacific Journal of Mathematics, 1967. — The alternating normalisation that Demo F runs, half a century before it became the workhorse of computational transport.</li>
<li id="r35">B. Schmitzer. Stabilized sparse scaling algorithms for entropy regularized transport problems. SIAM Journal on Scientific Computing, 2019. — ε-scaling and log-domain stabilisation, the two ingredients that let the solver reach small ε in float32.</li>
<li id="r36">S. P. Lloyd. Least squares quantization in PCM. IEEE Transactions on Information Theory, 1982. — Lloyd's relaxation, the iterative alternative to transport for even shares (§ 03).</li>
<li id="r37">Q. Du, V. Faber, M. Gunzburger. Centroidal Voronoi tessellations: applications and algorithms. SIAM Review, 1999. — What those relaxed layouts are and what they are good for.</li>
<li id="r38">A. Okabe, B. Boots, K. Sugihara, S. N. Chiu. Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, 2nd edition, 2000. — Everything about Voronoi cells, including the statistics of random ones.</li>
<li id="r39">Q. Mérigot. A multiscale approach to optimal transport. Computer Graphics Forum, 2011. — Semi-discrete transport solved coarse to fine; the way past the float32 grid cap of § 05.</li>
<li id="r40">B. Lévy. A numerical algorithm for L2 semi-discrete optimal transport in 3D. ESAIM: Mathematical Modelling and Numerical Analysis, 2015. — The same idea made fast, with power diagrams.</li>
<li id="r41">M. Zwicker, H. Pfister, J. van Baar, M. Gross. EWA splatting. IEEE Transactions on Visualization and Computer Graphics, 2002. — Where "splatting" Gaussians onto pixels, and normalising what lands, comes from.</li>
<li id="r42">R. G. Keys. Cubic convolution interpolation for digital image processing. IEEE Transactions on Acoustics, Speech, and Signal Processing, 1981. — Bicubic interpolation, the comparison view in the app and the baseline of § 09.</li>
<li id="r43">C. E. Duchon. Lanczos filtering in one and two dimensions. Journal of Applied Meteorology, 1979. — The Lanczos filter, the strongest classical resampler and the yardstick of the paper's super-resolution tables.</li>
<li id="r44">M. Harris, S. Sengupta, J. D. Owens. Parallel prefix sum (scan) with CUDA. GPU Gems 3, Addison-Wesley, 2007. — The prefix sums that turn per-Gaussian tile counts into tile lists (§ 13).</li>
<li id="r45">W3C. WebGPU and WebGPU Shading Language, Working Drafts. https://www.w3.org/TR/webgpu/ · https://www.w3.org/TR/WGSL/ — The API and the shading language the engine is written against; the limits it stays within are the ones these documents guarantee.</li>
</ol>
<p>In the repository: <a href="docs/method.md">the method</a> with every constant, <a href="docs/engine.md">the engine</a> buffer by buffer, <a href="docs/tutorial-porting.md">the porting record</a> with the derivations and the mistakes, <a href="docs/performance.md">performance</a> and how to benchmark, <a href="docs/testing.md">testing</a> and the measured accuracy; <a href="https://github.com/Aztech-Lab/OTSR/blob/main/CITATION.md">CITATION.md</a> for the paper's entry once it is public.</p>
</section>
</main>
</div>
<footer>OTSR 0.1.4 · MIT · <a href="https://github.com/Aztech-Lab/OTSR">github.com/Aztech-Lab/OTSR</a> · <a href="./">open the app</a></footer>
<script type="module" src="/src/report.ts"></script>
</body>
</html>