Preprint
Article

ChatGPT Translation of Program Code for Image Sketch Abstraction

Altmetrics

Downloads

180

Views

169

Comments

0

A peer-reviewed article of this preprint also exists.

Submitted:

29 October 2023

Posted:

30 October 2023

You are already at the latest version

Alerts
Abstract
The migration from MATLAB to Python (M-to-PY) has gained significant traction in recent computational research. While MATLAB has long served as a linchpin in myriad scientific endeavors, there's an emerging trend to rejuvenate these projects using Python's extensive AI tools and libraries. This study presents a semi-automated process for M-to-PY conversion, using a detailed case study of an image skeletonization project comprising fifteen MATLAB files and a 1404-image dataset. Skeletonization is foundational for ongoing 3D motion detection research using AI transformers, predominantly developed in Python. The utilization of ChatGPT-4, acting as an AI co-programmer, is pivotal in this conversion. By leveraging the public OpenAI API, we developed an M-to-PY converter prototype, evaluated its efficacy using test cases from the Bard bot, and subsequently employed the converted code in an AI application. The dual contributions encompass a well-tested M-to-PY converter and a Skeleton App capable of sketching and skeletonizing any given image, enriching the AI toolset. This study accentuates how AI resources, like ChatGPT-4, can simplify code transitions, opening doors for innovative AI implementations using primarily MATLAB-coded scientific research.
Keywords: 
Subject: Computer Science and Mathematics  -   Computational Mathematics
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated