Creating Language-driven Spatial Variations of Icon Images

Xianghao Xu, Aditya Ganeshan, Karl D. D. Willis, Yewen Pu, Daniel RitchiearXiv 2024 · DOI · arXiv

Abstract

Researchers from Brown University and Autodesk have introduced a novel system for editing 2D icon images through natural language. By leveraging Large Language Models (LLMs) to translate text prompts into geometric constraints within a custom Domain Specific Language (DSL), the system optimizes the position, rotation, and scale of icon components. This approach successfully maintains structural integrity and physical coherence, outperforming traditional generative models in precise spatial manipulation tasks.

Introduction

While generative AI has revolutionized image synthesis, existing tools like Stable Diffusion often struggle with precise spatial editing. For structured graphics like icons, a simple request such as "move the lamp shade to touch the base" frequently results in visual artifacts, style drift, or a total loss of the object's logical structure. Icons require "physical coherence"—if one part moves, the connected components must adapt accordingly to prevent the illustration from appearing broken.

Figure 1: Examples of language-driven spatial variations for a lamp icon, demonstrating movement, rotation, and scaling while maintaining connectivity.

This paper addresses the challenge of producing spatial variations of icons through a language-driven interface that respects underlying geometry. By treating icon editing as a constrained optimization problem rather than a pixel-generation task, the proposed method preserves the clean, vector-like quality essential for professional design.

Methodology

The system employs a multi-stage pipeline that bridges the gap between qualitative language and quantitative geometric transformations.

1. Image Segmentation and DSL Mapping

The icon is first decomposed into labeled segments (e.g., "shade," "arm," "base"). To facilitate editing, the authors developed a Domain Specific Language (DSL) consisting of differentiable operators such as touch, rotate, and coincide_on_point. These operators allow geometric relationships to be expressed mathematically.

2. Constraint Generation

Instead of direct pixel manipulation, the system uses GPT-4 to translate user requests into DSL code. This leverages the LLM's strength in qualitative reasoning (e.g., understanding that "A should touch B") while avoiding its weakness in predicting precise numerical coordinates. To ensure the icon remains intact, a secondary constraint detector automatically identifies joints and connections that the user did not explicitly mention but must be preserved.

Figure 2: The editing pipeline, showing how an input request is processed via GPT-4 and a DSL into primary and secondary constraints for a solver.

The final stage involves a graph-based search and a gradient-based optimizer. The system calculates the optimal affine transformations (translation, rotation, and scaling) for each segment to satisfy the generated constraints while minimizing the deformation of the original structure.

Evaluation and Results

The method was evaluated using the FIGR-8-SVG dataset and a new benchmark of 65 diverse editing requests.

  • Quantitative Performance: The system achieved a Chamfer Distance of 0.41, significantly outperforming direct GPT-4 coordinate prediction (4.03) and diffusion-based models like InstructPix2Pix.
  • Qualitative Quality: Unlike diffusion models, which often introduce unnecessary details or fail to respect spatial boundaries, this method produces clean, designer-quality edits. It excels at maintaining the "identity" of segments through affine transformations rather than pixel warping.

Conclusion and Future Work

By prioritizing constraints over coordinates, this research provides a robust framework for language-driven vector graphic editing. While highly effective for 2D icons, future work aims to address abstract requests (e.g., "make the shovel dig") and complex 3D perspectives where simple 2D affine transformations may fall short. The authors also suggest incorporating local deformations to allow for more expressive, non-rigid artistic edits.

Summary updated

Abstract

Editing 2D icon images can require significant manual effort from designers. It involves manipulating multiple geometries while maintaining the logical or physical coherence of the objects depicted in the image. Previous language driven image editing methods can change the texture and geometry of objects in the image but fail at producing spatial variations, i.e. modifying spatial relations between objects while maintaining their identities. We present a language driven editing method that can produce spatial variations of icon images. Our method takes in an icon image along with a user's editing request text prompt and outputs an edited icon image reflecting the user's editing request. Our method is designed based on two key observations: (1) A user's editing requests can be translated by a large language model (LLM), with help from a domain specific language (DSL) library, into to a set of geometrical constraints defining the relationships between segments in an icon image. (2) Optimizing the affine transformations of the segments with respect to these geometrical constraints can produce icon images that fulfill the editing request and preserve overall physical and logical coherence. Quantitative and qualitative results show that our system outperforms multiple baselines, enabling natural editing of icon images.
BibTeX
@misc{xu2024creating,
  author = {Xianghao Xu and Aditya Ganeshan and Karl D. D. Willis and Yewen Pu and Daniel Ritchie},
  title = {{Creating Language-driven Spatial Variations of Icon Images}},
  year = {2024},
  eprint = {2405.19636},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.19636},
}
Figure