Figma2Code: 将多模态设计转换为代码的自动化
Figma2Code: Automating Multimodal Design to Code in the Wild
AI总结:
本文提出Figma2Code任务,通过收集Figma文件元数据与设计图像,构建高质量数据集,评估多种多模态大语言模型,发现专有模型在视觉保真度上表现优异,但布局响应性和代码可维护性有限。
摘要:
前端开发是软件工程的重要组成部分,但将设计草图转换为生产级用户界面(UI)代码仍繁琐且昂贵。尽管近期研究探索了使用多模态大语言模型(MLLMs)自动化此过程,现有方法通常仅依赖设计图像。因此,它们必须从图像中推断复杂的UI细节,通常导致降级结果。在真实开发流程中,设计草图通常以Figma文件形式交付,这是一种广泛用于前端设计的工具,嵌入了丰富的多模态信息(例如元数据和资产),对于生成高质量UI至关重要。为弥合这一差距,我们引入了Figma2Code,一个将设计到代码推进到多模态环境的新任务,并旨在在真实世界中自动化设计到代码的过程。具体而言,我们收集了配对的设计图像及其对应的元数据文件,从Figma社区中。然后我们应用一系列处理操作,包括基于规则的过滤、人工和MLLM基于的注释和筛选,以及元数据细化。此过程产生了3,055个样本,从其中设计师精选出213个高质量案例。使用此数据集,我们评估了十种最先进的开源和专有MLLMs。我们的结果表明,尽管专有模型在视觉保真度上表现优异,但它们在布局响应性和代码可维护性上仍然有限。进一步在不同模态和消融研究中的实验证实了这一限制,部分原因在于模型倾向于直接映射Figma元数据中的基本视觉属性。
英文摘要:
Front-end development constitutes a substantial portion of software engineering, yet converting design mockups into production-ready User Interface (UI) code remains tedious and costly. While recent work has explored automating this process with Multimodal Large Language Models (MLLMs), existing approaches typically rely solely on design images. As a result, they must infer complex UI details from images alone, often leading to degraded results. In real-world development workflows, however, design mockups are usually delivered as Figma files, a widely used tool for front-end design, that embed rich multimodal information (e.g., metadata and assets) essential for generating high-quality UI. To bridge this gap, we introduce Figma2Code, a new task that advances design-to-code into a multimodal setting and aims to automate design-to-code in the wild. Specifically, we collect paired design images and their corresponding metadata files from the Figma community. We then apply a series of processing operations, including rule-based filtering, human- and MLLM-based annotation and screening, and metadata refinement. This process yields 3,055 samples, from which designers curate a balanced dataset of 213 high-quality cases. Using this dataset, we benchmark ten state-of-the-art open-source and proprietary MLLMs. Our results show that while proprietary models achieve superior visual fidelity, they remain limited in layout responsiveness and code maintainability. Further experiments across modalities and ablation studies corroborate this limitation, partly due to models' tendency to directly map primitive visual attributes from Figma metadata.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。