arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.11307cs.CVcs.LG
收藏

Vision2Code:一个多领域评估图像到代码生成的基准

Vision2Code: A Multi-Domain Benchmark for Evaluating Image-to-Code Generation

Duke University(杜克大学)

Ajay Vikram Periasami, Junlin Wang, Bhuwan Dhingra

AI总结:

Vision2Code提出一个无需参考代码的多领域图像到代码生成评估框架,通过2169个测试示例评估模型生成代码的质量,发现性能依赖于领域,且通过筛选器的模型输出可提升生成能力。

摘要:

图像到代码生成测试视觉语言模型(VLM)能否足够恢复图像结构以表达为可执行代码。现有基准要么聚焦狭窄视觉领域,依赖配对可执行参考代码,或依赖通用标准,无法捕捉领域特定的重建误差。我们引入Vision2Code,一个无需参考代码的多领域图像到代码生成基准和评估框架。Vision2Code包含来自15个数据集的2169个测试示例,涵盖图表、几何、图形、科学图像、文档和3D空间场景。模型生成可执行程序,我们将其渲染并使用VLM评分者与源图像对比,使用领域特定的标准和确定性防护措施处理严重语义错误。我们报告了渲染成功诊断,将代码执行失败与重建质量分开。人类验证显示,此评估协议比通用视觉标准或嵌入相似性基线更符合人类判断。在九个开源和专有模型上,发现图像到代码性能是领域依赖的:领先模型在常规图表和图形视觉上表现良好,但在空间场景、化学、文档和电路式图表上表现较弱。最后,我们展示筛选器过滤的模型输出可作为训练数据提升图像到代码能力,Qwen3.5-9B在基准上从1.60提升到1.86,无需配对源程序。Vision2Code提供了一个可重复的测试平台,用于测量、诊断和改进图像到代码生成。我们的代码和数据在https://image2code.github.io/vision2code/公开。

英文摘要:

We study whether vision-language models (VLMs) can reconstruct structured, graphics-based images by writing executable code to generate them. Existing benchmarks on image-to-code generation are generally limited in the domains they cover, rely on reference source code for evaluation, and do not provide metrics to quantify domain-specific issues. To address this, we introduce Vision2Code, a multi-domain, reference-code-free benchmark containing 539 test examples from 15 different datasets, spanning charts and plots, geometry, graphs, scientific diagrams, documents and 3D spatial scenes. Evaluation is done by executing the generated programs and comparing their rendered outputs to the source images using dataset- and domain-specific rubrics for a VLM judge. We find that the final scores obtained in this manner have substantially higher correlation with human ratings than those obtained via generic VLM rubrics or standard pixel-based, embedding-based or perceptual similarity metrics. We further demonstrate the reliability of our evaluation under repeated sampling from the VLM judges, varying rubric weights, and in the presence of controlled errors. Our results highlight the variability across domains of existing image-to-code generation models, with accuracy on charts and graphs being significantly higher than other domains. Lastly, we demonstrate the utility of our scoring method for rejection sampling of generated programs for fine-tuning, improving Qwen3.5-9B by 16% and Phi-4-MM by 28% compared to their base checkpoints. Our code and data are publicly available at https://image2code.github.io/vision2code/.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑