{'fraction_non_alphanumeric': 0.04016716030348521, 'fraction_numerical': 0.01882582058668398, 'mean_word_length': 5.138978829389789, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Validation of a velocity-based algorithm to quantify saccades during walking and turning in mild traumatic brain injury and healthy controls

Objective Saccadic (fast) eye movements are a routine aspect of neurological examination and are a potential biomarker of mild traumatic brain injury (mTBI). Objective measurement of saccades has become a prominent focus of mTBI research, as eye movements may be a useful assessment tool for deficits in neural structures or processes. However, saccadic measurement within mobile infra-red (IR) eye-tracker raw data requires a valid algorithm. The objective of this study was to validate a velocity-based algorithm for saccade detection in IR eye-tracking raw data during walking (straight ahead and while turning) in people with mTBI and healthy controls. Approach Eye-tracking via a mobile IR Tobii Pro Glasses 2 eye-tracker (100Hz) was performed in people with mTBI (n=10) and healthy controls (n=10). Participants completed two walking tasks: straight walking (walking back and forth for 1minute over a 10m distance), and walking and turning (turns course included 45°, 90° and 135° turns). Five trials per subject, for one-hundred total trials, were completed. A previously reported velocity-based saccade detection algorithm was adapted and validated by assessing agreement between algorithm saccade detections and the number of correct saccade detections determined from manual video inspection (ground truth reference). Main results Compared with video inspection, the IR algorithm detected ~97% (n=4888) and ~95% (n=3699) of saccades made by people with mTBI and controls, respectively, with excellent agreement to the ground truth (Intra-class correlation coefficient2,1 = .979 to .999). Significance This study provides a simple yet highly robust algorithm for the processing of mobile eye-tracker raw data in mTBI and controls. Future studies may consider validating this algorithm with other IR eye-trackers and populations.


Introduction
Neurological clinical examinations routinely involve eye-movement assessments of patients that focus on saccadic (fast eye-movements) and fixation (pauses on area of interest) movements [1]. Eye-movements, particularly saccades, provide an understanding of the visual, cognitive and motor deficits that accompany ageing [2] and neurological injuries or illnesses [3][4][5][6] such as mild traumatic brain injury (mTBI). Indeed, the presence of eye movement deficits in acquired brain injury (of which mTBI is a sub-group) is reportedly as high as 90% [7,8], and objective measurement of eye movements for the detection of deficits with mTBI has been a focus of many current research studies [9][10][11][12]. Hence, measurement of eye-movements in mTBI via non-invasive technology has become increasingly popular over recent years [13][14][15], likely due to the ease of application and the insight it may give into the extensive network of brain regions that are involved in eyemovement control [16]. Individuals with mTBI may suffer deficits in a multitude of neural structures and processing centers that impact visual capabilities [17], such as deficits in visual attention, visual working memory, visual discrimination, and selective (or choice) attention [18,19]. Understanding eye-movement abnormalities in mTBI compared with healthy controls using eye-tracking technology may therefore inform underlying mechanisms involved in patient symptoms and deficits. Examining eye movements in mTBI during complex dynamic tasks that involve real-word challenges, such as dual tasking (i.e. carrying out two tasks simultaneously) or turning, could be particularly useful to understand how mTBI-related deficits may affect functional capabilities in everyday life. This makes robust eye-tracking a possible biomarker of mTBI-related deficits [20] and a useful mTBI assessment tool [21] that could be deployed in a variety of environments including the clinic or field side assessments.
Eye-tracking is not novel to research, but recent advances in micro-technology have allowed a shift from high resolution static (200-1000Hz) to dynamic mobile (30-100Hz) eyetracking devices that facilitate the study of eye-movements during real-world tasks (i.e. walking, turning, obstacle crossing etc.) [3,4,[22][23][24]. Mobile infra-red (IR) eye-trackers have been developed, and are the predominant method used within research to monitor eyemovements [13]. During dynamic tasks, research is often focused on the analysis of saccades and fixations with common outcomes including; number and duration of fixations; and number, duration, velocity, and amplitude (i.e. distance) of saccades. Such outcomes are not typically available from the manufacturer provided "black-box" mobile eye-tracker software (i.e. Tobii Pro Analyzer, Dikablis D-Lab etc.) or open source software [25][26][27]. These "black-box" software packages do not allow researchers to access data processing methods and limit outcome use and understanding. Therefore, custom-made algorithms are required to provide robust saccadic and fixation data from raw coordinate data provided by mobile eye-tracking devices. Developed algorithms are largely transferable across eyetracker hardware, but may need to be adapted with technological advancement of eyetrackers or the output that they provide.
There are currently several different algorithm methods to extract desired eye movement outcomes (for an overview see; [28][29][30]). However, there is currently no gold-standard methodology for saccade detection [31]. Due to saccade and fixation speed profiles, velocity-based (i.e. pupil coordinate frame-to-frame velocities) identification of these eyemovements is a simple method to understand and implement [31]. For example, saccades have high velocities (i.e. a 5° saccade typically has a velocity >240°/sec) and fixations consist of low velocities (i.e. <30-300°/sec depending on task), therefore discrimination between these features is relatively easy and robust [28,29]. This process has been applied to dynamic eye-tracking data analysis to extract saccadic and fixation outcomes [3,4,[32][33][34].
Robust velocity-based algorithms for dynamic (i.e. walking) monocular eye-tracker (Dikablis, 50Hz, Ergoneers) data analysis have been developed and validated in older adults and people with Parkinson's disease [33]. While, the application of such saccade detection algorithms to mobile eye-tracker data collected from people with mTBI has not yet been examined, it is a necessary step to ensure robust data analysis [29]. Similarly, technological advancements in mobile eye-tracking devices may require such algorithms to be adapted to appropriately derive metrics [35]. For example, new eye-trackers with higher sampling frequency (i.e. 100Hz) high definition cameras (e.g. 1080HD) may require different algorithm settings (e.g. pixel to degree conversion ratios etc.) [36], and may capture greater levels of noise that need to be accounted for to avoid temporal sampling errors [37].
The overall aim of this study was to validate a saccade detection algorithm for analyzing data from a binocular mobile eye-tracker during walking (straight and with increasing complexity via turning and dual-task) in individuals with mTBI and healthy controls. To achieve this aim we adapted a previously reported saccade detection algorithm [33] to analyze data from a Tobii Pro Glasses 2 (100Hz, 1080HD cameras, Tobii Inc.) mobile eyetracker and compared outcomes to manual video observation by an expert rater, in line with previous studies [33,34].

Participants
Data were collected within an ongoing study 'Rehabilitation of Complex TBI with Sensory Integration Balance Deficits; Can Early Initiation of Rehabilitation with Wearable Sensor Technology Improve Outcomes?' (ClinicalTrials.gov identifier: NCT03479541). All experimental procedures were approved by an Oregon Health & Science University (OHSU) and Veterans Affairs Portland Health Care System (VAPORHCS) joint institutional review board, with written informed consent obtained from participants prior to all testing. This study involved recording eye-movement data while walking straight and while turning in people with an acute mTBI and healthy controls. Data from twenty subjects (n=10 mTBI and n=10 controls) was analyzed, specific participant inclusion and exclusion criteria is detailed below. Participant demographic data are presented within Table 1; subjects were well matched for age, gender, height and mass. Visual acuity (LogMAR at 4m) and contrast sensitivity (Mars Perceptrix at 50cm) were assessed using standard eye charts.
Stage of mTBI was based upon previous work that has defined 0-7 days post-mTBI to be the immediate period, 1-6 weeks the acute period, 7-12 weeks the post-acute period, and >12 weeks to be the chronic period [38]. All mTBI diagnoses were confirmed by a physician and were defined with the following criteria: no CT scan (or a normal CT scan if obtained), Video: The IR eye-tracker used a dual camera view system, with a video recording from an eye camera and a field of view camera (1080HD, 50Hz, Figure 2). The eye-tracker was calibrated prior to data collection using the manufacturer's single point calibration method, which overlaid the eye and field video outputs with a cross-hair provided on the video to represent pupil location. Coordinate (x, y) data were derived from the cross-hair (red circle, Figure 2) location and were used to derive eye-movements.

Experimental Procedure
Participants were asked to walk down a 10m straight corridor back and forth for 1minute, under single and dual-task. Participants also completed a walking-while-turning course (8 laps) over a similar course to our previously developed turning course (with repeated 45°, 90° and 135° turns) [42], under single and dual-task, and while fast walking (4 laps) ( Figure  1). The dual-task involved walking while completing a secondary auditory Stroop task, which has been detailed elsewhere [43]. In brief, this test involved participants having to respond (speak the word high or low) as fast as possible to different pitches of the words 'HIGH' or 'LOW' that were played over a digital recording via headphones. Both congruent (e.g. word High is said in a High pitch, or word Low is said in a Low pitch) and incongruent (e.g. word High is said in a Low pitch, or word Low is said in a High pitch) stimuli were used, where the pitch of the word was reported rather than the spoken word by the voice recording.

Feature Selection and Extraction
Video inspection: Videos were manually analyzed similar to previous work [33,34,44]. In order to compare eye-tracker algorithm results, all high-definition field camera videos ( Figure 2) from each participant (n=20) during the dynamic walking trials were visually inspected by a single expert rater examiner (SS) frame-by-frame (100 videos in total). The visual inspection involved recording the number of saccades (fast eye-movements >5°) seen within each video, which was then compared to the IR eye-tracker algorithm output.

Detection of visual events via algorithm
In order to analyze data from the Tobii Pro Glasses 2 mobile eye-tracker, we adapted a previously validated algorithm [33]. It was not appropriate to directly apply the algorithm to this new technology since sampling rate, pixel conversion ratios and data output were not the same as the those used by older eye-tracking devices. The entire algorithm is presented in Figure 3 and the following details the algorithm stages.

Stage 1: Pre-processing
a) Moving median filter: Due to the eye-tracker sampling frequency (100Hz), we adapted the previous algorithm [33] by filtering the raw eye-tracker signal using a moving median filter to remove high frequency noise introduced by artifacts, such as head movement or device slippages. This filter was chosen to preserve the edge steepness of the saccades, retain signal amplitudes and not introduce any artificial signal changes [45]. b) Distance, velocity and acceleration: A velocity-based algorithm was used to derive all eye movement characteristics of interest. Following raw data filtering, the first step of this algorithm was to calculate the point-to-point position change of the x and y coordinates for each frame of the raw data.
Distance (1) was calculated in pixels, which was the difference in pixels from time point 1 (t1) to time point 2 (t2), with Time equal to 10ms. Velocities (2) and accelerations (3) were calculated as the change in distance and change in velocity from one frame (or time point) to the next. (1)

Velocity = Distance Time
(2) Acceleration = Velocity t1 − Velocity t2 Time Stage 2: Convert data from pixels to degrees a) Conversion of pixels to degrees: Eye movements are typically measured and reported in degrees of movement, however raw eye tracker co-ordinate (x, y) data was obtained in pixels. Therefore eye-movement pixel data were converted to degrees, calculated using the pixel to degree conversion ratio of 1:0.05 (Table 1).

Stage 3: Event Detection
a) Velocity and Acceleration thresholds: Following calculation of the velocities and accelerations for each frame in the raw eye-tracker data the algorithm then classified each point based on fixed thresholds. Although in line with previous recommendations [35], these thresholds can be manually changed depending upon the task (i.e. lower thresholds could be used for static tasks). In order to remove irrelevant artifacts in eye-tracker data (i.e. blinks or flickers) and to standardize detected visual events (i.e. saccades or fixations) fixed velocity and acceleration thresholds were used, which are explained below.

b) Removal of data caused by blinks and flickers:
Data were further filtered using set criteria for blinks and flickers, which were based upon the co-ordinate data and the frameby-frame velocity changes of the data. Blinks (closing the eye) were classified as any eyetracker data frames that had co-ordinates that had missing data (i.e. x, y = 0, 0 or blank space). Flickers were classified as any frame that had a velocity change of >1000°/s or acceleration >100,000°/s 2 , as it is not physiologically possible to move the eye faster than these thresholds [46,47]. These artifacts or missing data were removed and gaps were linearly interpolated.
c) Detection of a saccade: Each point in the raw eye-tracker data that had a velocity greater than 240°/s (~5° distance) and acceleration greater than 3000°/s² was classified as a saccade. In line with previous dynamic eye-tacker algorithms [33,34], the current algorithm used a threshold above a 5° distance in order to avoid vestibular ocular reflexes (VOR) (due to VOR-related eye-movements typically being less than 5° during walking [48,49]) and to ensure that only purposeful eye movement data was included.
We adapted the previous algorithm [33] by ensuring that saccades that were <10 frames (100ms) apart were joined, as they were likely part of the same eye-movement (i.e. catch-up saccades). Saccade distance and duration were calculated from the grouped saccades. Saccades had to have durations <10 frames (100ms) as saccades are not known to occur with durations longer than this threshold.

d) Detect of a fixation:
Fixations were a secondary outcome of the algorithm, and were classified as points in the eye-tracker data that had a velocity less than 240°/s and acceleration less than 3000°/s 2 in the same manner as the saccades. Following joining of adjacent fixation frames, fixations also had to have durations that were >10 frames (100ms) and frames not meeting this criteria were discarded.

Stage 4: Quantifying saccades and fixations-
The final stage of the algorithm was to calculate the outcomes of the visual events (i.e. saccades and fixations). We extracted the following features from the data: Saccade number, frequency, velocity, acceleration, duration and distance; and Fixation number, frequency, duration and timing.

Data and Statistical Analysis
The mobile eye-tracker algorithm was implemented within MATLAB® (2017b, Mathworks, Natick, MA, USA). Mobile eye-tracker algorithm outcomes were compared to manual video analysis by an expert rater (gold-standard or ground truth reference) in line with previous research studies [33,34,44]. Between-group comparisons were not performed, as this was not the focus of the study. Saccade detection (number) was evaluated during dynamic walking tasks, including straight walking and walking with turns. Detection performance was performed with respect to the following criteria; • Correct detection: IR algorithm saccade or fixation detection was marked as correct if it was found in the corresponding video.
• Undetected: IR algorithm saccade detection was marked as undetected if the saccade was found in the corresponding video, but not in the algorithm output.
• Spurious: IR algorithm saccade detection was marked as spurious if it was in the algorithm output but not in the corresponding video.

Results
Results from the video inspection and IR algorithm output during the various walking trials are displayed in Tables 3 and 4. Overall, the IR algorithm correctly detected ~97% (n=4888) and ~95% (n=3699) of the saccades detected via video inspection for the mTBI and control groups, respectively. There were generally low levels of undetected saccades (~2-3%) and spurious saccade detections (~2-3%) within the IR algorithm output compared to the video inspection.
Agreement results shown in Table 3 indicated that the IR algorithm detected saccades while walking with excellent (ICC 2,1 .979 to .999) agreement to the video inspection across both mTBI and control groups. On average, there was also little difference between the IR algorithm output and video inspection (Mean difference −2.1 to 0.9), with no significant differences and relatively small limits of agreement (LoA% 4 to 14.5).

Discussion
To the best of our knowledge, this is the first study to adapt and validate an algorithm to detect saccades from raw mobile IR eye-tracking data obtained during walking and turning in people with acute mTBI and controls. This is fundamental for accurate and automated evaluation of mobile eye-tracking data. Similar to previous work [33,34,44], we compared the IR algorithm output to frame-by-frame manual video inspection by an expert rater to establish the validity of the adapted algorithm.
Evaluation of automated algorithms for eye movement examination is vital to ensure that clinical decisions based on outputs are accurate and based upon robust methods. In line with previous eye-tracking algorithms [33,34], a velocity-based threshold method was used to detect saccades within the IR eye-tracker signal. Velocity-based algorithms for saccade detection are relatively easy to implement and can therefore be used by those unfamiliar with algorithm development (e.g. clinicians or novice researchers). This study suggests that despite its relative simplicity the algorithm was robust in its ability to detect saccades from mobile IR eye-tracker data.

Robustness of algorithm
To determine IR algorithm robustness, participants with mTBI and healthy control participants performed the same walking tasks, and data were analyzed using the same fixed algorithm settings that were then compared to visual inspection. Under these conditions the IR algorithm proved to be robust, overall correctly detecting 8587 (~96%) saccades made by the mTBI and control participants during the walks (100 trials in total), with relatively small (~2-3%) undetected or spurious saccades. This level of accuracy via a velocity-based algorithm is similar to previous dispersion-based approaches [51][52][53]. Agreement between the ground truth video inspection and IR algorithm methodologies was also excellent across groups and walking conditions. This demonstrated that the IR algorithm was capable of robustly detecting saccades during walking in people with mTBi and controls, with similar performance for both groups.
The algorithm presented in this study performed better than the previously validated mobile algorithm [33]. Specifically, correct saccade detection performance of the previous algorithm was 85%, but the current adapted algorithm improved performance to ~96% correct saccade detection. This improved performance may be due to a number of factors including algorithm adaption and advancement of eye-tracker technology.
Adaption of the previous algorithm [33] was performed to develop the current IR algorithm ( Figure 3) that was implemented within this study to analyze the raw data from the latest mobile eye-tracking technology (Tobii Pro Glasses 2, 100Hz, binocular 1080HD camera). Specifically, a moving median filter was applied to the raw data to remove any noise before further analysis [45] and saccades were grouped if they were <10 frames (100ms) apart (i.e. if saccades were not separated by a fixation then they were grouped), which allowed more accurate saccade classification.
Technological advancements have allowed mobile eye-trackers to progress to devices with higher sampling rates (100Hz, with a 50Hz eye-camera) and better resolution (1080HD field camera) than previous studies that have been limited to sampling rates that may only just detect saccades (50Hz) [33,34]. It is plausible that these advancements have allowed greater accuracy in determining eye movement velocities [37] and have provided better material for visual inspection, resulting in improved algorithm and ground truth video inspection outcomes. For example, ~14% of saccades were undetected and ~3% were spurious in the previous hardware/algorithm combination [33], whereas the current hardware/IR algorithm combination reduced this to ~2-3% undetected or spurious saccade detections. Spurious saccade detection was similar to the previous methods [33,34], which is likely due to the use of video inspection as a ground truth [44], as video inspection may have missed some saccades that were present within the IR algorithm output. For example; video inspection is limited by issues with incorrect saccade detection due to poor pupil tracking that is caused by eye-lashes, eye-lids or dark/light lighting conditions which cause flickers or absent pupil (cross-hair) location. Such anomalies are automatically ruled out in the IR algorithm, however they can be difficult to spot upon video inspection unless they are particularly fast or large [44].

Future Algorithm Applications
The robust algorithm that this article presents and validates could be used with current or future mobile eye-tracking technology, such as the Tobii Pro Glasses 2 system, to examine laboratory or real-world eye-movements in mTBI compared to controls. It is vital that algorithms to derive saccadic features are robust and valid, as the outcomes may be used to inform future clinical practice or interventions for mTBI. With our comprehensive algorithm validation and description, both novice and expert researchers could apply this methodology within future studies, which may allow some standardization of the methodology used to derive saccadic characteristics across studies. Future work is needed that uses robust algorithms to examine saccadic eye movement features during walking and turning in mTBI compared to controls, which may provide an understanding of mTBI-related deficits and their influence on daily function.

Limitations
In line with previous work [33,34] this study was limited by the fixed velocity threshold (>240°/s, ~5° distance) that may rule out smaller eye movements within the IR eye-tracker signal. We used this threshold as previously validated algorithms (both IR and EOG eyetrackers) have used the same setting in order to rule out interference from vestibular ocular reflexes (VOR). However, this is an adaptable threshold so future studies could change this based on the task undertaken (i.e. smaller for static tasks). Additionally, this study only examined saccadic detection validity, and we did not specifically assess other saccadic outcomes (e.g. saccade durations, amplitude etc.) which future studies could examine with validated methodologies [32].

Conclusions
This study adapted a velocity-based algorithm for saccade detection and measurement in IR eye-tracker data, and validated the algorithm during walking tasks in people with a previous mTBI and healthy controls. The algorithm can accurately detect saccades in IR eye-tracker data and was found to be valid against the ground truth manual video inspection during the various walking conditions in both groups.