[$\ast$]Corresponding and lead author;
Email address<EMAIL_ADDRESS>
# SLOctolyzer: Fully automatic analysis toolkit for segmentation and feature
extracting in scanning laser ophthalmoscopy images

Jamie Burke  School of Mathematics, University of Edinburgh, Edinburgh, UK
Robert O Curle Ophthalmology Suite, Institute for Regeneration and Repair,
University of Edinburgh, UK  Samuel Gibbon  Robert O Curle Ophthalmology
Suite, Institute for Regeneration and Repair, University of Edinburgh, UK
Justin Engelmann  Centre for Medical Informatics, University of Edinburgh,
Edinburgh, UK  School of Informatics, University of Edinburgh, Edinburgh, UK
Adam Threlfall  Robert O Curle Ophthalmology Suite, Institute for Regeneration
and Repair, University of Edinburgh, UK  Ylenia Giarratano  Centre for Medical
Informatics, University of Edinburgh, Edinburgh, UK  Charlene Hamid  Clinical
Research Facility and Imaging, University of Edinburgh, Edinburgh, UK  Stuart
King  School of Mathematics, University of Edinburgh, Edinburgh, UK  Ian J.C.
MacCormick  Institute for Adaptive and Neural Computation, School of
Informatics, University of Edinburgh, Edinburgh, UK  Centre for Clinical Brain
Sciences, University of Edinburgh, Edinburgh, UK  Tom MacGillivray  Robert O
Curle Ophthalmology Suite, Institute for Regeneration and Repair, University
of Edinburgh, UK  Clinical Research Facility and Imaging, University of
Edinburgh, Edinburgh, UK  Centre for Clinical Brain Sciences, University of
Edinburgh, Edinburgh, UK

###### Abstract

Purpose To describe SLOctolyzer: an open-source analysis toolkit for en face
retinal vessels appearing in infrared reflectance scanning laser
ophthalmoscopy (SLO) images.

Methods SLOctolyzer includes two main modules: segmentation and measurement.
The segmentation module use deep learning methods to delineate retinal
anatomy, while the measurement module quantifies key retinal vascular features
such as vessel complexity, density, tortuosity, and calibre. We evaluate the
segmentation module using unseen data and measure its reproducibility.

Results SLOctolyzer’s segmentation module performed well against unseen
internal test data (Dice for all-vessels, 0.9097; arteries, 0.8376; veins,
0.8525; optic disc, 0.9430; fovea, 0.8837). External validation against severe
retinal pathology showed decreased performance (Dice for arteries, 0.7180;
veins, 0.7470; optic disc, 0.9032). SLOctolyzer had good reproducibility (mean
difference for fractal dimension, -0.0007; vessel density, -0.0003; vessel
calibre, -0.3154 $\mu$m; tortuosity density, 0.0013). SLOctolyzer can process
a macula-centred SLO image in under 20 seconds and a disc-centred SLO image in
under 30 seconds using a standard laptop CPU.

Conclusions To our knowledge, SLOctolyzer is the first open-source tool to
convert raw SLO images into reproducible and clinically meaningful retinal
vascular parameters. It requires no specialist knowledge or proprietary
software, and allows manual correction of segmentations and re-computing of
vascular metrics. SLOctolyzer is freely available at
https://github.com/jaburke166/SLOctolyzer.

Translational Relevance SLO images are captured simultaneous to optical
coherence tomography (OCT), and we believe our software will be useful for
extracting retinal vascular measurements from large OCT image sets and linking
them to ocular or systemic diseases.

##  1 Introduction

The retina is a highly vascularised light-sensitive tissue at the back of the
eye. The retinal microvasculature branches from the optic nerve head along the
inner surface of the retina and is commonly imaged using colour fundus
photography, which typically covers a 35–50 degree field of view around the
posterior pole.

Confocal near infrared reflectance scanning laser ophthalmoscopy (SLO) utilise
long wavelengths of around 820nm and also captures an en face view of the
superficial retinal vessels 1. SLO images are typically captured simultaneous
to optical coherence tomography (OCT) scans of the inner retinal layers
(supplementary Fig. S1) acting as a localiser to position the OCT scan at the
back of the eye accurately and typically images a restricted field of view of
30 degrees (approximately 9 mm2). Additionally, confocal imaging leverages
laser-point raster scanning to prevent stray light interference during
acquisition 2, thus providing higher contrast visualisation of the en face
retinal vasculature over regular colour fundus images. Moreover, the
interferometry of OCT imaging enables an exact conversion from pixel to
physical space, a crucial step in forming clinically meaningful datasets of
features of the en face retinal vessels 3. In colour fundus images, heuristic
approaches are commonly used to obtain physical measurements, such as optic
disc area normalisation 4. However, despite the detail SLO images capture they
are often discarded due to the primary aim of OCT imaging to visualise the
cross-sectional retinal layers.

This improved visualisation, increased accuracy in measurement and growing
abundance from OCT capture make the SLO imaging modality an exciting frontier
of en face retinal vessel analysis. Manual delineation of en face retinal
vessels is prohibitively time-consuming, labour-intensive, and prone to
inaccuracies. Consequently, extensive research has focused on segmenting
retinal vessels, primarily in the colour fundus modality 5, with less emphasis
on SLO images.

At the time of writing, very few methods have been reported for retinal vessel
analysis for SLO images 6; 7; 8; 9; 10, and none for other major landmarks on
the SLO image, the fovea and optic disc. Additionally, none of these methods
have been made available to the research community, which has the potential to
impact the standardisation of SLO-derived retinal vascular parameters.

Equipping automatic imaging methods with the tools for measuring downstream
features for research and clinical use is an important element of any research
pipeline 11; 12; 13; 14; 15. This allows the general researcher to use these
methods in an end-to-end manner, and analyse their own retinal images without
specialist training or a background in image processing. Unfortunately, there
is a lack of similar pipelines for SLO images.

Accordingly, we aimed to develop and release a fully automatic analysis
toolkit, SLOctolyzer, for segmentation and subsequent measurement of retinal
vessels as seen on SLO images. Here, we introduce and quantitatively validate
the segmentation models which detect the binary vessels, and classification of
arteries and veins, as well as detection of the optic disc and fovea.

We highlight several contributions that SLOctolyzer provides to the research
community:

  * •

SLOctolyzer is the first open-source pipeline for converting raw SLO images
into clinically meaningful, retinal vascular parameters.

  * •

SLOctolyzer’s measurement module computes several summary measures of the
retinal vessels, such as fractal dimension, vessel density, tortuosity
density, vessel calibre and central retinal artery/vein equivalents.

  * •

SLOctolyzer works on macula- or optic disc-centred images which usually
accompany OCT capture.

  * •

SLOctolyzer supports manual annotation to correct erroneous segmentations.

  * •

SLOctolyzer is suitable for batch processing large amounts of SLO images,
collating results for ease of segmentation quality inspection and downstream
statistical analysis.

##  2 Methods

Fig. 1 summarises the key elements of SLOctolyzer’s pipeline, which contains a
segmentation module and a measurement module (of which the latter is based on
features and code produced by Automorph 12). We have released SLOctolyzer in a
frictionless manner so that it can be used without author permissions,
proprietary software, or specialist training. SLOctolyzer is freely available
here: https://github.com/jaburke166/SLOctolyzer.

Figure 1: Summary of SLOctolyzer’s analysis pipeline with a segmentation
module (a) for binary vessel/artery/vein segmentation and fovea/optic disc
detection, and a measurement module (b) for measuring retinal vascular
parameters, with additional functionality for metadata extraction and manual
annotation.

###  2.1 Data

Data used to build the segmentation module include RAVIR 10, a publicly
available dataset of pathological SLO images with the arteries and veins
segmented, and three additional cohorts related to systemic health: i-Test 16,
a cohort of pregnant women at late gestation who are experiencing either a
normative, pre-eclamptic or small baby pregnancy; PREVENT-Dementia 17; 18, a
cohort of mid-life individuals, half of whom are at genetic risk of developing
later life dementia; FutureMS 19; 20, a cohort of individuals with newly
diagnosed relapsing-remitting multiple sclerosis (MS). All studies and cohorts
adhered to the Declaration of Helsinki and received relevant ethical approval
and informed consent from all subjects was obtained in all cases from the host
institution.

Table 1 summarises image characteristics of each cohort. All SLO images were
captured using a spectral domain Heidelberg SPECTRALIS HRA+OCT imaging device
(Heidelberg Engineering, Heidelberg, Germany). All images were either centred
on the macula or the optic disc. SLO images from Heidelberg HRA+OCT imaging
devices are grayscale, capturing a 30 degrees field of view (approximately 9
mm2) using a laser light with wavelength 820nm. All cohorts used a HRA+OCT
SPECTRALIS Standard Module except for the i-Test study, which used a portable
version, the SPECTRALIS FLEX, for 24 participants out of the 93 available.
Dependent upon settings prior to acquisition, SLO images from Heidelberg
devices have either a pixel resolution of 768 $\times$ 768 or 1536 $\times$
1536 (pixel height $\times$ width).

Study | Participants | Images | Right eyes | Retinal pathology | HRA+OCT Module | Image resolution | Location
---|---|---|---|---|---|---|---
RAVIR 10 | 23 | 23 | 14 | Yes | Standard | 768 | Disc
Healthy 21 | 7 | 7 | 7 | No | Standard | 1536 | Disc
PREVENT 17; 18 | 144 | 285 | 142 | No | Standard | 1536 | Disc
i-Test 16 | 93 | 186 | 93 | No | Standard & FLEX | 768 | Macula
FutureMS 19; 20 | 15 | 15 | 9 | No | Standard | 1536 | Disc
Table 1: Image characteristics of the five cohorts used to build SLOcolyzer’s
segmentation module. Image resolution is in pixels (for both lateral and axial
directions), location refers to the centring of the scan, i.e. if it’s macula-
centred disc-centred. HRA, Heidelberg retina angiography; OCT, optical
coherence tomography.

SLOctolyzer’s segmentation module contains three segmentation models, one for
binary vessel detection, one for fovea detection and another for artery-vein
and optic disc detection. Table 2 outlines which cohorts and how many
eyes/images of the cohorts each model used for training and evaluation. For
all studies except for FutureMS, we selected all available participants for
modelling. For FutureMS, a subset of 15 participants from the wider cohort 20
were selected. These images were chosen based on image features relevant for
vessel segmentation, such as blur, illumination, contrast, and abnormal
features like vessel tortuosity or optic nerve head atrophy (supplementary
Fig. S2). Similarly, for the i-Test cohort, 15 participants were selected from
the wider cohort for building the artery-vein-optic disc (AVOD) model.

Model | Cohort (eyes/images) | Total
---|---|---
RAVIR | Healthy | PREVENT | i-Test | FutureMS
Vessel | 23 | 7 | ✗ | ✗ | ✗ | 30
Fovea | 23 | 7 | 285 | 186 | 15 | 516
AVOD | ✗ | ✗ | ✗ | 15 | 15 | 30

Table 2: Number of eyes (images) used for each segmentation model stratified
by cohort. AVOD, artery-vein-optic disc.

###  2.2 Ground truth labels

####  2.2.1 Binary vessel detection

A total of 30 SLO images (RAVIR & Healthy) were used to train and evaluate the
segmentation model for binary vessel detection. 23 of these were sourced from
the RAVIR dataset, of which manual pixel-level annotation of the arteries and
veins were done by the same, experienced retinal image grader 10. Segmentation
over the optic nerve head was only performed if artery and vein classes were
able to be resolved. Vessel labels were defined as both the artery and vein
class combined. The remaining seven SLO images were made available from
healthy eyes and were manually segmented by an experienced image analyst
(author S.G.) using ITK-Snap 22, which supports pixel-level annotation.

####  2.2.2 Fovea detection

Fovea detection was performed by the same experienced grader (author J.B.) and
used all 516 SLO images made available.

For the i-Test cohort, access to both the SLO and OCT was possible, which
allowed the fovea coordinate on the SLO to be cross-referenced using it’s
location on the corresponding fovea-centred OCT B-scan. The fovea location on
each OCT B-scan was detected using Choroidalyzer 15, a fully automatic toolkit
for choroid analysis and fovea detection in OCT images. For the remaining
images, only the SLO was available and the fovea coordinate was selected
manually, using an in-house GUI written in Python (version 3.11.6).

We assessed intra-rater variability by one user (author J.B.) through re-
selecting the fovea pixel coordinate for all 516 images, two months after the
initial manual grading, and the results of which can be found in supplementary
Table S1. Repeatability against the initial i-Test fovea coordinates acted as
comparison to ground truth, and the remaining images were used to assess
intra-rater variability. Intra-rater variability had an average intra-class
correlation (ICC(3,1)) of 0.9934 for both $x$ and $y$ coordinates, and
comparison to ground truth scored an average ICC of 0.8206 across both $x$ and
$y$ coordinates.

The final fovea coordinate used for modelling was computed as the average of
the two pixel coordinates selected.

####  2.2.3 Artery-vein-optic disc detection

Three experienced image analysts (authors J.B., S.G., A.T.) were given 14 SLO
images to manually annotate the arteries, veins, and optic disc. For each SLO
image, a binary vessel map was generated using the binary vessel detection
model. Each grader then used ITK-Snap 22 for anatomical segmentation of
arteries, veins and the optic disc. See supplementary Fig. S3 and S4 for the
vessel labelling rules and segmentation protocol each rater followed for
consistent and comparative segmentation.

Each set of 14 images had two images with distinct overlap between pairwise
graders. Thus, there were a total of 30 unique SLO images used for modelling:
15 from the i-Test cohort and 15 from the FutureMS cohort. This overlap
allowed for a total of six SLO images which could be used for comparison. We
calculated inter-rater agreement for all-vessel, artery, vein, and optic disc
segmentation using the Dice coefficient, whose results can be found in
supplementary Table S2. All values were found to be greater than 0.93,
suggesting an excellent degree of consistency between graders.

We also had a clinical ophthalmologist (I.M.) qualitatively rate the artery
and vein segmentations for all 30 SLO images. For each SLO image, we asked
I.M. to rate its image quality and the segmentation quality of the artery and
vein annotation using a 5-point ordinal scale between -2 (very bad) and 2
(very good). The results of this rating can be found in supplementary Table
S3. 63% (19/30) were rated as ‘very good’, with the remaining annotations
graded as ‘good’, except for only one which was rated as ‘okay’. This example
can be seen in supplementary Fig. S5, which had two, small miss-labelled
vessels. Importantly, there were no ‘bad’ or ‘very bad’ ratings for these
manual annotations.

####  2.2.4 The RAVIR dataset

The RAVIR dataset 10 was intended to be used for training the artery-vein-
optic disc (AVOD) model, as it contains suitable examples of severe retinal
pathology. However, before modelling we reviewed the segmentation labels and
observed inconsistent artery and vein classification, an example of which can
be seen in supplementary Fig. S6. Therefore, we decided to use the RAVIR
dataset as an external test set for the AVOD model, after correcting for any
misclassified veins or arteries. This external test set presents a significant
challenge to the AVOD model as it contains examples of severe retinal
pathology.

Before evaluating the AVOD model, the corrections to the RAVIR dataset were
reviewed by a clinical ophthalmologist (I.M.) against the original labels in a
masked, randomised fashion. For each image, I.M. was presented with two
segmentation labels without revealing their source. He was then asked to rate
the SLO image quality and each artery-vein classification using a 5-point
ordinal scale from -2 (very bad) to 2 (very good), and select which of the
labels he preferred, with options for none or both. The results are shown in
supplementary Table S4, and the ophthalmologist preferred over 64% (14/23) of
the corrected labels, and the labels for the remaining images were equally of
good quality, according to I.M. Additionally, we segmented the optic disc for
this external test set for comparison with our optic disc segmentation.

###  2.3 Segmentation module

During training, we applied the same data augmentations randomly to each
model’s training data. This included random horizontal and vertical flips
($P=0.5$), affine transformations to allow random rotation and scaling,
uniformly sampled in $[0,90]$ and $[0.4,1.6]$, respectively ($P=1/3$). We also
applied a Gaussian blur with random window size and standard deviation
uniformly sampled in $[1,20]$ and $[0.1,4.0]$, respectively ($P=1/4$).
Finally, we applied random brightness and contrast adjustments, altering the
brightness and contrast using uniformly sampled scale factors $[0.8,1.2]$ and
$[0.75,1.25]$, respectively.

We used python 3.12, PyTorch 2.0, Segmentation Models PyTorch 23 and MONAI 24.

####  2.3.1 Binary vessel detection

The model and training pipeline has been discussed previously 25. Briefly, the
model was a custom U-Net deep learning architecture trained from scratch on a
total of 30 SLO images. The dataset was split randomly into training (n=24),
validation (n=2) and test (n=4) sets. Offline data augmentation randomly
cropped 20 patches of size 320 $\times$ 240 to artificially increase the
training set, reduce computational load and accelerate the training rate.

The model was trained to minimise the Dice Focal loss 24, using the Adam 26
optimiser (with default optimiser hyperparameters) for 600 epochs using a
batch size of 20. The initial learning rate was set as 1e-3 until epoch 300,
at which point the learning rate was reduced to 1e-4 for the remainder of
training.

####  2.3.2 Fovea detection

Fovea segmentation is a significantly easier task than vessel detection or
artery-vein classification, so our model used a pre-trained 23, lightweight
U-Net deep learning architecture with a MobileNetV3 27 backbone, previously
trained using ImageNet 28. This model used all available images from all
cohorts, comprising 516 SLO images.

The dataset was split into training ($n=359$), validation ($n=104$) and test
sets ($n=54$) at the participant-level, so there was no overlap of
participants between sets. All images were resized to a common pixel
resolution of $768\times 768$ for training. To facilitate learning through
segmentation, training labels were circular binary masks whose centre was the
fovea coordinate with radius of 60 pixels.

The model was trained to minimise the binary cross entropy loss using the
AdamW 29 optimiser for 200 epochs using a batch size of 8. During training, we
applied two sets of random augmentations per image, per epoch, artificially
doubling the batch size. An initial learning rate of 5e-4 was set, and after a
10-epoch linear warm up to a learning rate of 5e-3, it decayed following a
cosine relationship for 90 epochs, with the learning rate set at 5e-4 for the
remaining 100 epochs.

####  2.3.3 Artery-vein-optic disc detection

The AVOD model used 30 SLO images from two cohorts related to pregnancy
(i-Test, 15 images) and multiple sclerosis (FutureMS, 15 images). Given the
number of segmentation tasks and dataset size, we similarly opted for fine-
tuning a pre-trained U-Net deep learning model, this time using a deep
ResNet101 30 backbone, previously trained on ImageNet 28. The dataset was
split into training (n=20), validation (n=4) and test (n=6) sets, with equal
proportion of cohorts (and thus macula- and disc-centred images) in each set.
All images were resized to a common pixel resolution of 768 $\times$ 768 for
training.

The model was trained to minimise the Dice Focal loss 24, using the Adam 26
optimiser (with default optimiser hyperparameters) for 300 epochs using a
batch size of 4, and a learning rate of 5e-4.

###  2.4 Measure module

SLOctolyzer’s second module is a suite of tools for measuring retinal vascular
parameters, and are based on the features measured when processing colour
fundus images using Automorph 12.

We use the whole image as the region of interest for feature measurement,
regardless of the location of the SLO image. Additionally, for disc-centred
SLO images, we define two concentric rings centred at the optic disc, zones B
and C 21. Zone B takes an annulus from one-half diameter away from the optic
disc margin to a full diameter away (0.5D - 1D), and zone C measures from the
optic disc margin to two diameters away (0D - 2D). See Fig. 1(B) for a
visualisation of these zones.

Across the whole image, we measure global features of vessel complexity,
density and calibre of the vasculature, using fractal dimension (Minkowski-
Bouligand dimension) 31, vessel density (ratio of vessel pixels to all pixels)
and global vessel calibre (ratio of vessel pixels to skeletonised vessel
pixels. These measurements are not taken for localised zones B and C. For
every region of interest (whole image and zones), we measure tortuosity
density 32 and local vessel calibre across individual vessel segments, whose
endpoints are defined by arteriovenous crossing and bifurcations. Global and
local vessel calibre are very similar measures, but the latter provides a more
granular approach to computing calibre from individual vessel segments — see
supplementary Fig. S7 and supporting text for more details.

All features are measured across artery, vein and binary vessel maps. Finally,
for artery and vein vessel maps, we measure central retinal artery and vein
equivalents (CRAE/CRVE) using the Knudston approach 33, as well as the
arteriole-to-venule (AVR) ratio. While these metrics are typically only
measured for zones B and C in disc-centred images, they are also computed
across the whole image and thus for macula-centred images too.

###  2.5 SLOctolyzer’s pipeline

Fig. 1 describes the analysis pipeline for SLOctolyzer. During segmentation,
the image is resized to a common pixel resolution of 768 $\times$ 768 as the
segmentation module was trained on this common pixel resolution. This prevents
any segmentation error in larger images due to the central artery/vein light
reflex 25, which appears as a bright strip in the centre of a vessel,
potentially leading to a larger vessel being perceived as two, smaller and
parallel ones. Upon resizing, full segmentation of the vasculature, optic disc
and fovea is performed. After thresholding with a value of 0.5 to produce
binary vessel masks, post-processing is applied to remove small false positive
regions, and disconnected vessels are joined to their neighbouring vessels to
remove small gaps. The fovea coordinate is defined as the centroid of the
fovea binary mask. If the SLO image is disc-centred, the optic disc binary
mask is modelled as an ellipse, and it’s diameter is defined as the average of
the major and minor axis lengths.

After segmentation, if the SLO image is macula-centred, measurements on the
vessel/artery/vein maps are taken across the whole image. If the SLO image is
disc-centred, the measurements are taken across the whole image and for zones
B and C, which are defined using the computed optic disc diameter. These
measurements will be saved out per file, alongside key metadata either stored
in the input file, or inferred during analysis (laterality, location, fovea
centre, optic disc diameter and centre). Moreover, segmentation masks will be
saved out, as well as helpful visualisations to inspect segmentation quality.
If running on a batch of images, a collated file will be saved out row-wise
compiling all measurements and metadata from all image files analysed.
Finally, a folder of visualisations, superimposing the segmentations onto the
SLO image will be saved out per file which will aid segmentation quality
checking.

While we do not have an automatic way to assess segmentation quality, an
additional feature of SLOctolyzer is its ability to correct manual
segmentations. Given a saved out segmentation mask of the arteries, veins and
optic disc, the user may correct any erroneous areas using ITK-Snap 22 and
save the corrected version in the same folder as the original mask. Upon
rerunning the pipeline again, it will use this corrected annotation and re-
compute the measurements for that image. See supplementary Fig. S8 and Fig. S9
with supporting text for more information on SLOctolyzer’s setup, interface
and output.

###  2.6 Statistical analysis

Each segmentation model, after model selection based on the performance
against their respective validation set, was evaluated on their respective,
internal test set. Additionally, for the AVOD model, we used the RAVIR dataset
10 as an external test to measure the segmentation module’s robustness to
severe retinal pathology.

We used standard segmentation metrics such as area under the receiver
operating characteristic curve (AUC) and the dice similarity coefficient (at a
standard threshold of 0.5) to evaluate segmentation performance. We also used
mean absolute error (MAE) to measure performance on downstream, retinal
vascular parameters fractal dimension and local vessel calibre (in microns,
$\mu$m, where pixel length-scales were available and pixels, px, otherwise).
We used MAE to measure the error in predicted fovea pixel coordinate (along
both axes) and optic disc area.

For internal test set evaluation, the whole image was used as the region of
interest due to the low sample size of disc-centred images in each internal
test set. For external test set evaluation, all regions of interest (whole
image, zone B and zone C) were evaluated, as RAVIR contains only disc-centred
images.

We also measured the reproducibility of SLOctolyzer on downstream retinal
vascular parameters, using the first 60 participants (120 eyes) of the i-Test
cohort (whose data was available at the time of analysis). SLO images were
captured simultaneous to macula-centred, OCT volume capture when enhanced
depth imaging mode was toggled on and off, creating a repeated, albeit
unregistered, pair of SLO images per eye. We measured all retinal vascular
parameters previously mentioned across the whole image, and report mean
absolute error and Pearson, Spearman and intra-class correlation (ICC(3,1))
coefficients for population-based reproducibility analysis. We also report
Bland-Altman plots 34 to assess the distribution of residuals.

Additionally, we report the reproducibility of SLOctolyzer at the eye-level
using a measure of individual-level measurement noise $\lambda$ 35. We express
the variability of each measured feature within an eye in units of the
feature’s overall population variability. $\lambda$ is computed per feature,
per eye, as the ratio between the standard deviation of within-eye
measurements and the standard deviation of between-eye measurements, across
the population. For convenience, $\lambda$ is presented as a percentage, with
0 as the optimal value. Note that the population are all white women with a
mean (SD) age of 34.7 (5.2) years, at mean (SD) gestation of 35.6 (3.4) weeks,
and thus we do not expect there to be huge variation across the population.

Finally, we measured the execution time of the SLOctolyzer’s segmentation
module and the whole pipeline on macula- and disc-centred images of different
pixel resolutions. We ran each experiment 100 times and report the mean and
standard deviation execution time in seconds. Timed experiments were run on a
standard Windows laptop with a four year old i5 CPU with 16GB of RAM, but no
GPU.

##  3 Results

Metric | Vessel | Fovea | Artery | Vein | Optic disc
---|---|---|---|---|---
AUC | Dice | AUC | Dice | AUC | Dice | AUC | Dice | AUC | Dice
Segmentation | 0.9922 | 0.9097 | 0.9975 | 0.8837 | 0.9860 | 0.8376 | 0.9857 | 0.8525 | 0.9976 | 0.9430
| FD | Calibre [px] |  Cx [px] |  Cy [px] | FD | Calibre [px] | FD | Calibre [px] |  Area [px2]
Feature | 0.0130 | 0.1518 | 6.2778 | 4.7778 | 0.0178 | 0.2081 | 0.0133 | 0.1539 | 638.1667
Table 3: Segmentation results for each segmentation task (top). Mean absolute
error across relevant measurements for each segmentation task (bottom).
Average local calibre was used here (in pixels). FD, fractal dimension. Cx is
the mean absolute error in the horizontal component of the centroid for the
fovea (and similarly for Cy. Figure 2: Segmentation masks for each
segmentation model on two examples randomly selected from their test sets.

###  3.1 Evaluation

Segmentation results are presented in Table 3 for all three models for their
respective internal test sets. All models had a strong AUC score (all greater
than 0.98), suggesting the raw probability maps were well calibrated in being
able to score highly the relevant pixels related to each of their segmentation
tasks, with the fovea and optic disc detection performing best, which was to
be expected since these are easier segmentation tasks than vessel detection.
Upon thresholding, both binary vessel and AVOD models scored high dice scores
for all-vessel detection (binary vessel model: 0.9097, AVOD model: 0.8570),
and the AVOD model scored slightly lower dice scores for artery and vein
classification (artery, 0.8376; vein, 0.8525). This was unsurprising, since
distinguishing between artery and vein is significantly more challenging than
differentiating retinal vasculature from retinal tissue. Fig. 2 shows example
segmentation outputs from the internal test sets.

The MAE for fovea coordinate detection was 6.3 and 4.8 pixels for the
horizontal and vertical direction (Table 3), thus a MAE of 7.9 pixels
diagonally. Images had a pixel resolution of 768 $\times$ 768, covering
approximately a 9 mm2 field of view, which makes their conversion factor
approximately 11.71 microns-per-pixel in both axes. Thus, this diagonal MAE
corresponds to 92.7 microns, which is well within the average size of the
foveola of 350 microns 36.

Similarly, an MAE of 638 square pixels for optic disc area corresponds to
approximately an MAE of 0.08 mm2, which is not clinically significant given
the wide distribution of optic disc sizes 37, the observed change across the
myopic spectrum 38 and even differences across different devices 39. MAE for
local vessel calibre was around 0.2 pixels, which corresponds to approximately
2.32 microns, and is similarly an insignificant error given population
distributions for arterioles and venules using confocal SLO imaging 40.

The results of our segmentation module evaluated against the external test set
is shown in Table 4. The RAVIR dataset 10 presents a significant challenge due
to retinal pathology heavily featuring in the 23 SLO images. The model
performs worse compared with the unseen test data which relate to systemic
health (dice coefficient averaged across zones: artery, 0.7228; vein, 0.7598;
optic disc, 0.9032), but quantitatively performs well for those images with
mild pathology. Given the segmentation models were trained on images with
grossly normal retinae related to systemic health changes, it is perhaps no
surprise that the performance of the model decreases as the extent of retinal
pathology increases. Fig. 3 compares the ground truth labels (middle row) with
our ones (bottom row), for SLO images of increasing retinal pathology from
left to right. While the major vessels are classified correctly for the
majority of cases, as the pathology becomes more severe we see smaller and
more tortuous vessels ignored, and segmentations of the major vessels
misclassified.

Region of interest | Artery | Vein | Optic disc
---|---|---|---
AUC | Dice | FD | Width [px] | AUC | Dice | FD | Width [px] | AUC | Dice |  Area [px2]
Whole | 0.9421 | 0.7180 | 0.0444 | 0.6869 | 0.9558 | 0.7470 | 0.0737 | 0.9791 | 0.9720 | 0.9032 | 788.5000
Zone B | 0.9922 | 0.7300 | 0.0379 | 1.0125 | 0.9935 | 0.7726 | 0.0597 | 1.1823 | - | - | -
Zone C | 0.9643 | 0.7203 | 0.0440 | 0.7854 | 0.9702 | 0.7598 | 0.0543 | 1.1479 | - | - | -
Table 4: Segmentation and feature measurement mean absolute errors of the
artery-vein-optic disc (AVOD) segmentation model against the RAVIR external
test set. Average local calibre was used here (in pixels). AUC, area under the
receiver operating characteristic curve; FD, fractal dimension (non-
dimensional). Figure 3: Visual comparison between ground truth and predicted
segmentations for the external test set, RAVIR, for artery-vein-optic disc
detection. The images were selected to show progressing eye pathology from
left to right.

###  3.2 Reproducibility

Table 5 present correlation values for all retinal vascular parameters for the
binary vessel segmentation model (all-vessel), and the artery-vein-optic disc
model. All correlations showed strong or excellent agreement among features,
with fractal dimension and vessel density scoring the highest. Across the
cohort, veins appeared as the poorest performing, but not by any significant
margin.

Metric | All-vessel | Artery | Vein
---|---|---|---
MAE | Pearson/Spearman | ICC(3,1) | MAE | Pearson/Spearman | ICC(3,1) | MAE | Pearson/Spearman | ICC(3,1)
Fractal dimension | 0.0077 | 0.9326/0.9192 | 0.965 (0.95, 0.98) | 0.0048 | 0.9485/0.9385 | 0.9734 (0.96, 0.98) | 0.0070 | 0.8940/0.8860 | 0.9423 (0.92, 0.96)
Vessel density | 0.0013 | 0.9493/0.9513 | 0.974 (0.96, 0.98) | 0.0022 | 0.9393/0.9371 | 0.9686 (0.95, 0.98) | 0.0014 | 0.9370/0.9218 | 0.9665 (0.95, 0.98)
Global calibre [$\mu$m] | 1.5811 | 0.8771/0.8861 | 0.9293 (0.9, 0.95) | 1.5995 | 0.8425/0.8331 | 0.9125 (0.87, 0.94) | 1.6063 | 0.8654/0.8692 | 0.9276 (0.9, 0.95)
Local calibre [$\mu$m] | 1.5049 | 0.8707/0.8815 | 0.9259 (0.89, 0.95) | 1.4654 | 0.8489/0.8525 | 0.9165 (0.88, 0.94) | 1.4105 | 0.8695/0.8711 | 0.9299 (0.9, 0.95)
Tortuosity density | 0.0324 | 0.7431/0.7460 | 0.8526 (0.79, 0.9) | 0.0147 | 0.7962/0.7977 | 0.886 (0.84, 0.92) | 0.0241 | 0.7039/0.6825 | 0.8262 (0.75, 0.88)
AVR/CRAE/CRVE [$\mu$m] | 0.0283 | 0.7743/0.7931 | 0.8728 (0.82, 0.91) | 6.2834 | 0.8456/0.8554 | 0.9151 (0.88, 0.94) | 10.1025 | 0.7940/0.8009 | 0.8852 (0.83, 0.92)

Table 5: Population-based reproducibility performance of SLOctolyzer,
reporting mean absolute error (MAE), Pearson, Spearman and intra-class
correlations (ICC(3,1)). All Pearson and Spearman correlations were
statistically significant with P-values $P<0.0001$. For readability,
AVR/CRAE/CRVE were combined into one row — AVR is dimensionless, while CRAE
and CRVE are in microns and only report for arteries and veins, respectively.

Fig. 4 present Bland-Altman plots of the residuals between paired SLO images.
We found that SLOctolyzer was highly reproducible, with the distribution of
residuals according to most metrics centred around 0, showing no apparent
trend. For fractal dimension, there was a mean difference (MD) of -0.0007 with
limits of agreement (LoA) of [-0.0178, 0.0164]; for vessel density there was a
MD of -0.0003 and LoA of [-0.0052, 0.0046]; for global vessel calibre there
was a MD of -0.3154 $\mu$m and LoA of [-4.9804, 4.3496]; for local vessel
calibre there was a MD of -0.3208 $\mu$m and LoA of [-4.5777, 3.9361]; for
tortuosity density there was a MD of -0.0013 and LoA of [-0.0624, 0.0650]; for
CRAE there was a MD of 0.9901 $\mu$m and LoA of [-17.4345, 15.4543]; for CRVE
there was a MD of -1.8782 $\mu$m and LoA of [-30.3251, 26.5687]; finally, for
AVR there was a MD of 0.0011 and LoA of [-0.0738, 0.0760].

Figure 4: Bland-Altman analysis of the residuals from assessing the
reproducibility of the segmentation models for all features outputted by
SLOctolyzer. Residuals for arteries (red), veins (blue) and all-vessel
(orange) are plotted together.

Fig. 5 reports the eye-level reproducibility of each of the features measured
by SLOctolyzer. For fractal dimension, vessel density and global/local
calibre, the upper, or third quartile is below 25% across all vessel types.
Thus, the range of measurement error for these features in the majority of the
paired, but unregistered, eyes were below 25% of the overall populations’
variability. Given the homogeneous nature of the population’s demographics,
this is very reasonable. Moreover, vessel density has the smallest
interquartile range among features (mean all-vessels, $\lambda=11.7\%$;
arteries, $\lambda=12.1\%$; veins, $\lambda=13.3\%$), suggesting this feature,
closely followed by fractal dimension, had the least measurement noise.
Tortuosity density and AVR/CRAE/CRVE appear the most sensitive features, with
veins as the most variable relative to arteries and all-vessels.

The eyes with the worst reproducibility for vessel calibre and tortuosity
density are shown to the right of the box plots, with dashed lines linking the
major outlier scatter-points to the corresponding eye. For all calibre
metrics, the worst metric came from the same eye. This was due to an
arteriovenous crossing near the edge of the image, where a major artery and
vessel overlapped, and SLOctolyzer classified artery and vein differently (red
arrows). This led to a large absolute difference of 87.5 microns in CRVE. For
tortuosity density, the vessel maps do not look qualitatively different, but
the absolute difference was 0.096. We believe that this is due to tortuosity
density’s sensitivity to arteriovenous crossings which disconnect the
respective artery and vein vessel maps. Star-shaped scatter-points represent
second to largest outliers for vessel calibre and tortuosity density and are
shown in supplementary Fig. S10, and are similar due to arteriovenous
crossings or vessel disconnectedness.

Figure 5: Reproducibility at the eye-level of each of the features outputted
by SLOctolyzer. Box-plot distributions are shown for each feature, with all-
vessels in orange, arteries in red and veins in blue. Note that the
AVR/CRAE/CRVE features are presented together as CRVE/CRAE are measured across
arteries (red) and veins (blue) individually, while AVR is a combination of
the two, thus represented in the all-vessel class (orange). A horizontal,
dashed line at the $\lambda$=25% mark is shown as a visual aid. We also show
the eyes (with segmentations overlaid) which had the greatest reproducibility
measurement error for large-vessel calibre and vein tortuosity density
(circular scatter-points). Eyes corresponding to the star-shaped scatter-
points are shown in supplementary Fig. S10.

###  3.3 Execution time

Table 6 shows the execution time of SLOctolyzer’s segmentation module and
entire pipeline. Because the segmentation module resizes all images to a
common resolution of 768 $\times$ 768, the segmentation execution time across
all image types and resolutions are approximately equal. For binary vessel
segmentation, it takes approximately 4.5 s/image, for the lightweight fovea
detection model it takes approximately 0.6 s/image, and for artery-vein-optic
disc detection it takes approximately 3.0 s/image. Thus, SLOctolyzer’s
segmentation module using a standard laptop CPU takes approximately 11.1 $\pm$
0.5 s/image. Measuring the execution time of the entire pipeline on a standard
laptop CPU took 18.9 $\pm$ 1.0s for a macula-centred SLO image at 768 $\times$
768 resolution, 28.6 $\pm$ 1.0s for a disc-centred SLO image at 768 $\times$
768 resolution and 111.0 $\pm$ 3.5s for a disc-centred SLO image at 1536
$\times$ 1536 resolution. Disc-centred SLO images are more time intensive for
feature measurement as measurements are made across the whole image, and for
zones B and C across the vessel, artery and vein segmentation maps separately.

Image type | Segmentation module | Whole pipeline
---|---|---
Binary vessel | Fovea | AVOD
Macula-centred ($768\times 768$) | 4.8 (0.407) | 0.6 (0.067) | 2.9 (0.408) | 18.9 (0.984)
Disc-centred ($768\times 768$) | 4.3 (0.147) | 0.6 (0.047) | 2.9 (0.440) | 28.6 (1.040)
Disc-centred ($1536\times 1536$) | 4.2 (0.191) | 0.6 (0.051) | 2.7 (0.133) | 111.0 (3.540)

Table 6: Average (standard deviation) execution time in seconds of the
segmentation module and SLOctolyzer’s entire pipeline, for SLO images of
different location and size.

##  4 Discussion

We have developed a fully automatic method, SLOctolyzer, for processing
macula-centred and disc-centred SLO images which typically accompany OCT data
but are often discarded in research. SLOctolyzer converts a raw SLO image into
clinically relevant retinal vascular parameters, including fractal dimension,
tortuosity, and vessel calibre.

SLOctolyzer performed well on unseen data, but we observed a performance drop
against an external test set featuring severe retinal pathology. SLOctolyzer
was designed for modelling the retinal vasculature during systemic health
change, so there was understandably a noticeable decrease in performance as
the subjective extent of pathology increased. However, we believe
SLOctolyzer’s additional functionality to correct any annotations and re-
compute measurements will prove very useful for cases of severe retinal
pathology. Regardless, we envision SLOctolyzer being a very useful tool for
SLO image analysis, particularly as the nascent field of oculomics increases
rapidly 41, since the populations being studied often have grossly normal
retinae.

SLOctolyzer’s segmentation module had good reproducibility, with the residuals
across all metrics for vessels, arteries and veins exhibiting no pattern and
being centred around 0. In particular, the residuals for measurements of
global and local calibre (in microns) appear to show proportionately small
error in comparison to what is generally considered as clinically significant.
Meta-analyses have found vessel calibre difference of 10–15 microns between
mid- and old-age, with 20 micron increase in venule calibre associated with
increased risk of stroke by 1.15 42.

The distributions of measurement error at the eye-level for fractal dimension,
vessel density and local/global calibre were found to be reasonable given the
homogeneous nature of the i-Test cohort studied for reproducibility — with
tortuosity density and large-vessel calibre having higher variability. We
observed that small differences in the segmentation maps can have an
inordinate impact on tortuosity density (supplementary Fig. S10(A)). This
highlights the apparent sensitivity of tortuosity, regardless of whether the
segmentation looks qualitatively different. While segmentation error
contributes to this error, this observation adds to a potential problem
surrounding standardisation of retinal vascular parameters 43. For large-
vessel calibre, the largest outliers for large-vessel calibre came from the
same eye, which showed a major arteriovenous crossings at the edge of the
image causing a major artery-vein miss-classification. Moreover, large-vessel
calibre metrics like AVR/CRAE/CRVE are typically reserved for disc-centred SLO
images as these show the major vessels in full. Thus, the unregistered nature
of the macula-centred SLO pairs, with major vessels appearing toward the edge
of the image, also contributed to the measurement error observed
(supplementary Fig. S10(B)). We hope in the future we may also assess
SLOctolyzer’s reproducibility for paired, disc-centred SLO images.

On a standard laptop CPU, SLOctolyzer can segment an SLO image in around 11
seconds. For a standard 768 $\times$ 768 resolution image, the entire pipeline
takes 19 seconds for macula-centred images and 29 seconds for disc-centred
images. It can be used interactively or for batch processing (supplementary
Fig. S8), converting raw SLO images into reproducible vascular metrics and
outputting intermediary segmentation masks for quality inspection
(supplementary Fig. S9).

There were some limitations associated with this work. Firstly, the SLO images
used to build SLOctolyzer’s segmentation module were sourced from only one
manufacturer, Heidelberg Engineering. Thus, we do not know the extent of
performance from SLO images from other devices. Furthermore, most of the
images we used were from individuals recruited to studies of systemic health
and did not have obvious retinal pathology. We therefore expect the
segmentation module to not be entirely robust to cases of severe retinal
pathology, as seen by the performance against the RAVIR dataset (Table 4),
which featured severe retinal pathology. However, SLOctolyzer’s additional
functionality allows for segmentation error to be corrected manually.

A technical limitation of the work is that SLOctolyzer’s segmentation module
is made up of three distinct models. The rationale for this was clear at the
time of model construction: we could leverage an initial binary vessel
segmentation model to help us manually annotate the arteries and veins for
building an artery-vein detection model, a much more challenging task, with
the fovea detection model utilising all available images due to the speed of
foveal pit manual annotation. However, these models now provide a quick and
consistent way to annotate large datasets which, after inspection and
correction by expert graders, could be used to build a much more robust
segmentation model.

Finally, our datasets were of macula-centred and disc-centred SLO images, and
thus we do not know its performance at different locations on the retina.

We intend to improve SLOctolyzer’s segmentation module in future work by
constructing a single model to perform all segmentation tasks and refine the
dataset on which it will be trained and evaluated on. This will ideally
include more diverse SLO images, such as those related to retinal pathology,
capturing different regions of the retina, and from multiple imaging devices
and manufacturers. Improving SLOctolyzer’s ability to generalise to other SLO
imaging modalities, such as Optos ultra-wide field SLO 44, or Heidelberg’s
more recent multicolour SLO 45, would further increase the scope of this open-
source pipeline.

##  5 Conclusion

We have developed a fully automatic method for extracting useful information
from SLO images, including fractal dimension, tortuosity, and vessel calibre.
SLOctolyzer, the first open-source analysis toolkit for macula- and disc-
centered SLO images, addresses the lack of open-source tools for this image
modality. It leverages existing OCT imagesets to provide clinically meaningful
retinal vascular parameters from the SLO images which are captured in parallel
to OCT acquisition, but are often overlooked. Available on GitHub, SLOctolyzer
requires no specialist training or proprietary software and supports batch
processing and manual correction. We hope this tool will encourage the
research community to reconsider the value of SLO images, facilitate
collaboration and help to standardise retinal vascular parameters in SLO
images and retinal imaging more generally.

## Acknowledgements

J.B. was supported by the Medical Research Council (grant MR/N013166/1) as
part of the Doctoral Training Programme in Precision Medicine at the Usher
Institute, University of Edinburgh. For the purpose of open access, the
authors have applied a creative commons attribution (CC BY) licence to any
author accepted manuscript version arising.

##  6 Conflicts of Interest

The authors declare no conflicts of interest.

## References

  * 1 Hiroto Terasaki, Shozo Sonoda, Masatoshi Tomita, and Taiji Sakamoto.  Recent advances and clinical application of color scanning laser ophthalmoscope.  Journal of Clinical Medicine, 10(4):718, 2021.
  * 2 Göran D Hildebrand.  Chapter 9 - imaging the fundus.  In Creig S Hoyt and David Taylor, editors, Pediatric Ophthalmology and Strabismus (Fourth Edition), pages 63–70. W.B. Saunders, London, fourth edition edition, 2013.
  * 3 Silke Aumann, Sabine Donner, Jörg Fischer, and Frank Müller.  Optical coherence tomography (oct): principle and technical realization.  High resolution imaging in microscopy and ophthalmology: new frontiers in biomedical optics, pages 59–85, 2019.
  * 4 Carolin Schanner, Nina Hautala, Franziska G Rauscher, and Aura Falck.  The impact of the image conversion factor and image centration on retinal vessel geometric characteristics.  Frontiers in Medicine, 10:1112652, 2023.
  * 5 Sakambhari Mahapatra, Sanjay Agrawal, Pranaba K Mishro, Rutuparna Panda, Lingraj Dora, and Ram Bilas Pachori.  A review on retinal blood vessel enhancement and segmentation techniques for color fundus photography.  Critical Reviews™ in Biomedical Engineering, 52(1), 2024.
  * 6 Juan Xu, Hiroshi Ishikawa, Gadi Wollstein, and Joel S Schuman.  Retinal vessel segmentation on slo image.  In 2008 30th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 2258–2261. IEEE, 2008.
  * 7 Enrico Pellegrini, Gavin Robertson, Emanuele Trucco, Tom J MacGillivray, Carmen Lupascu, Jano van Hemert, Michelle C Williams, David E Newby, Edwin JR van Beek, and Graeme Houston.  Blood vessel segmentation and width estimation in ultra-wide field scanning laser ophthalmoscopy.  Biomedical optics express, 5(12):4329–4337, 2014.
  * 8 Robert Kromer, Rahman Shafin, Sebastian Boelefahr, and Maren Klemm.  An automated approach for localizing retinal blood vessels in confocal scanning laser ophthalmoscopy fundus images.  Journal of medical and biological engineering, 36:485–494, 2016.
  * 9 Maria Ines Meyer, Pedro Costa, Adrian Galdran, Ana Maria Mendonça, and Aurélio Campilho.  A deep neural network for vessel segmentation of scanning laser ophthalmoscopy images.  In Image Analysis and Recognition: 14th International Conference, ICIAR 2017, Montreal, QC, Canada, July 5–7, 2017, Proceedings 14, pages 507–515. Springer, 2017.
  * 10 Ali Hatamizadeh, Hamid Hosseini, Niraj Patel, Jinseo Choi, Cameron C Pole, Cory M Hoeferlin, Steven D Schwartz, and Demetri Terzopoulos.  Ravir: A dataset and methodology for the semantic segmentation and quantitative analysis of retinal arteries and veins in infrared reflectance imaging.  IEEE Journal of Biomedical and Health Informatics, 26(7):3272–3283, 2022.
  * 11 Adria Perez-Rovira, T MacGillivray, Emanuele Trucco, KS Chin, K Zutis, C Lupascu, Domenico Tegolo, Andrea Giachetti, Peter J Wilson, A Doney, et al.  Vampire: Vessel assessment and measurement platform for images of the retina.  In 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pages 3391–3394. IEEE, 2011.
  * 12 Yukun Zhou, Siegfried K Wagner, Mark A Chia, An Zhao, Moucheng Xu, Robbert Struyven, Daniel C Alexander, Pearse A Keane, et al.  Automorph: automated retinal vascular morphology quantification via a deep learning pipeline.  Translational vision science & technology, 11(7):12–12, 2022.
  * 13 Justin Engelmann, Ana Villaplana-Velasco, Amos Storkey, and Miguel O Bernabeu.  Robust and efficient computation of retinal fractal dimension through deep approximation.  In International Workshop on Ophthalmic Medical Image Analysis, pages 84–93. Springer, 2022.
  * 14 Jamie Burke, Justin Engelmann, Charlene Hamid, Megan Reid-Schachter, Tom Pearson, Dan Pugh, Neeraj Dhaun, Amos Storkey, Stuart King, Tom J MacGillivray, et al.  An open-source deep learning algorithm for efficient and fully automatic analysis of the choroid in optical coherence tomography.  Translational Vision Science & Technology, 12(11):27–27, 2023.
  * 15 Justin Engelmann, Jamie Burke, Charlene Hamid, Megan Reid-Schachter, Dan Pugh, Neeraj Dhaun, Diana Moukaddem, Lyle Gray, Niall Strang, Paul McGraw, et al.  Choroidalyzer: An open-source, end-to-end pipeline for choroidal analysis in optical coherence tomography.  Investigative Ophthalmology & Visual Science, 65(6):6–6, 2024.
  * 16 Neeraj Dhaun.  Optical coherence tomography and nephropathy: The octane study.  https://clinicaltrials.gov/ct2/show/NCT02132741, 2014.  ClinicalTrials.gov identifier: NCT02132741. Updated November 4, 2022. Accessed May 31st, 2023.
  * 17 Craig W Ritchie and Karen Ritchie.  The prevent study: a prospective cohort study to identify mid-life biomarkers of late-onset alzheimer’s disease.  BMJ open, 2(6):e001893, 2012.
  * 18 Craig W Ritchie, Katie Wells, and Karen Ritchie.  The prevent research programme–a novel research programme to identify and manage midlife risk for dementia: the conceptual framework.  International Review of Psychiatry, 25(6):748–754, 2013.
  * 19 Patrick KA Kearns, Sarah J Martin, Jessie Chang, Rozanna Meijboom, Elizabeth N York, Yingdi Chen, Christine Weaver, Amy Stenson, Katarzyna Hafezi, Stacey Thomson, et al.  Futurems cohort profile: a scottish multicentre inception cohort study of relapsing-remitting multiple sclerosis.  BMJ open, 12(6):e058506, 2022.
  * 20 Yingdi Chen, Juan Larraz, Michael Wong, Patrick Kearns, Fraser Brown, Sarah-Jane Martin, Peter Connick, Niall MacDougall, Christine Weaver, Baljean Dhillon, et al.  Longitudinal retinal imaging study of newly diagnosed relapsing-remitting multiple sclerosis in scottish population: baseline and 12 months follow-up profile of futurems retinal imaging cohort.  BMJ Open Ophthalmology, 7(1):e001024, 2022.
  * 21 James R Cameron, Lucia Ballerini, Clare Langan, Claire Warren, Nicholas Denholm, Katie Smart, and Thomas J MacGillivray.  Modulation of retinal image vasculature analysis to extend utility and provide secondary value from optical coherence tomography imaging.  Journal of Medical Imaging, 3(2):020501–020501, 2016.
  * 22 Paul A. Yushkevich, Joseph Piven, Heather Cody Hazlett, Rachel Gimpel Smith, Sean Ho, James C. Gee, and Guido Gerig.  User-guided 3D active contour segmentation of anatomical structures: Significantly improved efficiency and reliability.  Neuroimage, 31(3):1116–1128, 2006.
  * 23 Pavel Iakubovskii.  Segmentation models pytorch.  https://github.com/qubvel/segmentation_models.pytorch, 2019.
  * 24 M Jorge Cardoso, Wenqi Li, Richard Brown, Nic Ma, Eric Kerfoot, Yiheng Wang, Benjamin Murrey, Andriy Myronenko, Can Zhao, Dong Yang, et al.  Monai: An open-source framework for deep learning in healthcare.  arXiv preprint arXiv:2211.02701, 2022.
  * 25 Adam Threlfall, Samuel Gibbon, James Cameron, and Tom MacGillivray.  A publicly available vessel segmentation algorithm for slo images.  arXiv preprint arXiv:2311.17525, 2023.
  * 26 Diederik P Kingma and Jimmy Ba.  Adam: A method for stochastic optimization.  arXiv preprint arXiv:1412.6980, 2014.
  * 27 Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al.  Searching for mobilenetv3.  In Proceedings of the IEEE/CVF international conference on computer vision, pages 1314–1324, 2019.
  * 28 Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei.  Imagenet: A large-scale hierarchical image database.  In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009.
  * 29 Ilya Loshchilov and Frank Hutter.  Decoupled weight decay regularization.  arXiv preprint arXiv:1711.05101, 2017.
  * 30 Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
  * 31 Kenneth Falconer.  Fractal geometry: mathematical foundations and applications.  John Wiley & Sons, 2004.
  * 32 Enrico Grisan, Marco Foracchia, and Alfredo Ruggeri.  A novel method for the automatic evaluation of retinal vessel tortuosity.  In Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (IEEE Cat. No. 03CH37439), volume 1, pages 866–869. IEEE, 2003.
  * 33 Michael D Knudtson, Kristine E Lee, Larry D Hubbard, Tien Yin Wong, Ronald Klein, and Barbara EK Klein.  Revised formulas for summarizing retinal vessel diameters.  Current eye research, 27(3):143–149, 2003.
  * 34 J Martin Bland and DouglasG Altman.  Statistical methods for assessing agreement between two methods of clinical measurement.  The lancet, 327(8476):307–310, 1986.
  * 35 Justin Engelmann, Diana Moukaddem, Lucas Gago, Niall Strang, and Miguel O Bernabeu.  Applicability of oculomics for individual risk prediction: Repeatability and robustness of retinal fractal dimension using dart and automorph.  Investigative Ophthalmology & Visual Science, 65(6):10–10, 2024.
  * 36 John V. Forrester, Andrew D. Dick, Paul G. McMenamin, Fiona Roberts, and Eric Pearlman.  Chapter 1 - anatomy of the eye and orbit.  In John V. Forrester, Andrew D. Dick, Paul G. McMenamin, Fiona Roberts, and Eric Pearlman, editors, The Eye (Fourth Edition), pages 1–102.e2. W.B. Saunders, fourth edition edition, 2016.
  * 37 Esther M Hoffmann, Linda M Zangwill, Jonathan G Crowston, and Robert N Weinreb.  Optic disk size and glaucoma.  Survey of ophthalmology, 52(1):32–49, 2007.
  * 38 Alpana Mishra, Lolly Pattnaik, Suchismita Mishra, Pradeep Kumar Panigrahi, and Smaraki Mohanty.  Assessment of changes in optic disc parameters and peripapillary retinal nerve fiber layer thickness in myopic patients and its correlation with axial length and degree of myopia.  Indian Journal of Ophthalmology, 70(12):4343–4348, 2022.
  * 39 Rune Brautaset, Ulrika Birkeldh, Petra Frehr Alstig, Petra Wiken, and Maria Nilsson.  Repeatability using automatic tracing with canon oct-hs100 and zeiss cirrus hd-oct 5000.  PLoS One, 11(2):e0149138, 2016.
  * 40 Gaurav Garg, Pradeep Venkatesh, Rohan Chawla, Brijesh Takkar, Shreyas Temkar, and Sourav Damodaran.  Normative data of retinal arteriolar and venular calibre measurements determined using confocal scanning laser ophthalmoscopy system–importance and implications for study of cardiometabolic disorders.  Indian Journal of Ophthalmology, 70(5):1657–1663, 2022.
  * 41 Siegfried K Wagner, Dun Jack Fu, Livia Faes, Xiaoxuan Liu, Josef Huemer, Hagar Khalid, Daniel Ferraz, Edward Korot, Christopher Kelly, Konstantinos Balaskas, et al.  Insights into systemic disease through retinal imaging-based oculomics.  Translational vision science & technology, 9(2):6–6, 2020.
  * 42 M Kamran Ikram, Yi Ting Ong, Carol Y Cheung, and Tien Y Wong.  Retinal vascular caliber measurements: clinical significance, current knowledge and future perspectives.  Ophthalmologica, 229(3):125–136, 2013.
  * 43 Sarah McGrory, Adele M Taylor, Enrico Pellegrini, Lucia Ballerini, Mirna Kirin, Fergus N Doubal, Joanna M Wardlaw, Alex SF Doney, Baljean Dhillon, John M Starr, et al.  Towards standardization of quantitative retinal vascular parameters: comparison of siva and vampire measurements in the lothian birth cohort 1936.  Translational vision science & technology, 7(2):12–12, 2018.
  * 44 Simrat K Sodhi, John Golding, Carmelina Trimboli, and Netan Choudhry.  Feasibility of peripheral oct imaging using a novel integrated slo ultra-widefield imaging swept-source oct device.  International Ophthalmology, 41:2805–2815, 2021.
  * 45 Zhaotian Zhang, Miaoling Li, Yimeng Sun, Yantao Wei, and Shaochong Zhang.  Multicolor scanning laser ophthalmoscopy strengthens surgeons’ preoperative decision-making and intraoperative performance on epiretinal membrane.  Translational Vision Science & Technology, 9(13):36–36, 2020.
  * 46 Akihiro Ishibazawa, Nihaal Mehta, Osama Sorour, Phillip Braun, Sarah Martin, A Yasin Alibhai, Adnan Saifuddin, Malvika Arya, Caroline R Baumal, Jay S Duker, et al.  Accuracy and reliability in differentiating retinal arteries and veins using widefield en face oct angiography.  Translational Vision Science & Technology, 8(3):60–60, 2019.
  * 47 Olaf Brinchmann-Hansen and Leiv Sandvik.  The intensity of the light reflex on retinal arteries and veins.  Acta Ophthalmologica, 64(5):547–552, 1986.

## SUPPLEMENTARY MATERIALS

## Simultaneous OCT + SLO capture during acquisition

Supplementary Fig. S1 shows a screenshot from the Heidelberg Eye Explorer
(HEYEX) software (version 1.12.1.0) (Heidelberg Engineering, Heidelberg,
Germany) of an OCT volume for an individual’s left eye. During OCT capture,
the confocal SLO image (left) is used to reference the location of the B-scans
(right) captured during acquisition. This is advantageous particularly for
registering follow-up scans.

Figure S1: Screenshot from Heidelberg Eye Explorer (HEYEX) of an OCT volume
capture during acquisition. (Left) the confocal SLO image with the acquisition
location of the OCT volume overlaid in green. (Right) the corresponding fovea-
centred OCT B-scan of the OCT volume.

## SLOctolyzer’s training data for artery-vein-optic disc detection

Supplementary Fig. S2 shows some exemplary SLO images selected from the i-Test
and FutureMS cohorts for building the artery-vein-optic disc segmentation
model. The total set of 30 SLO images were selected to provide a variety of
image-features during training and evaluation, such as blur, illumination, and
contrast artefacts, as well as abnormal retinal features such as vessel
tortuosity or optic nerve head atrophy.

Figure S2: Selection of the data used to build the artery-vein-optic disc
segmentation model, highlight features of interest in the image which are
advantageous for diverse training, such as blur (A), contrast artefacts
(B,E,H), illuminations (D, F, G), vessel tortuosity (C) and optic nerve head
atrophy (H).

## Repeatability of fovea manual detection

As part of the manual detection of the fovea coordinate on SLO images, author
J.B. manually selected the fovea coordinate for all cohorts but the i-Test one
(as we could cross-reference the fovea on the SLO using the fovea-centred OCT
B-scan). As a measure of rater variability, author J.B. re-selected the fovea
coordinate for all 516 SLO images two months after the initial manual
detection, and compared the $(x,y)$-positioning using mean absolute error and
intra-class correlation. Like the training pipeline for the fovea detection
model, fovea segmentation masks were generated for each batch of coordinates
and compared using the area under the receiver operating characteristic curve
(AUC) and dice coefficient. Evaluation was performed after all images were
resized to a common pixel resolution of 768 $\times$ 768 for interpretable
comparison.

The repeatability results are listed below in supplementary Table S1. Results
for the i-Test cohort represent inter-observer variability (manual detection
against accurate ground truth data), and results for the remaining four
cohorts of data represent intra-observer variability. Intra-observer
variability has an excellent average intra-class correlation of 0.9934 and a
strong intra-class correlation for inter-observer variability of 0.8206.

| AUC | Dice | ICC(3,1) | MAE (px)
---|---|---|---|---
|  |  | x | y | x | y
Others | 0.9640 | 0.9287 | 0.9998 | 0.9870 | 3.3921 | 3.0000
i-Test | 0.9441 | 0.8892 | 0.7720 | 0.8692 | 4.7527 | 4.5161
Table S1: Repeatability of detecting the fovea on the i-Test dataset (which
act as ground truth) and the remaining cohorts (which measure variability in
the rater (J.B.). AUC, area under the receiver operating characteristic curve;
ICC, intra-class correlation for single fixed raters; MAE, mean absolute error
(in pixels)

## Manual annotation of artery-vein-optic disc

The optic disc was classified as both the cup and rim together, and its margin
was defined by the sharpest intensity transition between the darker rim and
brighter retinal tissue constituting the retinal nerve fiber layer. For
accurate artery-vein classification, the list below is a set of classification
rules each grader followed:

  1. 1.

Alternating rule: It’s common to see arteries and veins appear on the fundus
in an alternative nature, for efficient oxygen transport 46.

  2. 2.

Junction rule: It is common to observe arteriovenous crossings (a junction of
four lanes) and same-class vessel bifurcations (a junction of three lanes).
Given a crossing where there are more than three lanes, it’s likely to be an
arteriovenous crossing. Otherwise, it is a same-class vessel bifurcation.

  3. 3.

Thickness rule: Veins are typically thicker than arteries 40.

  4. 4.

Brightness rule: Veins are typically darker than arteries 47.

Supplementary Fig. S3 shows an exemplary SLO image and annotations to describe
each of the rules followed by the graders.

Figure S3: An exemplary SLO image with annotations to describe each of the
four core rules for artery-vein classification.

A protocol was created to ensure consistent and comparable segmentations by
each grader using ITK-Snap 22. After application of the binary vessel
segmentation model to detect all the vessels in each SLO image, the core
segmentation rules the graders followed are listed below:

  1. 1.

Given an arteriovenous crossing, select the class which is most obviously
overlaid on top the other class. If unsure, select the largest vessel.

  2. 2.

Do not classify any vessels within the optic disc.

  3. 3.

Complete any disconnected vessels.

  4. 4.

Do not extend vessels which have visibly not been segmented.

  5. 5.

Remove false positive pixels, i.e. retinal tissue which have been classed as
vessel.

Supplementary Fig. S4 shows an exemplary SLO image with a binary vessel map
overlaid using the binary vessel detection model, with annotations to
highlight each of the four segmentation rules each grader followed.

Figure S4: An exemplary SLO image (A) with a raw binary vessel mask (B)
superimposed in green with annotations to describe each segmentation rules
followed during annotation.

## Inter-rater agreement of graders for artery-vein-optic disc detection

Supplementary Table S2 shows the results of comparing the segmentations for
each task (vessel/artery/vein/optic disc) across the three raters using the
dice coefficient (ignoring background). All dice scores were greater than
0.93, suggesting strong agreement between graders.

Pairwise grader | Vessel | Artery | Vein | Optic disc
---|---|---|---|---
Grader 1 vs. Grader 2 | 0.9898 | 0.9597 | 0.9703 | 0.9442
Grader 1 vs. Grader 3 | 0.9906 | 0.9526 | 0.9602 | 0.9480
Grader 2 vs. Grader 3 | 0.9887 | 0.9468 | 0.9596 | 0.9379
Table S2: Inter-grader agreement between the three segmentation raters using
the Dice similarity coefficient.

## Qualitative evaluation of artery and vein ground truth labels

Supplementary Table S3 show the qualitative grading results from the clinical
ophthalmologist (I.M.) for the manual annotations. All SLO images were graded
as having ‘good quality’ or above, except for one, and there was no annotation
which received a bad or worse rating. Across the image quality categories, a
total of 19 SLO images were marked as ‘very good’, 10 as ‘good’ and 1 as
’okay’.

The SLO image and manual annotation which had the poorest score is shown in
supplementary Fig. S5. The clinical ophthalmologist identified an arteriole
and venule nasal to the optic disc as misclassified (red arrows). This error
amounted to a drop in score from ‘good’ to ‘okay’, suggesting that all other
images which rated as ‘good’ had significantly smaller miss-classifications,
if any.

SLO Image quality Artery-vein rating Very good ($n=10$) VG: 7, G: 3, O: 0, B:
0, VB: 0 Good ($n=13$) VG: 7, G: 5, O: 1, B: 0, VB: 0 Okay ($n=7$) VG: 5, G:
2, O: 0, B: 0, VB: 0

Table S3: Qualitative adjudication of the manual annotations for artery and
vein classification from a clinical ophthalmologist (I.M.). VG, very good; G,
good; O, okay; B, bad; VB, very bad. Figure S5: SLO image (A) and
corresponding manual annotation superimposed (B) with poorest score from
manual adjudication from clinical ophthalmologist (I.M.). The red arrows
indicate where an arteriole/venule was miss-classified.

## RAVIR segmentation label corrections

During the construction of the artery-vein-optic disc detection (AVOD) model,
we intended on using the publicly available RAVIR dataset to further enhance
and diversify our dataset of SLO images. However, during experimentation, we
observed some inconsistent artery and vein classification.

One of our image graders (author J.B.) identified any major errors in the
original segmentation labels and corrected them using ITK-Snap 22.
Supplementary Fig. S6 shows an SLO image with the most significant error (A),
the SLO image with the original labelling overlaid (B), and the SLO image with
the corrected version overlaid (C).

After major corrections were made to all SLO images, we asked a clinical
ophthalmologist (author I.M.) to rate the quality of the SLO image, as well as
the segmentations before and after correction in a masked and randomised
fashion using a 5-point ordinal scale from 2 (very good) to -2 (very bad). We
also asked him to rate his preference, with options for both or neither
available. Supplementary Table S4 shows the results from this adjudication,
stratified by image quality.

Figure S6: SLO image (A), original manual annotation superimposed 10 (B) and
corrected manual annotation (C). Here, many of the vessels in the macula were
all assumed to be venules in the original annotation.

Image Quality Original 10 Corrected Both Very good ($N=6$) 0 3 3 Good ($N=4$)
0 2 2 Okay ($N=10$) 0 7 3 Bad ($N=3$) 0 2 1 Total ($N=23$) 0 14 9 Label
Artery-Vein classification Original 10 VG: 6, G: 8, O: 6, B: 2, VB: 1
Corrected VG: 10, G: 11, O: 2, B: 0, VB: 0

Table S4: Qualitative adjudication between the original and corrected manual
annotations for artery and vein classification in the RAVIR dataset 10, from a
clinical ophthalmologist (I.M.). VG, very good; G, good; O, okay; B, bad; VB,
very bad.

We chose to exclude the RAVIR dataset from training the artery-vein-optic disc
model and used the corrected segmentation labels as an external test set for
our model. We hypothesised this set would pose a significant challenge for our
model, which was trained on images related to systemic health.

## Global and local vessel calibre

Measurements of fractal dimension, vessel density and global vessel calibre
are not taken across zones B and C because they capture a global measure of
the vasculature. Instead, for zones B and C, we compute tortuosity density,
central retinal artery/vein equivalents, and local vessel calibre along
individual vessel segments in the vessel maps. These vessel segments are
defined where crossings and bifurcations are observed.

Supplementary Fig. S7 shows the key differences in global and local vessel
calibre. Global vessel calibre is the ratio between vessel pixels and
skeletonised vessel pixels (number of yellow pixels divided by blue pixels)
(B). This provides a coarse measure of calibre. Local vessel calibre measures
the diameter of each vessel segment by traversing it’s length and measuring
the diameter of the largest circle which fits entirely within it. A vessel
segments’ calibre is then the average value of the list of circle diameters
collected as the vessel segment is traversed. Local vessel calibre is thus the
overall average of all vessel segment calibres, hence a more granular approach
to assess vessel calibre.

Figure S7: SLO binary vessel map (A), binary vessel map with skeleton overlaid
in dark blue (B) and binary vessel map with individual vessel segments
overlaid in an array of colours (C).

## SLOctolyzer’s interface

Supplementary Fig. S8 shows the core steps to run the SLOctolyzer pipeline.
SLOctolyzer can be run either from an integrated development environment
(IDE), such as Jupyter, Spyder or Visual Studio Code, or directly from the
terminal. All that is required is the path to the directory of images to be
analysed, and where the results are to be stored in a simple configuration
text file. A process log for the user is outputted as the pipeline processes
each image in turn, utilising GPU acceleration if available. An optional
spreadsheet with additional metadata such as the conversion factor from pixel
space to physical space can be provided (in microns-per-pixel), so that
measurements in pixel units can be converted into microns.

Figure S8: Summary of the process of running SLOctolyzer on a batch ($n=3$) of
images. Directory of input SLO images to be analysed, with an optional
spreadsheet which allows manual data entry of pixel length scale, eye type and
location (A). Spreadsheet with optional metadata to accompany SLO images
during pipeline. Note that missing information is supported (B). Configuration
file specifying the file paths to images and where results will be saved (C).
Demonstration of running SLOctolyzer via JupyterLab or via the terminal (D).

Supplementary Fig. S9 summarises the output from running SLOctolyzer on a
batch ($n=3$) of images. A folder is generated for each SLO image file
analysed, and within each folder contains the segmentations masks, feature
measurements and a composite image showing the segmentations superimposed onto
the SLO. For ease of assessing segmentation quality, composite segmentation
images are saved out for every SLO image analysed into a separate folder.
Finally, an output spreadsheet collates all feature measurements for every
image analysed row-wise, which can be quickly loaded into a statistical
programming language for data analysis.

Figure S9: Summary of the output of running SLOctolyzer on a batch ($n=3$) of
images. Directory of output folders for each of the three image files analysed
(A). Output files for the ‘opticdisc_768’ exemplar SLO image, including the
original SLO image, segmentation masks, composite image with segmentations
superimposed and a results file with metadata and feature measurements (B). A
directory with composite images of SLO and segmentation masks per image file
for quick inspection of segmentation quality (C). A composite results file
with the metadata and features of each image file processed, stored row-wise
to facilitate downstream statistical analysis (D).

## Examples of poor performance from reproducibility analysis

Supplementary Fig. S10 shows two examples which had the second largest
outliers for tortuosity density and large-vessel calibre (AVR/CRAE/CRVE). In
supplementary Fig. S10(A), while there is no qualitative difference in the
binary vessel segmentation, tortuosity density is quite large. This is likely
due to vessel disconnectedness between the segmentations (purple arrows).
Nevertheless, the local vessel calibre and fractal dimension residuals are
very low.

Additionally, due to the unregistered nature of the SLO image pairs, minor
translations/scales can have an inordinate impact on large-vessel calibre
reproducibility given the major arteries and veins appear toward the edge of
macula-centred SLO images. In supplementary Fig. S10(B), this particular
repeated set of SLO images are off by a horizontal translation while
intersecting the disc and thus cuts off one of the major arteries and veins
(red arrows). This had a significant consequence to the CRVE and CRAE
residuals, causing large error. Nevertheless, local vessel calibre remains
stable due to taking into account the whole vasculature of the image.

Figure S10: Some examples of poor agreement in repeated SLO images for
tortuosity density (A), and vessel width measurements (B). In Fig. 5, (A) is
represented by the blue star, while (B) is represented by the red stars.