Towards Making Flowchart Images Machine Interpretable

Shreya Shukla, Prajwal Gatti, Yogesh Kumar, Vikash Yadav, Anand Mishra
1/29/2025
cs.CVcs.AIcs.CL

No official code found. Best implementation: vl2g/floco (37 stars, MIT, last commit 2023-08-13).

Abstract

Computer programming textbooks and software documentations often contain flowcharts to illustrate the flow of an algorithm or procedure. Modern OCR engines often tag these flowcharts as graphics and ignore them in further processing. In this paper, we work towards making flowchart images machine-interpretable by converting them to executable Python codes. To this end, inspired by the recent success in natural language to code generation literature, we present a novel transformer-based framework, namely FloCo-T5. Our model is well-suited for this task,as it can effectively learn semantics, structure, and patterns of programming languages, which it leverages to generate syntactically correct code. We also used a task-specific pre-training objective to pre-train FloCo-T5 using a large number of logic-preserving augmented code samples. Further, to perform a rigorous study of this problem, we introduce theFloCo dataset that contains 11,884 flowchart images and their corresponding Python codes. Our experiments show promising results, and FloCo-T5 clearly outperforms related competitive baselines on code generation metrics. We make our dataset and implementation publicly available.

View on arXivView PDF

Code Implementations(1)

vl2g/flocoCommunity100%
MIT

Flow Chart Image-to-Code Generation

375Shell, PythonApr 24, 20233 years agoMIT
code-generationfigure-captioningflowchart-diagramsllm4code

Similar Papers

Cite this paper

@article{shukla2025towards,
  title  = {Towards Making Flowchart Images Machine Interpretable},
  author = {Shreya Shukla and Prajwal Gatti and Yogesh Kumar and Vikash Yadav and Anand Mishra},
  year   = {2025},
  eprint = {2501.17441},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.17441v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.17441.svg)](https://codeofpaper.com/paper/2501.17441)

Discussion