summaryrefslogtreecommitdiff
path: root/cnn_v2/README.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-15 18:44:17 +0100
committerskal <pascal.massimino@gmail.com>2026-02-15 18:44:17 +0100
commit161a59fa50bb92e3664c389fa03b95aefe349b3f (patch)
tree71548f64b2bdea958388f9063b74137659d70306 /cnn_v2/README.md
parent9c3b72c710bf1ffa7e18f7c7390a425d57487eba (diff)
refactor(cnn): isolate CNN v2 to cnn_v2/ subdirectory
Move all CNN v2 files to dedicated cnn_v2/ directory to prepare for CNN v3 development. Zero functional changes. Structure: - cnn_v2/src/ - C++ effect implementation - cnn_v2/shaders/ - WGSL shaders (6 files) - cnn_v2/weights/ - Binary weights (3 files) - cnn_v2/training/ - Python training scripts (4 files) - cnn_v2/scripts/ - Shell scripts (train_cnn_v2_full.sh) - cnn_v2/tools/ - Validation tools (HTML) - cnn_v2/docs/ - Documentation (4 markdown files) Changes: - Update CMake source list to cnn_v2/src/cnn_v2_effect.cc - Update assets.txt with relative paths to cnn_v2/ - Update includes to ../../cnn_v2/src/cnn_v2_effect.h - Add PROJECT_ROOT resolution to Python/shell scripts - Update doc references in HOWTO.md, TODO.md - Add cnn_v2/README.md Verification: 34/34 tests passing, demo runs correctly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'cnn_v2/README.md')
-rw-r--r--cnn_v2/README.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/cnn_v2/README.md b/cnn_v2/README.md
new file mode 100644
index 0000000..ef0cf44
--- /dev/null
+++ b/cnn_v2/README.md
@@ -0,0 +1,60 @@
+# CNN v2: Parametric Post-Processing Neural Network
+
+**Architecture:** 3-layer compute, storage buffer (~3.2 KB)
+**Features:** 7D static (RGBD + UV + sin + bias), sigmoid activation
+
+## Quick Start
+
+```bash
+./cnn_v2/scripts/train_cnn_v2_full.sh
+```
+
+## Documentation
+
+- [CNN_V2.md](docs/CNN_V2.md) - Architecture and implementation details
+- [CNN_V2_BINARY_FORMAT.md](docs/CNN_V2_BINARY_FORMAT.md) - Weight format specification
+- [CNN_V2_WEB_TOOL.md](docs/CNN_V2_WEB_TOOL.md) - Validation tool documentation
+- [CNN_V2_DEBUG_TOOLS.md](docs/CNN_V2_DEBUG_TOOLS.md) - Debugging and analysis tools
+
+## Integration
+
+- **C++:** `cnn_v2/src/cnn_v2_effect.{h,cc}`
+- **Assets:** `workspaces/main/assets.txt` (lines 47-49)
+- **Test:** `src/tests/gpu/test_demo_effects.cc` (line 93)
+
+## Directory Structure
+
+```
+cnn_v2/
+├── README.md # This file
+├── src/
+│ ├── cnn_v2_effect.h # Effect header
+│ └── cnn_v2_effect.cc # Effect implementation
+├── shaders/ # WGSL shaders (6 files)
+├── weights/ # Binary weights (3 files)
+├── training/ # Python training scripts (4 files)
+├── scripts/ # Shell scripts (train_cnn_v2_full.sh)
+├── tools/ # Validation tools (HTML)
+└── docs/ # Documentation (4 markdown files)
+```
+
+## Training Pipeline
+
+1. **Train model:** `./cnn_v2/scripts/train_cnn_v2_full.sh`
+2. **Export weights:** Automatic (binary format, ~3.2 KB)
+3. **Validate:** HTML tool at `cnn_v2/tools/cnn_v2_test/index.html`
+
+For detailed training options: `./cnn_v2/scripts/train_cnn_v2_full.sh --help`
+
+## Key Features
+
+- **Parametric static features:** 7D input (RGBD + UV + sin encoding + bias)
+- **Storage buffer architecture:** Dynamic layer count, compact binary format
+- **Sigmoid activation:** Smooth gradients, prevents training collapse
+- **Patch-based training:** Sample-efficient, focuses on salient regions
+- **Sub-10KB target:** Achieved with 3-layer model (~3.2 KB)
+
+## Next Steps
+
+- **8-bit quantization:** 2× size reduction (~1.6 KB) via quantization-aware training (QAT)
+- **CNN v3:** U-Net architecture for enhanced quality (separate directory)