Skip to main content
Biomedical Optics Express logoLink to Biomedical Optics Express
. 2025 Apr 29;16(5):2112–2134. doi: 10.1364/BOE.543611

SpecstatOR: speckle statistics-based iOCT segmentation network for ophthalmic surgery

Kristina Mach 1,*, Hessam Roodaki 2, Michael Sommersperger 1, Nassir Navab 1
PMCID: PMC12945488  PMID: 41767927

Abstract

This paper introduces an approach to intraoperative optical coherence tomography (iOCT) segmentation, utilizing speckle patterns from tissue and tool scattering properties, defined by refractive index and structural composition, to differentiate retinal layers and instruments. Unlike classical deep learning approaches, our model trains on tissue-specific characteristics, enhancing robustness across different devices and anatomical variations and eliminating retraining. Consequently, our approach reduces the dependency on shape and intensity, addressing the limitations of state-of-the-art iOCT segmentation techniques used during surgical procedures.

1. Introduction

Good utilization of intraoperative Optical Coherence Tomography (iOCT) in ophthalmic surgery relies heavily on accurate visualization, which, in turn, depends on precise segmentation. Segmentation is fundamental for identifying critical retinal layers and surgical tools and quantifying OCT images—measuring angles, distances, areas, and volumes—which is increasingly being applied in real-time surgical decision-making. For example, subretinal volume measurements and intraoperative biometry during retinal surgeries have demonstrated the importance of accurate segmentation for guiding surgical steps and ensuring optimal outcomes [1,2].

IOCT segmentation faces several challenges stemming from surgical procedure’s dynamic and variable nature. The DISCOVER study, a comprehensive prospective analysis, demonstrated the critical need for precise and adaptable imaging techniques, as iOCT information influenced surgical decision-making in 29.2 percent of posterior segment surgeries [3]. This finding underscores the necessity for real-time imaging capabilities to accommodate rapid anatomical and procedural changes during surgery.

A significant issue in iOCT segmentation arises from the interference caused by surgical instruments. Metallic tools, for instance, scatter and shadow light, degrading image quality and complicating the distinction between tissue structures and instruments, thereby impeding segmentation accuracy during procedures. Additionally, the dynamic nature of surgery introduces variability in tissue morphology. Tissue deformation and anatomical changes during operations further disrupt image consistency, underscoring the necessity for segmentation methods that can adapt in real-time to the evolving surgical environment [4].

Precise and adaptable retinal segmentation is particularly valuable in complex ophthalmic procedures, where accurate tissue identification is crucial. For example, iOCT-guided visualization enhances the outcomes of vitrectomies and epiretinal membrane peelings by improving the visualization of adhesions, reducing reliance on dyes, and minimizing the risk of residual tissue [5]. Similarly, in full-thickness retinal surgeries, such as macular hole repairs and vitreomacular traction releases, precise segmentation enables refined surgical techniques by revealing changes in macular hole geometry and intraretinal structures [6,7].

For subretinal or retinal detachment surgeries, iOCT aids in precise subretinal injections and optimizes retinal detachment repairs by visualizing subtle intraretinal changes and fluid dynamics, which are crucial for improving postoperative outcomes [8–10]. Additionally, in highly myopic eyes, iOCT ensures the preservation of foveal architecture during Inner Limiting Membrane (ILM) peeling, reducing the risk of complications that could impair vision [11–13].

To aid these clinical procedures and help with the challenges of adapting to real-time environmental and structural changes, our proposed method focuses on supporting a network with a thorough statistical characterization of tissues to enhance its performance. Segmentation methods, ranging from traditional thresholding to complex machine-learning algorithms, often fail in real-time surgical applications because of the non-rigid, mutable nature of eye anatomy, the diversity of surgical tools, variability of anatomical conditions of the patient, and the variability across iOCT devices, leading to sub-optimal segmentation on unseen scans. Our goal, therefore, is to develop a segmentation method that not only learns from anatomical properties but also leverages statistical features inherent in the tissues, ensuring robustness across different devices and patient variations. The statistical characterization serves as a foundation, enabling the model to generalize to various iOCT machines and retinal shapes without needing retraining, unlike conventional CNN-based approaches, which often require retraining for unseen devices or tissue shapes. This generalization is crucial in ophthalmic surgery, where imaging equipment and patient anatomy vary significantly. The primary focus of this research is to explore the feasibility of real-time segmentation of iOCT retinal B-scans based on the scattering properties of the tissue. This study serves as a feasibility analysis, employing statistical methods rooted in optical physics, such as light scattering, light absorption, and statistical modeling, to evaluate the potential for reliable segmentation based on the intrinsic scattering properties of retinal tissues. Unlike many other studies that emphasize time efficiency or the novelty of machine learning models, our work is primarily concerned with understanding the underlying physical interactions between light and tissue and how these can be leveraged for accurate segmentation in a dynamic surgical environment.

To the best of our knowledge, our research is the first to leverage the intrinsic statistical properties of iOCT speckles for segmentation, utilizing light reflection and scattering behaviors in ophthalmic tissues. This approach uniquely enables segmentation that adapts to tissue changes during surgery, minimizing incorrect segmentation caused by abnormal visual appearance of pathologies or tissue deformations caused by instrument tissue interactions. In this work as an initial step, we focus on ex-vivo porcine eyes and attempt to segment Retinal Pigment Epithelium (RPE), ILM, and instruments. The availability of high quality surgical iOCT data with visible instruments and visual similarities between human and pig retinal anatomical features in OCT make porcine data a suitable choice for a first step in this direction. Developing fully automated human retinal layer and instrument segmentation of iOCT data could be based on equivalent principles and outcomes discussed here.

Given that real-time segmentation for intraoperative applications like navigation is the primary goal, we focus on leveraging the statistical properties of iOCT speckles within a neural network framework to accelerate otherwise time-consuming calculations. Deep learning architectures, such as U-Net and ReLayNet, have shown promise in improving segmentation speed and accuracy. U-Net, known for its efficiency in biomedical image segmentation and ReLayNet, which extends segmentation to include fluids, provide a solid foundation for integrating statistical insights to boost real-time performance. [14–18].

Diagnostic intraoperative Optical Coherence Tomography is a different imaging device than OCT, which is widely used for diagnostics [19]. This distinction arises from the controlled and stable conditions under which diagnostic OCT is performed. In these settings, precise eye alignment, reduced motion, and extended acquisition times allow for applying advanced light sources, signal averaging, and noise-reduction algorithms, resulting in clearer and more detailed images with minimal artifacts [20,21]. Additionally, diagnostic OCT systems often employ laser sources with significantly higher power levels. These higher power levels are feasible due to the short duration of diagnostic imaging sessions, enabling more photons to be captured and improving the signal-to-noise ratio and image clarity. [22,23]

In contrast, iOCT operates in dynamic surgical settings where real-time imaging is essential. The duration of an iOCT session can be an entire procedure long, and due to safety concerns, the laser powers are much lower than in OCT which impacts image quality with a lower distinction between signal and noise. The rapid acquisition required imposes constraints on image resolution algorithms and noise reduction. Additionally, the presence of motion artifacts from surgical tools and tissue deformation, coupled with limited processing, often compromises iOCT image quality

In contrast, intraoperative Optical Coherence Tomography (iOCT) is utilized in dynamic surgical environments where real-time imaging is crucial. Unlike the short duration of diagnostic OCT, iOCT sessions often span the entire duration of a surgical procedure. To ensure patient safety, lower laser power levels are employed, which adversely affects image quality by reducing the distinction between signal and noise. Furthermore, the rapid acquisition requirements limit resolution optimization and noise reduction algorithms. The presence of motion artifacts caused by surgical tools and tissue deformation, combined with constrained computational processing, further compromises the overall image quality of iOCT [3,24].

Consequently, algorithms designed for stable diagnostic OCT images benefit from controlled environments and minimal motion artifacts and are often unsuitable for the highly variable conditions of iOCT. In intraoperative settings, the rapid imaging speeds, real-time processing demands, and interference from surgical tools require specialized algorithms that can adapt to the dynamic nature of surgical procedures and the variability of tissue morphology.

While other works on OCT, especially on iOCT have focused on denoising speckles to enhance image clarity, our approach contrasts with this trend by embracing the information inherent in light-tissue interactions [25–28].

In prior attempts at OCT segmentation, Chiu et al. developed a method for segmenting seven retinal layers in diagnostic OCT using graph theory and dynamic programming, achieving segmentation accuracy comparable to expert manual segmentation. However, the average computation time per OCT B-scan was 9.74 seconds, efficient for diagnostic purposes but potentially too slow for real-time intraoperative applications [29]. Other research has highlighted the importance of high reflectivity in specific retinal layers, such as ILM and Retinal Pigment Epithelium (RPE), for accurate segmentation [30]. The segmentation of less reflective layers is often accomplished through fuzzy clustering and graph-cut optimization, though the average computation time in these cases was about 12.75 seconds per image. The varying reflective properties of tissues provide valuable insights into their distinct anatomical characteristics and responses to light, which we leverage in our approach.

In dermatology, OCT speckle characterization has been applied to skin tissue, with studies determining that the Gamma distribution best characterizes skin layers [31]. This study by M. Ali and B. Hadj used speckle statistical parameters for segmenting OCT images of skin, demonstrating that speckle statistics could be successfully applied to distinguish structural elements in OCT [31]. However, this method was applied to dermatological OCT and did not explore the complexities of retinal layer segmentation in the dynamic environment of intraoperative OCT. Intraoperative retinal OCT images exhibit a significantly lower signal-to-noise ratio due to the reduced laser power levels required in operating room settings. These constraints render the findings in [31] inapplicable for our purposes. The challenges posed by the variability of retinal layers and changing anatomy during surgery were not addressed. Similarly, the Gamma distribution has been effectively applied to model speckles in cancer imaging using OCT [32]. Danilo A. Jesus et al. have used speckle statistics to distinguish age-related structural changes in the cornea and modeled corneal micro-structure in vivo, again utilizing the Gamma distribution [33,34]. A study from Niemczyk [35] investigated statistical modeling of corneal diagnostic OCT to evaluate the influence of the increase in intraocular pressure and utilized the Gamma distribution. Silva et al. research different distributions to model the speckles in OCT. The Generalized Gamma distribution achieved the best goodness of fit against Rayleigh, Weibull, Nakagami, and Gamma distributions. [36]. An innovative approach by Huang et al. involves using pseudo-labels to reduce manual work in segmentation by allowing models to learn from larger datasets without needing to label the entire dataset. However, this method requires re-labeling and re-training for different OCT devices and does not consider the changing anatomy during surgery [37].

To address this gap, our innovative approach preserves and leverages the natural light-tissue interactions, resulting in more precise segmentation in a non-static environment. By employing statistical models that accurately reflect the behavior of light within the eye, this method significantly enhances segmentation accuracy, reducing the need for constant retraining, which is often required in state-of-the-art machine learning-based approaches and lays the foundation for tissue-adaptive and dynamic surgical segmentation.

2. Method

2.1. Statistical characterization of anatomical tissues in iOCT

To prove the effectiveness of using these speckle statistics, we perform a thorough statistical analysis that serves as the foundation for segmentation. The focus of this analysis is to demonstrate that the scattering properties of the tissues are consistent within the same retinal layers across different B-scans and show significant differences between different layers. The Inner Limiting Membrane (ILM) and Retinal Pigment Epithelium (RPE), for example, exhibit distinct scattering properties due to their unique optical, structural, and anatomical characteristics. The ILM, a thin, highly reflective layer, scatters light primarily due to its smooth surface, collagen-rich composition, and high refractive index. In contrast, the RPE, which is composed of melanin-rich pigmented cells, exhibits a more diffuse scattering profile influenced by its high absorption and backscattering properties [30,38]. This analysis ensures that our model can reliably differentiate between tissue types based on their statistical and anatomical characteristics, validating the robustness of our segmentation approach.

We perform homogeneity assessments to confirm consistency within the same retinal layers across different B-mode scans (B-scans) and distinctly different between the layers with a heterogeneity assessment. Only if the scattering properties show clear and consistent patterns within layers and significant differences between them can we confidently assume that they are suitable for reliable segmentation.

To further prove the effectiveness of using these speckle statistics, we perform a thorough statistical evaluation of which distribution best characterizes the speckles. We fit several distributions to the speckle data and rigorously evaluate their accuracy using the Kolmogorov-Smirnov (KS) and Cramér–von Mises (CVM) tests to determine the goodness-of-fit. By selecting the best-fitting distribution, we ensure that the statistical properties of the tissues are robust and consistent, enabling reliable segmentation.

Our segmentation methodology involves patch-wise distribution fitting to the speckle patterns in iOCT images, using maximum likelihood estimation to determine the parameters of probability density functions (PDFs). This step, combined with the statistical analysis of the goodness-of-fit, ensures that the statistical foundation of the model is solid, further enhancing its ability to generalize across various devices and retinal shapes.

The classes selected for the analysis and segmentation are the Inner Limiting Membrane (ILM), the Retinal Pigment Epithelium (RPE), and the tool used in the procedure. The ILM and RPE, which are the top and bottom layers of the retina, act as a physical barrier when targeting intravitreal injections, the most common invasive treatment used today in ophthalmology. [39]

2.1.1. Heterogeneity assessment

We conduct an Analysis of variance (ANOVA) primarily to justify treating different classes separately in the segmentation algorithm. If ANOVA reveals significant heterogeneity between the class categories ILM, tool, and RPE across B-scans, as shown in Fig. 1, it confirms that we can segment these classes separately due to their distinct speckle characteristics [40]. This step is critical to ensure the validity of subsequent goodness-of-fit analyses by establishing baseline homogeneity in pixel intensities, thereby enabling more accurate modeling of the underlying distribution of iOCT data.

Fig. 1.

Fig. 1.

Retinal ex-vivo porcine iOCT B-scan with ILM (green), RPE (light blue), and tool (Purple) classes marked.

Let Xijk denote the pixel intensity for the kth observation (pixel) in the jth B-scan of the ith class, where i∈ Class 1, Class 2 , j∈ 1,2,… ,m , and m is the number of B-scans. The F-statistic is calculated based on the between-class variance and within-class variance as follows:

F=MSBMSW. (1)

In Eq. (1) MSB represents he between-class variance and measures how much each class’s mean intensity deviates from the grand mean, weighted by the number of pixels in that class. MSW represents the mean square within each class, which accounts for variations in pixel intensities within each class across different B-scans:

MSB=∑ ini(X¯ i− X¯ )2m− 1. (2)
MSW=∑ i∑ j∑ k(Xijk− X¯ ij)2N− m. (3)

In Eq. (2) and Eq. (3), X¯ i is the mean pixel intensity for the ith class (ILM, RPE, or tool), X¯ ij is the mean pixel intensity for the jth B-scan in the ith class, computed as the average intensity of all pixels in that class across all B-scans. X¯ is the grand mean pixel intensity across all B-scans and classes (ILM, RPE, and tool), representing the average pixel intensity across all classes and B-scans, but excluding background pixels. ni is the number of pixels in the ith class and N is the total number of pixel observations across all classes (ILM, RPE, and tool) in all B-scans.

This methodological approach identifies significant pixel intensity variations between different anatomical structures or tools within the iOCT images. We performed the computations using the f_ oneway function from the stats module of Python’s SciPy library, enabling the calculation of the F-statistic and associated p-values for the between-class variability [41].

2.1.2. Homogeneity assessment

Prior to asserting any conclusions about the speckle statistics within the ILM, RPE, and tool classes via ANOVA, we incorporated Levene’s test as a fundamental step to evaluate the homogeneity of these regions across various B-scans to ensure consistency in the observations. Levene’s test is essential for confirming that the variability observed in speckle patterns across different B-scans is not due to intrinsic differences in variance within a class but rather reflects genuine differences between classes [42]. By establishing that the variances within each class are equal, Levene’s test safeguards against potential biases in the statistical analysis and ensures that the segmentation decisions are based on true differences in speckle patterns, not on artifacts of unequal variances among samples.

We used the median to measure central tendency, which helps mitigate the influence of outliers, assuming the data was not normally distributed. We set the proportion of data to trim at 5%, allowing for a conservative assessment of variance equality. We calculate the Levene’s test statistic as follows:

W=(Ni− m)(m− 1)∑ j=1mnij(Zij⋅ − Zi⋅ ⋅ )2∑ j=1m∑ k=1nij(Zijk− Zij⋅ )2. (4)

The Eq. (4) consists of: Ni , which is the total number of observations in the ith group across all B-scans, m is the number of B-scans for the ith group, nij is the number of observations (pixel intensities) in the jth B-scan within the ith group, Zijk denotes the absolute deviation of the kth observation from the median in the jth B-scan of the ith group, Zij⋅ is the mean of the Zijk values for the jth B-scan, and Zi⋅ ⋅ is the overall mean of all Zijk values within the ith group.

We computed Levene’s test using the levene function from the stats module of Python’s SciPy library. This function provides a test statistic and a corresponding p-value, with the null hypothesis that all groups have equal variances. [41]

2.1.3. Distribution fitting

We modeled the empirical distribution of pixel intensities within iOCT images to identify suitable statistical distributions for ILM, RPE, and surgical tools. To achieve this, we fitted a series of continuous probability distributions to the data, including Gamma, Rayleigh, Normal, Burr, Lognormal, and Nakagami distributions. This is the first step in our pipeline that is outlined in Fig. 2. We selected these distributions based on previous literature in diagnostic OCT and their relevance to the light scattering and absorption properties of ocular tissues and surgical instruments observed in iOCT images [32,35,43].

Fig. 2.

Fig. 2.

Overview of the proposed methodology pipeline. 1) istribution fitting is performed on 7× 7 pixel patches for each class to determine the optimal statistical model describing the speckle scattering characteristics. 2) The parameters from the chosen distribution are clustered with minimal overlap to ensure clear class separation. 3) The clustered parameters are used to generate three binary maps corresponding to the ILM, RPE, and surgical tool classes. 4) A deep neural network further refines these binary maps, leveraging learned shape priors of retinal structures for enhanced segmentation accuracy.

We executed the parameter fitting on 7× 7 -sized patches on the B-scans. A 7× 7 patch provides a sufficient number of pixels (49 pixels) for robust statistical estimation of distribution parameters. This number of pixels is typically adequate for fitting common statistical distributions like Gamma or Rayleigh, ensuring that the estimates are statistically stable without requiring an excessively large patch size that might blend distinct features together since each layer is not thinner than 7 pixels. We modeled each patch region of scatters using a histogram. We fitted it using Maximum Likelihood Estimation (MLE), which seeks to find values that maximize the likelihood function given the observed data. This process resulted in a new matrix for each distribution parameter or parameter, each consisting of 7× 7 patches optimized to the value of the distribution. The MLE approach is beneficial as it provides estimators with good asymptotic properties, such as consistency and asymptotic normality, which are desirable for large sample sizes like those in iOCT image data sets.

θ ^ dist=arg maxθ L(θ |x). (5)

In Eq. (5), θ ^ dist represents the estimated parameters for the given distribution ’dist,’ L(θ |x) is the likelihood of the parameters given the observed pixel intensities x, and arg maxθ denotes the argument of the parameters that maximize the likelihood function.

We estimated the shape (k) and scale (θ ) parameters for the Gamma distribution. The Normal distribution required fitting the mean and standarddeviation . For the Burr distribution, they fitted the two parameters (c and d), resulting in two matrices per distribution. They also estimated the scale parameter (σ ) for the Rayleigh distribution, the parameter (s) for the Lognormal distribution, and the parameter (ν ) for the Nakagami distribution, each producing one matrix per distribution.

2.1.4. Goodness-of fit analysis

We performed goodness-of-fit analyses using the Kolmogorov-Smirnov and the Cramér–von Mises criterion to validate the consistency of speckle patterns and their suitability for segmentation. To measure the maximum discrepancy between the empirical distribution function (EDF) of the sample and the cumulative distribution function (CDF) of the hypothesized statistical model, we applied the Kolmogorov-Smirnov-Test. This test is especially useful in this context because of its non-parametric nature, offering a sensitive fit measure without assuming the distribution’s parameters [44].

High p-values (above 0.05) from the Kolmogorov-Smirnov- and Cramér–von-Mises-Tests indicate minimal deviation between the observed data and the theoretical distributions, suggesting that the fitted distributions accurately represent the iOCT speckle data. This is essential for validating the segmentation approach, as an accurate statistical model forms the foundation for distinguishing retinal layers and surgical tools. Conversely, low p-values (below 0.05) indicate significant deviations, implying that the distribution may not be suitable for modeling the data [44,45].

While the mean p-value measures the overall fit of the distribution across the dataset, variance p-values provide critical insight into the consistency of the fit across different patches of the iOCT images. A low variance p-value (below 0.05) highlights regions of higher variability, suggesting areas where the theoretical distribution may not align well with the observed data. This dual assessment is critical: high mean p-values confirm the global appropriateness of the selected distribution, while variance p-values ensure that the fit remains consistent on a local scale [46].

Furthermore, a higher p-value (e.g., 0.23) can be seen as indicating an even closer alignment between the observed and theoretical distributions compared to a value just above the threshold (e.g., 0.055). This distinction can be particularly relevant in contexts where quantitative comparisons of goodness-of-fit are being made, as it allows for the relative performance of different distributions to be evaluated with greater precision. By considering both the mean and variance p-values, the method ensures a comprehensive assessment of the suitability of the statistical models for iOCT data segmentation. [47]

KS=supx|Fn(x)− F(x)|. (6)

In Eq. (6), KS is the KS statistic representing the supremum of absolute differences between the EDF (Fn(x)) of the sample and the CDF (F(x)) of the assumed model.

The Cramér–von Mises criterion, on the other hand, assesses the sum of squared discrepancies across the distribution’s entire range, providing a rigorous evaluation of the overall fit between the empirical data and the theoretical model [45].

CVM=112N+∑ i=1N[2i− 12N− F(x(i))]2. (7)

In Eq. (7), CVM is the Cramér–von Mises statistic, N is the number of observations within the group, and x(i) are the ordered observations. This statistic provides a global assessment of how well the hypothesized distribution models the entire data set.

To ensure a comprehensive approach, we selected these two goodness-of-fit tests: the KS-Test focuses on the most extreme deviations, sensitive to central distribution differences, while the Cramér–von Mises test checks for discrepancies across the entire distribution, enhancing sensitivity to variations in the tails. We calculated the tests using Python’s SciPy library functions, comparing each group’s pixel intensity distributions against their respective theoretical models [41].

2.2. Proposed method

Section 2.1, Statistical characterization of Anatomical Tissues in iOCT, provides the statistical groundwork needed to demonstrate the relationship between speckle characteristics and anatomical tissues. It is important to note that while this analysis forms the foundation of the methodology, it is not a required step for reproducing the segmentation process. The characterization confirms and proves that statistical differences exist between the retinal layers within porcine eyes and not between scans, ensuring the method’s robustness and enabling its application across various iOCT machines and retinal shapes. Without this foundational analysis, we could not assert the statistical significance of the speckle features relevant to anatomical differentiation.

2.2.1. Parameter isolation

The distributions are defined by parameters in a function that models the scattering and absorption of light within each 7× 7 patch region. Our method operates on the assumption that distinct parameter ranges will naturally emerge for different patches while remaining consistent within regions associated with specific structures such as the ILM, RPE, the rest of the retina, surgical tools, and background. The distinct scattering properties of ILM and RPE can be attributed to their unique anatomical and optical characteristics. The ILM primarily consists of collagen and is a highly reflective surface, whereas the RPE contains melanin granules, leading to absorption-dominated scattering. [38] The parameters characterizing the speckle distribution in the ILM layer will differ from those of the surgical tool or the RPE layer, as each exhibits unique optical and physical properties. These parameter variations enable clear differentiation between the structures, a crucial factor for achieving accurate segmentation.

To efficiently handle these variations, we assign distinct parameter ranges to visually isolate different 7× 7 patches into classes by coloring them or extracting them into binary images that highlight the class of interest. This approach allows us to generate binary label maps that clearly distinguish between the ILM, RPE, and tool classes within the B-scan. This process constitutes the second step in Fig. 2 and forms the foundation of our segmentation method.

2.2.2. Automatic parameter isolation

To improve time efficiency, we employ a Random Forest algorithm to automate the parameter range isolation process. The Random Forest classifies the 2D patch-wise parameter matrices based on predefined categories derived from ground truth segmentations, such as ILM, RPE, and tool. This method is particularly well-suited to handling the complex, high-dimensional data generated by fitting distributions to iOCT speckle patterns, as Random Forests can merge multiple decision trees to improve classification accuracy.

Five volumes were randomly selected to assess generalization, with 10 B-scans per volume used to train the Random Forest algorithm. Inputs to the Random Forest included the 2D patch-wise parameter matrices, with ground truth based on the corresponding patch-wise ground truth segmentations obtained by ophthalmologists and experts in the field. This training process established logical rules that best differentiate the parameter ranges capturing the ILM, RPE, and tool classes. The preliminary binary maps created by the Random Forest algorithm serve as initial segmentations, referred to as weak labels.

The Weak labels are further refined through biological insights and a deep-learning network. This step integrates statistical and physics-based insights with a biological understanding of the retina, depicted as step 3 in Fig. 2. We used an enhanced version of U-Net, incorporating residual units known for their effectiveness in biomedical image segmentation, to achieve precise refinement [48]. U-Net is widely recognized for its success in medical segmentation tasks. It is ideal for producing the three binary maps representing ILM, RPE, and the surgical tool. These are crucial for refining segmentation outcomes based on the goodness-of-fit analysis parameters.

2.2.3. Classification

We conducted an ablation study to compare the performance of different model input variations and assess the generalizability of our approach on unseen intraoperative data. The study aims to determine how well our method performs compared to state-of-the-art segmentation methods, particularly when applied to new, unseen data from a different iOCT machine, which includes surgically manipulated retinal shapes. This evaluation is critical to understanding how effectively our model can generalize without needing retraining, a common limitation in existing machine learning-based approaches.

Model Variations:
  • •

    A: Baseline - B-scans with ground truth segmentation made by experts, used as a benchmark for evaluating segmentation accuracy.

  • •

    B: Weak labels Weak labels, generated solely from the statistical understanding of the OCT data (without B-scan input).

  • •

    C: B-scans and parameters A combination of B-scans and Gamma distribution parameters to assess the added value of statistical features alongside traditional image data.

  • •

    D: Gamma parameters Gamma distribution parameters alone, emphasizing the statistical foundation of the model without using direct B-scan input.

The ablation study evaluated the impact of these variations on segmentation performance, as shown in Fig. 3. The primary goal was to assess how well our proposed method (variation D) generalizes to unseen intraoperative data, particularly from different machines and surgically manipulated retinal shapes. Variation A (Baseline) provided a reference for comparison, using traditional B-scan input with ground truth segmentation. In contrast, variations B, C, and D tested the efficacy of our method by incorporating statistical distributions into the segmentation process, either with or without B-scan input.

Fig. 3.

Fig. 3.

Network architecture and training variations A: Baseline, B: Weak Labels, C: B-scan and Gamma parameters, and D: Gamma parameters as different inputs. Labels: weak from the parameter isolation and segmented ground truth from experts.

By comparing these variations, we can determine whether the distribution parameters alone are sufficient for segmentation (variation D) or if combining them with B-scan data (variation C) yields better results. Variation D, our proposed method, aims to demonstrate that relying solely on Gamma distribution parameters can achieve robust segmentation that generalizes well to unseen data without needing the traditional B-scan input, a key limitation in CNN-based methods.

We further explored the potential of using Weak labels generated from Random Forest parameter isolation in cases where no ground truth data is available. This could automate the creation of labeled data for training large models, with the effectiveness assessed by calculating the model’s loss function based on discrepancies between the output and the weak label predictions.

The network’s architecture, shown in Fig. 3, includes 4.0 million trainable parameters, resulting in an estimated model size of 16.094 MB. The different training variants are also illustrated in Fig. 3. The training and speed validations are done on a NVIDIA A40 GPU with 48GB VRAM.

2.2.4. Data acquisition and preprocessing

Three datasets collected using distinct OCT devices facilitate a comparative analysis. The B-scans are all 512x1024 pixels. The first set, referred to as Group One, is the dataset from [49], consisting of 50 iOCT acquisitions obtained using a Zeiss Lumera 700 with an integrated Rescan 700 OCT system (Carl Zeiss Meditec AG). These iOCT scans, which include a volumetric collection of B-scans, each with a depth of 2.8mm, were acquired from ex-vivo porcine eyes to simulate a broad field-of-view environment. This dataset features two different surgical tools: one metallic needle and one forceps. Group One was annotated by a collaborative team of two ophthalmic imaging experts and three ophthalmologists specializing in retinal surgery.

Porcine eyes have long been recognized as an important model in ophthalmic research due to their anatomical and physiological similarities to human eyes. Prince et al. [50] describe how porcine eyes possess comparable retinal thickness, vascularization, and scleral structure to human eyes, making them valuable for studying ocular imaging and surgical techniques. Additionally, Beauchemin and Chesler [51] highlight the optical characteristics of porcine eyes, emphasizing their relevance in simulating human retinal imaging conditions.

While porcine eyes lack a well-defined fovea and exhibit more uniform photoreceptor distribution, Delori et al. [52] demonstrate that their fluorescence and scattering properties closely mirror those of human eyes. These optical similarities, combined with practical advantages such as availability and controlled experimental conditions, make porcine eyes an ideal preliminary model. Namely, porcine eyes allow us to focus on key layers like the Inner Limiting Membrane (ILM) and Retinal Pigment Epithelium (RPE), simplifying the evaluation of statistical speckle analysis. This controlled framework provides a necessary first step before applying the method to human retinal datasets, which introduce additional layers and greater anatomical complexity.

The second dataset [18], which we refer to as Group Two, is collected using Leica Proveo 8 With EnFocus OCT Imaging System (Leica Microsystems GmbH). It consists of 311 B-scans, which are comprised of 1000 A-scans with an axial resolution of 1024 pixels, each with a scanning depth of 3.38 mm, containing 100 linearly acquired B-scans. Two different metallic needles are present in the dataset. The dataset of Group Two was labeled by two biomedical engineering experts, each with 2–3 years of experience in retinal image analysis. Likewise, The third dataset, which we refer to as the Unseen Dataset, utilizing a similar Zeiss system as Group One, contains five different porcine eyes for validation purposes and includes a glass needle in the tool class. Both Group One and Group Two include B-scans with corresponding label maps of the ILM, RPE, and tools as presented during each surgical phase. A representative visualization of a B-scan from a porcine eye, illustrating the ILM and RPE annotations, is provided in Fig. 1.

Unlike the first two datasets, Dataset 3 , addressed as Unseen Dataset contains sparsely labeled B-scans, with only a subset of frames per volume annotated. This dataset serves as a supplementary validation set for evaluating the robustness of the proposed method under conditions of limited ground truth availability and was independently annotated by an additional ophthalmologist with expertise in intraoperative imaging.

3. Results

3.1. Levene’s test

The analysis utilizing Levene’s test to assess the homogeneity of variances across different classes ILM, RPE, and tool within two distinct iOCT B-scan Group One and Two is presented in Table 1. Our observations delineate that variances within the B-scan groups for ILM and RPE are consistent, thus endorsing the application of ANOVA. However, noteworthy to address is a small imbalance in variance within Group Two for RPE was noted. Significant variance disparities across the B-scans for the tool in both iOCT B-scan groups necessitate a cautious application of ANOVA. This variability was anticipated, given the tools’ heterogeneous material composition and varying thicknesses, which induce non-uniform speckle patterns.

Table 1. Levene’s Test Results for Dataset Group One and Group Two a .

Class Levene’s inferential statistic Significance Conclusion
Dataset Group One

Tool 1.916 * Variances not equal
ILM 1.217 n.s. Variances equal
RPE 1.379 n.s. Variances equal

Dataset Group Two

Tool 8.060 *** Variances not equal
ILM 2.394 n.s. Variances equal
RPE 1.743 n.s. Variances equal
a

Significance levels: *p < 0.05, **p < 0.01, ***p < 0.001, n.s. = non-significant. Levene’s test compares the variance of pixel intensities within each class (tool, ILM, RPE) across B-scans. A significant p-value indicates variance inequality, suggesting heterogeneity in the class for both datasets.

3.2. ANOVA

The ANOVA conducted to study the variability between and within ILM, RPE, and tool classes across the two B-scan groups has demonstrated key insights, as detailed in Table 2. In dataset Group One, the comparison between tool and ILM manifested a considerable difference in speckle characteristics, underscored by a notable F-value of 13.421 and a P-value of 0.00025, suggesting pronounced disparities. Conversely, the RPE versus ILM comparison indicates similar character in speckle patterns amongst these classes.

Table 2. Statistical ANOVA Analysis of Pixel Distributions in B-scan Regions.

B-scan Group F-value P-value Class
1 1.34× 101 2.48× 10− 4 Needle ILM
1 6.20× 100 1.00× 10− 2 Needle RPE
1 1.86× 100 1.70× 10− 1 RPE ILM
2 2.39× 103 1.51× 10− 22 Needle ILM
2 1.19× 102 1.06× 10− 27 Needle RPE
2 2.04× 103 1.42× 10− 26 RPE ILM

In Group Two, a stark contrast was observed in all pairwise class comparisons as seen in Table 2, demonstrating significant statistical variances. These findings substantiate the premise of distinctive speckle characteristics between the classes, especially pronounced in Group Two. The statistical significance of these disparities validates the hypothesis that applying distinct distribution can form a segmentation by effectively characterizing speckle patterns.

3.3. Distribution fit for dataset Group One

3.3.1. ILM

For the ILM class in Group One, (referenced in Table 3 and Table 4) both the Cramér-von-Mises and Kolmogorov–Smirnov-Tests indicate that the Rayleigh distribution and the Gamma distribution showed high mean p-values. However, they both display p-values above 0.05 for the variance in Kolmogorov–Smirnov-Tests, where Rayleigh displayed a bigger variance p-value, which suggests a lower consistency and lower reliability within each dataset. The Normal distribution demonstrated a high mean p-value in Kolmogorov–Smirnov-Test and just above the limit of 5.58× 10− 2 with Cramér-von-Mises-Test and low variance p-value in Cramér-von-Mises and above the limit in Kolmogorov–Smirnov. Lognorm showed good fit in the CVM-Test but failed to go above and below the threshold for the Kolmogorov–Smirnov-Test. Among two-parameter distributions, the Burr distribution exhibited lower p-values than 0.05 in Kolmogorov–Smirnov, highlighting inconsistency. Similarly, the Nakagami distribution showed variability in its results, particularly in the Kolmogorov–Smirnov-Test.

Table 3. Cramér-von-Mises-Test results for distributions in dataset Group One.
Type Distribution P-value Distribution P-value Distribution P-value Class
mean Gamma 6.54× 10− 2 Rayleigh 1.95× 10− 1 Norm 5.58× 10− 2 ILM
variance Gamma 1.60× 10− 4 Rayleigh 2.77× 10− 4 Norm 1.38× 10− 4 ILM
mean Burr 2.97× 10− 2 Lognorm 5.68× 10− 2 Nakagami 5.58× 10− 2 ILM
variance Burr 5.54× 10− 5 Lognorm 1.38× 10− 4 Nakagami 1.38× 10− 4 ILM

mean Gamma 8.35× 10− 2 Rayleigh 2.58× 10− 1 Norm 7.18× 10− 2 RPE
variance Gamma 3.33× 10− 4 Rayleigh 1.93× 10− 3 Norm 2.57× 10− 4 RPE
mean Burr 3.39× 10− 2 Lognorm 7.24× 10− 2 Nakagami 7.18× 10− 2 RPE
variance Burr 7.77× 10− 5 Lognorm 2.54× 10− 4 Nakagami 2.57× 10− 4 RPE

mean Gamma 7.52× 10− 2 Rayleigh 2.13× 10− 1 Norm 6.48× 10− 2 Tool
variance Gamma 2.67× 10− 4 Rayleigh 3.15× 10− 3 Norm 1.85× 10− 4 Tool
mean Burr 2.99× 10− 2 Lognorm 6.47× 10− 2 Nakagami 6.44× 10− 2 Tool
variance Burr 1.06× 10− 4 Lognorm 1.91× 10− 4 Nakagami 1.92× 10− 4 Tool
Table 4. Kolmogorov-Smirnov-Test results for distributions in B-scan dataset Group One.
Type Distribution P-value Distribution P-value Distribution P-value Class
mean Gamma 1.12× 100 Rayleigh 1.45× 101 Norm 7.47× 10− 1 ILM
variance Gamma 2.65× 10− 1 Rayleigh 2.41× 101 Norm 1.28× 10− 1 ILM
mean Burr 1.23× 10− 1 Lognorm 7.76× 10− 1 Nakagami 7.48× 10− 1 ILM
variance Burr 8.43× 10− 3 Lognorm 1.31× 10− 1 Nakagami 1.30× 10− 1 ILM

mean Gamma 2.19× 100 Rayleigh 2.72× 101 Norm 1.48× 100 RPE
variance Gamma 1.38× 100 Rayleigh 1.68× 102 Norm 6.35× 10− 1 RPE
mean Burr 1.76× 10− 1 Lognorm 1.51× 100 Nakagami 1.48× 100 RPE
variance Burr 1.97× 10− 2 Lognorm 6.36× 10− 1 Nakagami 6.25× 10− 1 RPE

mean Gamma 2.33× 100 Rayleigh 2.54× 101 Norm 1.55× 100 Tool
variance Gamma 2.19× 100 Rayleigh 2.38× 102 Norm 9.85× 10− 1 Tool
mean Burr 1.47× 10− 1 Lognorm 1.57× 100 Nakagami 1.55× 100 Tool
variance Burr 7.40× 10− 3 Lognorm 9.98× 10− 1 Nakagami 1.01× 100 Tool

3.3.2. RPE

The Rayleigh and Gamma distribution demonstrated high mean p-values in both tests. However the Rayleigh distribution showed a high variance p-value for the KS-Test at 2.41× 101 . The Normal- , Lognormal-, and Nakagami distributions displayed moderate p-values in both mean and variability for CVM-Test but not for Kolmogorov–Smirnov. While the Burr distribution showed weaker performance with mean p-values of 3.39× 10− 2 in the Cramér-von-Mises-Test and above threshold for the variance p-value in KS-Test.

3.3.3. Tool

The tool class in Group One all distributions passed with mean p-value higher than 0.05 and a variance p-value of lower than 0.05 in the CVM-Test. In the Kolmogorov-Smirnov-Test, only Burr is above and below the threshold in mean and variance, respectively.

3.4. Distribution fit for Group Two

3.4.1. ILM

The analysis for Group Two as can be seen in (Table 5) and Table 6. The Lognormal distribution was the only distribution that performed above and below the threshold in mean and variance, respectively in the Cramér-von-Mises-Test. While the Gamma-, Rayleigh- and Normal distributions passed the mark in the Kolmogorov–Smirnov-Test.

Table 5. Cramér-von-Mises-Test results for distributions in B-scan Group Two.
Type Distribution P-value Distribution P-value Distribution P-value Class
mean Gamma 6.17× 100 Rayleigh 6.77× 100 Norm 1.68× 100 ILM
variance Gamma 5.36× 102 Rayleigh 1.55× 101 Norm 7.01× 10− 1 ILM
mean Burr 7.03× 101 Lognorm 5.14× 10− 1 Nakagami 7.03× 10− 1 ILM
variance Burr 2.77× 103 Lognorm 6.53× 10− 2 Nakagami 1.32× 10− 1 ILM

mean Gamma 3.06× 10− 1 Rayleigh 1.58× 101 Norm 3.62× 10− 1 RPE
variance Gamma 1.38× 100 Rayleigh 1.68× 102 Norm 6.35× 10− 1 RPE
mean Burr 6.98× 101 Lognorm 4.58× 10− 1 Nakagami 2.82× 10− 1 RPE
variance Burr 1.97× 10− 2 Lognorm 6.36× 10− 1 Nakagami 6.25× 10− 1 RPE

mean Gamma 2.68× 100 Rayleigh 9.90× 100 Norm 6.46× 10− 1 Tool
variance Gamma 2.19× 100 Rayleigh 2.38× 102 Norm 9.85× 10− 1 Tool
mean Burr 5.92× 101 Lognorm 1.20× 100 Nakagami 5.85× 10− 1 Tool
variance Burr 7.40× 10− 3 Lognorm 9.98× 10− 1 Nakagami 1.01× 100 Tool
Table 6. Kolmogorov-Smirnov-Test results for distributions in B-scan Group Two.
Type Distribution P-value Distribution P-value Distribution P-value Class
mean Gamma 7.11× 10− 2 Rayleigh 1.27× 10− 1 Norm 7.02× 10− 2 ILM
variance Gamma 1.41× 10− 2 Rayleigh 1.01× 10− 3 Norm 2.39× 10− 4 ILM
mean Burr 3.89× 10− 1 Lognorm 4.177× 10− 2 Nakagami 4.93× 10− 2 ILM
variance Burr 3.89× 10− 2 Lognorm 7.68× 10− 5 Nakagami 1.41× 10− 4 ILM

mean Gamma 3.35× 10− 2 Rayleigh 1.81× 10− 1 Norm 3.64× 10− 2 RPE
variance Gamma 1.17× 10− 4 Rayleigh 1.65× 10− 3 Norm 1.23× 10− 4 RPE
mean Burr 3.89× 10− 1 Lognorm 3.91× 10− 2 Nakagami 3.31× 10− 2 RPE
variance Burr 4.20× 10− 2 Lognorm 1.97× 10− 4 Nakagami 1.01× 10− 4 RPE

mean Gamma 6.10× 10− 2 Rayleigh 1.49× 10− 1 Norm 5.15× 10− 2 Tool
variance Gamma 5.00× 10− 3 Rayleigh 3.82× 10− 3 Norm 2.35× 10− 4 Tool
mean Burr 4.19× 10− 1 Lognorm 6.07× 10− 2 Nakagami 4.82× 10− 2 Tool
variance Burr 4.62× 10− 2 Lognorm 0.70× 10− 2 Nakagami 0.21× 10− 2 Tool

3.4.2. RPE

For the RPE class, the Burr distribution hits the mark in the CVM-Test. While Rayleigh and Burr perform above and below the threshold in mean and variance, respectively in the Kolmogorov–Smirnov-Test.

3.4.3. Tool

In the tool class, similarly as for RPE, the Burr distribution performs best in the CVM-Test. In the Kolmogorov–Smirnov-Test all distributions except Nakagami were above the 0.05 threshold for the mean p-value and below for the variance p-value.

3.5. Class evaluation across B-scan dataset groups

The Gamma and Rayleigh distributions consistently demonstrated strong performance across most classes and groups, with high mean p-values indicating a good overall fit. However, the Rayleigh distribution’s high variance p-values in some cases raise concerns about its consistency. Burr performed well in specific scenarios, particularly for the tool and RPE classes in Group Two, but its performance was less reliable for ILM. Lognormal was notable for its performance in the CVM test for Group Two’s ILM class, suggesting its potential in specific use cases. Meanwhile, Nakagami displayed the most variability and weaker overall fit.

3.6. Parameter extraction

The scatter plots of the fitted parameters for each distribution can be seen in Fig. 4. Nakagami, Rayleigh, and Lognormal all have one parameter to tune where the Rayleigh distribution parameters can be linearly separated into different classes. For the 2 parameter distributions, Normal, Burr, and Gamma distribution, the two more straightforward parameter separations seem to be Gamma and Normal distribution parameters. An example of this kind of classification of specific parameter values can be seen in Fig. 5, where we delineated the alpha parameter within the range of ten to thirty, corresponding to the RPE layers segmented and highlighted in green.

Fig. 4.

Fig. 4.

Scatterplots of statistical distribution parameters, fitted for dataset Group Two

Fig. 5.

Fig. 5.

On the left, an example iOCT scan from dataset Group One is shown. On the right, the corresponding calibrated Gamma distribution alpha parameter map is displayed, where alpha values between 10 and 30 are represented in green, values below 10 are shown in black, and the remaining values are depicted in blue.

Furthermore, Fig. 6 demonstrates how the parameter value classification can yield three distinct binary maps. Notably, due to some values being wrongly classified because of overlap, the resultant segmentation maps exhibit a degree of noise. This nuanced approach underscores the inherent variability within the data and highlights the need for meticulous parameter selection to enhance the segmentation outcome.

Fig. 6.

Fig. 6.

On the left, an example iOCT scan from dataset Group Two is presented. The three images on the right display the corresponding binary maps for the classes: ILM (green), RPE (light blue), and tool (purple), derived from calibrated Gamma distribution alpha and beta parameters. Colored markings represent ground truth segmentations overlaid for reference.

3.7. Validation

The comparison between dataset Group One and Two (used for decision tree development for binary map generation) and the Unseen Dataset (completely new, unseen data) highlights the method’s robustness. While dataset Group One and Two show high Dice scores and lower Hausdorff distances for all variations, as can be seen in Fig. 7, Unseen Dataset demonstrates a broad performance spectrum, emphasizing the challenges of segmenting new datasets. Three visual examples of the output from Group One can be seen in Fig. 7. The time

Table 7. DICE score and Hausdorff distance (pixels).

Ablation study results: Group One and Group Two

Training Variation Baseline Weak Labels B-scan and Param Gamma Param
DICE

Mean 0.96 0.95 0.96 0.97
Min 0.93 0.91 0.94 0.95
Max 0.99 0.99 0.99 0.99

Hausdorff

Mean 45 33 20 29
Min 4 4 4 0
Max 330 350 350 351

Fig. 7.

Fig. 7.

Examples of two B-scans from dataset Group One with outputs based on Baseline variation and training variation D, solely the Gamma parameters(our proposed method variation). In each example, the first image in the two rows is the raw B-scan, the second image is the ground truth segmentation, the third image is output based on training with variation A, and the last image in the row is the output from training with variation D.

To substantiate the reliability and generalizability of the proposed segmentation approach, we conducted a validation study using an independent dataset of five porcine eyes (Unseen Dataset), for which the algorithms were not previously trained and for which the statistical approach was not tested. The validation is designed to mirror how the algorithm and network would generalize on unseen patients. The validation commenced with applying Gamma distribution fitting to patches of the B-scans of the new porcine eyes, creating two patch-wise 2D matrices, one for parameter alpha and the other one for parameter beta. Subsequently, the tool, ILM, and RPE parameters were isolated based on the Random Forest algorithm previously trained on Group One and Group Two. The variations A, B, C, and D were then tested with the Unseen Dataset for the networks trained on dataset Group One and Group Two as can be seen in Table 8 the results with variation with B-scans at input (A) had the lowest mean DICE score of 0.10 and the biggest mean Hausdorff distance of 351 while the variation consisting of the Alpha and Beta parameter (D) matrices performed the best with a Mean DICE score of 0.90 and the lowest mean Hausdorff distance of 141. The variation consisting of weak binary maps as input (B) performed better than that of B-scans, Alpha matrix, and Beta matrix, with a mean DICE score of 0.87 compared to 0.75. The Segmentation speed below 4.5 milliseconds per B-scan shows real-time implementation possibility for all variations.

Table 8. DICE score, Hausdorff distance (pixels), B-scan segmentation speed (milliseconds) results.

Ablation study results from the Unseen Dataset

Training Variation A B C D
DICE

Mean 0.10 0.87 0.75 0.90
Min 0.05 0.63 0.20 0.85
Max 0.99 0.99 0.99 0.99

Hausdorff

Mean 351 163 232 141
Min 221 24 33 17
Max 475 474 475 474

B-scan Segmentation Speed (milliseconds) 4.21 4.17 4.19 4.15

The detailed analysis across various network variations and metrics emphasizes variation D, which utilizes Gamma parameters exclusively as the most effective. It outperforms others with the highest accuracy, DICE score, and lowest Hausdorff distance, as detailed in Table 8. Interestingly, while solely using Gamma parameters led in performance, other variations, including Weak labels (B) and the combination of B-scans and Gamma parameters (C), also demonstrated valuable segmentation capabilities. The visualization of the resulting segmentations for the Unseen Dataset can be seen in Fig. 8.

Fig. 8.

Fig. 8.

Examples of two B-scans from the Unseen Dataset with outputs based on the Baseline variation (variation A) and with solely the Gamma parameters (variation D, our proposed method variation). In each example, the first image in the two rows is the raw B-scan, the second image is the ground truth segmentation, the third image is output based on training with the Baseline variation, and the last image in the row is the output from training with our proposed method.

This comprehensive analysis showcases our segmentation method’s nuanced and adaptable nature, especially when using Gamma parameters and weak labels. The method’s demonstrated precision and adaptability promise advancements, paving the way for clinical integration.

4. Discussion

The statistical analysis of the speckle characteristics across different tissues and structures has proven crucial in differentiating the retinal layers, the surgical tool, and the background. The parameters derived from the best-fitting distributions vary according to the unique scattering properties of each class, which directly supports the model’s ability to segment these structures accurately. Our findings indicate that Rayleigh, Normal, and Gamma distributions also achieved an elegant separation between the parameter values based on class belonging, simplifying the segmentation process with easy value isolation to create binary maps. The analysis, backed by prior research on biological tissues, reveals that the Gamma distribution provides a reasonable fit with acceptable variability and good parameter value separation, which is a commendable balance between accuracy and reduced manual labor. This balance is pivotal as it directly impacts the practicality of iOCT applications in surgical settings, where both low manual labor and precision are important. Hence, steps two and three of the pipeline shown in Fig. 2 were processed with the Gamma distribution. By incorporating speckle statistics directly into the segmentation process, we enhance the method’s adaptability to real-time intraoperative imaging, where noise and tissue variability are inevitable. This approach also allows for segmentation in scenarios where traditional methods, which rely on intrinsic features such as pixel intensity or spatial relationships between structures, often fail due to intraoperative environments’ dynamic and unpredictable nature.

While the primary focus of our study was to demonstrate the feasibility and generalizability of statistical speckle analysis for iOCT segmentation, it is noteworthy that the frame rate of our method aligns well with the state-of-the-art speeds reported in the literature. With a processing speed of 4.18 ms per B-scan, as can be seen in Table 9, our approach achieves a frame rate of approximately 240 frames per second (fps), which is well within the operational range of typical iOCT devices that generally operate at frame rates between 20 to 30 fps [56,57]. Importantly, the reported speed includes both inference from the deep learning model and necessary preprocessing steps but does not account for potential data transfer delays from the imaging device, as these may vary depending on the system setup. This demonstrates that our method delivers robust segmentation and operates efficiently in real-time scenarios, further supporting its applicability in intraoperative settings.

Table 9. Comparison of OCT and iOCT Segmentation Speeds and Frame Rates.

Method ms/B-scan Frame Rate (FPS) Type

Pseudo-real-time [53] 13.76 ms 73 FPS OCT
Graph cut to DL [54] 3 ms 333 FPS OCT
PseudoSegRT [37] <1 ms >1000 FPS iOCT
Deformation-aware [55] 20 ms 50 FPS iOCT
Proposed Method 4.18 ms 240 FPS iOCT

Our study highlights the power of the Gamma distribution in accurately segmenting retinal layers, as demonstrated by its consistent performance across different B-scans. The results from the Unseen Dataset, previously unseen data, underscore the method’s ability to generalize to new datasets without requiring retraining. This is critical in clinical settings where OCT devices, imaging conditions, and patient anatomy vary.

The ablation study results strongly support our hypothesis that using statistical speckle analysis, as in training with only Gamma parameters (version D), enables the model to generalize across unseen iOCT devices and surgically manipulated retinal structures without the need for retraining. This makes it an ideal candidate for segmenting retinal layers in unseen samples and demonstrates the potential of our method to be deployed across different iOCT systems, providing consistent segmentation performance regardless of the machine or patient-specific variability.

Another important finding from this study is the potential use of Weak labels generated from the Random Forest parameter isolation process. The ability to train models effectively with these Weak labels opens the door for automating large-scale data labeling, reducing manual intervention, and further enhancing clinical applicability.

However, one limitation of the current method lies in its inability to differentiate between surgical tools within the OCT scans, particularly when dealing with semi-transparent tools, the Gamma distribution struggled to segment the thin, semi-transparent needle in our Unseen Dataset. This challenge is exacerbated when tools are made from materials like glass, which present less prominent reflections in OCT images. While metallic tools are easier to segment with their stronger reflections, the varying signal strength from different materials poses a significant obstacle. Additionally, the process of manually optimizing the statistical parameters for each new tool type is labor-intensive and time-consuming. Each new tool type introduced into the surgical field requires an adjustment of the statistical parameters to ensure accurate representation within the OCT images. To address this, future work should focus on automating the parameter-finding process. Developing algorithms that can dynamically adjust to new tools would reduce the reliance on manual optimization and make the method more scalable for use in diverse surgical environments. Automation in this regard would significantly enhance the clinical applicability of our OCT imaging methodology by enabling seamless adaptation to a broader range of surgical tools and procedures.

While the method has shown promise in porcine eyes, the clinical relevance of these findings, especially the method’s applicability to human eyes, must be explored further. The anatomical similarities between porcine and human retinas provide a strong foundation for this research. Still, it is crucial to acknowledge the inherent differences, such as the number of retinal layers in iOCT scans. Though the primary focus of this research is to investigate the feasibility of segmenting retinal layers based on the scattering properties of the tissue, future iterations of this work should aim to improve time efficiency and further reduce manual labor. As proof of concept, this study has shown that statistical, anatomical, and physical approaches can be harnessed for segmentation.

5. Conclusion

In conclusion, our study demonstrates that using speckle statistics, particularly the Gamma distribution, for iOCT segmentation can overcome some limitations associated with conventional or existing machine learning-based methods. This approach provides a robust and generalizable solution for intraoperative retinal segmentation of porcine eyes, with promising implications for human retinal segmentation in clinical settings. It can potentially improve surgical outcomes by providing the means for accurate, real-time visualizations across various surgical scenarios. Future work will focus on enhancing the method’s performance with transparent tools and further automating the parameter selection process to maximize clinical applicability. Additionally, future research will aim to extend this work to human eyes, addressing the complexity of numerous different retinal layers in human retinas. This extension is crucial for validating the method’s potential for clinical integration and real-time application in human ophthalmic surgeries.

Funding

Bavarian Research Foundation 10.13039/501100002745 (BFS) ( 541 AZ-1569-22).

Disclosures

The authors declare no conflicts of interest.

Data availability

The data that support the findings of this article are not publicly available at this time. They can be requested from the author at kristina.mach@tum.de upon reasonable request.

References

  • 1.Sastry A., Li J., Raynor W., et al. , “Microscope-integrated oct-guided volumetric measurements of subretinal blebs created by a suprachoroidal approach,” Trans. Vis. Sci. Tech. 10(7), 24 (2021). 10.1167/tvst.10.7.24 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Ishikawa H., Kim J., Friberg T. R., et al. , “Three-dimensional optical coherence tomography (3d-oct) image enhancement with segmentation-free contour modeling c-mode,” Invest. Ophthalmol. Vis. Sci. 50(3), 1344–1349 (2009). 10.1167/iovs.08-2703 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Ehlers J., Modi Y., Pecen P., et al. , “The discover study 3-year results: Feasibility and usefulness of microscope-integrated intraoperative oct during ophthalmic surgery,” Ophthalmology 125(7), 1014–1027 (2018). 10.1016/j.ophtha.2017.12.037 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Uchida A., Srivastava S. K., Ehlers J. P., “Update on the intraoperative oct: Where do we stand?” Curr. Ophthalmol. Rep. 6(1), 24–35 (2018). 10.1007/s40135-018-0160-9 [DOI] [Google Scholar]
  • 5.Rachitskaya A. V., Yuan A., Marino M. J., et al. , “Intraoperative OCT imaging of the Argus II retinal prosthesis system,” Ophthalmic Surgery, Lasers Imaging Retin. 47(11), 999–1003 (2016). 10.3928/23258160-20161031-03 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Heinrich D., Bohnacker S., Nasseri M. A., et al. , “Intraoperative optische kohärenztomographie bei explorativer vitrektomie an patienten mit glaskörperblutung – eine fallserie [intraoperative optical coherence tomography in explorative vitrectomy in patients with vitreous haemorrhage - a case series],” Der Ophthalmol. 116(3), 261–266 (2019). In German. 10.1007/s00347-018-0665-5 [DOI] [PubMed] [Google Scholar]
  • 7.Ehlers J. P., Khan M., Petkovsek D., et al. , “Outcomes of intraoperative OCT-assisted epiretinal membrane surgery from the PIONEER study,” Ophthalmol. Retin. 2(4), 263–267 (2018). 10.1016/j.oret.2017.05.006 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Ehlers J. P., Petkovsek D. S., Yuan A., et al. , “Intrasurgical assessment of subretinal tPA injection for submacular hemorrhage in the PIONEER study utilizing intraoperative OCT,” Ophthalmic Surgery, Lasers Imaging Retin. 46(3), 327–332 (2015). 10.3928/23258160-20150323-05 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Lee L. B., Srivastava S. K., “Intraoperative spectral-domain optical coherence tomography during complex retinal detachment repair,” Ophthalmic Surgery, Lasers Imag. 42(6), e71–e74 (2011). 10.3928/15428877-20110804-05 [DOI] [PubMed] [Google Scholar]
  • 10.Toygar O., Riemann C. D., “Intraoperative optical coherence tomography in macula involving rhegmatogenous retinal detachment repair with pars plana vitrectomy and perfluoron,” Eye 30(1), 23–30 (2016). Epub 2015 Dec 11. 10.1038/eye.2015.230 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Itoh Y., Inoue M., Koto T., et al. , “Alterations of foveal architecture during vitrectomy for myopic retinoschisis identified by intraoperative optical coherence tomography,” Ophthalmologica 242(2), 87–97 (2019). 10.1159/000500362 [DOI] [PubMed] [Google Scholar]
  • 12.Kumar A., Ravani R., Mehta A., et al. , “Outcomes of microscope-integrated intraoperative optical coherence tomography-guided center-sparing internal limiting membrane peeling for myopic traction maculopathy: a novel technique,” Int. Ophthalmol. 38(4), 1689–1696 (2018). 10.1007/s10792-017-0644-x [DOI] [PubMed] [Google Scholar]
  • 13.Bruyère E., Philippakis E., Dupas B., et al. , “Benefit of intraoperative optical coherence tomography for vitreomacular surgery in highly myopic eyes,” Retina 38(10), 2035–2044 (2018). 10.1097/IAE.0000000000001827 [DOI] [PubMed] [Google Scholar]
  • 14.Ronneberger O., Fischer P., Brox T., “U-net: Convolutional networks for biomedical image segmentation,” in Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015 , vol. 9351 of Lecture Notes in Computer Science Navab N., Hornegger J., Wells W., Frangi A., eds. (Springer, 2015), pp. 234–241. [Google Scholar]
  • 15.Roy A. G., Conjeti S., Karri S. P. K., et al. , “Relaynet: Retinal layer and fluid segmentation of macular optical coherence tomography using fully convolutional networks,” Biomed. Opt. Express 8(8), 3627–3642 (2017). 10.1364/BOE.8.003627 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Xu P., Ourak M., Borghesan G., et al. , “Fast oct-based needle tracking for retinal microsurgery using dynamic spiral scanning,” IEEE Trans. Med. Robot. Bionics 6(4), 1502–1511 (2024). 10.1109/TMRB.2024.3464693 [DOI] [Google Scholar]
  • 17.Sommersperger M., Weiss J., Nasseri M. A., et al. , “Real-time tool to layer distance estimation for robotic subretinal injection using intraoperative 4d oct,” Biomed. Opt. Express 12(2), 1085–1104 (2021). 10.1364/BOE.415477 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Dehghani S., Sommersperger M., Zhang P., et al. , “Robotic navigation autonomy for subretinal injection via intelligent real-time virtual ioct volume slicing,” in 2023 IEEE International Conference on Robotics and Automation (ICRA), (IEEE, 2023), pp. 4724–4731. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Stuart A., Writer C., “Intraoperative oct: An emerging technology,”EyeNet Magazine (2018). Accessed: 2025-01-23.
  • 20.Baghaie A., Yu Z., D’Souza R. M., “State-of-the-art in retinal optical coherence tomography image analysis,” Quant. Imaging Med. Surg. 5(4), 603–617 (2015). 10.3978/j.issn.2223-4292.2015.07.02 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Spaide R. F., Fujimoto J. G., Waheed, et al. , “Image artifacts in optical coherence angiography,” Retina 35(11), 2163–2180 (2015). 10.1097/IAE.0000000000000765 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Huang D., Swanson E., Lin C., et al. , “Optical coherence tomography,” Science 254(5035), 1178–1181 (1991). 10.1126/science.1957169 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Aumann S., Donner S., Fischer J., Optical Coherence Tomography (OCT): Principle and Technical Realization (Springer, 2019), pp. 59–85. [PubMed] [Google Scholar]
  • 24.Ciarmatori N., Pellegrini M., Nasini F., et al. , “The state of intraoperative oct in vitreoretinal surgery: Recent advances and future challenges,” Tomography 9(5), 1649–1659 (2023). 10.3390/tomography9050132 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Mittal P., Bhatnagar C., “Effectual accuracy of oct image retinal segmentation with the aid of speckle noise reduction and boundary edge detection strategy,” J. Microsc. 289(3), 164–179 (2023). 10.1111/jmi.13152 [DOI] [PubMed] [Google Scholar]
  • 26.Koresh H. J. D., Chacko S., Periyanayagi M., “A modified capsule network algorithm for oct corneal image segmentation,” Pattern Recognit. Lett. 143, 104–112 (2021). 10.1016/j.patrec.2021.01.005 [DOI] [Google Scholar]
  • 27.Zhou Y., Li J., Wang M., et al. , “Dhnet: High-resolution and hierarchical network for cross-domain oct speckle noise reduction,” Med. Phys. 49(9), 5914–5928 (2022). 10.1002/mp.15712 [DOI] [PubMed] [Google Scholar]
  • 28.Nienhaus J., Matten P., Anja Britten J. S., et al. , “Live 4d-oct denoising with self-supervised deep learning,” Sci. Rep. 13(1), 5760 (2023). 10.1038/s41598-023-32695-1 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Chiu S.-J., Li X., Nicholas P., et al. , “Automatic segmentation of seven retinal layers in sdoct images congruent with expert manual segmentation,” Opt. Express 18(18), 19413–19428 (2010). 10.1364/OE.18.019413 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Dodo B. I., Li Y., Kaba D., et al. , “Retinal layer segmentation in optical coherence tomography images,” IEEE Access 7, 152388–152398 (2019). 10.1109/ACCESS.2019.2947761 [DOI] [Google Scholar]
  • 31.Ali M., Hadj B., “Segmentation of oct skin images by classification of speckle statistical parameters,” in 2010 IEEE International Conference on Image Processing, (2010), pp. 613–616. [Google Scholar]
  • 32.Lindenmaier A. A., Conroy L., Farhat G., et al. , “Texture analysis of optical coherence tomography speckle for characterizing biological tissues in vivo,” Opt. Lett. 38(8), 1280–1282 (2013). 10.1364/OL.38.001280 [DOI] [PubMed] [Google Scholar]
  • 33.Jesus D. A., Iskander D. R., “Age-related changes of the corneal speckle by optical coherence tomography,” in 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), (2015), pp. 5659–5662. [DOI] [PubMed] [Google Scholar]
  • 34.Jesus D. A., Iskander D. R., “Assessment of corneal properties based on statistical modeling of oct speckle,” Biomed. Opt. Express 8(1), 162–176 (2017). 10.1364/BOE.8.000162 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Niemczyk M., Danielewska M. E., Kostyszak M. A., et al. , “The effect of intraocular pressure elevation and related ocular biometry changes on corneal oct speckle distribution in porcine eyes,” PLoS One 16(3), e0249213 (2021). 10.1371/journal.pone.0249213 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Silva V. B., Jesus D. A., Klein S., et al. , “Signal-carrying speckle in optical coherence tomography: a methodological review on biomedical applications,” J. Biomed. Opt. 27(03), 030901 (2022). 10.1117/1.JBO.27.3.030901 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Huang Y., Asaria R., Stoyanov D., et al. , “Pseudosegrt: efficient pseudo-labelling for intraoperative OCT segmentation,” Int. J. CARS 18(7), 1245–1252 (2023). Epub 2023 May 26. 10.1007/s11548-023-02928-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Rogers J. D., “Measurement of optical scattering properties of retinal layers,” Invest. Ophthalmol. Vis. Sci. 60, 171 (2019). [Google Scholar]
  • 39.Irigoyen C., Alonso A. A., Sanchez-Molina J., et al. , “Subretinal injection techniques for retinal disease: A review,” J. Clin. Med. 11(16), 4717 (2022). 10.3390/jcm11164717 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Lowry R., “Concepts and applications of inferential statistics,” (2008).
  • 41.Jones E., Oliphant T., Peterson P., et al. , “SciPy: Open source scientific tools for Python,” (2001).
  • 42.Levene H., Robust Tests for Equality of Variances (Stanford University Press, 1960). [Google Scholar]
  • 43.Grzywacz N. M., de Juan J., Ferrone C., et al. , “Statistics of optical coherence tomography data from human retina,” IEEE Trans. Med. Imaging 29(6), 1224–1237 (2010). Epub 2010 Mar 18. 10.1109/TMI.2009.2038375 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Massey F. J., “The kolmogorov-smirnov test for goodness of fit,” J. Am. Stat. Assoc. 46(253), 68–78 (1951). 10.1080/01621459.1951.10500769 [DOI] [Google Scholar]
  • 45.Anderson T. W., “On the distribution of the two-sample cramér-von mises criterion,” Ann. Math. Statist. 33(3), 1148–1159 (1962). Accessed: May 2, 2024. 10.1214/aoms/1177704477 [DOI] [Google Scholar]
  • 46.Shao J., Mathematical Statistics (Springer, 2003), 2nd ed. [Google Scholar]
  • 47.Conover W. J., Practical Nonparametric Statistics (John Wiley and Sons, 1999), 3rd ed. [Google Scholar]
  • 48.Kerfoot E., Clough J., Oksuz I., et al. , “Left-ventricle quantification using residual u-net,” in Statistical Atlases and Computational Models of the Heart. Atrial Segmentation and LV Quantification Challenges. STACOM 2018 , vol. 11395 of Lecture Notes in Computer Science Pop M., et al., eds. (Springer, Cham, 2019). [Google Scholar]
  • 49.Weiss J., Sommersperger M., Nasseri A., et al. , “Processing-aware real-time rendering for optimized tissue visualization in intraoperative 4d oct,” in Medical Image Computing and Computer Assisted Intervention – MICCAI 2020 , (Springer International Publishing, 2020), pp. 267–276. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Prince J. H., Ruskell G. L., “The use of domestic animals for experimental ophthalmology,” Am. J. Ophthalmol. 49(5), 1202–1207 (1960). 10.1016/0002-9394(60)91636-6 [DOI] [PubMed] [Google Scholar]
  • 51.Beauchemin M. L., “The fine structure of the pig’s retina,” Albrecht Von Graefes Arch Klin Exp. Ophthalmol. 190(1), 27–45 (1974). PMID: 4547923. 10.1007/BF00414333 [DOI] [PubMed] [Google Scholar]
  • 52.Delori F. C., Parker J. S., Mainster M. A., “Light levels in fundus photography and fluorescein angiography,” Vision Res. 20(12), 1099–1104 (1980). 10.1016/0042-6989(80)90046-2 [DOI] [PubMed] [Google Scholar]
  • 53.Janpongsri W., Huang J., Ng R., et al. , “Pseudo-real-time retinal layer segmentation for high-resolution adaptive optics optical coherence tomography,” J. Biophotonics 13(8), e202000042 (2020). 10.1002/jbio.202000042 [DOI] [PubMed] [Google Scholar]
  • 54.Borkovkina S., Janpongsri W., Camino A., et al. , “Real-time retinal layer segmentation of oct images: from graph cut to deep learning (conference presentation),” in Proceedings of SPIE Medical Imaging: Image Processing , vol. 11228 (2020), p. 73. [Google Scholar]
  • 55.Arikan D., Zhang P., Sommersperger M., et al. , “Real-time deformation-aware control for autonomous robotic subretinal injection under ioct guidance,” arXiv (2024). 10.48550/arXiv.2411.06557 [DOI] [PMC free article] [PubMed]
  • 56.Microsystems L., “Enfocus ultra-hd intraoperative oct specifications,” (2025).
  • 57.Technology Z. M., “Rescan 700: Integrated intraoperative oct for opmi lumera 700,” Microsc. Today 2379, 132 (2025).. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The data that support the findings of this article are not publicly available at this time. They can be requested from the author at kristina.mach@tum.de upon reasonable request.


Articles from Biomedical Optics Express are provided here courtesy of Optica Publishing Group

RESOURCES