Skip to content

research(053): deployment-capture realism — phone pipelines, finite-depth scenes, crop sim, holdouts + 1k pilot - #138

Merged
dompm merged 5 commits into
research/delightingfrom
research/delighting-053-capture-realism
Jul 17, 2026
Merged

research(053): deployment-capture realism — phone pipelines, finite-depth scenes, crop sim, holdouts + 1k pilot#138
dompm merged 5 commits into
research/delightingfrom
research/delighting-053-capture-realism

Conversation

@dompm

@dompm dompm commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Response to the CTO-commissioned external dataset review of trunk @ 8c8877a (committed verbatim as docs/external/053-dataset-capture-review.md): make the synthetic dataset faithful to the deployment capture process, so a model can't score by learning "Blender glass grammar". Full write-up: reports/053-deployment-capture-realism.md.

A — Phone-ISP presets (foundation/phone_pipeline.py)

5 named COMPLETE device pipelines (neutral_mid, bright_window_hdr, low_light_handheld, android_punchy, wide_edge) in physical ISP order — AWB error, lens shading, CA, motion/defocus blur, local HDR/tonemap with halos, denoise, sharpen with overshoot, saturation/per-channel clip, rescale, JPEG/HEIC — with CORRELATED per-preset parameters, replacing the 4 independent knobs in dataset._augment_photo. Scene-linear in/out (report 025). Preset strip: results/053/phone_pipeline_strip.jpg.

B — Scene realism (generate_synthetic.py, --deploy-scene)

  • Varied-silhouette shadows (hand/forearm/phone/blobs at random side/angle/scale) at a SAMPLED prevalence (0.3), replacing 4 fixed rectangle sets + forced pairs (--shadow-pairs keeps the pair path).
  • Mixed front/back lighting as the NORM (front area light ~70%, deploy-default specular + dim interior). White-marker self-emission hack reduced 0.6→0.15 — white marks verified legible under real front light.
  • Finite-depth textured backgrounds at sampled 10cm/50cm/2m/∞ with depth-discontinuity near bars; HDRI stays the far layer.
  • --cover-recipes cycles all 17 recipes (kills the stale --count==5 case).

C — Holdouts (foundation/dataset.py + EVAL_PROTOCOL v1.2 §3b-ext)

Whole FAMILIES reserved test-only, deterministically: generator families/taxa (ring-mottle, confetti-shard, cathedral-red, dark-slate), ~20% of HDRIs by hash, one camera preset (wide_edge), perspective-rectified capture geometry. Frozen REAL set §3c untouched. Final gate (untouched real user captures) is a CTO action item — noted, out of scope.

D — render_farm.py fixes

build_cmd now forwards --gt-b --gt-aov --no-tex-dump --exr-codec --specular --fixed-ev --no-marks + all 053 flags (previously silently dropped — a 20k run would have lost gt_B/AOV supervision and blown the storage budget).

E — σ_s eval (048-owed)

eval_foundation.py scores σ_s-MAE + structured-checker relight L1 (pred-σ_s relight vs GT-σ_s relight, 045/046 methodology), rows in eval.json + baseline_ladder.md. Unit-tested (perfect→0, no-scatter→full penalty).

F — Deployment pilot

68 samples (34 identities × 2 lightings, 17/17 recipes, 23 HDRIs) rendered THROUGH the farm with production flags (--no-tex-dump --exr-codec DWAA --gt-b --gt-aov), ≤80MB/sample. Crop-sim post-pass (registered homography + detail patches, transform in meta.json). Renders gitignored; committed boards: results/053/boards/ (overview / crop-workflow / shadows).

Validate gate

17/17 recipes pass uniform-backlight T-agreement (MAE 0.002–0.030, historical band); deploy features are fully gated out of --validate (re-render agreement ~1e-5).

No training launched. Modal/payment untouched. Do not merge — lead review requested.

🤖 Generated with Claude Code

dompm and others added 5 commits July 16, 2026 16:16
Scope A: foundation/phone_pipeline.py — 5 named COMPLETE device ISP pipelines
(neutral_mid, bright_window_hdr, low_light_handheld, android_punchy, wide_edge)
applied in physical order (AWB/lens-shading/CA/blur/local-HDR+halos/denoise/
sharpen/sat/rescale/JPEG-HEIC), correlated params per device. dataset._augment_photo
now calls it instead of the 4 independent knobs.

Scope C: multi-axis holdout in dataset.py (EVAL_PROTOCOL §3b-ext) — reserve whole
texture-generator families (ring-mottle, confetti-shard, cathedral-red, dark-slate),
~20% of HDRIs by hash, one camera preset (wide_edge), and perspective-rectified
geometry, all test-only. holdout_reason() deterministic from meta.json.

Scope E: eval_foundation.py scores σ_s (048-owed) — σ_s-MAE + structured-checker
relight L1 vs GT-map relight (045/046 methodology).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…warding

Scope B (generate_synthetic.py, all gated behind --deploy-scene; --validate untouched):
- SHADOW OVERHAUL: generate_shadow_mask draws VARIED silhouettes (hand at angle,
  forearm, phone edge, blob cluster) from a random side/scale/tilt, replacing the 4
  hardcoded axis-aligned rectangle sets. Shadow PRESENCE is a sampled probability
  (deploy 0.3), not a forced pair for every identity; --shadow-pairs restores dense
  pairs for the shadow-supervision path.
- MIXED FRONT/BACK LIGHTING AS NORM: add_deploy_lighting_and_background adds a soft
  front area light (behind camera, never in frame) + deploy-default specular + dim
  reflective interior. White-marker self-emission hack drops 0.6->0.15 (verified:
  white marks render under the new front light).
- FINITE-DEPTH TEXTURED BACKGROUNDS at sampled 10cm/50cm/2m (or HDRI-only), with a
  nearer shelf-edge/mullion bar at a different depth (depth discontinuity). GT emission
  renders defensively hide the new objects; gt_B captures them correctly.
- --cover-recipes cycles all 17 recipes (kills the stale --count==5 special case).

Scope D (render_farm.py): build_cmd now forwards --gt-b --gt-aov --no-tex-dump
--exr-codec --specular --fixed-ev --no-marks + all 053 scene flags (previously
silently dropped, which would omit gt_B/AOV supervision and blow the storage budget).

Scope F infra: crop_sim.py (post-pass user-crop homography applied identically to
photo+all GT channels; emits cropped sheet + registered detail patches; stamps
capture_geometry+transform into meta) and build_boards_053.py (contact-sheet boards).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- docs/external/053-dataset-capture-review.md: CTO-commissioned review of trunk
  8c8877a, verbatim, with provenance frontmatter (lead-verified 5 code claims).
- EVAL_PROTOCOL.md -> v1.2: §3b-ext synthetic FAMILY-level holdout (generator
  families, taxa, HDRIs, camera presets, capture geometries reserved test-only);
  frozen REAL set §3c unchanged.
- reports/053-deployment-capture-realism.md: full write-up (scopes A-F, validate
  gate, honest limitations, deferred items, scale commands).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deployment pilot rendered through render_farm with full production flags
(--deploy-scene --cover-recipes --gt-b --gt-aov --no-tex-dump --exr-codec DWAA).
Boards committed (renders gitignored): overview / crop-workflow / shadows.
<=80MB/sample; shadow 25%, front-light 71%, bg depths 0.1/0.5/2/inf.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying vitrai with  Cloudflare Pages  Cloudflare Pages

Latest commit: bb379cc
Status: ✅  Deploy successful!
Preview URL: https://8c456eb3.vitrai.pages.dev
Branch Preview URL: https://research-delighting-053-capt.vitrai.pages.dev

View logs

@dompm
dompm merged commit 5cc53f6 into research/delighting Jul 17, 2026
2 checks passed
@dompm
dompm deleted the research/delighting-053-capture-realism branch July 17, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant