The one-paragraph version
Lang-SVG is a new way to turn a regular photo — a grid of pixels — into SVG code that is organized like a family tree of meaningful things and their parts. Instead of producing a flat pile of colored shapes that happen to look right when stacked, it builds a hierarchy: a scene contains a car, the car contains a door and a tire, the tire contains texture detail, and each level gets a word label like “car” or “window.” It does this by starting from automatic segmentation models that can cut out objects at different levels of detail and name the coarse ones, then fitting vector shapes to those cuts, cleaning up duplicates, filling in missing pieces, and asking a multimodal large language model to name the unnamed fine pieces using clues from parents, siblings, children, location, and color. On natural images from ADE20K, it both looks more accurate and lines up much better with how humans label parts than previous vectorizers, and its tree context sharply improves automatic part naming.
The problem they're solving, and why it matters
Image vectorization means converting a raster image, meaning a fixed grid of colored pixels as in a photo, into SVG, meaning Scalable Vector Graphics, a text code that describes shapes like curves and filled regions that a renderer can draw at any size. SVG is attractive because it is compact, infinitely zoomable, and editable as code — increasingly a bridge between vision and language models that read and write code.
The problem is that most current vectorizers only care about looking right pixel by pixel. They optimize shapes so the rendering matches the photo, often by layering dozens or hundreds of semi-transparent curves. The result can get a good photo similarity score while scattering one object across many unrelated layers, spending shapes on high-frequency texture speckle rather than on a door, wheel, or lane divider, and providing no names or grouping. That makes selection, editing, and reasoning very hard: you cannot easily click “the bus” and move it if “the bus” is 30 fragments mixed with road and sky.
Earlier attempts added segmentation priors, meaning precomputed masks that say which pixels belong together, using models like SAM, the Segment Anything Model that can cut out regions from point or box prompts. But plain SAM does not give a clean object-to-part-to-subpart hierarchy, and a related method that used diffusion simplification to get coarse-to-fine levels could warp boundaries. Lang-SVG asks: can we vectorize directly into a labeled hierarchy that preserves both appearance and human-perceived structure?
The key idea, in plain words
Think of the image as a parts catalog, not a pile of paint strokes. Lang-SVG stores the vectorization as a tree, where tree means nodes connected by parent-child links with one root at the top. The root is the whole image background. Its children are large objects like car, road, bridge. Their children are parts like tire, window, lane divider. Leaves at the bottom hold fine details.
Each node in that tree holds three things: a word tag for meaning, a mask for which pixels it claims, and a small set of vector primitives, meaning parametric shapes like Bézier curves whose control points determine their outline, plus color and opacity.
The key moves are to avoid forcing geometry through lossy simplification, to spend geometric detail where it is visible rather than where it will be hidden underneath other layers, to clean redundancy using the tree rather than just overlap, and to let language models name fine regions using the tree as context. In the paper’s street example, the coarse level says car, road, bus, bridge, background, and the fine level under car expands to tire, window, door, and even road texture elsewhere — with parent links preserving that a window belongs to that car.
How it actually works, step by step
Start from language-aware cuts. Lang-SVG first gets labeled coarse masks from open-vocabulary segmentation, meaning models that can find and name regions from free-form language concepts without being limited to a tiny fixed class list. The paper uses Grounded SAM, which combines automatic detection or tagging with SAM to produce masks, and part-aware models like LangHOPS. It then adds multi-granularity masks, meaning cuts at several levels of coarseness to fineness, from granularity-controllable models like Semantic-SAM that can output several nested levels. Those fine masks start with the tag “unknown” as candidates.
Build the tree by containment. Candidate masks are inserted from coarse to fine. In words: a new region becomes a child of an existing node if most of the new region lies inside the existing node’s mask. If several existing nodes contain it, pick the deepest one, meaning the most specific already-placed ancestor, breaking ties by mask overlap. If nothing contains it, attach it to the root. This turns flat masks into explicit “part of” relations.
Fit shapes with depth-adaptive effort. Each mask is turned into a polygon outline, then approximated by Bézier curves. Depth here means distance from the root: shallow nodes near the root are large and mostly covered up by children drawn on top through alpha compositing, the standard way semi-transparent layers blend. So Lang-SVG uses a looser tolerance near the root, giving simpler polygons with fewer points, and a tighter tolerance at leaves to keep crisp boundaries. This allocates the limited control-point budget, meaning the total number of curve-defining points allowed, in proportion to visible contribution.
Optimize in two phases with L1-SAM-Prompting in between. The system first does structure optimization to fit the segmentation-derived shapes, then visual refinement to polish appearance by differentiable rendering, meaning adjusting shape parameters by gradient descent to reduce the difference between rendering and photo. The bridge is L1-SAM-Prompting: instead of directly turning the pixel error map, the absolute difference between current rendering and target, into jagged cluster shapes that chase texture noise, it takes bounding boxes and center points from those high-error clusters and uses them as prompts to SAM. SAM returns more coherent, object-like missing regions that are added as new leaves. This recovers holes the initial segmentation missed without just fitting speckle.
Prune and merge using the branch, not just overlap. Multi-level segmentation produces many redundant masks. Lang-SVG compares a child to its parent and siblings within the same semantic branch using rendered color similarity and spatial overlap: an unlabeled child very similar in color to its parent is removed, and similar-colored parent-child or sibling nodes with enough overlap can be merged. Crucially, branch constraints prevent merging same-colored regions from different objects, and already-labeled semantic nodes are preserved. Color and overlap here detect rendering redundancy, not semantic identity.
Name the unknowns with a language model plus tree context. For unlabeled nodes under a labeled ancestor, the paper prompts Qwen3.5-27B — the paper names this model, though its reference points to the Qwen3 technical report, so the exact variant is unclear — with the full image, a crop around the target region, its SVG color, ancestor and parent tags to set scope, labeled sibling and child tags, and bounding-box layout for spatial cues. It asks for one label in a closed set, meaning chosen from a fixed list like the 234 ADE20K-Part labels, or free-form in open-vocabulary mode, defaulting to “texture” or “unknown” when ambiguous to avoid overconfident naming.
What they showed — results, honestly, with limitations
The main tests use 200 sampled ADE20K validation images with 752 ground-truth part and subpart masks, plus COCO-AOKVQA scene descriptions for text-to-image semantic checks and 40 complex Iconfont SVG-style images. Comparison controls for budget in two ways: Same points, meaning equal total control points across methods, the main protocol, and Same paths, meaning equal number of SVG paths for mask-based methods.
On reconstruction plus structure at 576, 1152, and 2304 points, Lang-SVG leads LIVE, DiffVG, SGLIVE, and LIVSS on SSIM, PSNR, LPIPS, StructXLIP, and CLIP in most settings. For example at 576 points it moves StructXLIP, a structure-aware vision-language score that emphasizes edges and layout, from 0.462 for the next best to 0.506, and average part recall — the share of human part masks matched by some SVG region above overlap thresholds 0.3, 0.5, 0.7, 0.8 — from 28.8% to 48.5%. With more budget recall climbs to 64.2% at 2304 points. Text-to-image alignment also improves: on COCO at 576 points, text-to-image StructXLIP rises from 0.188 to 0.270 versus DiffVG while PSNR only moves modestly, suggesting semantic preservation beyond pixels.
Hierarchy quality is strong on containment but imperfect on naming: child containment, meaning how much of an SVG child lies inside its true parent, is 95.55% at 0.5 overlap and 86.65% at 0.7; tagging reliability, meaning how much of a labeled SVG region is covered by the same-labeled true subpart, is 68.25% at 0.5; labeled subpart recall is 47.06% at 0.5. For tag recovery alone with true masks given but up to half the tags hidden, tree context raises accuracy from 58.5% with images only to 81.3% with parents, siblings, geometry, and color.
Ablations support that gains are not just better segmenters: swapping Semantic-SAM plus Grounded-SAM into LIVSS helps a little, but Lang-SVG with the same priors jumps much further. Removing the tree, removing depth-adaptive simplification, removing tree pruning, or removing L1-SAM-Prompting all hurt. Limitations stated by the authors, and visible in numbers, are real: quality is still bounded by upstream segmentation, small subparts and texture-like regions inherit errors, and the labeling language model is not specially trained for SVG understanding. Future work proposes fine-tuning such models on SVG trees and part annotations.
Why this might matter to me
For spatial reasoning in vision-language models, Lang-SVG offers a testbed where “understanding” must be grounded in explicit containment and sibling layout, not just caption similarity. Its masked-tag task — predict the missing part name from parent, siblings, boxes, and color — directly measures whether a model uses hierarchical and geometric context, and its large jump with layout suggests a path toward structure-aware prompting and evaluation.
For world models, a labeled vector tree is a compact, editable state: objects persist as nodes with parts and attributes rather than flickering pixels. That could make dynamics, interaction, and counterfactual edits easier to represent than in pure pixel rollouts.
For text-to-CAD and parametric geometry, the depth-adaptive idea and tree-guided pruning map closely to CAD practice: coarse sketches define major solids, fine sketches add features, and redundant sketches that do not change rendered or manufactured shape should be suppressed within the same body but never merged across bodies. Lang-SVG’s budget-aware simplification is a 2D analogue of feature-suppression and level-of-detail control.
For 3D generation and scene representation, the lesson is to generate structure plus appearance together: layered primitives organized by parent-child semantics, recovered missing regions via error-prompted proposals, and metadata preserving labels and relations for downstream selection and animation. Extending this tree to 3D parts, articulated subparts, or scene graphs could bridge vector graphics, neural fields, and Gaussian-style primitives with language-addressable editing.
Terms worth knowing
- Raster image: a photo stored as a fixed grid of pixels, each with color values. Good for capture, bad for clean editing at arbitrary scale.
- SVG / vector primitives: Scalable Vector Graphics code describing shapes mathematically, for example Bézier curves controlled by control points, plus fill color and opacity. Resolution-independent and editable as text.
- Differentiable rendering: a renderer that lets you compute how changing a shape or color would change the image error, so you can improve shapes by gradient descent.
- Segmentation mask: a binary map saying which pixels belong to a proposed region, like “all pixels of this wheel.”
- Open-vocabulary segmentation: finding and naming regions using free language concepts, not just a small pre-fixed class list. Grounded SAM does this by coupling automatic detection with SAM.
- Granularity-controllable segmentation: a model like Semantic-SAM that can output cuts at multiple coarseness levels, from whole object to part to sub-detail.
- SAM / L1 loss map: SAM is the Segment Anything Model that produces masks from prompts like points or boxes. L1 loss map here is the per-pixel absolute difference between current SVG rendering and target photo, used to spot missing areas.
- Tree, depth, branch: the hierarchy Lang-SVG builds. Nodes are regions with shapes. Edges mean “part of.” Depth is distance from the root image node. A branch is all descendants of one semantic ancestor, used to limit merging.
- StructXLIP and part recall: evaluation beyond pixel error. StructXLIP is a vision-language score sensitive to edges and structure. Part recall is the fraction of human-annotated part masks that some SVG region overlaps well enough at a given IoU threshold, where IoU means intersection over union, the area of overlap divided by area of union.