SemLayer: Semantic-aware Generative Segmentation and Layer Construction for Abstract Icons

Haiyang Xu, Ronghuan Wu, Li-Yi Wei, Nanxuan Zhao, Chenxi Liu, Cuong Nguyen, Zhuowen Tu, Zhaowen Wang

TL;DR

SemLayer is a novel generative pipeline that reconstructs editable, semantically meaningful layered structures from flattened vector icons. By framing segmentation as a colorization task and leveraging diffusion-based amodal completion, it recovers full object geometries and their correct stacking order, enabling seamless editing and animation workflows.

What Problem Does This Paper Address?

Vector icons are essential in digital design, but they are frequently distributed in a "flattened" format (merged into a single path or compound path) to optimize file size or for third-party redistribution. This destroys the original layer hierarchy, making simple tasks like recoloring a specific part or animating an element incredibly tedious, as designers must manually re-segment and redraw occluded parts.

Standard image segmentation tools (like the Segment Anything Model, or SAM) fail here because abstract icons lack the rich texture, shading, and depth cues found in natural images. Furthermore, standard tools cannot reason about hidden, occluded geometries—a necessity for restoring true, independent layers.

Methods

SemLayer breaks down the problem into a multi-stage generative pipeline:

  1. Semantic-aware Generative Segmentation: Instead of standard mask prediction, the authors cleverly reformulate segmentation as a controllable colorization problem. Using a diffusion transformer (built on the EasyControl baseline), the model maps a monochrome icon into a chromatically differentiated image where each distinct color corresponds to a semantic part.
  2. Amodal Layer Completion: To recover parts hidden by overlap, the pipeline uses a latent-diffusion amodal completion model (adapted from pix2gestalt). It predicts the full, unoccluded geometry of each segmented component, ensuring style-consistent "hallucinations" of hidden lines.
  3. Layer Ordering Optimization: Once the full shapes are recovered, an Integer Linear Programming (ILP) framework determines the mathematically optimal stacking order by balancing an "occlusion reward" (ensuring extra pixels are covered) against a "visibility penalty" (preventing visible pixels from being incorrectly hidden).

Finally, a curve reuse strategy vectorizes the ordered layers back into clean SVGs, preserving original Bézier segments wherever possible and only drawing new "bridge curves" where geometry was completed.

Figure 2. Overview of our SemLayer pipeline.

Datasets

Due to a lack of pre-existing annotated vector icon data, the authors curated two new datasets:

  • SemLayer-Segmentation: Contains 8,567 training icons with segmented semantic parts, sourced from real-world SVGs (via LayerPeeler) and synthetically generated descriptions using GPT-4o and gpt-image-1.
  • SemLayer-Completion: Contains 50,000 training triplets simulating occlusions by combining pairs of distinct icons as object and occluder.
  • Test Set: A manually verified set of 48 high-quality real-world SVG icons exhibiting complex semantic structures and part-level occlusions.

Key Insights and Ideas

  • Segmentation as Colorization: Framing segmentation as a generative colorization task allows the model to exploit strong shape-semantic priors embedded in modern diffusion models, bypassing the limitations that traditional edge or mask detectors face with abstract line art.
  • Many-to-One Amodal Training: When an object is fragmented into multiple visible pieces by an occluder, treating each fragment as an independent input that maps to the same complete underlying shape drastically improves the model's robustness to heavy occlusion.
  • Curve Reuse over Generation: Instead of generating vector curves from scratch (which often yields messy, un-editable paths), reusing the original high-quality Bézier segments ensures the output remains professional-grade and designer-friendly.

Key Results

  • Segmentation Superiority: SemLayer outperforms a fully fine-tuned SAM2 by +5.0 mIoU and +16.7 Panoptic Quality (PQ) on the original predictions.
  • Accurate Completion: On amodal completion, SemLayer achieves 85.2 mIoU and a Chamfer Distance of 46.6, significantly outperforming general amodal models like MP3D.
  • Downstream Utility: The pipeline successfully enables complex editing workflows—such as swapping colors, scaling individual components, and creating animations—directly from flattened web assets.
Figure 4. Qualitative comparison of completion results.

Limitations and Future Work

The current pipeline is optimized primarily for black-and-white line drawings, which represent the hardest case for semantic decomposition due to the complete lack of color cues. However, highly tangled or heavily occluded icons can still cause the model to fail or produce implausible completions.

Looking ahead, the authors aim to extend SemLayer to multi-color, filled, and stylistically diverse vector graphics, paving the way for fully automated vector editing assistants.

Summary updated

BibTeX
@inproceedings{xu2026semlayer,
  author = {Haiyang Xu and Ronghuan Wu and Li-Yi Wei and Nanxuan Zhao and Chenxi Liu and Cuong Nguyen and Zhuowen Tu and Zhaowen Wang},
  title = {{SemLayer: Semantic-aware Generative Segmentation and Layer Construction for Abstract Icons}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=vnOkW5wKGF},
}
Figure