Adaptive Optics Image Analysis Using Generative AI (GPT-4) Scripting: Exploratory Study.
Jeroen Aah Pas, Ludo C van der Zanden, Yoeri van Leeuwen, Yara Te Lechanteur, Carel B Hoyng, Thomas Theelen
Department of Ophthalmology, Radboud University Medical Center, Nijmegen, Gelderland, The Netherlands.
Key points
From the paper's conclusion- We developed a preliminary nonvalidated script for cone detection in retinal AO images with support from GPT-4. Before such a script can be used in clinical research, it should undergo more fine-tuning and extensive testing. Future work should enhance the image analysis capabilities of the script and validate its results to assess the potential of AO-based cone counts as biomarkers in clinical trials.
Abstract
BACKGROUND: The availability of dedicated image analysis scripts for adaptive optics (AO)-flood illumination ophthalmoscopy (FIO) is limited, especially for large-scale measurements and analyses of nonhealthy images. This limitation highlights the need for alternative approaches to facilitate automated and scalable analysis. Large language models may help develop such scripts. OBJECTIVE: This study aimed to generate an analysis script for AO-FIO images in the R programming language using a widely available generative AI (GenAI; specifically, GPT-4) as a proof of principle for generating a functional but nonvalidated script. METHODS: GPT-4 was used to generate an R script for the analysis of AO-FIO images. The code generated by GPT-4 was fine-tuned iteratively based on trial and error, testing the script for image preprocessing and analysis using images from 4 participants, including 1 healthy individual and 3 patients with Stargardt disease. The script code was subsequently checked for errors by another researcher who was naive to previous coding, using a different test set of AO-FIO images from 4 other participants (n=1 healthy individual and n=3 patients with Stargardt disease). The cone counts from 5 AO image snippets were compared with the counts independently recorded by 2 human graders and those generated by pre-existing AO analysis software that was trained on healthy participants. RESULTS: After 54 iterations of instructions, a functional R script for the analysis of AO-FIO images was generated. The script identified and quantified blobs. CONCLUSIONS: We developed a preliminary nonvalidated script for cone detection in retinal AO images with support from GPT-4. Before such a script can be used in clinical research, it should undergo more fine-tuning and extensive testing. Future work should enhance the image analysis capabilities of the script and validate its results to assess the potential of AO-based cone counts as biomarkers in clinical trials.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Assessing the quality and educational applicability of AI-generated anterior segment images in ophthalmologyScientific Reports · 2025
- Evaluation of a cornea-specialized large language model for diagnostic and management accuracy in complex corneal cases.International ophthalmology · 2026
- Ability of Large Language Models to Answer Patients' Questions and Generate Educational Materials for Uncommon Retinal Conditions.Journal of vitreoretinal diseases · 2026
- Enhancing Patient Education with AI: A Readability Analysis of AI-Generated Versus American Academy of Ophthalmology Online Patient Education MaterialsJournal of Clinical Medicine · 2025
- Performance of a Small Language Model Versus a Large Language Model in Answering Glaucoma Frequently Asked Patient Questions: Development and Usability StudyJMIR AI · 2026
- Code-Free Automated Machine Learning for Referable Glaucoma Classification From Retinal Fundus Photographs: A Proof-of-Concept Study Using Google Cloud Vertex AI.Cureus · 2026