Abstract
Purpose :
Artificial intelligence (AI) methods have become an indispensable part of ophthalmology in recent years. A variety of AI methods are available to analyze visual fields (VFs) and to detect or predict vision loss progression. Nearly all of the recent deep learning VF models have been implemented in the Python language, which provides numerous readily available algorithms and techniques for this purpose. At the same time, the vast majority of VF analytic tools have been implemented in the R language. Here, we aim to bridge this gap by providing a Python-wrapped package to make numerous previously developed R libraries and functions for VF analysis available in the Python language.
Methods :
In a first step, we analyzed existing R libraries for visual fields, most notably the vfprogression [1] and the visualFields [2] libraries for overlaps as well as distinct functionality. Based on this, we conceptualized a Python package combining the functionality of the existing R libraries and harmonizing their data structures. Finally, with help of the wrapper library rpy2, we translated this functionality and the according data structures into Python.
Results :
The developed Python package is available as open-source software at the GitHub repository: https://github.com/mohaEs/PyVisualField. In the same repository, we demonstrate the capabilities of the new Python package in the categories of presenting data, plotting, scoring and progression as well as normalization analysis. For each category, we provide function descriptions and examples and the function output in Jupyter notebooks. Fig. 1 shows examples of demonstration from the functionality from the original vfprogression R library and, analogously, Fig. 2 shows examples from the visualFields R library.
Conclusions :
To make the considerable VF analysis functionality of existing R libraries available to the Python AI community, we developed a Python package and demonstrate its functionality to support ophthalmic researchers in VF statistical analysis, plotting, and progression prediction.
[1] Elze, T., Li, D., Wall, M., Choi, E. U., vfprogression: Visual Field (VF) Progression Analysis and Plotting Methods, available at: https://cran.r-project.org/package=vfprogression.
[2] Marin-Franch, I. Swanson, W.H., Wall, M., Turpin, A., Artes, P.H., Huchzermeyer, C., Montesano, G., Dul, M., W, visualFields: Statistical Methods for Visual Fields, available at: https://cran.r-project.org/package=visualFields
This abstract was presented at the 2022 ARVO Annual Meeting, held in Denver, CO, May 1-4, 2022, and virtually.