Skip to content

fix: detect resampled official logos#37

Merged
Minorli merged 1 commit into
mainfrom
fix/0.1.64-resampled-logo-detection
Jul 12, 2026
Merged

fix: detect resampled official logos#37
Minorli merged 1 commit into
mainfrom
fix/0.1.64-resampled-logo-detection

Conversation

@Minorli

@Minorli Minorli commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • recognize official logos that were shifted by up to three pixels during upstream down/upscaling
  • retain the existing strict per-channel color tolerance and 90% match threshold
  • preserve standard logo placement and avoid adding a second logo to edited images
  • release PicGen 0.1.64

Production finding

A deployed customer-style edit preserved the source logo after upstream resampling, but exact-position matching scored about 0.68 and the client added a second logo. The bounded neighborhood matcher scores the unobscured real logo pixels at 0.9279 while an identical color pattern outside the radius remains rejected.

Test plan

  • ./scripts/check.sh (410 passed; Ruff and Mypy clean)
  • uv run --with pytest-cov pytest -q --cov=picgen --cov-report=term (87% total)
  • uv run --with pip-audit pip-audit (no known vulnerabilities)
  • real failed-image Chrome pixel replay (0.9279 match score)
  • logo policy suite (15 passed, including local-shift acceptance and out-of-radius rejection)
  • Docker build and non-root healthy-container smoke test

@Minorli
Minorli merged commit c9819ab into main Jul 12, 2026
1 check passed
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