{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T10:10:39Z","timestamp":1784196639730,"version":"3.55.0"},"reference-count":42,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","funder":[{"DOI":"10.13039\/501100001659","name":"Deutsche Forschungsgemeinschaft","doi-asserted-by":"crossref","award":["460247524"],"award-info":[{"award-number":["460247524"]}],"id":[{"id":"10.13039\/501100001659","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,10,9]]},"abstract":"<jats:p>Image processing workflows typically consist of a series of different functions, each working with \u201cimage\u201d 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.<\/jats:p>","DOI":"10.1145\/3763059","type":"journal-article","created":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T08:49:50Z","timestamp":1759999790000},"page":"248-273","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["im2im: Automatically Converting In-Memory Image Representations using a Knowledge Graph Approach"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-7890-0330","authenticated-orcid":false,"given":"Fei","family":"Chen","sequence":"first","affiliation":[{"name":"German Research Center for Artificial Intelligence (DFKI), Saarbr\u00fccken, Germany"},{"name":"Saarland University, Saarbr\u00fccken, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7259-8994","authenticated-orcid":false,"given":"Sunita","family":"Saha","sequence":"additional","affiliation":[{"name":"German Research Center for Artificial Intelligence (DFKI), Saarbr\u00fccken, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8598-3410","authenticated-orcid":false,"given":"Manuela","family":"Schuler","sequence":"additional","affiliation":[{"name":"German Research Center for Artificial Intelligence (DFKI), Saarbr\u00fccken, Germany"},{"name":"Saarland University, Saarbr\u00fccken, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2189-2429","authenticated-orcid":false,"given":"Philipp","family":"Slusallek","sequence":"additional","affiliation":[{"name":"German Research Center for Artificial Intelligence (DFKI), Saarbr\u00fccken, Germany"},{"name":"Saarland University, Saarbr\u00fccken, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4060-7192","authenticated-orcid":false,"given":"Tim","family":"Dahmen","sequence":"additional","affiliation":[{"name":"Aalen University, Aalen, Germany"},{"name":"German Research Center for Artificial Intelligence (DFKI), Saarbr\u00fccken, Germany"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,10,9]]},"reference":[{"key":"e_1_3_2_2_1","doi-asserted-by":"publisher","unstructured":"Mart\u00edn Abadi Ashish Agarwal Paul Barham Eugene Brevdo Zhifeng Chen Craig Citro Greg S. Corrado Andy Davis Jeffrey Dean Matthieu Devin. et al. 2015. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. doi:10.5281\/zenodo.4724125","DOI":"10.5281\/zenodo.4724125"},{"key":"e_1_3_2_3_1","doi-asserted-by":"publisher","DOI":"10.1109\/RBME.2010.2084567"},{"key":"e_1_3_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622758.3622893"},{"key":"e_1_3_2_5_1","volume-title":"Technical Report UCB\/CSD-04- 1368","author":"Boshernitsan Marat","year":"2004","unstructured":"Marat Boshernitsan and Michael Downes. 2004. Visual Programming Languages: A Survey. Technical Report UCB\/CSD-04- 1368. Computer Science Division, University of California,.Los Angeles http:\/\/www2.eecs.berkeley.edu\/Pubs\/TechRpts\/2004\/6201.html"},{"key":"e_1_3_2_6_1","first-page":"122","article-title":"The OpenCV Library","volume":"120","author":"Bradski Gary","year":"2000","unstructured":"Gary Bradski, Adrian Kaehler, and Others. 2000. The OpenCV Library. Dr. Dobb\u2019s J. Softw. Tools 120 (2000), 122\u2013125","journal-title":"Dr. Dobb\u2019s J. Softw. Tools"},{"key":"e_1_3_2_7_1","unstructured":"chaiNNer org.. 2024. ChaiNNer: A node-based image processing GUI aimed at making chaining image processing tasks easy and customizable. Alpha v0.24.1. Retrieved August 31 2024 from https:\/\/github.com\/chaiNNer-org\/chaiNNer"},{"key":"e_1_3_2_8_1","doi-asserted-by":"publisher","unstructured":"Fei Chen Sunita Saha Manuela Schuler Philipp Slusallek and Tim Dahmen. 2025. im2im: Automatically Converting In-Memory Image Representations (Artifact).doi:10.5281\/zenodo.16910429 Artifact archive.","DOI":"10.5281\/zenodo.16910429"},{"key":"e_1_3_2_9_1","doi-asserted-by":"publisher","DOI":"10.1109\/vl\/hcc53370.2022.9832910"},{"key":"e_1_3_2_10_1","unstructured":"Alex Clark. 2015. Pillow: Python Imaging Library (PIL Fork) https:\/\/python-pillow.org"},{"key":"e_1_3_2_11_1","doi-asserted-by":"publisher","DOI":"10.5555\/1614191"},{"key":"e_1_3_2_12_1","doi-asserted-by":"publisher","DOI":"10.7287\/peerj.preprints.336v2"},{"key":"e_1_3_2_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/3544548.3581338"},{"key":"e_1_3_2_14_1","doi-asserted-by":"publisher","unstructured":"David Gobbi Parvin Mousavi Karen Li Jing Xiang Adam Campigotto Adrien LaPointe Gabor Fichtinger and Purang Abolmaesumi. 2010. Simulink Libraries for Visual Programming of VTK and ITK. The MIDAS Journal (June 2010). doi:10.54294\/zrtccj","DOI":"10.54294\/zrtccj"},{"key":"e_1_3_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3618305.3623588"},{"key":"e_1_3_2_16_1","doi-asserted-by":"publisher","DOI":"10.1038\/s41586-020-2649-2"},{"key":"e_1_3_2_17_1","doi-asserted-by":"publisher","DOI":"10.1109\/tssc.l968.300136"},{"key":"e_1_3_2_18_1","unstructured":"Luis Ibanez Will Schroeder Lydia Ng Josh Cates et al. 2003. The ITK software guide."},{"key":"e_1_3_2_19_1","doi-asserted-by":"publisher","DOI":"10.1109\/jcsse.2012.6261974"},{"key":"e_1_3_2_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/wvl.l991.238852"},{"key":"e_1_3_2_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-88655-6_5"},{"key":"e_1_3_2_22_1","doi-asserted-by":"publisher","DOI":"10.1038\/s41467-024-49125-z"},{"key":"e_1_3_2_23_1","doi-asserted-by":"publisher","DOI":"10.5220\/0011652500003417"},{"key":"e_1_3_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1064978.1065018"},{"key":"e_1_3_2_25_1","unstructured":"MathWorks. 2023. Simulink Documentation: Simulation and Model-Based Design. https:\/\/www.mathworks.com\/help\/simulink\/"},{"key":"e_1_3_2_26_1","doi-asserted-by":"publisher","DOI":"10.3389\/fninf.2014.00013"},{"key":"e_1_3_2_27_1","doi-asserted-by":"publisher","DOI":"10.1016\/S1045-926X(05)80036-9"},{"key":"e_1_3_2_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563767.3568127"},{"key":"e_1_3_2_29_1","doi-asserted-by":"publisher","DOI":"10.1109\/BLOCKS.2017.8120404"},{"key":"e_1_3_2_30_1","first-page":"4","volume-title":"NIPS 2017 Workshop on Autodiff","author":"Paszke Adam","year":"2017","unstructured":"Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. 2017. Automatic Differentiation in PyTorch. In NIPS 2017 Workshop on Autodiff (Long Beach, CA, USA). 4 pages."},{"key":"e_1_3_2_31_1","unstructured":"Evan W Patton and Danny Tang. 2018. JSON interoperability in MIT app inventor. In BLOCKS+ 2018 ACM SPLASH Workshop."},{"key":"e_1_3_2_32_1","unstructured":"Python Software Foundation. 2024. timeit \u2014 Measure execution time of small code snippets. Python v3.10.15. Retrieved August 31 2024 from https:\/\/docs.python.org\/3\/library\/timeit.html."},{"key":"e_1_3_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563296"},{"key":"e_1_3_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563296"},{"key":"e_1_3_2_35_1","doi-asserted-by":"publisher","DOI":"10.1038\/s41467-020-14529-0"},{"key":"e_1_3_2_36_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-00934-2_30"},{"key":"e_1_3_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563836.3568726"},{"key":"e_1_3_2_38_1","doi-asserted-by":"publisher","unstructured":"Calvin-Khang Ta Abhishek Aich Akash Gupta and Amit K. Roy-Chowdhury. 2022. Poisson2Sparse: Self-supervised Poisson Denoising from a Single Image. Springer Nature Switzerland 557\u2013567. doi:10.1007\/978-3-031-16452-1_53","DOI":"10.1007\/978-3-031-16452-1_53"},{"key":"e_1_3_2_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/3486608.3486908"},{"key":"e_1_3_2_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3567512.3567518"},{"key":"e_1_3_2_41_1","doi-asserted-by":"publisher","DOI":"10.1109\/crv50864.2020.00031"},{"key":"e_1_3_2_42_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.sigpro.2024.109870"},{"key":"e_1_3_2_43_1","doi-asserted-by":"publisher","DOI":"10.1109\/cvpr52733.2024.01058"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763059","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T09:59:55Z","timestamp":1784195995000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3763059"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,9]]},"references-count":42,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2025,10,9]]}},"alternative-id":["10.1145\/3763059"],"URL":"https:\/\/doi.org\/10.1145\/3763059","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,10,9]]},"assertion":[{"value":"2024-10-14","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-12","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}