Skip to main content

Deterministic logo idealizer — rendered logo raster to clean, editable, symmetric SVG.

Project description

vectormark

Deterministic logo idealizer — turn a rendered (raster) logo into a clean, editable, exactly-symmetric SVG.

Where conventional tracers (vtracer, potrace, autotrace) chase pixel edges and emit anonymous <path> soup, vectormark recognizes structure: it collapses anti-aliasing to a true palette, detects symmetry, and fits ideal primitives (<ellipse>, <rect>, regular polygons) to regions — falling back to fitted Bézier paths only where no primitive matches. The output SVG doubles as a human-editable parametric model.

No model/LLM in the loop. Every stage is a known, deterministic algorithm.

Status

🌱 v1 pipeline working. The deterministic A0→B→C pipeline idealizes the Daikonic mark end-to-end (SSIM 0.98 / mean ΔE 0.006 vs. source) into a 1.9 KB structured SVG with exact bilateral symmetry. See the design spec and plan:

uv sync --extra dev
uv run vectormark path/to/logo.png -o out.svg
uv run pytest

Variant matrix

Explore the geometric design space in one shot — idealize swept across an epsilon × max_error grid:

uv run vectormark logo.png --variants                       # 3×3 grid -> ./logo-variants/
uv run vectormark logo.png --variants --out-dir ./looks/
uv run vectormark logo.png --variants --epsilons 0.5,2,4 --max-errors 0.5,2

Add --axes to draw each detected symmetry axis over the contact-sheet tiles — a quick visual check of what the symmetry detector found.

Writes variant-e<ε>-m<max_error>.svg per cell and a manifest.json listing each variant's params and the fitter strategies it used. With the scoring extra installed it also renders an annotated contact-sheet.png (one tile per cell, labelled with its strategy histogram).

MCP integration is available for AI clients that can call local stdio servers (the server lives in the optional server extra; scored selection needs the scoring extra — without it, selection falls back to the cascade pick):

uv sync --extra server --extra scoring
npm --prefix integrations/mcp-app install
npm --prefix integrations/mcp-app run build
uv run vectormark-mcp

See docs/mcp.md for client configuration and hosted app notes.

Pipeline (v1)

A0  color optimization   robust palette (OKLab, ΔE-merge); AA halo discarded as noise
B   trace + clean        vtracer per layer; drop background plate
C   idealize             symmetry axis (PCA + reflection gate) → fundamental domain
                         → contour → RDP → primitive-first / Bézier-fallback
                         → geometry-level mirror (<use>)
→   structured SVG       native shapes + <use>; optional --flatten to paths

v1 targets flat-color segmented marks. v1.1 adds gradient normalize/re-apply.

Prototype → core

Built first in Python (numpy/scipy/scikit-image/shapely/Pillow + vtracer), with a pure, IO-free pipeline so the eventual Rust core (npm via napi-rs, PyPI via PyO3/maturin, WASM for browser) is a mechanical port.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vectormark-0.2.0.tar.gz (795.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vectormark-0.2.0-py3-none-any.whl (66.7 kB view details)

Uploaded Python 3

File details

Details for the file vectormark-0.2.0.tar.gz.

File metadata

  • Download URL: vectormark-0.2.0.tar.gz
  • Upload date:
  • Size: 795.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vectormark-0.2.0.tar.gz
Algorithm Hash digest
SHA256 074b8625d7259efa38b96455cc26a42bc6b0571b207ba2ff553d1e9afe4b483b
MD5 76bb03cf99db0ea08c614031801fb094
BLAKE2b-256 57e30fc7cce1f92e251a595ebbfb35079c4d5d7b1c706cee7ca71bf5a9d51faa

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectormark-0.2.0.tar.gz:

Publisher: release.yml on pradeepmouli/vectormark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vectormark-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vectormark-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 66.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vectormark-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29d36dc16f550ddb17145f7241c53c0bfd9280fa56bd3fbd633c7ee6f689d878
MD5 7ab842fe9406cb5fb273c1867c170811
BLAKE2b-256 bd8a98b23e584869b9348f143feec1f9258953e80dfe5a4051de840dad4c0be8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectormark-0.2.0-py3-none-any.whl:

Publisher: release.yml on pradeepmouli/vectormark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page