Skip to content

Overexposure: graduated float instead of boolean#4

Open
marcelo-earth wants to merge 8 commits into
MAXMARDONES:mainfrom
marcelo-earth:feat/overexposure-filter
Open

Overexposure: graduated float instead of boolean#4
marcelo-earth wants to merge 8 commits into
MAXMARDONES:mainfrom
marcelo-earth:feat/overexposure-filter

Conversation

@marcelo-earth

Copy link
Copy Markdown

Summary

overexposed_patch was a bool — on or off, no middle ground. Replaced it with overexposure: float (0.0–1.0) so you can control how washed out the photo gets.

The float maps to a description in the Gemini prompt: ≤0.3 is "light wash", ≤0.6 is "moderate bleaching", above that is "severely washed out, text barely visible."

Also:

  • New "overexposed" preset (0.7 + strong center glare) for the warehouse-under-fluorescents look
  • Occlusion manifest now flags overexposure when fields come back illegible
  • Docs, text-to-variation schema, and 7 unit tests updated

Test plan

  • 24 tests pass (existing + new)
  • Generate with --presets overexposed, confirm it looks washed out
  • text_to_variation("slightly overexposed document") should map to a low float

Change the overexposure model from a simple on/off toggle to a
graduated float (0.0–1.0) for finer control over how washed out
the generated document photo appears.
Include overexposure intensity and a human-readable description in
the failure_modes section of the prompt JSON so Gemini knows how
washed out to render the document photo. Also surface shadow_band
which was previously missing from the prompt.
New preset combines 0.7 overexposure with strong center glare to
simulate a document photographed under harsh direct lighting, a
common failure mode in warehouse environments.
When a field is illegible and the variation has overexposure > 0,
the manifest now explains the failure as washed_out_by_overexposure
with the intensity value so downstream consumers can distinguish
intentional degradation from image gen errors.
Replace the boolean overexposed_patch field with the new float
overexposure field in the Gemini schema prompt so natural language
descriptions like 'slightly washed out' map to appropriate
intensity values.
Sync documentation and command reference with the new graduated
overexposure field across variations.mdx, sdk/variation.mdx, and
the penquify command template.
Cover the default (no overexposure), all three intensity tiers
(light/moderate/severe), prompt JSON serialization, and the new
overexposed preset.
Verify that when a field is illegible and the variation has
overexposure set, the manifest includes the correct reason
string with the intensity value.
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