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.1.tar.gz (796.3 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.1-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vectormark-0.2.1.tar.gz
  • Upload date:
  • Size: 796.3 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.1.tar.gz
Algorithm Hash digest
SHA256 28e8f70e598808a801eaa062dae9cd42fa7e731f1650ce4228fd6de214c4f70a
MD5 8d66ddf97308a43b47b63a7fd66d9908
BLAKE2b-256 800ef26dfeeb9ec22f49d320e5778d62d96546f1d31d160bfeb4b6a1d6af8016

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectormark-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: vectormark-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 66.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 223a272c656b5f0ca628ebfcfe5f664511ab3056f69ef32b7bba486cf32a6e2f
MD5 f149a15917f02bbe612248e8911208a7
BLAKE2b-256 30ba6eeaf611bbf9c8dd2ef0e497a28d78d786e8e424cddc61e3aa88bcd44176

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectormark-0.2.1-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