<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="2.3" xml:lang="EN">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Neurol.</journal-id>
<journal-title>Frontiers in Neurology</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Neurol.</abbrev-journal-title>
<issn pub-type="epub">1664-2295</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fneur.2025.1522894</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Neurology</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>A deep learning-based image analysis model for automated scoring of horizontal ocular movement disorders</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Jin</surname> <given-names>Xiao-lu</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<role content-type="https://credit.niso.org/contributor-roles/data-curation/"/>
<role content-type="https://credit.niso.org/contributor-roles/software/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Liu</surname> <given-names>Yu-fei</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>He</surname> <given-names>Bing-bing</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Fan</surname> <given-names>Yi-fei</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Zhou</surname> <given-names>Ling-yun</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x002A;</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/1216139/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/data-curation/"/>
<role content-type="https://credit.niso.org/contributor-roles/software/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Ocular Motility Disorder Treatment and Rehabilitation Center, Department of Acupuncture, Harbin Medical University</institution>, <addr-line>Harbin, Heilongjiang Province</addr-line>, <country>China</country></aff>
<aff id="aff2"><sup>2</sup><institution>Ocular Motility Disorder Treatment and Rehabilitation Center, The First Affiliated Hospital of Harbin Medical University</institution>, <addr-line>Harbin, Heilongjiang Province</addr-line>, <country>China</country></aff>
<author-notes>
<fn fn-type="edited-by" id="fn0001">
<p>Edited by: Hsiao-Lung Chan, Chang Gung University, Taiwan</p></fn>
<fn fn-type="edited-by" id="fn0002">
<p>Reviewed by: Hyeshin Jeon, Pusan National University Hospital, Republic of Korea</p>
<p>Mattia Barbieri, Italian Institute of Technology (IIT), Italy</p></fn>
<corresp id="c001">&#x002A;Correspondence: Ling-yun Zhou, <email>no1zhly@163.com</email></corresp>
</author-notes>
<pub-date pub-type="epub">
<day>02</day>
<month>07</month>
<year>2025</year>
</pub-date>
<pub-date pub-type="collection">
<year>2025</year>
</pub-date>
<volume>16</volume>
<elocation-id>1522894</elocation-id>
<history>
<date date-type="received">
<day>05</day>
<month>11</month>
<year>2024</year>
</date>
<date date-type="accepted">
<day>19</day>
<month>06</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x00A9; 2025 Jin, Liu, He, Fan and Zhou.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Jin, Liu, He, Fan and Zhou</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<sec id="sec1">
<title>Introduction</title>
<p>This study proposes a deep learning&#x2013;based image analysis method for automated scoring of the severity of horizontal ocular movement disorders and evaluates its performance against traditional manual scoring methods.</p>
</sec>
<sec id="sec2">
<title>Methods</title>
<p>A total of 2,565 ocular images were prospectively collected from 164 patients with ocular movement disorders and 121 healthy subjects. These images were labeled and used as the training set for the RetinaEye automatic scoring model. Additionally, 184 binocular gaze images (left and right turns) were collected from 92 patients with limited horizontal ocular movement, serving as the test set. Manual and automatic scoring were performed on the test set using ImageJ and RetinaEye, respectively. Furthermore, the consistency and correlation between the two scoring methods were assessed.</p>
</sec>
<sec id="sec3">
<title>Results</title>
<p>RetinaEye successfully identified the centers of both pupils, as well as the positions of the medial and lateral canthi. It also automatically calculated the horizontal ocular movement scores based on the pixel coordinates of these key points. The model demonstrated high accuracy in identifying key points, particularly the lateral canthi. In the test group, manual and automated scoring results showed a high level of consistency and positive correlation among all affected oculi (<italic>&#x03BA;</italic>&#x202F;=&#x202F;0.860, <italic>p</italic>&#x202F;&#x003C;&#x202F;0.001; <italic>&#x03C1;</italic>&#x202F;=&#x202F;0.897, <italic>p</italic>&#x202F;&#x003C;&#x202F;0.001).</p>
</sec>
<sec id="sec4">
<title>Conclusion</title>
<p>The automatic scoring method based on RetinaEye demonstrated high consistency with manual scoring results. This new method objectively assesses the severity of horizontal ocular movement disorders and holds great potential for diagnosis and treatment selection.</p>
</sec>
</abstract>
<kwd-group>
<kwd>ocular movement disorders</kwd>
<kwd>deep learning</kwd>
<kwd>artificial intelligence</kwd>
<kwd>automated scoring</kwd>
<kwd>ocular key points</kwd>
</kwd-group>
<counts>
<fig-count count="6"/>
<table-count count="4"/>
<equation-count count="1"/>
<ref-count count="15"/>
<page-count count="7"/>
<word-count count="5063"/>
</counts>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Artificial Intelligence in Neurology</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="sec5">
<label>1</label>
<title>Introduction</title>
<p>Ocular movement disorders refer to limitations in eye movement or fixed eye positions that result from damage to the ocular motor nerves or dysfunction of the neuromuscular junction, often accompanied by diplopia (<xref ref-type="bibr" rid="ref1">1</xref>). These conditions considerably affect the patient&#x2019;s quality of life. Therefore, accurate and objective assessment of the severity of ocular movement disorders is essential for diagnosing ocular motor nerve palsy, evaluating prognosis, and selecting appropriate treatment options. Clinically, the corneal reflex test, combined with a grading scale, is commonly used to assess the range of ocular movements (<xref ref-type="bibr" rid="ref2">2</xref>). Our preliminary research indicated that manual measurement and comparison of the distances from the pupil center to the medial and lateral canthi in different gaze positions represents a reliable and clinically useful approach for scoring the severity of ocular movement disorders (<xref ref-type="bibr" rid="ref3">3</xref>, <xref ref-type="bibr" rid="ref4">4</xref>). However, the accuracy of these two grading methods depends on the expertise of trained physicians, presenting subjectivity. The modified limbus test is a method that captures photographs of the nine cardinal gaze positions, sequentially overlays semi-transparent images of the secondary gaze positions onto the primary gaze position image, and measure the edge-to-edge distance. Then, geometric analysis is performed to calculate the angles of ocular rotation corresponding to each gaze position (<xref ref-type="bibr" rid="ref5">5</xref>), though it requires manual measurement after overlaying two images, which can lead to issues such as imperfect alignment and measurement error.</p>
<p>Advancements in artificial intelligence for ocular movement analysis are rapidly progressing. Traditional machine learning models can generate classification models from ocular movement datasets (<xref ref-type="bibr" rid="ref6">6</xref>). Deep learning models based on convolutional neural networks can automatically locate and segment the ocular region, facilitating the measurement of ocular movement distance in photographs of nine gaze positions (<xref ref-type="bibr" rid="ref7">7</xref>). However, this model is limited to the localization and segmentation of the ocular region. It still requires manual input for distance measurement and has not been validated in patients with eyelid dysfunction or ocular motility disorders. Additionally, the results of automatic and manual measurements using through this method show significant differences, warranting caution in clinical practice. Therefore, we aim to explore a fully automated model for scoring the severity of ocular movement disorders to rapidly obtain accurate results.</p>
<p>RetinaFace is a high-precision face detection algorithm that employs self- and joint-supervised multi-task learning to perform pixel-level facial localization across faces of varying scales (<xref ref-type="bibr" rid="ref8">8</xref>). Besides detecting the position of the facial bounding box, this algorithm can accurately localize key points of interest. Therefore, the present study aims to introduce an improved method based on RetinaFace to achieve orbital localization and detection of ocular key points. Furthermore, this approach will be integrated with our previously developed scoring scale for ocular movement disorders (<xref ref-type="bibr" rid="ref3">3</xref>) to enable accurate and efficient automated scoring of ocular movement disorders.</p>
</sec>
<sec sec-type="materials|methods" id="sec6">
<label>2</label>
<title>Materials and methods</title>
<sec id="sec7">
<label>2.1</label>
<title>Study participants</title>
<p>A total of 164 patients with ocular motility disorders (including vertical and horizontal movement disorders) who visited the Ocular Motility Disorder Center at the First Affiliated Hospital of Harbin Medical University between January 2024 and October 2024 were prospectively enrolled. Additionally, 121 healthy volunteers were recruited. Photographs were obtained in nine gaze positions for all participants. Then, this training dataset was used to train the automatic scoring model.</p>
<p>A total of 92 patients with horizontal ocular motility limitations were also enrolled (these 92 patients were not included among the 164 patients in the training set). Photographs of each patient in leftward and rightward gaze positions were taken and used as the test set for the automatic scoring model. The exclusion criteria for the test group were patients with horizontal nystagmus or myogenic myasthenia gravis.</p>
</sec>
<sec id="sec8">
<label>2.2</label>
<title>Ethics statement</title>
<p>This study was conducted in accordance with the principles outlined in <italic>the Declaration of Helsinki</italic> and was approved by the Ethics Committee of the First Affiliated Hospital of Harbin Medical University (No: 2024JS97), with informed consent obtained from each volunteer in advance.</p>
</sec>
<sec id="sec9">
<label>2.3</label>
<title>Photography and image collection</title>
<p>Ocular images were collected by an experienced clinical ophthalmologist. Subjects&#x2019; chins and foreheads were stabilized on a headrest, with the head maintained at a horizontal position and secured with straps. A digital camera (G1X Mark II; Canon Inc., Japan) was positioned 50&#x202F;cm in front of the eyes and aligned horizontally with the head. Subjects in the training set were directed to gaze at each of nine gaze positions (The directions are: up, down, left, right, upper left, upper right, lower left, lower right, and straight ahead.), with images captured at each position. In the test group, images were collected only when subjects gazed maximally to the left and right. In all subjects, when gazing downward or in cases of ptosis, the upper eyelid was gently lifted to improve the visualization of the pupil position.</p>
</sec>
<sec id="sec10">
<label>2.4</label>
<title>Scoring criteria and calculation method</title>
<p>The scoring method for ocular movement disorders followed the scoring criteria in the ocular motor nerve palsy scale (<xref ref-type="bibr" rid="ref3">3</xref>): 1&#x202F;=&#x202F;affected eye movement is close to that of the healthy oculus, with the pupil center reaching or exceeding the ipsilateral 1/4 line in the paralyzed direction; 2&#x202F;=&#x202F;the pupil center of the affected eye just crosses the midline but does not reach the ipsilateral 1/4 line in the paralyzed direction; 3&#x202F;=&#x202F;the pupil center of the affected eye reaches or exceeds the contralateral 1/4 line in the paralyzed direction but does not reach or only reaches the midline; 4&#x202F;=&#x202F;no movement toward the paralyzed side, or it does not reach the contralateral 1/4 line in the paralyzed direction. When both eye gazed to the right, the scoring included the abduction movement of the right eye and the adduction movement of the left eye. When both eyes gazed to the left, the scoring included the abduction movement of the left eye and the adduction movement of the right eye (<xref ref-type="fig" rid="fig1">Figure 1</xref>). <xref ref-type="table" rid="tab1">Table 1</xref> summarizes the calculation method for ocular movement disorder scores based on the aforementioned criteria.</p>
<fig position="float" id="fig1">
<label>Figure 1</label>
<caption>
<p>Horizontal ocular movement scoring diagram. <bold>(A)</bold> Scoring diagram for both eyes gaze to the right. <bold>(B)</bold> Scoring diagram when both eyes gaze to the left.</p>
</caption>
<graphic xlink:href="fneur-16-1522894-g001.tif">
<alt-text content-type="machine-generated">Two side-by-side images labeled A and B show close-ups of human eyes divided into four vertical striped segments labeled 1 to 4. In image A, the numbers progress from left to right, and in image B, they progress from right to left. The stripes vary in color and transparency.</alt-text>
</graphic>
</fig>
<table-wrap position="float" id="tab1">
<label>Table 1</label>
<caption>
<p>Scoring method for horizontal ocular movement disorders.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th/>
<th align="left" valign="top">Score</th>
<th align="left" valign="top">Ratio</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top" rowspan="4">Abduction movement</td>
<td align="left" valign="top">1</td>
<td align="left" valign="top">R1&#x202F;&#x2264;&#x202F;1/4</td>
</tr>
<tr>
<td align="left" valign="top">2</td>
<td align="left" valign="top">1/4&#x202F;&#x003C;&#x202F;R1&#x202F;&#x2264;&#x202F;1/2</td>
</tr>
<tr>
<td align="left" valign="top">3</td>
<td align="left" valign="top">1/2&#x202F;&#x003C;&#x202F;R1&#x202F;&#x2264;&#x202F;3/4;</td>
</tr>
<tr>
<td align="left" valign="top">4</td>
<td align="left" valign="top">3/4&#x202F;&#x003C;&#x202F;R1</td>
</tr>
<tr>
<td align="left" valign="top" rowspan="4">Adduction movement</td>
<td align="left" valign="top">1</td>
<td align="left" valign="top">R2&#x202F;&#x2264;&#x202F;1/4</td>
</tr>
<tr>
<td align="left" valign="top">2</td>
<td align="left" valign="top">1/4&#x202F;&#x003C;&#x202F;R2&#x202F;&#x2264;&#x202F;1/2</td>
</tr>
<tr>
<td align="left" valign="top">3</td>
<td align="left" valign="top">1/2&#x202F;&#x003C;&#x202F;R2&#x202F;&#x2264;&#x202F;3/4;</td>
</tr>
<tr>
<td align="left" valign="top">4</td>
<td align="left" valign="top">3/4&#x202F;&#x003C;&#x202F;R2</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p>R1&#x202F;=&#x202F;(|Xpupil-Xtemporal|)/(|Xinner-Xtemporal|); R2&#x202F;=&#x202F;(|Xpupil-Xinner|)/(|Xinner-Xtemporal|); Xpupil, Xtemporal, and Xinner represent the horizontal pixel coordinates of the pupil center point, the temporal canthus, and the inner canthus in the image, respectively.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec id="sec11">
<label>2.5</label>
<title>Automatic scoring</title>
<sec id="sec12">
<label>2.5.1</label>
<title>Eye feature point annotation</title>
<p>An experienced ophthalmologists used Labelme software to annotate ocular images at nine gaze positions in the training group, marking the locations of both eye, pupil center points, medial canthi, and lateral canthi (<xref ref-type="fig" rid="fig2">Figure 2</xref>). The position of the pupil center if the cornea was occluded by the eyelid was determined through manual fitting. All annotation data were reviewed by another physician. In cases of ambiguous annotation points, decisions were made through discussion between the two physicians.</p>
<fig position="float" id="fig2">
<label>Figure 2</label>
<caption>
<p>Annotated images of nine gaze positions.</p>
</caption>
<graphic xlink:href="fneur-16-1522894-g002.tif">
<alt-text content-type="machine-generated">Close-up images of eyes gazing in different directions. Each eye is outlined by colored rectangles with dots at the corners, indicating tracking points. The full series involves various angles, capturing detailed eye movements.</alt-text>
</graphic>
</fig>
</sec>
<sec id="sec13">
<label>2.5.2</label>
<title>Model development</title>
<p>This study utilized a convolutional neural network&#x2013;based RetinaFace detector architecture, adjusting the head network and improving data augmentation methods to suit the tasks of ocular detection and key point localization in this research. The overall architecture of RetinaEye included image feature extraction, classification, position detection, and key point localization multi-task learning (<xref ref-type="fig" rid="fig3">Figure 3</xref>).</p>
<fig position="float" id="fig3">
<label>Figure 3</label>
<caption>
<p>Overall architecture diagram of RetinaEye.</p>
</caption>
<graphic xlink:href="fneur-16-1522894-g003.tif">
<alt-text content-type="machine-generated">Diagram showing a process of eye image analysis with three stages: eye classification (\(L_{cls}\)), eye box regression (\(L_{box}\)), and eye points regression (\(L_{pts}\)). Each stage processes the eye image further, indicated by labeled 3D blocks with numbers 2, 4, and 6.</alt-text>
</graphic>
</fig>
<p>Step 1 was image preprocessing. The images and annotation data of the training set were preprocessed using the OpenCV and Albumentations image processing libraries. The preprocessing operations included random cropping, aspect ratio padding, random rotation (within 40&#x00B0;), random brightness adjustment, aspect ratio scaling, and mean subtraction to augment the sample size.</p>
<p>Random rotation may cause in the loss of key points (<xref ref-type="fig" rid="fig4">Figure 4</xref>). In such cases, the random rotation was performed again (up to three times) to ensure that the key points remained usable after rotation. Rarely, when an image still had no usable key points after 3 random rotations, it was considered unsuitable for random rotation operations; thus, the rotation step was skipped.</p>
<fig position="float" id="fig4">
<label>Figure 4</label>
<caption>
<p>Key point loss due to rotation.</p>
</caption>
<graphic xlink:href="fneur-16-1522894-g004.tif">
<alt-text content-type="machine-generated">Close-up images of two human eyes placed side by side, each marked with colored dots: red, blue, and green. The red dot is positioned near the corner, the blue dot near the edge, and the green dot on the iris. Both images are tilted against a black background.</alt-text>
</graphic>
</fig>
<p>Step 2 was establishing the RetinaEye algorithm structure. The algorithm structure of this study was based on the RetinaFace single-stage detector, with the feature extraction module built upon a feature pyramid that incorporated independent context modules, calculating multi-task loss for each anchor on the feature maps (<xref ref-type="fig" rid="fig5">Figure 5</xref>).</p>
<fig position="float" id="fig5">
<label>Figure 5</label>
<caption>
<p>Feature extraction module.</p>
</caption>
<graphic xlink:href="fneur-16-1522894-g005.tif">
<alt-text content-type="machine-generated">Diagram of a neural network architecture involving feature extraction from an eye image. The left section shows layers C2 to C6/P6 with dimensions. The right section displays context modules and their interconnections leading to a multi-task loss.</alt-text>
</graphic>
</fig>
<p>For each trained anchor i, its classification loss + bounding box regression loss + key point regression loss were calculated, as shown in <xref ref-type="disp-formula" rid="EQ1">Equation. 1</xref>.</p><disp-formula id="EQ1">
<label>(1)</label>
<mml:math id="M1">
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mtext mathvariant="italic">Total</mml:mtext>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi mathvariant="italic">cls</mml:mi>
</mml:msub>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>&#x03BB;</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi mathvariant="italic">box</mml:mi>
</mml:msub>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>t</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>&#x03BB;</mml:mi>
<mml:mn>2</mml:mn>
</mml:msub>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi mathvariant="italic">pts</mml:mi>
</mml:msub>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi>l</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>l</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
</mml:math>
</disp-formula><p>where <inline-formula>
<mml:math id="M2">
<mml:msub>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
</mml:math>
</inline-formula> represents the probability predicted for the ocular region, while <inline-formula>
<mml:math id="M3">
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
</mml:math>
</inline-formula> represents the ground truth. The formula shows, that for all negative sample anchors, only the classification loss is utilized. For positive sample anchors, the multi-task loss was calculated.</p>
<p><inline-formula>
<mml:math id="M4">
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi mathvariant="italic">cls</mml:mi>
</mml:msub>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
</mml:math>
</inline-formula> denotes the classification loss for the ocular region, and <inline-formula>
<mml:math id="M5">
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi mathvariant="italic">cls</mml:mi>
</mml:msub>
</mml:math>
</inline-formula> uses the softmax binary classification loss function.</p>
<p><inline-formula>
<mml:math id="M6">
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi>box</mml:mi>
</mml:msub>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
</mml:math>
</inline-formula> represents the bounding box regression loss for the ocular region, where <inline-formula>
<mml:math id="M7">
<mml:msub>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">x</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">y</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">w</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi>h</mml:mi>
</mml:msub>
</mml:math>
</inline-formula>,) and <inline-formula>
<mml:math id="M8">
<mml:msubsup>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mo stretchy="true">(</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">w</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi>h</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
</mml:math>
</inline-formula> denote the predicted bounding box position and the ground truth annotation position for the positive sample anchor, respectively. The regression function employs the <inline-formula>
<mml:math id="M9">
<mml:msub>
<mml:mtext>smooth</mml:mtext>
<mml:mrow>
<mml:mi mathvariant="normal">L</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> loss.</p>
<p><inline-formula>
<mml:math id="M10">
<mml:msub>
<mml:mi mathvariant="double-struck">L</mml:mi>
<mml:mi>pts</mml:mi>
</mml:msub>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
</mml:math>
</inline-formula> represents the regression loss for ocular keypoints, where <inline-formula>
<mml:math id="M11">
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mo stretchy="true">(</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>,) and <inline-formula>
<mml:math id="M12">
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mo stretchy="true">(</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mn>3</mml:mn>
</mml:mrow>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mi mathvariant="normal">l</mml:mi>
<mml:mrow>
<mml:mi mathvariant="normal">y</mml:mi>
<mml:mn>3</mml:mn>
</mml:mrow>
<mml:mo>&#x2217;</mml:mo>
</mml:msubsup>
<mml:mo stretchy="true">)</mml:mo>
</mml:math>
</inline-formula> denote the predicted and ground truth values, respectively, for the outer canthus, pupil, and inner canthus points of the positive sample anchor.</p>
<p>The measurements of the three loss functions correspond to the outputs of the three different head networks illustrated in <xref ref-type="fig" rid="fig3">Figure 3</xref>: the classification of whether the current anchor region contains the ocular position, the output of the bounding box for foreground anchors, which include the ocular position; and the output of the key points for the ocular region.</p>
<p>Step 3 was training. The RetinaEye training set comprised 2,565 images with corresponding annotation information. Training was conducted on a server equipped with an Intel Xeon 8-core processor, a Tesla P40 GPU, and 64&#x202F;GB of memory, running the Ubuntu 20.04 operating system. The training utilized the Python programming language and the PyTorch deep learning framework, with the SGD optimizer selected. The initial learning rate was set to <inline-formula>
<mml:math id="M13">
<mml:msup>
<mml:mn>10</mml:mn>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula>, which was increased to <inline-formula>
<mml:math id="M14">
<mml:msup>
<mml:mn>10</mml:mn>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> after 5 epochs. Subsequently, the learning rate was reduced to one-tenth of its original value at epochs 40 and 50, with training concluded at epoch 80.</p>
<p>Step 4 was automatic scoring. The images of patients gazing left and right in the test group were automatically scored according to the established scoring criteria.</p>
</sec>
</sec>
<sec id="sec14">
<label>2.6</label>
<title>Manual scoring</title>
<p>A clinically experienced ophthalmologist manually marked the positions of the pupil center, medial canthus, and lateral canthus in the test group images for left and right gazes using ImageJ software. The scoring was performed based on the horizontal coordinates of these three points according to the ocular movement scoring calculation method.</p>
</sec>
<sec id="sec15">
<label>2.7</label>
<title>Statistical analysis</title>
<p>The mean Euclidean distance (MED) was calculated as the average distance between the pixel coordinates of the key points identified by the model and the pixel coordinates of the manually annotated points to assess the accuracy. A smaller average distance indicated higher accuracy. The weighted kappa coefficient (WK) was calculated to evaluate the consistency between manual and automatic scoring. If WK&#x202F;=&#x202F;1, it indicated complete agreement between the two methods; 0.75&#x202F;&#x2264;&#x202F;WK&#x202F;&#x003C;&#x202F;1 was generally considered high consistency; 0.4&#x202F;&#x2264;&#x202F;WK&#x202F;&#x003C;&#x202F;0.75 indicated moderate consistency; 0&#x202F;&#x003C;&#x202F;WK&#x202F;&#x003C;&#x202F;0.40 represented low consistency; and WK&#x202F;=&#x202F;0 signified complete disagreement. The Spearman correlation coefficient was calculated to assess the correlation between the results obtained from the two scoring methods. All statistical analyses were conducted using SPSS version 25.0, with <italic>p</italic>&#x202F;&#x003C;&#x202F;0.05 indicating statistical significance.</p>
</sec>
</sec>
<sec sec-type="results" id="sec16">
<label>3</label>
<title>Results</title>
<p>The training group included a total of 285 participants, with 2,565 ocular images collected. The testing group initially included 94 patients with horizontal ocular movement disorders; however, 2 patients were excluded for refusing to sign the informed consent, resulting in a final total of 92 participants with 184 ocular images. Among them, 25 patients had adduction movement disorders and 67 had abduction movement disorders, comprising 26 eyes with adduction disorders and 73 eyes with abduction disorders. All patients were of Asian ethnicity. The basic demographic information of participants in the training and testing groups is shown in <xref ref-type="table" rid="tab2">Table 2</xref>.</p>
<table-wrap position="float" id="tab2">
<label>Table 2</label>
<caption>
<p>Basic demographic information of participants in the training and testing groups.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th colspan="2"></th>
<th align="left" valign="top">Training group</th>
<th align="left" valign="top">Testing group</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top" colspan="2">Total number of participants (<italic>n</italic>)</td>
<td align="left" valign="top">285</td>
<td align="left" valign="top">92</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Mean age (years &#x00B1; SD)</td>
<td align="left" valign="top">55.89&#x202F;&#x00B1;&#x202F;9.30</td>
<td align="left" valign="top">60.9&#x202F;&#x00B1;&#x202F;12.2</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Male (%)</td>
<td align="left" valign="top">61.8%</td>
<td align="left" valign="top">65.2%</td>
</tr>
<tr>
<td align="left" valign="top" rowspan="4">Different types (<italic>n</italic>)</td>
<td align="left" valign="top">Horizontal movement disorder</td>
<td align="left" valign="top">97</td>
<td align="left" valign="top">92</td>
</tr>
<tr>
<td align="left" valign="top">Vertical movement disorder</td>
<td align="left" valign="top">32</td>
<td align="left" valign="top">0</td>
</tr>
<tr>
<td align="left" valign="top">Horizontal and vertical movement disorder</td>
<td align="left" valign="top">35</td>
<td align="left" valign="top">0</td>
</tr>
<tr>
<td align="left" valign="top">Healthy</td>
<td align="left" valign="top">121</td>
<td align="left" valign="top">0</td>
</tr>
<tr>
<td align="left" valign="top" rowspan="6">Different etiologies (<italic>n</italic>)</td>
<td align="left" valign="top">Oculomotor nerve palsy</td>
<td align="left" valign="top">62</td>
<td align="left" valign="top">25</td>
</tr>
<tr>
<td align="left" valign="top">Trochlear nerve palsy</td>
<td align="left" valign="top">11</td>
<td align="left" valign="top">0</td>
</tr>
<tr>
<td align="left" valign="top">Abducens nerve palsy</td>
<td align="left" valign="top">79</td>
<td align="left" valign="top">67</td>
</tr>
<tr>
<td align="left" valign="top">Mixed nerve palsy</td>
<td align="left" valign="top">4</td>
<td align="left" valign="top">0</td>
</tr>
<tr>
<td align="left" valign="top">Thyroid ophthalmopathy</td>
<td align="left" valign="top">5</td>
<td align="left" valign="top">0</td>
</tr>
<tr>
<td align="left" valign="top">Others</td>
<td align="left" valign="top">3</td>
<td align="left" valign="top">0</td>
</tr>
</tbody>
</table>
</table-wrap>
<sec id="sec17">
<label>3.1</label>
<title>Key point recognition results</title>
<p>After training using the nine gaze positions from the training group, RetinaEye was tested on images from the test group. The model successfully detected the positions of both eyes, identifying their pupil centers, medial canthi, and lateral canthi. It also output the coordinates of the three key points and automatically calculated the scores for abduction and adduction movement disorders of both eyes. <xref ref-type="fig" rid="fig6">Figure 6</xref> illustrates a representative example of the automatic scoring output for the abduction of the right eye.</p>
<fig position="float" id="fig6">
<label>Figure 6</label>
<caption>
<p>Example of automatic scoring output for ocular abduction. Blue box: position of the right eye; red dot: medial canthus; green dot: pupil center; blue dot: lateral canthus. The position of the pupil center in different regions (1, 2, 3, 4) represents the movement scores for the abduction of the right eye.</p>
</caption>
<graphic xlink:href="fneur-16-1522894-g006.tif">
<alt-text content-type="machine-generated">Close-up of two eyes with a rectangular overlay on the left eye. The overlay is divided into four vertical colored sections numbered one to four. Small dots in blue, green, and red appear near both eyes.</alt-text>
</graphic>
</fig>
</sec>
<sec id="sec18">
<label>3.2</label>
<title>Results of key point recognition accuracy by the model</title>
<p><xref ref-type="table" rid="tab3">Table 3</xref> shows the MED between the pixel coordinates of key points (The pupil center point, inner canthus point, and outer canthus point identified by the model) identified by the model and those of manually annotated points. The average Euclidean distance for the lateral canthi of both eyes was relatively small, while that for the medial canthi was somewhat larger, indicating that the model performed well in predicting the lateral canthi but was slightly less accurate in predicting the medial canthi. The average Euclidean distances for all three key points of the right eye were smaller than those of the left eye, suggesting that the model achieved greater accuracy in predicting the coordinates of the left eye key points compared to the right eye.</p>
<table-wrap position="float" id="tab3">
<label>Table 3</label>
<caption>
<p>Mean Euclidean distance of different key points.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left" valign="top" colspan="4">Unit: pixel</th>
</tr>
<tr>
<th align="left" valign="top">Eye</th>
<th align="left" valign="top">Medial canthus (<inline-formula>
<mml:math id="M15">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mspace width="0.25em"/>
</mml:mrow>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x00B1; s)</th>
<th align="left" valign="top">Pupil center (<inline-formula>
<mml:math id="M16">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mspace width="0.25em"/>
</mml:mrow>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x00B1; s)</th>
<th align="left" valign="top">Lateral canthus (<inline-formula>
<mml:math id="M17">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mspace width="0.25em"/>
</mml:mrow>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x00B1; s)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">Left eye</td>
<td align="left" valign="top">11.777&#x202F;&#x00B1;&#x202F;0.879</td>
<td align="left" valign="top">9.661&#x202F;&#x00B1;&#x202F;0.719</td>
<td align="left" valign="top">5.047&#x202F;&#x00B1;&#x202F;0.470</td>
</tr>
<tr>
<td align="left" valign="top">Right eye</td>
<td align="left" valign="top">10.366&#x202F;&#x00B1;&#x202F;0.983</td>
<td align="left" valign="top">8.590&#x202F;&#x00B1;&#x202F;1.086</td>
<td align="left" valign="top">4.957&#x202F;&#x00B1;&#x202F;0.482</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><inline-formula>
<mml:math id="M18">
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="normal">d</mml:mi>
<mml:mspace width="0.25em"/>
</mml:mrow>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula> represents the mean Euclidean distance; <inline-formula>
<mml:math id="M19">
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="normal">X</mml:mi>
<mml:mspace width="0.25em"/>
</mml:mrow>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x00B1; s represents the mean &#x00B1; standard deviation.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec id="sec19">
<label>3.3</label>
<title>Consistency between manual and automatic scoring results</title>
<p>After scoring the adduction and abduction movements of both eyes in the test set images using manual annotation and automatic prediction methods, the weighted kappa coefficients between the manual and automatic scoring results were calculated (<xref ref-type="table" rid="tab4">Table 4</xref>). The consistency results indicate a high degree of agreement between the two measurement methods (<italic>&#x03BA;</italic>&#x202F;=&#x202F;0.857, <italic>p</italic>&#x202F;&#x003C;&#x202F;0.001), particularly in eyes with adduction movement disorders, where the consistency was highest. The Spearman correlation coefficient between the two scoring methods was as <italic>&#x03C1;</italic>&#x202F;=&#x202F;0.897 (<italic>p</italic>&#x202F;&#x003C;&#x202F;0.001), demonstrating a strong positive correlation between the results obtained from both methods.</p>
<table-wrap position="float" id="tab4">
<label>Table 4</label>
<caption>
<p>Consistency results between manual scoring and automatic scoring.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th/>
<th align="left" valign="top">Weighted kappa coefficient (<italic>&#x03BA;</italic>)</th>
<th align="left" valign="top">Pearman correlation coefficient (<italic>&#x03C1;</italic>)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">All affected eyes</td>
<td align="left" valign="top">0.857<sup>&#x002A;</sup></td>
<td align="left" valign="top">0.897<sup>&#x002A;</sup></td>
</tr>
<tr>
<td align="left" valign="top">Eyes with abduction movement disorders</td>
<td align="left" valign="top">0.835<sup>&#x002A;</sup></td>
<td align="left" valign="top">0.864<sup>&#x002A;</sup></td>
</tr>
<tr>
<td align="left" valign="top">Eyes with adduction movement disorders</td>
<td align="left" valign="top">0.912<sup>&#x002A;</sup></td>
<td align="left" valign="top">0.899<sup>&#x002A;</sup></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p>&#x002A;<italic>p</italic>&#x202F;&#x003C;&#x202F;0.001.</p>
</table-wrap-foot>
</table-wrap>
</sec>
</sec>
<sec sec-type="discussion" id="sec20">
<label>4</label>
<title>Discussion</title>
<p>This study proposes a deep learning model named RetinaEye. Trained on ocular photographs with manually annotated key points, this model accurately identified the pixel coordinates of the orbit, pupil centers, medial canthi, and lateral canthi of both eyes. Additionally, it automatically calculated scores for ocular movement disorders.</p>
<p>Clinically, multiple traditional methods exist to assess ocular movements; however, grading the severity of movement disorders remains challenging. The corneal light reflex test, a common clinical method, instructs the subject to maintain a steady head position while attempting the maximal gaze in nine directions. Then, the positions of the eyes and corneal light reflex are observed, allowing for the assessment of ocular movements, with scores ranging from &#x2212;1 to &#x2212;4 or +1 to +4 (<xref ref-type="bibr" rid="ref2">2</xref>). Additionally, corneal limbus measurement (<xref ref-type="bibr" rid="ref9">9</xref>) is a convenient and efficient assessment method. It involves placing a transparent ruler directly in front of the cornea to measure the movement distance of the limbus when the ocular shifts from the first gaze position to the second or third positions, allowing for the evaluation of ocular motility. Despite being straightforward, non-invasive, and easy to perform, the accuracy of these methods largely depends on the clinician&#x2019;s experience. Additionally, the corneal light reflex test is less applicable in patients with corneal damage, and the limbus measurement has limited precision. Other methods that quantify ocular movement angles, such as manual perimetry, scleral search coils, and synoptophore, have drawbacks, including extended measurement time, high costs, and limited measurement ranges (<xref ref-type="bibr" rid="ref7">7</xref>).</p>
<p>Photographic eye assessment is increasingly used to evaluate ocular movements. Photos taken in various gaze positions can be used to assess the severity of abduction dysfunction (<xref ref-type="bibr" rid="ref10">10</xref>) and oblique muscle dysfunction (<xref ref-type="bibr" rid="ref11">11</xref>, <xref ref-type="bibr" rid="ref12">12</xref>) for scoring. Compared to traditional assessments, photography offers greater objectivity, although the photo analysis can be labor-intensive and slow when processing large volumes of images. Artificial intelligence applications have enabled the rapid analysis of such images for ocular movement assessment. For instance, an application using ResNet-50 as its neural network architecture was trained on facial photographs to classify images into nine gaze positions (<xref ref-type="bibr" rid="ref13">13</xref>). Zheng (<xref ref-type="bibr" rid="ref14">14</xref>) developed a deep learning model that identifies horizontal strabismus from primary gaze images, achieving diagnostic performance comparable to, or exceeding, that of ophthalmologists. These models lay the foundation for early detection of horizontal strabismus and for distinction between leftward and rightward gaze images, facilitating subsequent ocular movement scoring. Lou (<xref ref-type="bibr" rid="ref7">7</xref>) developed an image analysis method using deep learning to automatically measure ocular movement distance based on nine gaze photos, aiding in the evaluation of the range of ocular movements. However, this model does not provide automated grading for the range of movements.</p>
<p>Therefore, this study introduces RetinaEye, which can achieve rapid, objective, and automated scoring of ocular movement disorders. RetinaEye demonstrated overall excellent performance in key point recognition, although its accuracy varied across different key points. A comparison of left and right eye key point predictions showed that RetinaEye achieved slightly higher accuracy for the right oculus in predicting the coordinates of the pupil center (<inline-formula>
<mml:math id="M20">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x202F;=&#x202F;8.590&#x202F;&#x00B1;&#x202F;1.086), medial canthus (<inline-formula>
<mml:math id="M21">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x202F;=&#x202F;10.366&#x202F;&#x00B1;&#x202F;0.983), and lateral canthus (<inline-formula>
<mml:math id="M22">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x202F;=&#x202F;4.957&#x202F;&#x00B1;&#x202F;0.482), compared to the left ocular pupil center (<inline-formula>
<mml:math id="M23">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x202F;=&#x202F;9.661&#x202F;&#x00B1;&#x202F;0.719), medial canthus (<inline-formula>
<mml:math id="M24">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x202F;=&#x202F;11.777&#x202F;&#x00B1;&#x202F;0.879), and lateral canthus (<inline-formula>
<mml:math id="M25">
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo stretchy="true">&#x00AF;</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>&#x202F;=&#x202F;5.047&#x202F;&#x00B1;&#x202F;0.470). Additionally, the prediction accuracy of RetinaEye for the medial canthi of both eyes was lower than for the pupil center and lateral canthus. This might stem from the common presence of epicanthus in Asians, which shortens the horizontal distance between the eyes (<xref ref-type="bibr" rid="ref15">15</xref>) and may lead to annotation and prediction discrepancies in the medial canthus.</p>
<p>The manual and automated scoring results also showed high consistency, particularly in scoring adduction disorders, with a weighted kappa coefficient of 0.912 (<italic>p</italic>&#x202F;&#x003C;&#x202F;0.001). The Spearman correlation coefficient was 0.897 (<italic>p</italic>&#x202F;&#x003C;&#x202F;0.001), further demonstrating a strong correlation between the two and indicating that RetinaEye can provide clinicians with a reliable automated tool to reduce workload and improve diagnostic efficiency, especially in cases requiring large-scale photo analysis. This outcome provides robust support for artificial intelligence&#x2013;based automated assessment of ocular movement disorders.</p>
<p>However, this study has some limitations. First, it only addresses horizontal movement scoring without evaluating vertical movement disorders. Vertical movement assessment involves additional anatomical complexities, including the positions of the lower edge of the pupil and the lower eyelid, posing greater demands on the model. Future research should expand on this foundation to achieve comprehensive automated scoring for ocular movement disorders. Secondly, the model&#x2019;s mean Euclidean distance in predicting medial canthus positions was relatively high, suggesting room for further improvement in key point recognition. Additionally, when calculating horizontal ocular movement scores, this study did not fully account for the vertical disparity between the medial and lateral canthi, which, though minor, may slightly affect scoring accuracy.</p>
<p>Future research should expand the scope of this model, exploring its performance across different races, age groups, and in vertical movement disorders. The model&#x2019;s potential for remote application is also highly promising. With further refinements, it may facilitate remote ocular selfies for diagnostic purposes, reducing healthcare costs for patients and providing valuable resources, particularly in remote or underserved areas.</p>
</sec>
<sec sec-type="conclusions" id="sec21">
<label>5</label>
<title>Conclusion</title>
<p>This study presents a deep learning model named RetinaEye, which can automatically analyze ocular photographs taken during horizontal gaze positions. The model accurately identifies the positions of the orbit, pupil center, inner canthus, and outer canthus, and calculates scores for ocular movement disorders. A comparison with traditional manual scoring results revealed a high correlation and strong consistency between the two methods. These findings strongly support the use of artificial intelligence for the automated assessment of ocular movement disorders.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="sec22">
<title>Data availability statement</title>
<p>The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.</p>
</sec>
<sec sec-type="ethics-statement" id="sec23">
<title>Ethics statement</title>
<p>The studies involving humans were approved by the First Affiliated Hospital of Harbin Medical University. The studies were conducted in accordance with the local legislation and institutional requirements. The participants provided their written informed consent to participate in this study. Written informed consent was obtained from the individual(s) for the publication of any potentially identifiable images or data included in this article.</p>
</sec>
<sec sec-type="author-contributions" id="sec24">
<title>Author contributions</title>
<p>X-lJ: Data curation, Software, Writing &#x2013; original draft, Writing &#x2013; review &#x0026; editing. Y-fL: Writing &#x2013; original draft. B-bH: Writing &#x2013; review &#x0026; editing. Y-fF: Writing &#x2013; review &#x0026; editing. L-yZ: Data curation, Software, Writing &#x2013; original draft, Writing &#x2013; review &#x0026; editing.</p>
</sec>
<sec sec-type="funding-information" id="sec25">
<title>Funding</title>
<p>The author(s) declare that financial support was received for the research and/or publication of this article. This work was funded by National Natural Science Foundation of China (Project Number: 82074524); Harbin Medical University Graduate Scientific Research and Practice Innovation Project (Project Number: YJSCX2023-50HYD).</p>
</sec>
<sec sec-type="COI-statement" id="sec26">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="ai-statement" id="sec27">
<title>Generative AI statement</title>
<p>The authors declare that no Gen AI was used in the creation of this manuscript.</p>
</sec>
<sec sec-type="disclaimer" id="sec28">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ref-list>
<title>References</title>
<ref id="ref1"><label>1.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Froment</surname> <given-names>TC</given-names></name></person-group>. <article-title>How to assess eye movements clinically</article-title>. <source>Neurol Sci</source>. (<year>2022</year>) <volume>43</volume>:<fpage>2969</fpage>&#x2013;<lpage>81</lpage>. doi: <pub-id pub-id-type="doi">10.1007/s10072-022-05981-5</pub-id></citation></ref>
<ref id="ref2"><label>2.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Ansons</surname> <given-names>AM</given-names></name> <name><surname>Davis</surname> <given-names>H</given-names></name></person-group>. <source>Diagnosis and management of ocular motility disorders</source> <publisher-name>John Wiley &#x0026; Sons</publisher-name> (<year>2022</year>).</citation></ref>
<ref id="ref3"><label>3.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhou</surname> <given-names>LY</given-names></name> <name><surname>Su</surname> <given-names>C</given-names></name> <name><surname>Liu</surname> <given-names>TJ</given-names></name> <name><surname>Li</surname> <given-names>XM</given-names></name></person-group>. <article-title>Validity and reliability of the ocular motor nerve palsy scale</article-title>. <source>Neural Regen Res</source>. (<year>2018</year>) <volume>13</volume>:<fpage>1851</fpage>&#x2013;<lpage>6</lpage>. doi: <pub-id pub-id-type="doi">10.4103/1673-5374.238716</pub-id></citation></ref>
<ref id="ref4"><label>4.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fan</surname> <given-names>YF</given-names></name> <name><surname>Tu</surname> <given-names>SJ</given-names></name> <name><surname>Liu</surname> <given-names>Y</given-names></name> <name><surname>Li</surname> <given-names>XM</given-names></name> <name><surname>Liu</surname> <given-names>TJ</given-names></name> <name><surname>Zhou</surname> <given-names>LY</given-names></name></person-group>. <article-title>Investigation of the differential susceptibility of extraocular muscles in patients diagnosed with ocular myasthenia gravis based on the computerized diplopia test and the ocular motor nerve palsy scale</article-title>. <source>Front Neurol</source>. (<year>2024</year>) <volume>15</volume>:<fpage>1353248</fpage>. doi: <pub-id pub-id-type="doi">10.3389/fneur.2024.1353248</pub-id></citation></ref>
<ref id="ref5"><label>5.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lim</surname> <given-names>HW</given-names></name> <name><surname>Lee</surname> <given-names>DE</given-names></name> <name><surname>Lee</surname> <given-names>JW</given-names></name> <name><surname>Kang</surname> <given-names>MH</given-names></name> <name><surname>Seong</surname> <given-names>M</given-names></name> <name><surname>Cho</surname> <given-names>HY</given-names></name> <etal/></person-group>. <article-title>Clinical measurement of the angle of ocular movements in the nine cardinal positions of gaze</article-title>. <source>Ophthalmology</source>. (<year>2014</year>) <volume>121</volume>:<fpage>870</fpage>&#x2013;<lpage>6</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.ophtha.2013.11.019</pub-id></citation></ref>
<ref id="ref6"><label>6.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Viikki</surname> <given-names>K</given-names></name> <name><surname>Isotalo</surname> <given-names>E</given-names></name> <name><surname>Juhola</surname> <given-names>M</given-names></name> <name><surname>Pyykk&#x00F6;</surname> <given-names>I</given-names></name></person-group>. <article-title>Using decision tree induction to model oculomotor data</article-title>. <source>Scand Audiol Suppl</source>. (<year>2001</year>) <volume>52</volume>:<fpage>103</fpage>&#x2013;<lpage>5</lpage>. doi: <pub-id pub-id-type="doi">10.1080/010503901300007227</pub-id></citation></ref>
<ref id="ref7"><label>7.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lou</surname> <given-names>L</given-names></name> <name><surname>Sun</surname> <given-names>Y</given-names></name> <name><surname>Huang</surname> <given-names>X</given-names></name> <name><surname>Jin</surname> <given-names>K</given-names></name> <name><surname>Tang</surname> <given-names>X</given-names></name> <name><surname>Xu</surname> <given-names>Z</given-names></name> <etal/></person-group>. <article-title>Automated measurement of ocular movements using deep learning-based image analysis</article-title>. <source>Curr Eye Res</source>. (<year>2022</year>) <volume>47</volume>:<fpage>1346</fpage>&#x2013;<lpage>53</lpage>. doi: <pub-id pub-id-type="doi">10.1080/02713683.2022.2053165</pub-id></citation></ref>
<ref id="ref8"><label>8.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Deng</surname> <given-names>J</given-names></name> <name><surname>Guo</surname> <given-names>J</given-names></name> <name><surname>Zhou</surname> <given-names>Y</given-names></name> <name><surname>Yu</surname> <given-names>J</given-names></name> <name><surname>Kotsia</surname> <given-names>I</given-names></name> <name><surname>Zafeiriou</surname> <given-names>S</given-names></name></person-group>. <article-title>Retinaface: single-stage dense face localisation in the wild</article-title>. <source>arXiv</source>. (<year>2019</year>)</citation></ref>
<ref id="ref9"><label>9.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Kestenbaum</surname> <given-names>A</given-names></name></person-group>. <source>Clinical methods of neuro-ophthalmologic examination</source> <publisher-name>Elsevier</publisher-name> (<year>2013</year>).</citation></ref>
<ref id="ref10"><label>10.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Holmes</surname> <given-names>JM</given-names></name> <name><surname>Hohberger</surname> <given-names>GG</given-names></name> <name><surname>Leske</surname> <given-names>DA</given-names></name></person-group>. <article-title>Photographic and clinical techniques for outcome assessment in sixth nerve palsy</article-title>. <source>Ophthalmology</source>. (<year>2001</year>) <volume>108</volume>:<fpage>1300</fpage>&#x2013;<lpage>7</lpage>. doi: <pub-id pub-id-type="doi">10.1016/s0161-6420(01)00592-9</pub-id></citation></ref>
<ref id="ref11"><label>11.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yoon</surname> <given-names>CK</given-names></name> <name><surname>Yang</surname> <given-names>HK</given-names></name> <name><surname>Kim</surname> <given-names>JS</given-names></name> <name><surname>Hwang</surname> <given-names>JM</given-names></name></person-group>. <article-title>An objective photographic analysis of ocular oblique muscle dysfunction</article-title>. <source>Am J Ophthalmol</source>. (<year>2014</year>) <volume>158</volume>:<fpage>924</fpage>&#x2013;<lpage>31</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.ajo.2014.07.035</pub-id></citation></ref>
<ref id="ref12"><label>12.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lim</surname> <given-names>HW</given-names></name> <name><surname>Lee</surname> <given-names>JW</given-names></name> <name><surname>Hong</surname> <given-names>E</given-names></name> <name><surname>Song</surname> <given-names>Y</given-names></name> <name><surname>Kang</surname> <given-names>MH</given-names></name> <name><surname>Seong</surname> <given-names>M</given-names></name> <etal/></person-group>. <article-title>Quantitative assessment of inferior oblique muscle overaction using photographs of the cardinal positions of gaze</article-title>. <source>Am J Ophthalmol</source>. (<year>2014</year>) <volume>158</volume>:<fpage>793</fpage>&#x2013;<lpage>799.e2</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.ajo.2014.06.016</pub-id></citation></ref>
<ref id="ref13"><label>13.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>de Figueiredo</surname> <given-names>LA</given-names></name> <name><surname>Dias</surname> <given-names>JVP</given-names></name> <name><surname>Polati</surname> <given-names>M</given-names></name> <name><surname>Carricondo</surname> <given-names>PC</given-names></name> <name><surname>Debert</surname> <given-names>I</given-names></name></person-group>. <article-title>Strabismus and artificial intelligence app: optimizing diagnostic and accuracy</article-title>. <source>Transl Vis Sci Technol</source>. (<year>2021</year>) <volume>10</volume>:<fpage>22</fpage>. doi: <pub-id pub-id-type="doi">10.1167/tvst.10.7.22</pub-id></citation></ref>
<ref id="ref14"><label>14.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zheng</surname> <given-names>C</given-names></name> <name><surname>Yao</surname> <given-names>Q</given-names></name> <name><surname>Lu</surname> <given-names>J</given-names></name> <name><surname>Xie</surname> <given-names>X</given-names></name> <name><surname>Lin</surname> <given-names>S</given-names></name> <name><surname>Wang</surname> <given-names>Z</given-names></name> <etal/></person-group>. <article-title>Detection of referable horizontal strabismus in children's primary gaze photographs using deep learning</article-title>. <source>Transl Vis Sci Technol</source>. (<year>2021</year>) <volume>10</volume>:<fpage>33</fpage>. doi: <pub-id pub-id-type="doi">10.1167/tvst.10.1.33</pub-id></citation></ref>
<ref id="ref15"><label>15.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Saonanon</surname> <given-names>P</given-names></name></person-group>. <article-title>The new focus on epicanthoplasty for Asian eyelids</article-title>. <source>Curr Opin Ophthalmol</source>. (<year>2016</year>) <volume>27</volume>:<fpage>457</fpage>&#x2013;<lpage>64</lpage>. doi: <pub-id pub-id-type="doi">10.1097/ICU.0000000000000277</pub-id></citation></ref>
</ref-list>
</back>
</article>