$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
Comparison of results between peeling and clearing
Both T. officinale and F. excelsior showed variability in stomatal and epidermal traits depending on whether samples were cleared or peeled (Figure 4). Cleared samples generally provided sharper cell boundaries and clearer visualization of guard cell shape and pore aperture, although overlapping tissue layers occasionally obscured smaller stomata and biased size estimates upward. In F. excelsior, average stomatal area and stomatal width were significantly higher in cleared samples than in peels, whereas in T. officinale no significant differences were observed. Stomatal density was significantly higher in peeled samples of F. excelsior, while no method effect was detected in T. officinale. Epidermal cell area did not differ between methods in either species, but epidermal cell density was slightly higher in peeled samples of F. excelsior.
Overall, method-dependent differences were trait- and species-specific, suggesting that peeling provides a reliable option for stomatal measurements, particularly when stomata vary in size (e.g., in developing leaves), while epidermal traits were largely unaffected (Figure 5).
AI results and how they resonate with peeling and clearing methods
The stomata-specific model StoManager1 detected stomata more reliably on peeled images (Figure 6), whereas performance declined markedly on cleared samples (Figure 7). To further evaluate the performance of StoManager1 across preparation methods, we compared stomatal trait detection in T. officinale and F. excelsior using both peels and cleared images (Figure 8). In T. officinale, the model reliably detected stomatal presence and density across the preparation methods. However, the resulting values differed significantly from manual measurements (Table 2 and Figures 5 and 8). Most stomatal traits differed significantly (p < 0.05) between peeled and cleared samples (Figure 8), indicating that AI detection pipelines are highly sensitive to preparation methods and require careful validation before large-scale application. By contrast, in F. excelsior, detection was limited to the abaxial surface due to the absence of adaxial stomata, and in cleared samples detection was inconsistent, with frequent false positives (Figure 8). These results highlight the strong influence of species-specific anatomical features and image quality on the effectiveness of AI-based analyses. Generalist ML tools like Cellpose (Figure 9A) and Ilastik (Figure 9B) segmented epidermal cells more effectively on peeled than on cleared images. However, both tools produced numerous false positives with both preparation techniques (peeling and clearing), especially under low-contrast conditions or when cell contours were blurred. In such cases, indistinct stomatal or epidermal contours were often over-segmented into multiple tiny objects misclassified as individual epidermal cells (see Figure 10). As a result, post-processing is essential, not just outlier removal but also filtering by upper quantiles, to retain reliably identified cells.

Figure 1: Stomatal peels of F. carica leaves before and after removal of trichomes using a razor blade. Large trichomes can leave impressions on the peel, forming air pockets that result in uneven surfaces and hinder consistent focusing (visible as large grey dots). F. carica was included as an outlier to extend the protocol to hairy leaves. (A) At 200x magnification, image before trichome removal is partly obstructed with the trichome impressions. (B) Quality of image is improved after trichome removal. (C) At a 400x magnification image before trichome removal is to most extent obstructed with trichome impressions. (D) Obstruction is minimal in image after trichome removal with a razor blade. Scale bars 100 µm (A, B) and 50 µm (C, D). Please click here to view a larger version of this figure.

Figure 2: Consecutive steps of the clearing protocol. Representative images of T. officinale, F. excelsior, and F. carica illustrate successive stages of the clearing protocol. (A-C) Fresh leaves. (D-F) leaves after clearing with NaOH. (G-I) leaves after bleaching with NaClO. (J-L) leaves after staining with toluidine blue O. This visual aid shows the expected sample appearance before proceeding to the next step and highlights protocol variability among species. F. carica was included as an outlier species to demonstrate protocol applicability across a wider range of leaf and venation morphologies. Please click here to view a larger version of this figure.

Figure 3: Example measurements of stomatal and epidermal traits. Measured traits are illustrated on the image as follows: As = stomatal area; Ls = stomatal length; Ws = stomatal width; Ae = epidermal cell area. Stomatal density and epidermal cell density were calculated within the marked area, as described in the protocol. Image at 400x magnification. Please click here to view a larger version of this figure.

Figure 4: Comparison of images obtained with clearing protocol and peeling protocol. Representative images of T. officinale and F. excelsior comparing clearing and stomatal peel images showing the visibility and variability of stomata and epidermis cell size and density. Scale bar 50 µm, and images are taken at 400x magnification. Please click here to view a larger version of this figure.

Figure 5: Differences in manual trait measurement results between clearing and peeling protocol. Box plots showing differences in stomatal and epidermal traits between clearing and epidermal peel methods in T. officinale and F. excelsior. (A) Average stomatal area (B) average stomatal width (C) stomatal density (D) average epidermal cell area, and (E) epidermal cell density. Asterisks indicate levels of statistical significance (P < 0.05; *P < 0.01; **P < 0.001). Statistical significance was assessed using one-way ANOVA followed by Tukey's HSD post-hoc test. Sample size per group: n = 3-5. Abbreviations: As = stomatal area; Ws = stomatal width; SD = stomatal density; Ae = epidermal cell area; ECD = epidermal cell density. Please click here to view a larger version of this figure.

Figure 6: Example of segmentation results using a stomatal detection model on peel sample. StoManager1 segmentation result for a peeled sample of T. officinale (lower side of a mature shade-exposed leaf), showing good detection accuracy. Please click here to view a larger version of this figure.

Figure 7: Example of segmentation result using a stomatal detection model on cleared sample. StoManager1 segmentation result for a cleared sample of T. officinale (lower side of a mature shade-exposed leaf), showing reduced detection accuracy compared to peeled samples. Please click here to view a larger version of this figure.

Figure 8: Differences in AI assisted trait measurement results between clearing and peeling protocol. Box plots showing AI-derived measurements of stomatal anatomical traits from images processed by StoManager1 in T. officinale and F. excelsior. Traits include stomatal area (As), stomatal width (Ws), stomatal length (Ls), and stomatal density (Ds). Units are as in Figure 5. Statistical significance was assessed using one-way ANOVA followed by Tukey's HSD post-hoc test. Asterisks indicate levels of statistical significance (P < 0.05; *P < 0.01; **P < 0.001). Sample size per group: n = 3-5. Abbreviations: As = stomatal area; Ws = stomatal width; Ls = stomatal length; Ds = stomatal density. Please click here to view a larger version of this figure.

Figure 9: Screenshots showing segmentation with generalist deep learning tool and pixel-based classifier. Peeled F. excelsior sample (abaxial leaf surface) segmentations with (A) generalist deep learning tool (Cellpose (cyto2)), and (B) pixel-based classifier (ilastik). Please click here to view a larger version of this figure.

Figure 10: Ilastik segmentation mask for a peeled sample of F. excelsior (abaxial side of a leaf), showing numerous false positives. Tiny dots are misclassified as distinct epidermal cells. During post-processing, manual (visual) inspection is required to set size-based thresholds to effectively filter out false positives. Please click here to view a larger version of this figure.
| Solution | Preparation | Final volume |
| Base for buffer 1 | 7.12 g (Na2HPO4 *2H2O) in 200 mL of dist.H2O | 200 mL |
| Base for buffer 2 | 7.12 g of Na2HPO4 *2H2O) in 200 mL of dist.H2O | 200 mL |
| Phosphate buffer | Mix 36 mL of base 1, 14 mL of base 2 + 50 mL of dist.H2O | 100 mL |
| Fixative solution | Mix 9.25 mL of 5% glutaraldehyde with 12.5 mL of phosphate buffer and 28.25 mL of dist.H2O | 50 mL |
Table 1: Recipe for fixating solution24. Composition of the solutions used in this study.
| Species | Side | Method | Man (As) | AI (As) | Man (Ws) | AI (Ws) | Man (Ls) | AI (Ls) |
| Fraxinus | Abaxial | Peel | 177.43 | 9.32 | 12.71 | 2.85 | 17.58 | 3.58 |
| Taraxacum | Abaxial | Cleared | 408.09 | 18.84 | 20.1 | 4.19 | 26.14 | 5.39 |
| Taraxacum | Abaxial | Peel | 262.54 | 13.93 | 15.18 | 3.47 | 22.2 | 4.68 |
| Taraxacum | Adaxial | Cleared | 414.48 | 14.91 | 20.11 | 3.44 | 26.09 | 5.71 |
| Taraxacum | Adaxial | Peel | 258.72 | 11.37 | 15.72 | 3.3 | 21.15 | 4.08 |
Table 2: Indicative comparisons on manual measurements and AI. ML (StoManager1) scaled results. Man and AI indicate, correspondingly, manual and AI (StoManager1) results. Units are as in Figure 5. Manual and AI measurements differ significantly. Some comparisons are not available for various reasons, including missing stomata (e.g., adaxial F. excelsior) or failed detection (e.g., stomata were more difficult to detect in cleared samples due to fuzzier cell contours).
Supplementary figure 1: Examples of common mistakes occurring during leaf clearing that affect the results. Images shown for troubleshooting purposes: (A) uneven staining due to incomplete rehydration of the sample during section 3.10; (B) mechanical damage resulting from mishandling of the chemically processed very fragile sample; (C) green hue in the center of the sample due to incomplete removal of chlorophyll during section 3.5. Please click here to download this figure.
Supplementary figure 2: Example of StoManager1 user interface. Screenshot of StoManager1 user interface showing the input setup and results table (left), and micrograph views with original images (top right) and stomatal detection overlay (bottom right, adaxial surface of a T. officinale peeled sample).Please click here to download this figure.
Supplementary figure 3: Example of Cellpose user interface. Screenshot of Cellpose segmentation in progress through the GUI with adjustable parameters (e.g., model selection - recommended pretrained cyto2 model or a custom-trained model, thresholds, and cell diameter calibration).Supervised manual annotation of epidermal cells highlights each cell in a unique color to guide model calibration. Overlay shows segmentation of a F. excelsior abaxial epidermal peel. Please click here to download this figure.
Supplementary figure 4: Ilastik segmentation process. Overlay illustrates pixel-based classification on a F. excelsior abaxial epidermal peel image. (A) Screenshot of ilastik segmentation in progress showing supervised training with manually labeled classes: epidermal cells (yellow), cell contours (blue), and non-epidermal background such as trichomes (red). (B) Screenshot showing only the epidermis class (yellow), illustrating how the classifier isolates individual epidermal cells. Note the presence of multiple false-positive "tiny" detections, particularly in regions of low contrast or uneven illumination. (C) Screenshot showing only the contour class (blue), illustrating how the classifier isolates cell boundaries from the surrounding epidermal tissue. Note that some contours are discontinuous and that multiple false-positive "tiny" detections occur, particularly in regions of low contrast or uneven illumination. (D) Screenshot showing the background class. Mask highlights stomatal complexes, glandular trichomes, and miscellaneous debris (red), while excluding epidermal cell bodies. Numerous small false-positive "tiny" detections are visible within epidermal regions, arising from grayscale artefacts and texture-based misclassification. Please click here to download this figure.
Supplementary figure 5: Cellpose training settings. Example of Cellpose training settings (GUI) for a cleared T. officinale sample (both leaf surfaces), showing default model parameters prior to adjustment. The pre-trained cyto2 model is selected, with a learning rate of 0.1 and 100 training epochs (default values), which determine the update speed of model weights and the number of training passes, respectively. These defaults are commonly modified (e.g., learning rate = 0.15; epochs = 12) to reduce training time and adapt the model to plant epidermal morphology; however, lower epoch numbers may reduce detection performance and increase false positives. Please click here to download this figure.
Supplementary figure 6: Cellpose "labels" mask. Applying Cellpose "labels" mask for a peeled F. excelsior sample (abaxial leaf surface), showing the result of supervised training in which each segmented object is assigned a unique identifier. Epidermal cells (marked e) dominate, while stomatal guard cell pairs (marked g) are also detected. False positives are evident where trichomes are misclassified as epidermal cells (upper left) or stomata (lower central), as well as false negatives where epidermal cells remain unlabelled across portions of the image. This mask type is used for downstream quantification and refinement of supervised models. Please click here to download this figure.
Supplementary figure 7: Quantification of segmented epidermal cells in ImageJ/Fiji. Screenshots showing segmented epidermal cell quantification following ilastik pixel classification for a peeled F. excelsior sample (abaxial leaf surface). (A) In the exported mask, each detected pixel cluster corresponds to an individual particle, enabling automated extraction of object-level metrics (e.g., area, perimeter, Feret's diameters). The Results window (bottom) displays raw measurements for thousands of objects; note the exceptionally high number of small particles arising from "tiny" dot noise and fragmentary contours, indicating the presence of numerous false positives. These artifacts require subsequent biologically informed filtering to isolate true epidermal cells prior to downstream statistical analysis. (B) Area-based filtering of ilastik-segmented epidermal objects in ImageJ/Fiji. Small fragments and noise are excluded by applying a minimum area threshold of 150-350 µm², reducing the number of detected particles by approximately an order of magnitude (tenfold) relative to the unfiltered mask in panel A. Although this filtering step substantially removes tiny false positives, imperfect classification persists: fragmented contours and residual non-epidermal elements remain and require additional refinement, such as circularity thresholds or biologically informed post-screening. Please click here to download this figure.
Supplementary figure 8: Post-processing of a Cellpose "labels" mask in ImageJ/Fiji. By using the Labels to ROIs plugin for a peeled F. excelsior sample (abaxial leaf surface), each segmented object in the mask is converted into a region of interest (ROI), enabling individual inspection and measurement of epidermal cells and stomatal guard cell complexes. ROIs are overlaid on the original micrograph (left), while the Results window (bottom right) displays cell-level metrics (e.g., area, Feret's diameters, perimeter). This step enables biologically informed curation, allowing users to verify whether each ROI corresponds to a true epidermal cell and to discard artefacts such as trichomes or mis-segmented stomata that persist after threshold filtering, thereby informing subsequent analysis steps. Please click here to download this figure.