Keywords—Flowcharts, Code Generation, Python Implementations, Optical Character Recognition, Large Language Models, Llama 2
Introduction
Coding, one of the most important skills to learn in the 21st century, helps children to sharpen their problem solving skills and boosts their creativity. It allows programmers to translate commands into binary codes using different programming languages such as Java, C++ and Python. The fast pace of digitisation has made children familiar with technology and the Internet. From an early age, students are exposed to technological advancements via the smartphones they use. Learning the techniques behind these advancements can effectively redirect their interest in these devices towards constructive pursuits, making their screen time more purposeful. It can help them become creators of technology rather than just consumers. Children may initially find coding difficult, as each programming language has its distinct syntax, which children have to learn to write code correctly. Acquiring proficiency in the syntactical rules of a specific language takes time, and encountering errors is inevitable during the journey of learning to code. Debugging can also be frustrating and it may discourage children from learning coding. The objective of this project is to create an application that can generate the code from the image of a flowchart given to it. Students can upload an image of their flowchart on the user interface and the application will generate the python code for the uploaded flowchart image. Python’s simplicity and readability make it an ideal language for beginners. The application assists students to convert the flowchart of their solutions into executable python code effortlessly. The generated code can help students see how their solution works after implementation without having to become well-versed in the syntax of the programming language they choose to implement it in. To develop the application, various computer vision techniques and large language models were used. A computer vision technique called Optical Character Recognition was used for extracting the textual content from the flowchart blocks in the uploaded image. A large language model named “Llama 2” with 70 billion parameters was used to transform the textual information extracted from the flowchart into its corresponding python code. By automating the process of code generation from flowchart images, the application speeds up the process of implementing the logic figured out to solve a problem. It can also be used to enhance educational tools used for teaching coding to younger students.