summaryrefslogtreecommitdiff
path: root/doc/CNN_V2_WEB_TOOL.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/CNN_V2_WEB_TOOL.md')
-rw-r--r--doc/CNN_V2_WEB_TOOL.md13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/CNN_V2_WEB_TOOL.md b/doc/CNN_V2_WEB_TOOL.md
index 8c661b2..25f4ec7 100644
--- a/doc/CNN_V2_WEB_TOOL.md
+++ b/doc/CNN_V2_WEB_TOOL.md
@@ -10,7 +10,8 @@ Browser-based WebGPU tool for validating CNN v2 inference with layer visualizati
**Working:**
- ✅ WebGPU initialization and device setup
-- ✅ Binary weight file parsing (.bin format)
+- ✅ Binary weight file parsing (v1 and v2 formats)
+- ✅ Automatic mip-level detection from binary format v2
- ✅ Weight statistics (min/max per layer)
- ✅ UI layout with collapsible panels
- ✅ Mode switching (Activations/Weights tabs)
@@ -24,6 +25,10 @@ Browser-based WebGPU tool for validating CNN v2 inference with layer visualizati
- ✅ Mip level selection (p0-p3 features at different resolutions)
**Recent Changes (Latest):**
+- Binary format v2 support: Reads mip_level from 20-byte header
+- Backward compatible: v1 (16-byte header) → mip_level=0
+- Auto-update UI dropdown when loading weights with mip_level
+- Display mip_level in metadata panel
- Code refactoring: Extracted FULLSCREEN_QUAD_VS shader (reused 3× across pipelines)
- Added helper methods: `getDimensions()`, `setVideoControlsEnabled()`
- Improved code organization with section headers and comments
@@ -70,9 +75,11 @@ Browser-based WebGPU tool for validating CNN v2 inference with layer visualizati
### Key Components
**1. Weight Parsing**
-- Reads binary format: header (16B) + layer info (20B×N) + f16 weights
+- Reads binary format v2: header (20B) + layer info (20B×N) + f16 weights
+- Backward compatible with v1: header (16B), mip_level defaults to 0
- Computes min/max per layer via f16 unpacking
-- Stores `{ layers[], weights[], fileSize }`
+- Stores `{ layers[], weights[], mipLevel, fileSize }`
+- Auto-sets UI mip-level dropdown from loaded weights
**2. CNN Pipeline**
- Static features computation (RGBD + UV + sin + bias → 7D packed)