Skip to content

[#80] Cycle-3: tighten the smooth gate so the curve-refit must earn its keep#81

Merged
realproject7 merged 1 commit into
mainfrom
task/80-smooth-gate-tighten
Jun 30, 2026
Merged

[#80] Cycle-3: tighten the smooth gate so the curve-refit must earn its keep#81
realproject7 merged 1 commit into
mainfrom
task/80-smooth-gate-tighten

Conversation

@realproject7

Copy link
Copy Markdown
Owner

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_background subject-extraction path keeps the prior lenient behavior (its drop_background_paths region 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

  • Output is pixel-identical to the eye-gated bundle on the corpus (smooth correctly rejected where it fattened the band); both reviewers eye-gated PASS.
  • Caught + fixed a transparent_background regression (smooth is load-bearing there for drop_background_paths); guard scoped to that path only.
  • python -m build green (0.7.0 sdist+wheel); full pytest 126 passed, 1 skipped.

Follow-ups (separate, not in this PR)

  • Secondary fidelity loss at the vtracer-on-preprocessed stage (curve resolution; some fine-line drops).
  • Detail-loss / color-simplification axis (garment/muscle micro-lines vs the reference).
  • _ridge_uniformity dark mask is luma-coarse on saturated-dark (navy) outlines; latent drop_background_paths fragility when smooth is off.

🤖 Generated with Claude Code

…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>
@realproject7 realproject7 force-pushed the task/80-smooth-gate-tighten branch from 4018d3f to ce31a19 Compare June 30, 2026 01:14
@realproject7 realproject7 merged commit e6fc7f2 into main Jun 30, 2026
4 checks passed
@realproject7 realproject7 deleted the task/80-smooth-gate-tighten branch June 30, 2026 01:17
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.

[quality] Cycle-3: tighten the smooth gate so the curve-refit must earn its keep

1 participant