diff options
Diffstat (limited to 'doc/HOWTO.md')
| -rw-r--r-- | doc/HOWTO.md | 39 |
1 files changed, 39 insertions, 0 deletions
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 |
