summaryrefslogtreecommitdiff
path: root/doc/CNN_V2.md
diff options
context:
space:
mode:
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]