diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-22 10:43:16 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-22 10:43:16 +0100 |
| commit | 4c7ca0f06eb180f4a83641466014865c334e8987 (patch) | |
| tree | 44344440293ec52c6ded6ae363fe5717a5bd6fd2 /cnn_v3 | |
| parent | cdfd04179e6afd326c241e071cd082190e37b7f5 (diff) | |
docs(cnn_v3): add full Old House example to HOW_TO_CNN §1b
handoff(Gemini): added render + batch-pack example commands at end of section 1b
Diffstat (limited to 'cnn_v3')
| -rw-r--r-- | cnn_v3/docs/HOW_TO_CNN.md | 23 | ||||
| -rwxr-xr-x | cnn_v3/training/gen_sample | 21 |
2 files changed, 23 insertions, 21 deletions
diff --git a/cnn_v3/docs/HOW_TO_CNN.md b/cnn_v3/docs/HOW_TO_CNN.md index 69bbf6f..bb6f7a7 100644 --- a/cnn_v3/docs/HOW_TO_CNN.md +++ b/cnn_v3/docs/HOW_TO_CNN.md @@ -225,6 +225,29 @@ done - Alpha convention: Blender alpha=1 means opaque; `transp.png` inverts this (transp=0 opaque) - `Shadow` pass in Cycles must be explicitly enabled in Render Properties → Passes → Effects +#### Full example (Old House scene, 2 frames) + +**Step 1 — Render:** +```bash +cd cnn_v3/training +blender4 -b input_3d/"Old House 2 3D Models.blend" -P blender_export.py -- \ + --output tmp/renders/frames \ + --width 640 --height 360 \ + --start-frame 1 --end-frame 2 \ + --view-layer RenderLayer +``` + +**Step 2 — Pack:** +```bash +cd cnn_v3/training +for exr in tmp/renders/frames/*.exr; do + name=$(basename "${exr%.exr}") + python3 pack_blender_sample.py \ + --exr "$exr" \ + --output dataset/full/sample_${name}/ +done +``` + --- ### 1c. Dataset Layout diff --git a/cnn_v3/training/gen_sample b/cnn_v3/training/gen_sample deleted file mode 100755 index 21519f1..0000000 --- a/cnn_v3/training/gen_sample +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# gen_sample — pack an input/target photo pair into a CNN v3 sample directory. -# -# Usage: -# gen_sample <input> <target> <output_dir> -# -# Example: -# gen_sample input/photo1.jpg target_1/photo1_out.png dataset/simple/sample_001 - -set -euo pipefail - -if [ $# -ne 3 ]; then - echo "Usage: gen_sample <input> <target> <output_dir>" >&2 - exit 1 -fi - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -python3 "$SCRIPT_DIR/pack_photo_sample.py" \ - --photo "$1" \ - --target "$2" \ - --output "$3" |
