Record the new Best in the spec and the manual

denoise.md §15: why Best became one network, how it compares with the
mixture and Medium on real photographs and the chart, the candidates that
fell short, the file names, the saved-edit numbering, and the timings on
the 3050 -- 0.51-0.54 s whole-frame, 0.95 s in tiles, against 2.60 s for
the mixture in tiles. The manual lists Bilinear, Fast and Best, says an
edit made with Medium opens with Best, and gives the new time; Medium's
close-up goes.
This commit is contained in:
2026-10-07 07:14:52 -04:00
parent a9271c4850
commit c2cfacd7d3
4 changed files with 83 additions and 31 deletions
+56
View File
@@ -571,3 +571,59 @@ In PyTorch fp16 the same network over the whole 20 MP frame in one call took 3.5
tiles, so a card that holds a whole frame gains more than the 6 GB one does; `WHOLE_FRAME_MAX` is a
constant sized for 6 GB until the limit follows the card's memory.
## 15. Best becomes one network (0.24)
The photographer's goal for 0.24 was Best's quality in under a second on the laptop. Whole frames
(§14) took the mixture from 2.60 s to 1.37 s and no further on a 6 GB card, so the other half was
a single network that holds the mixture's quality at a third of its work. Methods are now
`Bilinear`, `Fast` and `Best`; Medium and the mixture are retired.
**The network** is `fb-combo` (darkroom-denoise, 2026-10-07): §11's shape (32-64-128-192, blocks
1-1-2-2, 3.2 M parameters, 48 GMAC/MP, halo 192), 20 000 steps from `fb-edges2` ← `student-m`,
taught by the mixture at a half share, with 10 % drawn scenes and 25 % crops from the edge-rich
cells of the training frames (branch `edge-sampling`). Scored on real photographs — the chart
overstated the mixture's lead (a chart-sharp network was softer than Medium on real edges) — on the
validation crops in the top quarter for sharp detail:
| | Edge PSNR, ISO 1600 / 6400 / 25600 | Sharpness kept | Smooth areas | Held-out PSNR, ISO 400 / 1600 / 6400 / 25600 | Chart edge |
|---|---|---|---|---|---|
| Mixture (Best to 0.23) | 30.71 / 29.93 / 28.55 | 0.899 / 0.868 / 0.782 | 42.61 / 41.71 / 40.12 | 40.69 / 39.84 / 38.47 / 36.71 | 0.82 |
| `fb-combo` (Best from 0.24) | 30.67 / 29.87 / 28.49 | 0.902 / 0.874 / 0.792 | 42.54 / 41.57 / 39.85 | 40.64 / 39.78 / 38.38 / 36.54 | 0.89 |
| Medium (to 0.23) | 30.43 / 29.68 / 28.38 | 0.896 / 0.862 / 0.776 | 42.59 / 41.69 / 40.08 | 40.59 / 39.75 / 38.40 / 36.65 | 1.30 |
Edges within 0.04–0.06 dB and more sharpness kept at every ISO; the known shortfall is smooth areas
at ISO 25600, 0.27 dB. The photographer took it as it stood at 20 000 of a planned 30 000 steps.
Others tried on the way, each short of the mixture on real photographs: `fb-sharp` (drawn scenes,
chart-sharp but Medium's real edges), `fb-edges` (half edge-rich crops: edges close, ISO 25600
flats −0.24 dB), `fb-edges2` (a quarter: 0.03–0.14 dB short everywhere, chart 1.33–1.47), and a
from-scratch 24-48-96-128 between Fast and Medium.
**Files.** `mosaic-hq-1408.onnx`, `mosaic-hq.onnx` (any size) and `mosaic-hq-1408.a16w16.onnx` for
the Hexagon. A new name, not Medium's or Best's: the result cache keys a model by name and size,
and this one is byte for byte Medium's size. The tablet form lost 0.00 dB in simulated QDQ at every
ISO and at most 0.09 dB across the ×0.5–×4 noise bracket (A16W8 0.08 / 0.26 dB; int8 −10.6 dB);
not yet confirmed on the tablet itself.
**Saved edits** keep their numbers: 2, which was Medium, is now Best; 3, which was Best, is past the
end and reads as the default, Best. Both land on the new network with no migration.
**Measured** 2026-10-07, `_MG_8862`, RTX 3050 Laptop, TensorRT fp16, P3 / 5001 MHz, nothing else on
the card:
| Best | Network time | Peak GPU memory |
|---|---|---|
| mixture, 1408² tiles (0.23) | 2.60 s | — |
| mixture, whole frame (§14) | 1.37 s | — |
| `fb-combo`, 1408² tiles | 0.95 s | 0.55 GB |
| `fb-combo`, whole frame (two 4160 × 3248) | **0.51–0.54 s** | 1.75 GB |
Decode and the hot-pixel pass add 0.4–0.5 s, so a photograph is about a second end to end. Whole
frame against tiles: max |Δ| 0.0029, 90 dB apart — fp16's spread. The whole-frame engine's first
build took 12 minutes (the mixture's 28); from the cache it loads in about a second, so the session
keeps the engine's ordinary 30 s idle decay rather than unloading after each photograph: at 1.75 GB
it fits beside the develop view on a 6 GB card, and an unload would cost the next photograph a
second.
The manual's close-up for Best is still the mixture's render, which this network matches to within
the table above; it is re-recorded with the next pass of `tools/manual/record.sh`.