paperbot · PL 论文追踪

全部论文 待读 收藏

P2 im2im: Automatically Converting In-Memory Image Representations using a Knowledge Graph Approach

im2im:使用知识图谱方法自动转换内存中的图像表示
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 该论文属于 DSL/代码生成与知识图谱驱动的图像表示转换,虽涉及编程语言工具与自动化,但未涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等研究画像的核心方向,匹配度较低。引用 0 inbox
Fei Chen, Sunita Saha, Manuela Schuler, Philipp Slusallek, Tim Dahmen
crossref: 2026-09-10

AI 速览

一句话:提出 im2im,用知识图谱自动生成并执行内存图像表示转换代码,消除视觉编程中的手工类型转换。

图像处理工作流常组合来自不同库的函数,但各库对图像的内存表示不同,用户须处理数据类型、颜色通道、通道顺序、minibatch 布局、内存位置和像素强度范围等转换细节,这在视觉编程语言(VPL)中尤为干扰。im2im 是一个 Python 库,以知识图谱描述图像表示及转换规则,查询图谱生成并执行转换代码,自动将图像转为目标表示。在两个块式 VPL 案例中,与基础工作流对比表明 im2im 能自动完成类型转换、无需人工干预;与显式中间表示方案相比只生成必要转换,避免中间格式往返开销;与单函数方案相比,其开销不影响实用。该方法可推广至其他 VPL 和文本编程环境。

问题
图像处理工作流整合来自不同库的函数时,图像的内存表示不一致,用户需手工处理数据类型、通道顺序、布局、内存位置与强度范围等底层转换细节,这尤其干扰视觉编程语言中的高阶操作。
方法
作者提出 im2im Python 库,用知识图谱描述图像表示及其转换方式,并通过查询图谱自动生成和执行转换代码,将图像转换为目标表示。
评估
在两个块式 VPL 案例中,im2im 与基础工作流、显式中间表示方案及单函数方案进行比较,验证其能消除手工转换、只生成必要转换且开销不影响实际可用性。
原文摘要(Abstract)

Image processing workflows typically consist of a series of different functions, each working with “image” inputs and outputs in an abstract sense. However, the specific in-memory representation of images differs between and sometimes within libraries. Conversion is therefore necessary when integrating functions from several sources into a single program. The conversion process forces users to consider low-level implementation details, including data types, color channels, channel order, minibatch layout, memory locations, and pixel intensity ranges. Specifically in the case of visual programming languages (VPLs), this distracts from high- level operations. We introduce im2im, a Python library that automates the conversion of in-memory image representations. The central concept of this library is a knowledge graph that describes image representations and how to convert between them. The system queries this knowledge graph to generate the conversion code and execute it, converting an image to the desired representation. The effectiveness of the approach is evaluated through two case studies in VPLs. In each case, we compared a workflow created in a basic blockbased VPL with the same workflow enhanced using im2im. These evaluations show that im2im automates type conversions and eliminates the need for manual intervention. Additionally, we compared the overhead of using explicit intermediate representations versus im2im, both of which avoid manual type conversions in VPLs. The results indicate that im2im generates only the necessary conversions, avoiding the runtime overhead associated with converting to and from intermediate formats. A performance comparison between the step-by-step approach used by im2im and a single-function approach demonstrates that the overhead introduced by im2im does not impact practical usability. While focused on block-based VPLs, im2im can be generalized to other VPLs and textual programming environments. Its principles are also applicable to domains other than images. The source code and analyses are available via GitHub.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2897,
  title = {im2im: Automatically Converting In-Memory Image Representations using a Knowledge Graph Approach},
  author = {Fei Chen and Sunita Saha and Manuela Schuler and Philipp Slusallek and Tim Dahmen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763059}
}