Objective: The swinging-flashlight test for relative afferent pupillary defect (RAPD) detection is an important clinical tool in ophthalmology that may be incorrectly performed by general healthcare providers. We designed an affordable, accessible, and easy-to-use cellphone application to screen patients for RAPD.
Methods: We created machine-learning software that locates, segments, tracks, and quantifies the kinetic response of the pupils with the goal of identifying RAPD. We tested our application on recordings of 547 participants and compared the software performance against evaluations made by a neuro-ophthalmologist, enabling us to determine the specificity and sensitivity of our software.
Results: We identified a RAPD prevalence of 5.84% in our specific population. When comparing videos that were classified as having a RAPD (RAPD+) and having no RAPD (RAPD-), we found a clear difference in kinetic response of the pupil (RAPD+: mean 0.40 ± 0.17; RAPD-: mean 0.76 ± 0.17; p < 0.001). Our method has a sensitivity of 93% and a specificity of 85%. Given a RAPD prevalence of 5.84% in our group, the software yields a positive predictive value of 28% and a negative predictive value of 99.5%.
Conclusions: We created an efficient screening tool to assist clinicians and medical staff, who may not be accustomed to performing swinging-flashlight tests, in detecting RAPD by using a readily available cellphone application.