Peking University's COVec Splits Light From Color to Vectorize Real Photos
COVec brings intrinsic image decomposition into SVG for the first time, splitting photos into albedo, shade, and light vector layers.
ProTakeaways
- COVec is the first image vectorizer to split SVGs into albedo, shade, and light layers using intrinsic decomposition.
- Uses SAM for albedo masks and a region-wise semantic binarization to seed the illumination layer.
- Composites layers with SVG's native multiply and plus-lighter blending, producing a single editable file.
- Beats DiffVG, LIVE, O&R, and LayerVec on MSE and LPIPS across face, scene, and emoji datasets.
- Scores 65.2% and 66.2% Vector Compactness on Face and Scene, versus 55.4% and 57.6% for LayerVec.
- Code promised at github.com/decade-de/COVec; paper at arxiv.org/abs/2511.20034.
Vectorizing icons and emojis is a solved problem. Vectorizing a photograph of a face or a bear's fur, without shattering it into hundreds of tiny fragments, is not. A team from Peking University is proposing a fix borrowed from Renaissance painters: separate the intrinsic color of a surface from the light hitting it, then represent each as its own SVG layer.
Their method, called COVec, is described in a new paper titled Clair Obscur: an Illumination-Aware Method for Real-World Image Vectorization. It is the first vectorization framework to introduce intrinsic image decomposition in the vector domain, separating an image into albedo, shade, and light layers in a unified vector representation.
Why photographs break existing vectorizers
Scalable Vector Graphics represent images through geometric primitives, providing a compact and structured description of visual content, and vectorization enables scalable, resolution-independent representations that support editing, animation, compression, and high-quality rendering. That works cleanly for flat art. Real photos are harder because they contain smooth tonal variation from lighting and shadow.
To match complex tonal variations, current methods often produce numerous fragmented shapes. This fragmentation undermines semantic conciseness, the ability to represent an image using a small number of coherent, semantically meaningful vector shapes, which in turn limits editability of the resulting SVG. If you want to recolor a shirt in an SVG produced by prior methods, you may end up chasing dozens of shards that together approximate its shading.
Prior optimization-based methods like DiffVG, LIVE, O&R, and LayerVec try to organize shapes into layers, but existing layer decomposition techniques mainly operate within RGBA compositing frameworks, and when applied to real-world images, they often produce redundant vector paths that compromise semantic conciseness.
Borrowing a trick from Renaissance painters
Clair-Obscur, or chiaroscuro, is the artistic principle of using strong light-versus-shade contrast to imply form. The authors translate this into math. Following an extended image formation model, a pixel image is represented as the combination of intrinsic albedo, shading, and additive lighting, written as I = A * S + L. COVec applies the same equation to vector graphics, splitting an SVG into three layers:
- Albedo: the intrinsic surface color, independent of lighting.
- Shade: light attenuation, composited via SVG's
multiplyblend mode. - Light: additive highlights and reflections, composited via
plus-lighter.
The clever part is that SVG's native blending modes are used directly, so multiply implements the attenuation effect of shading in intrinsic image decomposition, allowing the shade layer to modulate surface reflectance without altering the underlying albedo structure. The final composite is a real SVG file, not a rendered raster.

The pipeline, step by step
The overall COVec pipeline follows a coarse-to-fine reconstruction process, including initialization and optimization. There are essentially three stages:
- Layer initialization. The albedo map is obtained from the target image using a standard intrinsic decomposition model. To extract semantic structural regions unaffected by illumination variations, the authors run the pretrained SAM segmentation model on the albedo map to generate albedo masks. The illumination layer is seeded by a new region-wise semantic binarization: within each SAM-derived region, pixels darker than the region mean are labeled as shadow.
- Structural optimization. Albedo and illumination layers are jointly optimized with DiffVG differentiable rendering. During a warm-up stage each layer is supervised by its own structure loss, ensuring stable alignment with initialization masks. After the first 50 epochs, training switches to the shared reconstruction objective for the remaining 50 epochs.
- Illumination refinement and separation. With albedo frozen, new Bezier paths are added into high-error regions to capture fine lighting detail. The illumination layer is then split: paths whose color values remain within the normalized range are assigned to the shade layer, whereas paths whose values exceed this range are identified as highlight-contributing regions and grouped into the light layer.

Numbers on faces, scenes, and emojis
Evaluation covers three datasets of 100 images each: faces from FFHQ, scenes from Things and TID2013, and emojis from Noto Emoji. The baselines are DiffVG, LIVE, O&R, and LayerVec (the prior state of the art for layered vectorization).
Under increasing path budgets, COVec achieves the lowest reconstruction error and perceptual distance across MSE and LPIPS in most cases, consistently outperforming other methods, and attains comparable or better results with substantially fewer paths.
On semantic containment, measured by Vector Compactness (share of vector paths that stay within a semantic object boundary), COVec scores 65.2% on the Face dataset and 66.2% on Scene, versus 55.4% and 57.6% for LayerVec. In plain terms, its paths respect the boundaries of actual objects far more often.
Editing without breaking the lighting
The practical payoff shows up in editing. Because albedo is a separate layer, you can recolor an object and the shade and light layers automatically re-shade the new color through SVG blending. Recoloring only the albedo layer while keeping shade and light layers fixed preserves the illumination structure, while the blending mechanism naturally adapts illumination colors to the new albedo tone.
The authors ran a controlled edit test, taking a target image generated by Gemini 2.5, computing which regions changed, and editing only the top-k overlapping paths for each method. COVec produced clean transitions with a handful of edits, whereas competing methods needed many more path changes and still bled illumination into the color change.

Where it fits, and where it doesn't
COVec is a good fit if you need editable SVGs of real photographs for downstream design work, animation rigging, or asset pipelines where a designer will later recolor materials. It is overkill for icons: since the emoji dataset contains visually simple images without complex illumination variation, the authors use a simplified version of COVec that optimizes only a single albedo layer without introducing additional light or shade layers.
Limitations worth flagging:
- It leans on two heavy pretrained components, SAM for segmentation and an intrinsic decomposition model, so its results inherit their failure modes.
- Optimization is still per-image and iterative rather than feed-forward, so it will not compete with StarVector-style transformer approaches on latency.
- The number of path-addition rounds is capped at 5 to prevent unnecessary path growth and avoid overfitting, so very high-frequency textures may still be under-represented.
The code will be released at https://github.com/decade-de/COVec. The repository is referenced in the paper but was not yet public at the time of writing, so anyone planning to build on this should watch that URL rather than expect a working checkpoint today.