Source-linked AI summary
LayerD: Decomposing Raster Graphic Designs into Layers
Tomoyuki Suzuki, Kang-Jun Liu, Naoto Inoue, Kota Yamaguchi
TL;DR
Raster compositing removes the layer structure needed for re-editing, motivating automatic decomposition of graphic designs into editable layers. LayerD iteratively extracts unoccluded top layers, completes backgrounds, and refines flat regions with palette cues. It reports high-quality decomposition against baselines using an evaluation protocol designed for ambiguous layer structures, while leaving vectorization as a direction for future work.
Problem
Raster compositing discards layer information, while graphic-design decomposition has multiple valid layer structures and unreliable ground-truth granularity.
Method
LayerD iteratively extracts unoccluded top layers, completes backgrounds, and recovers foreground colors using matting, inpainting, and domain-specific refinement.
Results
LayerD achieves solid improvement over baselines and the highest reported quality under an evaluation protocol that accounts for ambiguous layer structures.
Takeaways & Limitations
The decomposed layers can support downstream graphic-design editing and broader re-editable creative workflows.
Takeaways & Limitations
The paper leaves vectorization as a future direction beyond its raster-layer decomposition approach.
Abstract
from arXiv · showhide
Designers craft and edit graphic designs in a layer representation, but layer-based editing becomes impossible once composited into a raster image. In this work, we propose LayerD, a method to decompose raster graphic designs into layers for re-editable creative workflow. LayerD addresses the decomposition task by iteratively extracting unoccluded foreground layers. We propose a simple yet effective refinement approach taking advantage of the assumption that layers often exhibit uniform appearance in graphic designs. As decomposition is ill-posed and the ground-truth layer structure may not be reliable, we develop a quality metric that addresses the difficulty. In experiments, we show that LayerD successfully achieves high-quality decomposition and outperforms baselines. We also demonstrate the use of LayerD with state-of-the-art image generators and layer-based editing.
1. Introduction
LayerD targets automatic decomposition of raster graphic designs into editable layer sequences, addressing domain-specific structure and ambiguity in layer granularity. It combines iterative top-layer extraction with an evaluation protocol designed for inconsistent ground truth.
- Raster compositing discards layer information, making precise decomposition valuable for editing existing graphic-design assets.
- Graphic designs combine typography, illustrations, vector art, embellishments, and photos, so natural-image decomposition can create unintended splits or artifacts.
- LayerD formulates decomposition as iterative top-layer matting and background completion, integrating subtasks into a fully automatic pipeline.
- The method uses qualitative edit-distance and visual-quality metrics aligned by dynamic time warping to accommodate multiple valid layer structures.
- LayerD achieves the highest quality against baselines, and its decomposed layers support downstream graphic-design editing.
2. Related Work
Prior work covers image decomposition, matting, foreground estimation, vectorization, and layered representations, but graphic designs introduce unusual object granularities and flat visual elements. LayerD addresses this setting with a simple domain-aware decomposition pipeline.
- Related approaches include color segmentation, alpha-based layer decomposition, and image vectorization, which represents images with drawing-function parameters rather than layer images.
- Natural-image decomposition methods target object-level layers, while graphic designs require handling typography, vector shapes, and mixed materials.
- Graphic-design decomposition must handle context-dependent granularity, such as whether a logo’s illustration and text should form separate layers.
- LayerD’s pipeline is described as simpler than a concurrent stacked pipeline and leverages domain knowledge for refinement.
- LayerD uses top-layer matting together with background completion and estimates foreground color from the matte and completed background.
3. Problem Formulation
The problem is to recover an ordered sequence of RGBA layers whose compositing reproduces a raster RGB image. LayerD treats this as an inverse alpha-compositing problem while acknowledging that dataset-defined layer granularity determines the target representation.
- The input is an RGB image x, and the output is an ordered sequence of RGBA layers Y indexed by blending order.
- Layers are recursively alpha-composited from back to front, with each layer combining its RGB color and alpha channel with the preceding composite.
- Layer decomposition inverts this compositing process to estimate the layer sequence from the raster image.
- The target layer granularity depends on the dataset, and human-created graphic designs serve as ground truth in this study.
4. Approach
LayerD iteratively extracts unoccluded top layers, completes the exposed background, and recovers foreground colors through inverse blending. It trains a top-layer matting model on graphic-design data and refines flat regions using palette and gradient cues.
- LayerD unifies decomposition subtasks by repeatedly extracting unoccluded top layers and completing the remaining background.
- The alpha model identifies top-layer regions, while background completion supplies an image used to estimate foreground RGB values through inverse alpha blending.
- LayerD uses a learned top-layer matting model and an off-the-shelf background inpainting model, with LaMa selected because generative approaches often insert unnecessary objects.
- Training targets combine non-occluded layers into top-layer alpha maps and recursively generate examples from remaining backgrounds.
- 4.3. Palette-based Refinement: Palette-based refinement detects flat connected regions from color gradients and assigns completed pixels to nearby dominant palette colors in Lab space.
- 4.3. Palette-based Refinement: The refinement is intended to eliminate artifacts in rough background-completion predictions for flat graphic regions.
5. Decomposition Metrics
LayerD evaluates decomposed layer sequences by aligning layers in order while accommodating differing lengths and permissible merges. The resulting metric combines appearance quality with layer granularity to address ambiguity in ground-truth structures.
- Layer alignment: Visibility-based preprocessing groups unoccluded layers into top-layers without changing the composite image.The process repeatedly blends visible regions that are not occluded by higher layers.
- Layer alignment: DTW aligns ground-truth and predicted layer sequences while preserving z-order, even when their lengths differ.Layers are paired monotonically, so alignment cannot shuffle their sequence order.
- Quality metric: The layer-pair distance combines negative alpha soft IoU with RGB-channel L1 distance weighted by ground-truth alpha.The same appearance components are used in the final quality function.
- Quality metric: The quality metric averages pairwise layer distances across the DTW alignment using a general similarity-or-distance function.Layer quality is computed over aligned pairs rather than requiring identical layer counts.
- Layer merge: A Merge edit combines consecutive z-ordered layers when it yields the largest positive distance improvement, relaxing alignment constraints.Edits continue until no improvement remains or only two layers remain, and ground-truth layers are mergeable as well.
6. Experiments
LayerD is evaluated on Crello using quantitative, qualitative, ablation, and application experiments. It outperforms the baselines, refinement improves decomposition quality, and the method supports decomposing generated images and layer-based editing.
- Quantitative Evaluation: LayerD generates layer sequences closer to ground truth than baselines with fewer edits across visual quality metrics.This holds with and without text layers; for all layers, LayerD alone also outperforms LayerD combined with Hi-SAM.
- Quantitative Evaluation: Training on graphic designs makes LayerD more effective than Hi-SAM and BiRefNet, while text-layer training slightly improves decomposition even without text targets.The authors suggest text may function as a variant of vector shapes.
- Ablation: Color estimation lowers RGB L1, background refinement improves subsequent Alpha IoU, and foreground refinement slightly improves alpha quality and boundary regions.The ablation attributes later decomposition gains to improved background completion.
- Qualitative Evaluation: LayerD produces cleaner qualitative decompositions than VLM and YOLO because it directly extracts layers without relying on bounding boxes.VLM struggles with failed or overlapping detections, while YOLO suffers from false negatives and incomplete decomposition.
- Qualitative Evaluation: Foreground and background refinement recover missing content and improve subsequent layers in the recursive decomposition process.Foreground refinement recovers a gold decoration, while background refinement completes missing background regions.
- Applications: LayerD decomposes FLUX.1-generated graphic designs and enables layer-level color, translation, resizing, and other editing operations without significant artifacts.Quantitative evaluation is unavailable for generated images because ground-truth layers are not provided.
7. Conclusion
The paper presents LayerD as an automatic framework for decomposing raster graphic designs through iterative layer extraction, background completion, and refinement. It also introduces an evaluation protocol for ambiguous layer structures and reports improvement over baselines, while identifying vectorization as a future extension.
- LayerD combines iterative extraction of unoccluded layers, background completion, and graphic-material-specific refinement for raster graphic decomposition.
- The proposed evaluation protocol uses layer edit and appearance quality between aligned layer sequences to address unreliable ground-truth layer structures.
- Experiments show solid improvement over baselines, while vectorization remains a future direction for expanding the creative workflow.
Supplementary Material
The supplementary material demonstrates that LayerD’s decomposed layers support precise, intuitive editing of individual graphic elements in PowerPoint.
- LayerD decompositions can be split into connected components and imported into PowerPoint for layout manipulation, image effects, and precise element-level editing.
B. Additional Results
LayerD produces effective decompositions across diverse Crello designs and achieves the strongest practical utility ratings among the compared methods. Its main failure modes involve very small objects and ambiguous layer granularity.
- B. Additional Results: LayerD demonstrates effective decomposition across diverse design styles in additional Crello test-set examples.The examples show decomposed layers ordered from back to front.
- C. Failure Cases: Very small objects, including detailed text descriptions, remain difficult to decompose because of their limited spatial extent.The authors suggest increasing input resolution as a possible mitigation.
- C. Failure Cases: Ambiguous layer granularity produces cases that humans also cannot decompose consistently, motivating improved training objectives or post-refinement.The evaluation metrics already account for this ambiguity.
- D. User Study: LayerD achieves the highest average user-study score, with 71.4% of users rating it highest on average.The study used 21 experienced cloudworkers and 50 anonymized decomposition results rated on a five-point scale.
E. Influence of Matting and Inpainting Model Choices
Larger matting backbones improve LayerD’s performance, whereas replacing the inpainting model with FLUX.1 Fill causes significant degradation. The evaluation also includes qualitative decomposition and editing examples on Crello.
- E. Influence of Matting and Inpainting Model Choices: Larger matting models improve performance, while FLUX.1 Fill causes significant degradation in the evaluated configurations.The compared matting backbones are Swin-L/T and PVT-M/S, with LaMa fixed for backbone comparisons and FLUX compared against LaMa for inpainting.
- E. Influence of Matting and Inpainting Model Choices: Generative inpainting often introduces unwanted objects that interfere with subsequent decomposition steps.This result highlights the need for graphic-design-specific inpainting and refinement.
- E. Influence of Matting and Inpainting Model Choices: LayerD qualitative examples include decompositions ordered from back to front and layer-level edits on Crello test images.The editing examples include layout changes, color changes, effects, text removal, and object manipulation.
F. Detail of Decomposition Metrics
The evaluation aligns predicted and ground-truth layer sequences with Dynamic Time Warping, then uses iterative merging to quantify edit distance while accommodating different layer counts.
- F.1. Dynamic Time Warping: Dynamic Time Warping aligns decomposition results of length K with ground truth of length Q using a distance-based accumulated-cost path.The alignment starts at (0,0), ends at (K,Q), uses unit steps, and includes every layer in at least one pair.
- F.1. Dynamic Time Warping: The final DTW distance is the average distance over all aligned layer pairs.The output pairs are constrained to connect the sequence endpoints while preserving layer coverage.
- F.2. Iterative Refinement: The refinement process repeatedly considers merging consecutive layers and selects edits that reduce the alignment distance.It uses a greedy local search over neighboring layers and stops at the edit or minimum-layer limit.
- F.2. Iterative Refinement: Each merge candidate is evaluated against the ground-truth layers aligned to the affected predicted layers.The procedure compares current and post-merge distance sums before accepting a merge.
G. Loss functions
LayerD trains its matting model with binary cross-entropy, IoU, and SSIM losses while preserving soft alpha values suited to graphic-design shading and transitions. The examples also illustrate DTW alignment and a practical overdecomposition case.
- G. Loss functions: LayerD uses binary cross-entropy, IoU, and SSIM losses for matting-model training.The losses compare predicted and ground-truth alpha maps, with SSIM computed over overlapping patches.
- G. Loss functions: Predicted and ground-truth alpha maps are not binarized because graphic designs commonly contain shading and smooth transitions.This preserves soft alpha structure during training.
- G. Loss functions: DTW visualizations connect matched predicted and ground-truth layers with red lines whose thickness represents matching score, while green boxes mark merged layers.Layers are ordered from back to front.
- G. Loss functions: LayerD can overdecompose a white background, but the evaluation treats merging those layers as one edit reflecting practical user workload.The example frames overdecomposition as removable through a single merge operation.