Accepted for/Published in: JMIR Formative Research
Date Submitted: Mar 8, 2026
Date Accepted: Jul 3, 2026
Adaptive Optics Image Analysis using Generative Artificial Intelligence (ChatGPT-4) scripting: an Exploratory Study
ABSTRACT
Background:
The availability of dedicated image analysis scripts for flood Illumination Ophthalmoscopy (AO-FIO) apart from examination software provided by manufacturers is limited, especially for large-scale measurements. This limitation highlights the need for alternative approaches to facilitate automated and scalable analysis.
Objective:
To generate an analysis script for AO-FIO images in the R programming language using a broadly available Generative Artificial Intelligence (GenAI; here ChatGPT-4) as proof of principle.
Methods:
ChatGPT-4 was used to generate an R script for AO-FIO images analysis. Coding by ChatGPT-4 was fine-tuned on the fly by iterations of instructions based on trial and error, testing the script on image pre-processing and analysis on images from four subjects, including one healthy individual and three patients with Stargardt disease. The script code was subsequently checked for errors by another code naive researcher, using a different test set of AO-FIO images of four other subjects (one healthy individual and three Stargardt patients) to check the code for errors. The cone count of five AO image snippets was compared with the counts independently recorded by two human graders.
Results:
After 54 iterations of instructions, a functional R script for analysis of AO-FIO images was developed. The script identified and quantified blobs, performing an acceptable analysis compared to the human graders.
Conclusions:
We developed an initial script for cone detection in retinal AO images with support from ChatGPT-4. Future work should enhance image analysis capabilities and validate results to assess the potential of AO-based cone counts as biomarkers in clinical trials.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.