## Abstract

The eukaryotic cytoskeleton plays essential roles in cell signaling, trafficking, and motion. Recent work towards defining the temporal and spatial dynamics of cytoskeletal organization, including as a function of cell status, has utilized quantitative analysis of cytoskeletal fluorescence images as a standard approach to define cytoskeletal function. However, due to the uneven spatial distribution of the cytoskeleton, including varied shape and unstable binding efficiency to staining markers, these approaches may not segment cytoskeletal fractions accurately. Additionally, quantitative approaches currently suffer from human bias as well as information loss caused by *z*-axis projection of raw images. To overcome these obstacles, we developed Implicit Laplacian of Enhanced Edge (ILEE), a cytoskeletal component segmentation algorithm, which uses an 2D/3D-compatible, unguided local thresholding approach, therefore providing less biased and stable results. Empowered by ILEE, we constructed a Python based library for automated quantitative analysis of cytoskeleton images, which computes cytoskeletal indices that covers density, bundling, severing, branching, and directionality. Comparing to various classic approaches, ILEE library generates descriptive data with higher accuracy, robustness, and efficiency. In addition to the analysis described herein, we have developed an open-access ILEE library for community use.

## Introduction

Higher eukaryotes have evolved complex mechanisms to organize and co-regulate a multitude of cellular processes, including growth, development, movement, division, and response to environmental stimuli. For example, plants coordinate growth with resistance against abiotic and biotic stress by engaging numerous systemic signaling processes, among which the cytoskeleton plays an indispensable role^{1}. To facilitate these processes and ensure robust and highly specific responses to changes in cell status, plants utilize two types of cytoskeleton – microfilaments and microtubules – to connect intercellular signaling to extracellular environments. Structurally, both of them are chains dynamically assembled from monomeric subunits, named global actin and tubulin respectively, and are involved in ceaseless events of polymerization and depolymerization, bundling, severing, branching^{2,3}, which is commonly referred to as cytoskeletal dynamics. Spatially, the cytoskeleton forms a web-like matrix within the cytoplasm, and through its vast connectivity, functionally links the plasma membrane, numerous organelles, vesicles, and cellular environments – the sum of which serves as a cell surveillance and signaling platform that functions as a structural and information network^{4}. As a structural component of the cell, the cytoskeleton controls numerous physical processes such as movement, shaping, cellular trafficking, and intercellular communication ^{5}. It also provides the force required for chromosome separation and plasma membrane division during mitosis and meiosis^{6}. In addition to its role within the cytoplasm, the cytoskeleton is also required for a variety of functions within the nucleus, including RNA polymerase recruitment, transcription initiation, and chromosome scaffolding^{7},

Over the past several decades, confocal microscopy-based methods using fluorescence markers have been developed to monitor changes in cytoskeletal organization^{8}. While showing advantages in real-time observation and intuitive image presentation, in general, these approaches possess critical limitations – namely, they are subjective to interpretation from captured images, which potentially involves human bias. As a step to remedy this limitation, the emergence of computational algorithm-based analyses offers a solution to describe the quantitative features of cytoskeletal architecture with reduced human bias. However, while early studies introduced the concept of using generalizable image processing pipelines^{9,10} to transfer the task of evaluation away from the user and into a series of computer-based quantitative indices, several key bottlenecks emerged. First, most of the quantitative algorithms described to date are limited to 2D images. As a result, these approaches require the user to manually generate z-axis projections from raw data, resulting in an incredible amount of information loss, especially within the perpendicular portion of cytoskeleton. Second, many approaches require users to manually segment cytoskeletal components from the images, resulting in sampling bias. Lastly, the accuracy and robustness of current algorithms greatly varies among different types of biological samples or microscope operators with different setting preference. This latter hurdle imposes a considerable disparity in the algorithm performance for plant (usually with curvy and spherical cytoskeleton) and animal (usually straight and complanate) samples. In fact, while sample source greatly impacts our ability to evaluate the features of cytoskeletal function across all eukaryotes, the vast majority of current approaches are developed based on cytoskeletal images of animal cells, which indicates potential systemic bias if transplanted to other types of sample, such as plant.

Previous work described the development of a global-thresholding-based pipeline to define and evaluate two key parameters of cytoskeleton filament organization in living plant cells: cytoskeletal density, defined by *occupancy*, and bundling, defined by statistical *skewness* of fluorescence^{11}. Interestingly, while it utilizes manual global thresholding (MGT), which can potentially introduce certain level of user-bias, it still outperforms standardized adaptive/automatic global or local thresholding approaches such as Otsu^{12} or Niblack^{13}. As a further advance of this early work, Higaki and colleagues developed the use of coefficient of variation (*CV*) of fluorescence to quantify the level of filament bundling, which improved the robustness and utility of the algorithm^{14}. However, not only does this pipeline consumes considerable amount of time and effort from users for massive sample processing, but it also left unaddressed two key issues of rigor in image processing and analysis: information loss and human bias.

In the current study, we developed implicit Laplacian of enhanced edge (ILEE), a 2D/3D compatible unguided local thresholding algorithm for cytoskeletal segmentation and analysis, which is based on the native value, first-order derivative (i.e., gradient), and second-order derivative (i.e., Laplacian) of the image (see Fig. 1). The research described herein supports ILEE as a superior quantitative imaging platform, one that overcomes current limitations related to information loss through dimensional reduction, human bias, and inter-sample instability. As shown, ILEE can accurately possesses cytoskeleton samples with a high dynamic range of fluorescence brightness and thickness, such as plant live sample. As a key advance in the development of ILEE, we further established an ILEE-based Python library for the fully-automated quantitative analysis of 14 cytoskeletal indices within 5 primary classes: density, bundling, connectivity, branching, and anisotropy. This platform not only enables the acquisition and evaluation of key actin filament parameters with high accuracy from both projected 2D and native 3D images, but also improves the accessibility to a broader range of biologically-relevant states, including polymerization/depolymerization, bundling, severing, branching, and directional regulation. Herein, we introduce the core ILEE algorithm, and with this, propose several novel indices reflecting cytoskeletal dynamics. Using a defined series of images from multiple biological replicates of pathogen-infected plant cells, we demonstrate the performance of this algorithm by multi-perspective comparative analysis. Further, we provide evidence that supports the further advancement of 3D-based cytoskeletal computational approaches – a significant enhancement over currently available 2D-based approaches. Our library, namely ILEE_CSK, is publicly released at GitHub (https://github.com/phylars/ILEE_CSK).

## Results

### ILEE pipeline and image acquisition

The raw image generated by laser scanning confocal microscopy is obtained through detecting in-focus photons by a sensor from each resolution unit on the focal plane. Since the cytoskeleton is a 3D structure permeated throughout the cell, the current approach to capture filament organization and architectural parameters is to scan the pixels of each plane on the z-axis, independently, at regular intervals within a given depth, and then to combine these (i.e., stacks) into a 3D image. However, due to limited computational biological resource, most studies have exclusively employed the z-axis projected 2D image, which results in substantial information loss, as well as systemic bias into downstream analyses.

In our proposed algorithm, we integrated both 2D and 3D data structures into the same processing pipeline to solve the aforementioned conflict (Fig. 1a); in short, this enables automatic processing and evaluation of both traditional 2D and native 3D z-stack image analysis. As shown in Fig. 1b, cytoskeleton segmentation using ILEE requires 3 inputs: an edge-enhanced image, a global gradient threshold that recognizes the edges of the captured cytoskeletal components, and the Laplacian smoothing coefficient *K* (described below). Next, a local threshold image is generated via ILEE, and the pixels/voxels with values above the threshold image at the same coordinates are classified as cytoskeletal components. The output of this is the generation of the binary image (Fig. 1c). Once acquired, the binary image is further skeletonized ^{15} to enable the downstream calculation of numerous cytoskeleton indices, the sum of which comprise the quantitative features of cytoskeletal dynamics (Fig. 1c). Additionally, because the 2D and 3D modes share a common workflow, all the calculated cytoskeleton indices also share the definition for both modes, regardless of the difference in dimensional spaces. This additional feature enables a horizontal comparison of both modes by the user, which will significantly contribute to the community by providing massive datasets to examine the performance of native 3D data structure for quantitative analysis of cytoskeletal organization. In general, the ultimate goal of our algorithm is to construct a pipeline that enables the automated detection of the cytoskeleton from complex biological images in an unbiased manner, and further compute cytoskeletal parameters (indices) as accurate descriptions of the cytoskeletal structure.

### Image decomposition and processing strategy

One of the central problems for automated cytoskeletal image processing is how to accurately recognize cytoskeletal components – a task that is currently extremely challenging because object pixels (i.e., cytoskeleton component) generally have a high dynamic range of signal intensity within and among individual samples, due to varied bundle thickness, concentration of fluorescent dye, and its binding efficiency. As a framework to further understand this challenge, the value of a single pixel captured using confocal microscopy is conceptually comprised of three components: 1) the true fluorescence, that which is emitted by the dye molecules within the pixel, 2) the diffraction signal transmitted from neighboring space, and 3) the ground noise generated by the sensor of the imaging system (Fig. 2a). During confocal imaging, the ground noise is a constant due to fixed setting of photon sensors, while the diffraction signal is positively corelated with the local fluorescence. Therefore, an ideal actin segregation algorithm will be a local thresholding approach that refers to both ground noise and local signal intensity.

### Identification of coarse background

In order to identify ground noise and locate the background for downstream analyses (e.g., fine thresholding), we designed an algorithm that calculates a global threshold using the morphological features of the ground noise; namely, non-connected negative element scanning (NNES; Fig. 2b). In brief, NNES calculates the total number of non-connected negative elements at different global thresholds, resulting in the identification of a representative value with a maximum non-connected negative element count (Fig. 2b, (i)). The global threshold for the coarse background (Fig. 2b, (iii)) will be determined using a linear model trained by the representative value rendered by NNES and manual global thresholding (MGT), a global threshold determined by operators experienced in cytoskeleton image analysis (Supplemental Fig. 1 and 2). NNES can maintain stability and accuracy over different samples that varies in distribution of native pixel value, because ground noise is the image component with the lowest value that is subject to normal distribution and generally does not interfere with true fluorescence signal. Another accessible method is to directly use peak-of-frequency of the image as a representative value to train a model. However, this approach is less accurate because the interval near the theoretical peak is always turbulent and non-monotone, a limitation potentially due to the pollution of diffracted light (Supplemental Fig. 1).

### Cytoskeleton segmentation by ILEE

The core strategy of ILEE is to accurately identify the edge of all cytoskeletal filament components and apply an implicit Laplacian smoothing on the selected edge, which generates a threshold image of low gradient areas that smoothly connects to the edge (Fig. 3a). As shown, the edge of the cytoskeletal component is smoothed and elongated using a significant difference filter (SDF; Supplemental Fig. 3) and a Gaussian filter, the sum of which serves to enhance the continuity of the edge and contributes to the accuracy of edge detection (Fig. 1b and 3a). Based on this process of our computational pipeline, we named our algorithm Implicit Laplacian of Enhanced Edge (ILEE). This algorithm builds a linear system based on Laplacian operators to achieve local adaptive thresholding for edges of cytoskeletal components. In leveraging the spectral characteristics of Laplacian operators, we could filter out high-frequency noise while preserving salient geometric features of individual actin filaments. To do this, and in brief, we first calculated the gradient of the whole image. Then, based on an estimated global threshold of the gradient magnitude (*g*_{thres}) over the image, we identified pixels above *g*_{thres} as boundary elements (*I*_{edge}) with high gradient magnitude to preserve during implicit Laplacian smoothing (Fig. 3a, 2.1). Accordingly, we constructed a selection matrix *S*, a diagonal matrix with *i*-th diagonal entry being 1 if the *i*-th pixel has a norm of the gradient above *g*_{thres}. The output of this approach is marking all of the elements that we hope to keep as the boundary of cytoskeleton filament, which serves as a guidance for local thresholding. Using this approach, *I*_{edge} can be mathematically redefined as shown in Fig 3a, equations 2.2.1 and 2.2.2, where *L* is the Laplacian matrix and *K*, or implicit Laplacian smoothing coefficient, is a weight that adjusts the influence of Laplacian operator. The local threshold image can therefore be rendered by solving the linear equation shown in Fig. 3b, 2.2.3. A detailed mathematical algorithm is introduced in *Methods*.

For a given image input, the performance of ILEE depends on two parameters: *g*_{thres}, which defines the edge, and *K*, which determines the weight of detail (i.e., high frequency components) to be filtered. To calculate the optimal *g*_{thres} for an input image, we used pixel values of the area identified as coarse background by NNES. Since the ground noise is subjected to normal distribution, we hypothesized that there is a certain deducible statistical relationship between the image gradient, defined by Scharr operator^{16}, and the native values of pixels within the coarse background. Using a normal random array that simulates the 2D or 3D data structure of confocal microscopy, we demonstrate that the distribution of the background gradient magnitude is also normal-like, and both mean (*μ*_{G}) and standard deviation (*σ*_{G}) of the gradients are directly proportional to the standard deviation of their native pixel values (*σ*_{cbg}), and we calculate the proportionality coefficient (see Supplemental Fig. 4). For 3D mode, since the pixel size on the x- and y-axis is different from that of the z-axis, the proportionality coefficient of *μ*_{G} and *σ*_{G} over *σ*_{cbg} will vary for different ratio of x-y unit : z unit (see Supplemental Fig. 5). To solve this problem, we simulated artificial 3D noise images and trained a multi-interval regression model that accurately (R^{2} > 0.999) calculates the proportionality coefficient of *μ*_{G} and *σ*_{G} over *σ*_{cbg} for different x-y : z ratio of the voxel.

Finally, using this approach and randomly selected actin image samples, we trained a model, *g*_{thres} = *μ*_{G} + *k* (*σ*_{cbg}) ∗ *σ*_{G}, to determine the *g*_{thres} as ILEE input (Supplemental Fig. 6).

To determine the appropriate setting of *K*, we first tested how different *K* values influence the result of the local threshold image (*I*_{thres} of Fig. 3a). As shown in Supplemental Figure 7a, at the optimal *g*_{thres}, a low value of *K* generated an *I*_{thres} that is highly consistent with the selected edge. When *K* increases, the total threshold image shifted towards the average value of the selected edges with increasing loss of detail. As for the resultant binary image, a relatively lower *K* enables the accurate recognition of thin and faint actin filament components, yet is unable to cover the full width of thick filaments. Conversely, a high *K* value covers thick actin filaments with improved accuracy, resulting in a binary image that is less noisy; however, thin and/or faint filaments tend to be omitted as pseudo-negative pixels (Fig. 3b, Supplemental Fig. 7a). To overcome this dilemma, we applied a strategy using a lower *K*_{1} and a higher *K*_{2} to compute two different threshold images, as well as binary images, that focuses on thin/faint components and thick components, respectively. Then, we generate a full outer-join image that contains all cytoskeleton components in these two binary images. This approach led to an improved recognition of actin with varying morphologies (see Fig. 3b).

As described above, *K*_{1} controls the performance of thin and faint filaments. Since the theoretical minimum thickness of distinguishable cytoskeletal components is approximately equal to one pixel unit, *K*_{1} can be fixed to a constant to recognize the finest of cytoskeletal components from a complex and heterogeneous set of input samples. Using this combined approach, we identified an empirical optimal *K*_{1} of 2.5. However, since different image samples have different distributions of cytoskeleton thickness, *K*_{2}, which controls the performance over thick filaments, must be guided according to the maximum thickness among all samples. To ensure that the algorithm described herein is fully unguided, our strategy was to estimate an appropriate *K*_{2} from an estimated maximum thickness using all samples from a single batch of experiments, including multiple biological replicates (if applicable). To do this, we used Niblack thresholding to first generate a coarse binary image (which is sufficiently accurate for the thickest portion of the filament) and from this, we calculated the mean of the top 5% of the Euclidian distance transformation (DT) values of all positive pixels (see *Methods* for additional information). Next, the top 5% means of all single images were averaged, which is used to estimate *K*_{2} via a trained model using diverse samples with manual binary ground truth (Fig. 3c and Supplemental Fig. 7b, c, d). All individual image samples of all groups in the same batch of experiment will processed through ILEE by this *K*_{2}, and hence the bias of human input is avoided. When processing 3D image, we additionally provide an alternative approach that uses a single *K* that balances the accuracy over thin/faint and thick filaments, because the 3D ILEE can be time-consuming if MATLAB-based GPU acceleration (employed by our library) is not applicable for individual users.

### Computational analysis of cytoskeleton indices

For image library assembly, cytoskeletal indices are automatically calculated from the binary image generated by ILEE. As a substantial expansion from the previously defined cytoskeletal indices (e.g., *occupancy*, *skewness*, and *CV*)^{11,14}, we propose 12 indices within 5 classes. In short, these classifications describe and serve as quantifiable features of cytoskeletal morphology and dynamics, and importantly, each of these are critical considerations within the context of complex biological samples (Fig. 1a; see also *Methods* for detailed mathematical definitions). It is worth noting that all of these indices require a certain levels of post-processing (e.g., oversampling) to further enhance the accuracy, which is described in *Methods*.

For the index class “density”, we developed a novel set of metrics to evaluate *linear density*, a feature that measures filament length per unit of 2D/3D space. For “bundling”, we developed two new, highly robust, indices referred to as *diameter by total DT* and *diameter by skeleton DT*, both of which measure the physical thickness of filament bundles, in addition to the indirect indices *skewness* and *CV*, which estimate the relative bundling level based on statistical distribution of fluorescence intensity. For the class “connectivity”, we introduced two indices, *total connected element* and its derived index – *severing activity*, which estimates the severing events within per unit length of the cytoskeleton. This additional metric assumes that severing generates two visible cytoskeletal filaments, which is distinguishable from filament depolymerization. This is an important consideration in terms of the biological activity of the cytoskeleton, as it enables the decoupling of the impact of filament depolymerization and filament severing, key activities of the eukaryotic actin depolymerizing factor (ADF) and cofilin family of proteins^{17}. For class “branching”, our algorithm is based on Skan, a recently developed Python library for graph-theoretical analysis of the cytoskeleton^{18}. To further explore the relationship between filament morphology and the biological activity of branching, we specifically designed an additional index, referred to as “branching activity”, which we define as the total number of additional branches emerging from any non-end-point node per unit length of filament. In total, this index measures the abundancy/frequency of cytoskeletal branching. Finally, our library is capable of estimating the level of directional cytoskeletal growth by indexing *local anisotropy*, which measures how local filament tend to be directional or chaotic. This approach is adapted from an ImageJ plug-in FibrilTool^{19}, but we expanded this algorithm to 3D with both numerical and visual output (Fig. 1c).

### ILEE displays high accuracy and stability over actin image samples

To evaluate the performance of ILEE in terms of its accuracy and compatibility over diverse samples, we constructed a dataset of actin images from Arabidopsis leaves with diverse morphology, and compared ILEE with numerous traditional global and local thresholding algorithms, including MGT. First, to evaluate the accuracy of each algorithm in terms of filament segregation, we manually generated the ground truth binary image from each of the *in planta* collected samples, using a digital drawing monitor (Fig. 4a, ground truth). Next, we used each of the ground truth binary images as a reference and compared the filament architecture obtained by ILEE, MGT, and additional 6 adaptive thresholding algorithms. These additional thresholding algorithms include Otsu^{12}, Triangle^{20}, Li^{21}, Yan^{22}, Niblack^{13}, and Sauvola^{23} (Fig. 4). As an additional element of rigor, because pseudo-positive pixels can be obtained due to user bias during generation of each of the ground truth images (even when the operator is experienced in the actin imaging field), we further analyzed and categorized each non-connected component of pseudo-positive pixel by its shape and connectivity to matched elements, and identified the actin-like pseudo-positive pixels as possible real actin components.

As shown in Fig. 4a (visualized demonstration), 4b (quantitative analysis), and 4c (bias analysis), ILEE offers a dominant performance, with the highest rate of accuracy with low pseudo-positive and pseudo-negative occurrence, as well as the lowest bias over local filament thickness. It is noteworthy, however, that the adaptive global thresholding approaches (from Otsu to Yan) tend to be relatively accurate when images (i.e., regions of interests) are selected which contact thick, bright filaments. However, these approaches are unable to capture faint filaments, and as a result, generate a high pseudo-negative rate. Conversely, both adaptive local thresholding approaches, Niblack and Sauvola, generate numerous block-shaped pseudo-positive elements, and fail to capture the near-edge region of thick filaments. For MGT, as well as the Li method, although they showed satisfactory match rate, as well as low averaged pseudo-positive/negative rates, the performance of Li on diverse samples is far less stable (Fig. 4b).

As a next step in our analysis, we evaluated the accuracy and stability of cytoskeletal indices using ILEE versus other commonly used imaging algorithms. To do this, we first evaluated the ground truth indices from the manually generated binary images. In brief, quantitative measurements were collected from all methods and normalized by the relative fold to the result generated from the corresponding ground truth image. As shown in Figure 4d, ILEE showed significantly improved stability as compared to all other quantitative approaches (see also Supplemental Fig. 8) and the highest accuracy for *occupancy*, *skewness*, CV, and *diameter-TDT*. However, we did observe that in terms of the morphology-sensitive indices (i.e., *linear density*, *severing activity*, and *branching activity*), the ILEE algorithm did not fully conform with data collected from the ground truth binary images. Upon further inspection, we determined that this is because the hand-portrayed ground truth images and ILEE results have different tendencies to judge the pixels in the thin areas between two bright filaments (see *Discussion*). While other approaches displayed obvious, somewhat predictable, inaccuracies, the MGT and Li methods still generated satisfactory results, which echoes their performance in actin segmentation. However, the performance of these two algorithms against more diverse, complex, biological sample was not as robust as ILEE. As a final metric to evaluate the stability and robustness of ILEE performance, we analyzed the variance coefficient of all groups (Supplemental Fig. 8), uncovering that ILEE is the only approach which simultaneously maintained high accuracy and stability. Taken together, these results demonstrate that ILEE is has the best accuracy and robustness over MGT and other classic image thresholding approaches in terms of both cytoskeleton segmentation and index computation.

### ILEE leads to discovery of new features of actin dynamics in response of bacteria

Our primary impetus for the creation of ILEE algorithm was to develop a method to define cytoskeleton organization from complex samples, including those during key transitions in cellular status. For example, our previous research has demonstrated that the activation of immune signaling is associated with specific changes in cytoskeletal organization^{24–27}. Complementary to these studies, other research identified the temporal and spatial induction of changes in cytoskeletal organization as a function of pathogen (e.g., *Pseudomonas syringae*) infection and disease development^{28–30}. The sum of these studies, which broadly applied MGT-based quantitative analysis of cytoskeleton architecture, concluded that virulent bacterial infection triggers elevated density (by *occupancy*) yet induced no changes in filament bundling (by *skewness*) in the early stages of infection. Since one of our major motivations herein was to develop an ILEE-based toolkit – supported by novel cytoskeletal indices – to investigate the process of pathogen infection and immune signaling activation, we collected raw data from a previous study^{27} describing a bacterial infection experiment using Arabidopsis expressing an actin fluorescence marker (i.e., GFP-fABD2), followed by confocal imaging and data analysis by ILEE as well as MGT conducted by three independent operators with rich experience in actin quantificational analysis (Fig. 5). Additionally, because researchers sometimes apply a universal global threshold to all images from a batch of biological experiment to avoid tremendous labor consumption, we included this approach and aimed to observe its performance as well. In this experiment, the only categorical variant is whether sampled plants are treated with bacteria (EV) or not (mock). In total, nine indices that cover features of density, bundling, severing, branching, and directional order were measured and compared.

Our first concern was whether bias generated by MGT will influence the result and conclusion generalized from raw image samples of the experiment. We thereby analyzed the correlation of individual MGT values set by the three operators and found only weak correlation between different operators (Fig. 5a), which indicates MGT bias indeed have potential impact to quantitative results. Interestingly, while minor statistical discrepancies between MGTs using different operators were found in some indices (i.e., skewness and severing activity), most of the MGT results (both adaptive or fixed) showed the same trend as the 2D ILEE approach, yet with far higher standard deviation or lower stability (Supplemental Fig. 9) over a certain biological treatment. This indicates that the historical data based on MGT should be majorly trustworthy even though single data points can be biased, but an accurate conclusion must be based on high sampling number that balances the deviation of individuals. Since ILEE provides stability over biological repeats, we were also interested whether it renders higher statistical power to identify potential significant difference. Therefore, we compared the p-values of t-tests conducted for each index (Supplemental Fig. 9) and found that ILEE indeed have the dominant statistical power to distinguish numerical difference over datasets. We believe this demonstrates ILEE as a superior choice for actin segregation algorithm.

Next, we sought to understand whether different indices of the same class, particularly density and bundling, can reflect the degree of the class in accordance, or instead show inconsistency. For density, we correlated the *occupancy* and *linear density* values of all methods from actin images collected from both mock and pathogen-inoculated groups and found that *occupancy* and *linear density* measurements were similar, with a Pearson coefficient at 0.98 (Supplemental Fig. 10). Interestingly, while both approaches demonstrated a high positive correlation, 2D ILEE and MGT do not share the numeric relationship. Moreover, 3D ILEE showed a weaker correlation, potentially due to cavities introduced by the skeletonized image utilized for calculation of *linear density*. For bundling indices, we were curious in the level of conformity because direct indices (based on binary shape) and indirectly indices (based on relative fluorescence intensity) are two commonly used strategies to measure bundling (REF). Using the same approach for correlating analysis, we found that *diameter-TDT* and *diameter-SDT* indeed displayed strong positive correlation, while *skewness* and *CV* showed a reduced correlation. This is in support of a previous report demonstrating skewness and *CV* have different performances with regard to an evaluation of bundling^{14}. Unexpectedly, we also found that *CV* (as a representative of indirect index) and *diameter-SDT* (as a representative of indirect index) do not show any correlation, a funding that which brings up a level of concers as to whether *skewness* or *CV* should be regarded as an accurate measurement of bundling (see *Discussion*). This discrepancy is also reflected by the results obstained using 3D ILEE, whose *CV* and *diameter-SDT* over mock vs pathogen treatment revealed the converse relationship. In total, our data support the conclusion that pathogen treatment results in increased actin bundling, and further analysis should be undertaken to define the induction of this change in cytoskeletal status.

Finally, we asked if additional features of changes in plant actin cytoskeletal organization in response to pathogen infection can be identified by the newly introduced indices ILEE. As shown in Fig. 5d, we observed a significant increase in severing activity, local anisotropy, and a decreased branching activity triggered by pathogen inoculation compared to mock-inoculated samples. At a fundamental level, these discoveries potentially open the door to new biological interpretation(s) of the response and role of changes in cell organization in response to infection. Moreover, these findings may contribute to the identification of additional immune-regulated processes as a function of changes in host actin dynamics. However, while most of the 2D approaches were consistent and in agreement with the other indices, the severing activity estimated by 3D ILEE indicates a significant, but opposite, conclusion. After evaluating the difference of each 2D ILEE and 3D ILEE sample, we concluded this is potentially due to information loss and misinterpretation via z-axis projection in the 2D-based approach. Based on this, we do not recommend the use of the 2D mode for the analysis of filament severing, and thus, recommend the use of the 3D ILEE approach described herein.

## Discussion

Herein, we described the creation of ILEE, an unguided and robust filament segregation algorithm for the unguided quantitative analysis of the organization of the eukaryotic cytoskeleton. As presented, this approach supports the *in vivo* analysis of both 2D and native 3D data structures, enabling an unbiased evaluation of cytoskeletal organization and dynamics. In addition to the development of key methods, we also generated a publicly available Python library that supports the automated batch processing analysis of 13 filament indices from 5 classes of morphological features of the cytoskeleton. As described above, our data indicate that ILEE possess superior accuracy, robustness, and stability over current cytoskeleton image analysis algorithms, including the widely employed MGT approaches^{11,31}. As a result of these newly developed approaches, we have developed an open-access library to conduct ILEE based cytoskeleton analysis, which eliminates limitations imposed by popular 2D MGT approaches, including the introduction of user bias and information loss.

### Robustness of NNES-based prediction of global gradient thresholds

The gradient threshold (*g*_{thres}) defines the selected edge of actin filaments for implicit Laplacian transformation, the appropriateness of which greatly determines the performance of ILEE. To calculate *g*_{thres} without imposing a user-biased input, our strategy was to utilize feature values collected from NNES curve and human-guided MGT to train a prediction model for the rapid rendering of a coarse area of image background. Through this approach, we were able to deduce the corresponding *g*_{thres} by the mathematical relationship between the statistical distribution of the native pixel values and Scharr gradient magnitude of the coarse background (Supplemental Fig. 4, 5, 6, and *Methods*). While this step might first appear unnecessary, since, alternatively, the most straight-forward strategy was to directly train a prediction model using the image gradient histogram and the human-determined *g*_{thres}. However, as the gradient operator (see *Methods*) for any given object pixel is influenced by the values of surrounding pixels, the calculated gradient on the edge of the background is highly impacted (overestimated) by the contrast of foreground (cytoskeleton) versus the background. In other words, we determined that the frequency distribution of the background gradient will change at elevated cytoskeleton fluorescence levels, even though the background *per se* does not. The outcome of this is a significant decrease in the accuracy of gained *g*_{thres}. For this reason, we assert that *g*_{thres} should be mathematically deduced from a pre-determined region of background rather than directly predicted via human-trained models or calculated from a histogram of gradients using the pre-determined background.

### ILEE and visual inspection have different inclinations on the topology between two bright filaments

Our data demonstrate that ILEE generally shows dominant robustness and accuracy for most of the indices when comparing to the hand-portrayed ground truth binary image, but there are 3 indices (*linear density*, *severing activity*, and *branching activity*) where ILEE renders stable yet dramatically lower output than those derived from the ground truth images (Fig. 4d). Since such inclination is very stable, we anticipate that it is due to certain systemic “bias” of ILEE algorithm. After inspecting the binary images generated by ILEE comparing with the ground truth, we identified a (potentially) critical reason: ILEE is less likely to presume unconfident branches inside the narrow space between two bright filaments. As demonstrated by Supplemental Figure 11, while the ground truth and ILEE binary image look very similar, their skeleton images, which represents their topological structure, show contrast discrepancy between two bundles of bright filament. Considering their procedure of generation, we speculate this is because: (1), ILEE fully outer-joins the binary results by a lower *K*_{1} and a higher *K*_{2} (Fig. 3c), among which *K*_{2} sacrifices the sensibility of local background at high signal region to improve the sensibility of local foreground at low signal region – the edge of thick filaments; and (2), human eyes tend to “hallucinate” imaginary filaments that does not statistically exist. According to our knowledge, there is no overwhelming evidence supporting either 2D ILEE or human eye are more accurate, as this comparison is conducted using 2D mode. However, 3D ILEE may majorly solve this paradox because most of “adjacent” bright bundles are artifacts out of z-axis project, which are distant enough to offer ILEE with satisfactory resolution.

### 2D and 3D mode of ILEE may lead to different conclusions

For all indices, 2D ILEE agrees with MGT, while showing higher robustness and stability (Fig. 5). However, this is not always the case for 3D ILEE. To understand this, we investigated the ILEE 3D algorithm as well as the rendered binary and skeletonized images. Based on our observation, we make three key assertions: (1) the result of the 3D mode is a more accurate reflection of the nature of the cytoskeleton, as compared with the output of the 2D mode; (2) due to the limited computational power of most users’ personal computers, we do not introduce the oversampled binary image to compute the skeleton image for topological analysis, and therefore the accuracy of ‘*severing activity*’ and ‘*branching activity*’ may be negatively influenced; and (3) because of the 3D-specific sphere-cavity structures in the skeleton images, we use a different method to calculate *filament total length*, which indicates all indices that involve the *filament total length* in 3D mode are not strictly comparable to those calculated in 2D mode. Although the imperfectness due to reason (2) and (3) are solvable by the improving of the computational power of mainstream PCs and skeletonization algorithm in the future, it is currently difficult to make a definite conclusion whether the current 2D or 3D mode is more accurate. Nonetheless, we assert that the 2D mode is inevitably an inaccurate and biased approach based on the nature of the image projection.

### Future development and applications

While ILEE has already remedied many disadvantages of traditional methods such as MGT, we are still working to further advance the ILEE approaches presented herein. Our goal is to ultimately arrive at a method that not only improves upon our currently described actin segmentation algorithms, but also integrates time and space to describe a 4D model of cytoskeleton dynamics as well as general cellular processes tractable by microscopy. As such, we offer the following as an initial list of potential upgrades and applications to be integrated to our library:

ILEE compatibility to

*x-y-t*and*x-y-z-t*data, where*t*represents time. We are in the process of developing 4D-compatible analysis of cytoskeletal dynamics that tracks filament organization over time. This approach will provide a temporal evaluation of supported indices with high accuracy and robustness.Deep learning-based cytoskeleton segmentation algorithm with “foreign object” removal. As presented herein, ILEE enables the generation of trustworthy binary images by large scale, which enables the construction of deep learning models to identify cytoskeleton component from confocal images at potentially better performance. The deep learning based approach is also the key to solve the ultimate problem of all current cytoskeleton segmentation algorithm (including ILEE), which is the inability to detect and erase non-cytoskeleton objects with high fluorescence, such as the nucleus and cytoplasm. As one approach to circumvent this limitation, we are testing the feasibility of introducing 35S:mCherry as a cell-permeable false signal. This will enable us to further train our models to recognize and exclude the non-cytoskeleton-like foreign objects, to render ideally pure cytoskeletal datasets.

Vectorized intermediate image. After generating the difference image (i.e.,

*I*_{dif}, Fig. 3a) using ILEE, one computational limitation of our Python-based algorithm is the tradeoff between the demand for unlimited high-resolution imaging versus limited computational power. Accordingly, an ideal strategy we propose is to transfer the pixel/voxel image to a 2D vector image or 3D polygon mesh for index calculation. We are currently working towards enabling this function at an acceptable requirement of computational power to further enhance the accuracy of ILEE.Regions of interest and organelle segmentation. There is currently a high demand in research of plant cell biology to quantify cytoskeletal parameters in stomatal guard cells, as well as additional plant cellular and subcellular architectures. In future releases of ILEE, we will develop additional traditional and deep-learning approaches to enable recognition and selection of region of interest, such as stomata, for various demand by the community.

### Methods

All methods are provided in Supplemental File Methods.

## Author contributions

All authors participated in the design and conception of ILEE pipeline and experiments. P.L. and Z.Z. constructed the ILEE algorithm and ILEE_CSK library. P.L. and Z.Z. performed the experiments. P.L., Z.Z., B.D., and Y.T. analysed the data. P.L. and B.D. and wrote the manuscript. All authors commented and agreed on the manuscript before submission.

## Competing interests

The authors declare no competing interests.

## Acknowledgements

We would like to thank Dr. Yi-Ju Lu (Michigan State University) for generously providing massive raw image of actin for our experiments. We would like to thank Dr. Yi-Ju Lu (Michigan State University) and Dr. Masaki Shimono (Michigan State University) for providing individual MGT evaluations for our experiments. We would like to thank Rongzi Liu (University of Florida) for providing critical advice on statistical analysis and modeling. Research in the laboratory of B.D. was supported by grants from the National Science Foundation (MCB-1953014) and the National Institutes of General Medical Sciences (1R01GM125743). Research in the laboratory of Y.T. is supported by grant from National Science Foundation (III-1900473).

## Footnotes

Minor edits to grammer, sentence structure, and general document formatting. No new data.