[#80] Cycle-3: tighten the smooth gate so the curve-refit must earn its keep#81
Merged
Merged
Conversation
…ts keep The Schneider Bézier smooth pass degraded flat/outlined linework (fattened/ raggedy outline band) yet shipped because the gate kept it within a 0.06 free SSIM-loss budget + a wobble-relief escape. Raw SSIM rewards the antialiased staircase, so SSIM alone tolerated a fattening smooth (gate audit: smooth lowers SSIM on 25/25 corpus+probe cases, −0.007..−0.073). Replace the free-pass with a ridge-width-uniformity keep-test (the eye-aligned screen): keep smooth only when it does not worsen outline width uniformity (ridge p90/IQR non-regression), with a small SSIM earn-floor as a feature-loss backstop. The transparent_background subject-extraction path keeps the prior lenient behavior (its region masking depends on the smoothed geometry). Bump 0.6.0 -> 0.7.0 (behavior change). Both POs eye-gated; output is pixel-identical to the validated bundle on the corpus; full suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4018d3f to
ce31a19
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #80.
What
Replace the smooth-gate's 0.06 free SSIM-loss budget + staircase-fooled wobble-relief escape with a ridge-width-uniformity keep-test (the eye-aligned screen). Keep the Schneider Bézier smooth only when it does not worsen outline width uniformity (ridge p90/IQR non-regression), with a small SSIM earn-floor (0.02) as a feature-loss backstop. The
transparent_backgroundsubject-extraction path keeps the prior lenient behavior (itsdrop_background_pathsregion masking depends on the smoothed geometry).Bump
0.6.0 → 0.7.0(behavior change).Why
On flat/outlined illustration the smooth pass fattened/raggedied the already-clean outline band yet shipped because raw SSIM rewards the antialiased staircase, so the 0.06 tolerance tolerated a fidelity-negative smooth. Gate audit over the full corpus + downscaled probes: smooth lowers SSIM on 25/25 cases (−0.007…−0.073) and never earns its keep on this class. Stage-ladder localized it as the primary fidelity-loss stage (e.g. c_38 ridge p90 10→14, c_23 IQR 0.5→2.67).
Verification
transparent_backgroundregression (smooth is load-bearing there fordrop_background_paths); guard scoped to that path only.python -m buildgreen (0.7.0 sdist+wheel); full pytest 126 passed, 1 skipped.Follow-ups (separate, not in this PR)
_ridge_uniformitydark mask is luma-coarse on saturated-dark (navy) outlines; latentdrop_background_pathsfragility when smooth is off.🤖 Generated with Claude Code