Repository navigation
Commit ee3865e
LR-BEHAV-RENDER-FIDELITY: tools/render_fidelity.py measures LightCraft's single-slider responses against Lightroom exports
A shareable render-fidelity measurement for gap 3 (docs/render-fidelity.md).
It compares a user's own Lightroom TIFF exports with LightCraft renders of
the same recipes from the same raws. It reads no Adobe application file,
profile, preset or table, keeps only the names of an export's profile and
look, and the Lightroom presets it writes are generated from the recipe
values. It needs numpy and tifffile (tools/requirements-render-fidelity.txt)
and the standard library.
- plan: Lightroom develop presets for Basic-slider recipes (default: the
Neutral and every Basic slider at two amounts) and export instructions:
one export operation into one new folder per session, 16-bit sRGB TIFF,
All Metadata.
- pair: reads each export's embedded XMP and checks the clean recipe
affirmatively (the settings the measurement depends on stated,
everything else neutral, identity curves, Adobe Standard / Adobe Color,
no crop or local edits). Finds the raw by crs:RawFileName and identifies
photos by the raw's sha256; refuses a raw whose own XMP, read where
LightCraft's reader reads it, carries develop settings. Pairs each
single-slider export with a Neutral, else the same slider's smallest
other amount, from the same session (export folder and time segment)
and size. Photos split into tune and check by hash.
- render: measures a private copy of the given lightcraft-cli. Each raw is
first checked with LightCraft's own importer (run --import, develop.get,
develop.reset, develop.get: any changed field refuses it). Renders the
Basic panel from the export's XMP with sharpening, noise reduction and
lens-profile corrections off, from a sidecar-free symlink, 16-bit sRGB
at the export's long edge, registers every reference export by a
consensus shift search and samples both engines on a grid. Every sample
and registration carries its provenance (the run's binding id, CLI and
tool hashes, the raw, the recipe or export, frame and shift); a
run-folder lock, exclusive manifest creation and identity checks before
each write keep concurrent renders apart. CLI calls have time limits;
any failure is recorded for its photo and retried on resume.
- score: per band of Lightroom's reference luminance, LightCraft's share
of Lightroom's log-luminance response, the signed bias, the
per-position error, CIE76 dE, the colour-change error, clipping and
black transitions both ways, support retention and out-of-support
errors, with contributor counts, tune and check apart. A pair is scored
only when its raw passed the importer check, its samples' and
registration's provenance matches the manifest and the pair, and its
two Lightroom exports are framed alike; every other pair is listed with
its reason.
- report: a Markdown summary to paste into an issue: numbers only, photos
under per-run salted labels, and a CSV appendix of every band and
transition.
- selftest: the XMP, clean-recipe and pairing rules, registration, the
scoring maths, the raw guard, run-state validation and a 20-mode CLI
fault matrix on synthetic data; with --cli, the raw guard and the
importer check against that build's own XMP reader.
On three of the maintainers' photos with main 76b5377, it pairs the 34
pairs their private scripts scored identically and reproduces all 7158
statistics exactly.
docs/gaps.md gap 3 and the LR-BEHAV-RENDER-FIDELITY row in
docs/parity-checklist.md say what exists and what is still missing; gap 3
no longer says only process V1 exists (V2 landed in storytold#645). cargo xtask
assets and parity pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 77c0a6a commit ee3865e
5 files changed
Lines changed: 4017 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
| 849 | + | |
849 | 850 | | |
850 | 851 | | |
851 | 852 | | |
| |||
0 commit comments