diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/CNN_TEST_TOOL.md | 11 | ||||
| -rw-r--r-- | doc/HOWTO.md | 39 |
2 files changed, 45 insertions, 5 deletions
diff --git a/doc/CNN_TEST_TOOL.md b/doc/CNN_TEST_TOOL.md index 7a970fe..09c55d4 100644 --- a/doc/CNN_TEST_TOOL.md +++ b/doc/CNN_TEST_TOOL.md @@ -178,11 +178,12 @@ assert mse < 10.0, f'MSE too high: {mse}' ## Known Issues -**BUG: Black output (uninitialized input texture)** -- Tool produces all-black output (MSE 64860 vs ground truth) -- Root cause: First intermediate texture not initialized with input image -- Multi-layer processing starts with uninitialized data -- Fix required: Copy input_texture → intermediate_textures[0] before layer loop +**BUG: Black output (unknown cause)** +- Tool produces all-black output despite correct architecture +- Fixed ping-pong logic, RGBA16Float intermediates, proper pipelines +- Shader compiles, GPU commands execute without errors +- Possible causes: shader execution issue, synchronization, binding problem +- Status: Under investigation --- diff --git a/doc/HOWTO.md b/doc/HOWTO.md index ba550bb..c0e9363 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -162,6 +162,45 @@ See `doc/ASSET_SYSTEM.md` and `doc/WORKSPACE_SYSTEM.md`. --- +## CNN Testing + +### Offline Shader Validation +```bash +# Test trained CNN on PNG input +./build/cnn_test input.png output.png + +# Adjust blend amount (0.0 = original, 1.0 = full CNN) +./build/cnn_test input.png output.png --blend 0.5 + +# PPM output format +./build/cnn_test input.png output.ppm --format ppm +``` + +### Ground Truth Comparison +```bash +# Generate Python ground truth +./training/train_cnn.py --infer input.png \ + --export-only checkpoints/checkpoint_epoch_1000.pth \ + --output ground_truth.png + +# Run tool +./build/cnn_test input.png tool_output.png + +# Compare (Python required) +python3 -c " +import numpy as np +from PIL import Image +gt = np.array(Image.open('ground_truth.png').convert('RGB')) +out = np.array(Image.open('tool_output.png').convert('RGB')) +mse = np.mean((gt.astype(float) - out.astype(float)) ** 2) +print(f'MSE: {mse:.4f} (target: < 10.0)') +" +``` + +See `doc/CNN_TEST_TOOL.md` for full documentation. + +--- + ## Additional Documentation - **Build System:** `doc/BUILD.md` - Multi-platform, size optimization |
