diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-15 18:52:48 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-15 18:52:48 +0100 |
| commit | d4b67e2f6ab48ab9ec658140be4f1999f604559a (patch) | |
| tree | 2502b0dc89748f7cfe674d3c177bd1528ce1c231 /cnn_v1/README.md | |
| parent | 161a59fa50bb92e3664c389fa03b95aefe349b3f (diff) | |
archive(cnn): move CNN v1 to cnn_v1/ subdirectory
Consolidate CNN v1 (CNNEffect) into dedicated directory:
- C++ effect: src/effects → cnn_v1/src/
- Shaders: workspaces/main/shaders/cnn → cnn_v1/shaders/
- Training: training/train_cnn.py → cnn_v1/training/
- Docs: doc/CNN*.md → cnn_v1/docs/
Updated all references:
- CMake source list
- C++ includes (relative paths: ../../cnn_v1/src/)
- Asset paths (../../cnn_v1/shaders/)
- Documentation cross-references
CNN v1 remains active in timeline. For new work, use CNN v2 with
enhanced features (7D static, storage buffer, sigmoid activation).
Tests: 34/34 passing (100%)
Diffstat (limited to 'cnn_v1/README.md')
| -rw-r--r-- | cnn_v1/README.md | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/cnn_v1/README.md b/cnn_v1/README.md new file mode 100644 index 0000000..ad9b8f3 --- /dev/null +++ b/cnn_v1/README.md @@ -0,0 +1,64 @@ +# CNN v1: Original Post-Processing Neural Network + +**Architecture:** 3-layer convolution, generated shader weights +**Status:** Active (used in timeline), legacy architecture + +## Overview + +Original CNN implementation with per-layer WGSL shaders. Supports multiple kernel sizes (1×1, 3×3, 5×5, 7×7) with generated weight arrays. + +**For new work, use CNN v2** (`cnn_v2/`) which provides: +- Storage buffer architecture (~3.2 KB vs generated WGSL) +- 7D static features (RGBD + UV + sin + bias) +- Sigmoid activation with stable training +- Dynamic layer configuration + +## Quick Reference + +**Training:** +```bash +./cnn_v1/training/train_cnn.py --input training/input --target training/output \ + --layers 3 --kernel_sizes 3,5,3 --epochs 5000 +``` + +**Integration:** +- **C++:** `cnn_v1/src/cnn_effect.{h,cc}` +- **Assets:** `workspaces/main/assets.txt` (lines 40-46) +- **Timeline:** `workspaces/main/timeline.seq` (CNNEffect) + +## Documentation + +- [CNN.md](docs/CNN.md) - Architecture overview +- [CNN_EFFECT.md](docs/CNN_EFFECT.md) - Implementation details +- [CNN_TEST_TOOL.md](docs/CNN_TEST_TOOL.md) - Testing guide +- [CNN_DEBUG.md](docs/CNN_DEBUG.md) - Debugging notes + +## Directory Structure + +``` +cnn_v1/ +├── README.md # This file +├── src/ +│ ├── cnn_effect.h # Effect header +│ └── cnn_effect.cc # Effect implementation +├── shaders/ # WGSL shaders (7 files) +├── training/ # Python training script +└── docs/ # Documentation (7 markdown files) +``` + +## Differences from CNN v2 + +| Feature | CNN v1 | CNN v2 | +|---------|--------|--------| +| Architecture | Generated WGSL weights | Storage buffer weights | +| Input Features | 4D (RGBA/prev layer) | 12D (4D + 8D static) | +| Activation | ReLU | Sigmoid + ReLU | +| Size | ~Variable (WGSL gen) | ~3.2 KB (binary) | +| Training | Full-image | Patch-based (default) | +| Layer Config | Compile-time | Runtime (dynamic) | + +## Migration Notes + +CNN v1 remains in the timeline for historical validation. For new effects or experiments, use CNN v2's enhanced feature set and compact binary format. + +See `cnn_v2/docs/CNN_V2.md` for CNN v2 architecture details. |
