summaryrefslogtreecommitdiff
path: root/doc/CNN_V2.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-13 16:52:41 +0100
committerskal <pascal.massimino@gmail.com>2026-02-13 16:52:41 +0100
commite4c1641201af04c9919410325f4e0865e8b88d5d (patch)
treeba554f74ad7ca0cc5619d36cd4c9fcd4707a528a /doc/CNN_V2.md
parent250491dc3044549edee8418d680d1e47920833f4 (diff)
Doc: Update CNN v2 docs for binary format v2 and mip-level support
Updated documentation to reflect binary format v2 with mip_level field. Changes: - CNN_V2_BINARY_FORMAT.md: Document v2 (20-byte header) with mip_level, v1 backward compat - CNN_V2_WEB_TOOL.md: Document auto-detection of mip_level, UI updates - CNN_V2.md: Update overview with mip-level feature, training pipeline Binary format v2: - Header: 20 bytes (was 16) - New field: mip_level (u32) at offset 0x10 - Backward compatible: v1 loaders treat as mip_level=0 Documentation complete for full mip-level pipeline integration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'doc/CNN_V2.md')
-rw-r--r--doc/CNN_V2.md17
1 files changed, 9 insertions, 8 deletions
diff --git a/doc/CNN_V2.md b/doc/CNN_V2.md
index 49086ca..a66dc1d 100644
--- a/doc/CNN_V2.md
+++ b/doc/CNN_V2.md
@@ -11,14 +11,15 @@ CNN v2 extends the original CNN post-processing effect with parametric static fe
**Key improvements over v1:**
- 7D static feature input (vs 4D RGB)
- Multi-frequency position encoding (NeRF-style)
+- Configurable mip-level for p0-p3 parametric features (0-3)
- Per-layer configurable kernel sizes (1×1, 3×3, 5×5)
- Variable channel counts per layer
- Float16 weight storage (~3.2 KB for 3-layer model)
- Bias integrated as static feature dimension
- Storage buffer architecture (dynamic layer count)
-- Binary weight format for runtime loading
+- Binary weight format v2 for runtime loading
-**Status:** ✅ Complete. Training pipeline functional, validation tools ready.
+**Status:** ✅ Complete. Training pipeline functional, validation tools ready, mip-level support integrated.
**TODO:** 8-bit quantization with QAT for 2× size reduction (~1.6 KB)
---
@@ -109,12 +110,12 @@ Input RGBD → Static Features Compute → CNN Layers → Output RGBA
```wgsl
// Slot 0-3: Parametric features (p0, p1, p2, p3)
-// Can be: mip1/2 RGBD, grayscale, gradients, etc.
-// Distinct from input image RGBD (fed only to Layer 0)
-let p0 = ...; // Parametric feature 0 (e.g., mip1.r or grayscale)
-let p1 = ...; // Parametric feature 1
-let p2 = ...; // Parametric feature 2
-let p3 = ...; // Parametric feature 3
+// Sampled from configurable mip level (0=original, 1=half, 2=quarter, 3=eighth)
+// Training sets mip_level via --mip-level flag, stored in binary format v2
+let p0 = ...; // RGB.r from selected mip level
+let p1 = ...; // RGB.g from selected mip level
+let p2 = ...; // RGB.b from selected mip level
+let p3 = ...; // Depth or RGB channel from mip level
// Slot 4-5: UV coordinates (normalized screen space)
let uv_x = coord.x / resolution.x; // Horizontal position [0,1]