agentpip/vectorforge

Local-first raster-to-vector workbench and neural SVG service

★ 0Forks 0GitHub ↗Compare

README

VectorForge

A local-first raster-to-vector workbench for deterministic tracing and neural SVG reconstruction on Apple Silicon.

Direction

VectorForge will provide one task-oriented API over multiple engines:

  • VTracer for full-color deterministic tracing
  • Potrace for monochrome contours
  • StarVector for neural image-to-SVG reconstruction
  • OmniSVG for complex neural SVG generation
  • SVG validation, rendering, and candidate comparison
  • On-demand model loading with idle eviction

The initial deployment target is an Apple Silicon Mac with a PyTorch/MPS runtime. The API will remain independent of any one serving runtime so MLX or GGUF backends can be added when they provide real value.

Status

The first working vertical slice is available:

  • Configurable FastAPI service (VECTORFORGE_HOST, VECTORFORGE_PORT)
  • Bearer-token enforcement whenever the service binds beyond localhost
  • Bounded upload bytes and decoded-image pixel limits
  • Safe per-job artifact workspaces and downloadable artifact URLs
  • Image normalization
  • Strictly validated VTracer options
  • VTracer full-color vectorization
  • SVG safety validation and structural metrics
  • Unit and feature coverage enforced at 95% or better

Potrace, rendered previews/diffs, candidate comparison, and neural engines are next.

Quick start

cp .env.example .env
uv sync --all-extras
uv run vectorforge serve

The default address is http://127.0.0.1:8742; change it in .env without modifying application code.

curl -X POST http://127.0.0.1:8742/v1/vectorize \
  -F 'engine=vtracer' \
  -F 'image=@./image.png;type=image/png'

Run the quality gates with:

make verify

License

MIT

Contributors

msitarzewski

Issues