TL;DR
Most image-to-vector converters act like over-caffeinated pointillists: they recreate a photograph’s pixels accurately, yet leave behind a chaotic soup of shapes that no human can actually edit. Lang-SVG transforms raster photographs into clean, hierarchical Scalable Vector Graphics (SVGs) organized like a family tree—where a "car" node branches neatly into "doors," "windows," and "tires." By marrying visual segmentation models with Multimodal Large Language Models (MLLMs), it yields vector graphics that both look sharp and make intuitive, semantic sense.
What Problem Does This Paper Address?
Vector graphics (SVGs) are essentially images written as code—collections of mathematical curves and polygons. Because they are text-based and infinitely scalable, SVGs are rapidly becoming a favorite interface between visual media and large language models.
However, turning a complex, real-world photograph into an SVG (a process called image vectorization) has adirty secret. Standard differentiable renderers optimize purely for pixel-level reconstruction. To match the colors and textures of a photo, they scatter vector shapes across flat layers with zero regard for what objects actually are. A car’s windshield might share a path with a puddle on the road, while high-frequency textures (like tree leaves) hog hundreds of curves. If a designer—or an AI agent—wants to select and move just the car, they are out of luck. Existing methods lack explicit object-part hierarchies and semantic labels.
Methods
Lang-SVG replaces the traditional flat stack of vector shapes with an explicit tree structure, where parent nodes represent whole objects and child nodes represent finer subparts. Building and refining this tree involves four novel steps alongside standard differentiable rendering:
- Tree Construction via Segmentation Priors: Starting with an input photo, Lang-SVG uses open-vocabulary segmentation (like Grounded-SAM) to find labeled big-picture objects, and granularity-controllable segmentation (like Semantic-SAM) to extract unlabeled coarse-to-fine sub-masks. It wires these into a parent-child tree based on spatial containment.
- Depth-Adaptive Simplification: Converting every mask into complex Bézier curves wastes control points, especially since background/root shapes mostly get covered up by finer foreground details. Lang-SVG gives deep leaf nodes (fine details) high geometric precision while simplifying shallow root nodes into rougher polygons.
- L1-SAM-Prompting: Standard vectorizers fix visual errors by clustering pixel-loss maps ($L_1$ residuals), which accidentally turns noisy textures into meaningless vector confetti. Instead, Lang-SVG feeds the bounding boxes and center points of high-error regions back into SAM as prompts, recovering clean, structurally coherent missing parts.
- Tree-Guided Pruning & MLLM Tagging: Redundant, similarly colored child or sibling nodes within the same branch are merged or pruned. Finally, to name the mysterious "unknown" fine-grained nodes, an MLLM (Qwen3.5-27B) is prompted with image crops plus the SVG tree context—parent/sibling names, bounding boxes, and RGB colors—to deduce whether a tiny shape is a "bird's tail" or just "tail texture."
Datasets
Because standard vectorization benchmarks only check pixel fidelity on simple icons, the authors assembled an evaluation suite focused on natural scenes and part hierarchies:
- ADE20K-Part234: 200 uniformly sampled natural scene images containing 752 ground-truth object/part/subpart masks (1,624 annotated parts), used as the primary testbed for structural alignment and hierarchy quality.
- COCO-AOKVQA: Natural images paired with scene descriptions, used to test text-to-image semantic preservation.
- Pascal-Part & Iconfont: Used for qualitative open-vocabulary part tagging on natural objects and testing generalization on 40 complex SVG-style illustrations, respectively.
The authors also introduce a new evaluation protocol combining StructXLIP (an edge-aware vision-language similarity score) with Part-Mask Recall across multiple Intersection-over-Union (IoU) thresholds.
Key Insights and Ideas
- Hierarchy actually helps pixel fidelity: You might expect forcing shapes into neat semantic trees would hurt raw visual reconstruction under a tight budget. The opposite happens: because curves aren't wasted on redundant overlaps or noisy textures, the image looks sharper at low control-point budgets.
- The tree is a powerful semantic clue: When the authors hid ground-truth labels and blinded the MLLM to the actual image pixels—giving it only the SVG tree's geometry, colors, and neighboring tags—it still guessed missing part names with 60.7% accuracy (outperforming the 58.5% achieved by looking at the image alone!). Combining visuals and tree context pushed accuracy to 81.3%.
- Color + Hierarchy beats IoU pruning: Pruning overlapping masks by geometry alone misses shapes that look identical in color and belong to the same object. Checking SVG layer colors within a semantic branch safely deletes rendering bloat without accidentally merging a red shirt into a nearby red apple.
Key Results
Across all control-point budgets (576, 1,152, and 2,304 points), Lang-SVG achieves state-of-the-art reconstruction and structural alignment on ADE20K:
- At a tight budget of 576 control points, Lang-SVG boosts StructXLIP from 0.462 (SGLIVE) to 0.506, while jumping Average Part Recall from 28.8% (LIVSS) to 48.5%, alongside the highest PSNR (21.88).
- In hierarchy evaluations (IoU threshold 0.5), 95.55% of child nodes stay properly contained within their ground-truth parent objects, with 68.25% tagging reliability.
Limitations and Future Work
Lang-SVG stands on the shoulders of upstream segmentation models—meaning if Grounded-SAM or Semantic-SAM misses a tiny subpart or draws an ambiguous boundary, the SVG tree inherits that blind spot. Additionally, Qwen3.5-27B is used off-the-shelf rather than being natively fluent in vector graphics. For future work, the authors suggest fine-tuning MLLMs directly on hierarchical SVG trees, rendered vector regions, and part annotations, reducing reliance on external segmentation models and moving toward native, end-to-end semantic vector understanding.
Summary updated