Skip to content

Illustration-geometry knobs (supersample + dark-thin) + quality harness — loop-ready, default-off#73

Merged
realproject7 merged 1 commit into
mainfrom
task/illustration-geometry-knobs
Jun 24, 2026
Merged

Illustration-geometry knobs (supersample + dark-thin) + quality harness — loop-ready, default-off#73
realproject7 merged 1 commit into
mainfrom
task/illustration-geometry-knobs

Conversation

@realproject7

Copy link
Copy Markdown
Owner

Phase 0 of the daily quality loop (see ~/Projects/docs/MANUAL-svgsmith-quality-loop.md): make the engine loop-ready by exposing the two confirmed illustration-geometry levers as tunable, default-OFF knobs, plus a reusable comparison harness.

No-regression by construction

Both knobs default to 0 (off) → behaviour unchanged. Verified byte-identical to 0.4.1 (md5) on pigeon / logo / 16-gradient / 12-sticker. The knobs apply ONLY to the outlined low-res illustration class on the coverage path (gated by _supersample_candidate); gradients, photos, and high-res inputs ignore them.

Knobs

  • ConvertOptions.illustration_supersample — trace the flat-colour mask at this resolution (e.g. 2048) → round, uniform feather/scallop boundaries (SSIM-to-reference 0.896 → ~0.93).
  • ConvertOptions.illustration_dark_thin — erode the dark linework by N steps → thick outline blobs become thin crescents; eye pupils / beak tip protected by area. (preprocess._thin_dark + quantize_coverage(dark_thin=).)
  • Both validated (non-negative); a regression test asserts they're opt-in (default native viewBox; illustration_supersample=2048 → larger internal resolution).

Harness

tools/quality_compare.py <folder> [--supersample N] [--dark-thin N] — given <folder>/inputs + <folder>/ref-svg, runs svgsmith with the chosen knobs → ours/, builds input | ours | reference target montages → montage/, writes metrics.md (SSIM to the reference OUTPUT, not the original — the correct loop metric — plus palette/paths/bytes). Outside src/, not packaged in the wheel.

Known follow-ups (deliberately deferred to the loop's R&D — not stubbed)

  • The dark-thin nearest-colour fill can leave faint grey; high-res tracing inflates node count. A node-economical curve-fit / simplify pass is the next lever — the loop's core R&D target.

Full suite green; ruff clean (ruff check .). Version 0.4.1 → 0.4.2.

…ss — loop-ready, default-off

Phase 0 of the daily quality loop: make the engine loop-ready by exposing the two confirmed
illustration-geometry levers as tunable, default-OFF knobs, plus a reusable comparison harness.

Both knobs default to 0 (off), so behaviour is unchanged — verified byte-identical to 0.4.1 on
pigeon/logo/gradient/flat. They apply ONLY to the outlined low-res illustration class on the
coverage path (gated by _supersample_candidate); gradients, photos, and high-res inputs ignore
them.

- ConvertOptions.illustration_supersample: trace the flat-colour mask at this resolution (e.g.
  2048) so feather/scallop boundaries come out round and uniform.
- ConvertOptions.illustration_dark_thin: erode the dark linework by this many steps so thick
  outline blobs become thin crescents (eye pupils / beak tip are protected by area). Implemented
  as preprocess._thin_dark + quantize_coverage(dark_thin=...). Known follow-up (loop R&D): the
  nearest-colour fill can leave faint grey, and high-res tracing inflates node count — a
  node-economical pass is the next lever (deliberately not stubbed here).

- tools/quality_compare.py: given <folder>/inputs + <folder>/ref-svg, runs svgsmith with chosen
  knobs, writes ours/, builds input|ours|reference-target montages, and a metrics.md (SSIM to the
  reference OUTPUT — not the original — plus palette/paths/bytes). Outside src/, not packaged.

Manual: ~/Projects/docs/MANUAL-svgsmith-quality-loop.md. Version 0.4.1 -> 0.4.2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@realproject7 realproject7 merged commit 4517646 into main Jun 24, 2026
4 checks passed
@realproject7 realproject7 deleted the task/illustration-geometry-knobs branch June 24, 2026 09:45
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