Fully Local Vectorization
Key point
An image-to-SVG pipeline that runs the entire process locally, from Moondream to VTracer.
Details
The macOS app Skiagrafia takes photos folder by folder and generates layered SVG and TIFF alpha mattes.
The entire inference stack is configured to be fully offline. It uses TRANSFORMERS_OFFLINE=1, HF_HUB_OFFLINE=1, the VLM uses the Ollama HTTP API, and the default backend is MPS.
The pipeline proceeds in the following order:
- Moondream 2: queries the image for meaning and extracts a label list, at about 100ms per image
- GroundingDINO SwinT-OGC: text-conditioned bounding box detection
- SAM 2.1 HQ Hiera Large: box-based pixel-level segmentation
- VitMatte ViT-B Composition-1K: alpha matting for smooth edges
- VTracer: Bézier spline-based vectorization producing logo-grade output
Total resident model memory is about 5GB, and it runs comfortably on a 64GB M1 Ultra.
The key choice was Moondream. There were 7B-class models with better description quality than LLaVA, MiniCPM-V, and LlamaVL, but for this task—quickly extracting just a noun list across a batch of 2,000 images—the judgment was that a lightweight, ~100ms model is far more efficient.
Beyond the reasoning behind the model choice, the post also covers the Protocol-based DI system, recursive child segmentation, and 5 design principles distilled through multiple rewrites.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.