Touching circle and stroke
primitive_contact_pair
Bitmap-to-vector reconstruction
Most vectorizers trace pixels. Morphēa reconstructs form, turning bitmap artwork into clean, editable SVG geometry.
Live quality artifacts
Pipeline
Normalize alpha, reduce palette drift, bound analysis size, and keep real images tractable.
Find circles, strokes, rings, rectangles, quads, cut-outs, and regular grids before generic fitting.
Write layers, groups, reservations, metrics, and export policy metadata instead of opaque paths.
Use reports, curated checks, reviewed pseudo-labels, retraining, and structure-preserving refinement.
Current baseline
Circles, dots, rings, strokes, arcs, rectangles, rounded rectangles, quads, and perspective grids.
White interior gaps can stay selectable as overlay strokes or become SVG mask candidates.
Max size, palette quantization, component deferral, timeout diagnostics, and profile reports.
Synthetic data, classifier training, curated checks, review queues, retraining gates, and refinement.
Primitive quality gate
These panels are generated from passing primitive-check
artifacts. Each bitmap and SVG pair uses the same fixed canvas.
rect · 1 anchor · L1 0.0000 · edge 0.0000
circle · 1 anchor · L1 0.0000 · edge 0.0000
stroke_polyline · 1 anchor · L1 0.0000 · edge 0.0000
stroke_circle · 1 anchor · L1 0.0168 · edge 0.0211
circle · 1 anchor · L1 0.0052 · edge 0.0073
rect + circle · 2 anchors · L1 0.0000 · edge 0.0000
primitive_contact_pair · 2 anchors · L1 0.0000 · edge 0.0000
primitive_contact_pair · 2 anchors · L1 0.0000 · edge 0.0000
primitive_contact_pair · 2 anchors · L1 0.0000 · edge 0.0000
cutout export · 2 anchors · L1 0.0000 · edge 0.0000
parallel_stroke_group · 2 anchors · L1 0.0000 · edge 0.0000
arc · 1 anchor · L1 0.0088 · edge 0.0125
stroke_path · 1 anchor · L1 0.0176 · edge 0.0233
ellipse · 1 anchor · L1 0.0123 · edge 0.0148
cutout export · 2 anchors · L1 0.0023 · edge 0.0036
cubic_path · 1 anchor · L1 0.0117 · edge 0.0175
Quickstart
The legacy curve command remains as an alias, but new
scripts should use morphea.
python -m pip install -e .
python -m unittest discover -s tests
morphea vectorize input.png -o output.svg --color-tolerance 18
morphea curated-check docs/real-images/suite.json -o runs/curated.json --run
Repository docs
Status
Morphēa runs with a deterministic baseline today. Optional MLX SAM and DiffVG adapters report their configuration state instead of silently becoming requirements.