Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: JMIR Formative Research

Date Submitted: Mar 8, 2026
Date Accepted: Jul 3, 2026

The final, peer-reviewed published version of this preprint can be found here:

Adaptive Optics Image Analysis Using Generative AI (GPT-4) Scripting: Exploratory Study

Pas JA, van der Zanden LC, van Leeuwen Y, Lechanteur YT, Hoyng CB, Theelen T

Adaptive Optics Image Analysis Using Generative AI (GPT-4) Scripting: Exploratory Study

JMIR Form Res 2026;10:e94906

DOI: 10.2196/94906

PMID: 42735400

Adaptive Optics Image Analysis using Generative Artificial Intelligence (ChatGPT-4) scripting: an Exploratory Study

  • Jeroen A.A.H. Pas; 
  • Ludo C van der Zanden; 
  • Yoeri van Leeuwen; 
  • Yara T.E. Lechanteur; 
  • Carel B Hoyng; 
  • Thomas Theelen

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

Please cite as:

Pas JA, van der Zanden LC, van Leeuwen Y, Lechanteur YT, Hoyng CB, Theelen T

Adaptive Optics Image Analysis Using Generative AI (GPT-4) Scripting: Exploratory Study

JMIR Form Res 2026;10:e94906

DOI: 10.2196/94906

PMID: 42735400

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© 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.