amodal raster-to-vector

Exploring amodal completion to improve Inkvec's raster-to-vector tracing

Hidden shapes are the hardest problem in vector tracing, and Inkvec's maintainer is tackling it head-on.

3 min readMachine Learning
Exploring amodal completion to improve Inkvec's raster-to-vector tracing
I need feedback on this architecture for amodal raster-to-vector using a hybrid approach. [D]

If you want to understand where AI-native tools are heading, look at what the Inkvec project is attempting to solve. The maintainer is tackling a problem most users don't even know they have: when a raster-to-vector tracer sees a flat image of overlapping shapes, it treats the hidden parts as missing data. It completes them with guesses, circles, rectangles, a single curve bridge, and achieves a median IoU of 0.52 on 121 emoji. That is not good enough for professional work. The real insight here is that the training data already exists. Every SVG with overlapping paths stores the hidden geometry for free. The question is whether a sub-100M parameter model can learn to infer what is occluded as well as a human artist does. This is the kind of practical, constraint-driven research that matters more than chasing benchmarks. It connects directly to Building a Polish legal AI model starts with one clear choice, where the author faced a similar dilemma about data availability and model scale. Both projects share a refusal to wait for perfect conditions, they work with what exists.

The node placement problem is arguably more interesting. Artists place nodes at extremes and corners, respecting symmetry and curvature. Inkvec's proposed solution, a 1D CNN over closed outlines, outputting a node score and vertex type, conditioned on per-image style via a learned embedding, is a direct attempt to encode human aesthetic judgment into a lightweight architecture. The mention of using truncated signed distance functions for sub-pixel accuracy is a smart detail; it acknowledges that the output needs to match the precision designers expect, not just the resolution of the input raster. This mirrors the approach in Testing Curvature Signals for Adaptive Flow Matching Step Control, where the focus is on using geometric signals to guide a generative process efficiently. Both projects treat the output quality as a function of the input structure, not brute-force computation.

The most striking part of this proposal is the training strategy. Supervised fine-tuning first, then reinforcement learning to minimize CIEDE2000 color difference while keeping nodes close to the SFT outputs. That is a principled way to balance fidelity to human examples with perceptual quality. It also reveals a larger truth: the hardest part of building a practical vector tracer is not the architecture, it is defining what "good" looks like for a human artist. The Inkvec maintainer is honest about the open questions, particularly whether existing amodal segmentation solutions are too rough for this use case. That is the right skepticism. A 0.52 IoU is a starting point, not a destination. The specific takeaway here is that the combination of free labels from SVG geometry and a two-stage training loop (SFT then RL) offers a path forward that does not require massive compute or proprietary datasets. Watch whether the 1D TSDF approach for node placement can actually capture the symmetry and corner preferences that artists rely on, that will determine whether this project becomes a practical tool or remains an academic exercise.

From Machine Learning

I am the maintainer of Inkvec, a open-source raster-to-vector tracer for logos and icons (see: github.com/logolabs/inkvec ).

Right now the main issue with Inkvec is that it uses MDL in order to select nodes, plus it only creates jigsaws, failing to do amodal infilling so that it can complete what is hidden.

Read the original at Machine Learning