Metadata-Version: 2.4
Name: vectormark
Version: 0.1.0
Summary: Deterministic logo idealizer — rendered logo raster to clean, editable, symmetric SVG.
Project-URL: Homepage, https://github.com/pradeepmouli/vectormark
Project-URL: Repository, https://github.com/pradeepmouli/vectormark
Project-URL: Issues, https://github.com/pradeepmouli/vectormark/issues
License-Expression: MIT
License-File: LICENSE
Keywords: idealize,image-tracing,logo,raster-to-vector,svg,vectorization
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.12
Requires-Dist: numpy>=2.0
Requires-Dist: pillow>=10.0
Requires-Dist: scikit-image>=0.24
Requires-Dist: scipy>=1.13
Requires-Dist: shapely>=2.0
Provides-Extra: dev
Requires-Dist: mcp>=1.13; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: resvg-py>=0.1.7; extra == 'dev'
Provides-Extra: scoring
Requires-Dist: resvg-py>=0.1.7; extra == 'scoring'
Provides-Extra: server
Requires-Dist: mcp>=1.13; extra == 'server'
Description-Content-Type: text/markdown

# 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:
- spec: [`docs/superpowers/specs/2026-06-04-vectormark-logo-idealizer-design.md`](docs/superpowers/specs/2026-06-04-vectormark-logo-idealizer-design.md)
- plan: [`docs/superpowers/plans/2026-06-04-vectormark-v1.md`](docs/superpowers/plans/2026-06-04-vectormark-v1.md)

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

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):

```bash
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`](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
