METHODS published: 04 November 2021 doi: 10.3389/fpls.2021.767400 Mask, Train, Repeat! Artificial Intelligence for Quantitative Wood Anatomy Giulia Resente 1* , Alexander Gillert 2 , Mario Trouillier 1 , Alba Anadon-Rosell 1,3 , Richard L. Peters 4,5 , Georg von Arx 5,6 , Uwe von Lukas 2,7 and Martin Wilmking 1 1 Institute of Botany and Landscape Ecology, Ernst Moritz Arndt University Greifswald, Greifswald, Germany, 2 Fraunhofer-Institut für Graphische Datenverarbeitung IGD, Rostock, Germany, 3 CREAF, Campus de Bellaterra (UAB), Cerdanyola del Vallès, Spain, 4 Department of Environment, Faculty of Bioscience Engineering, Ghent, Belgium, 5 Swiss Federal Institute for Forest, Snow and Landscape Research, Birmensdorf, Switzerland, 6 Oeschger Centre for Climate Change Research, University of Bern, Bern, Switzerland, 7 Institute for Visual and Analytic Computing, University of Rostock, Rostock, Germany The recent developments in artificial intelligence have the potential to facilitate new research methods in ecology. Especially Deep Convolutional Neural Networks (DCNNs) have been shown to outperform other approaches in automatic image analyses. Here we apply a DCNN to facilitate quantitative wood anatomical (QWA) analyses, where the main challenges reside in the detection of a high number of cells, in the intrinsic variability of wood anatomical features, and in the sample quality. To properly classify and interpret features within the images, DCNNs need to undergo a training stage. We performed Edited by: the training with images from transversal wood anatomical sections, together with Miha Humar, manually created optimal outputs of the target cell areas. The target species included University of Ljubljana, Slovenia an example for the most common wood anatomical structures: four conifer species; a Reviewed by: Angela Balzano, diffuse-porous species, black alder (Alnus glutinosa L.); a diffuse to semi-diffuse-porous University of Ljubljana, Slovenia species, European beech (Fagus sylvatica L.); and a ring-porous species, sessile oak Jozica Gricar, (Quercus petraea Liebl.). The DCNN was created in Python with Pytorch, and relies on Slovenian Forestry Institute, Slovenia a Mask-RCNN architecture. The developed algorithm detects and segments cells, and *Correspondence: Giulia Resente provides information on the measurement accuracy. To evaluate the performance of this giulia.resente@uni-greifswald.de tool we compared our Mask-RCNN outputs with U-Net, a model architecture employed Specialty section: in a similar study, and with ROXAS, a program based on traditional image analysis This article was submitted to techniques. First, we evaluated how many target cells were correctly recognized. Next, Technical Advances in Plant Science, we assessed the cell measurement accuracy by evaluating the number of pixels that a section of the journal Frontiers in Plant Science were correctly assigned to each target cell. Overall, the “learning process” defining Received: 30 August 2021 artificial intelligence plays a key role in overcoming the issues that are usually manually Accepted: 15 October 2021 solved in QWA analyses. Mask-RCNN is the model that better detects which are the Published: 04 November 2021 features characterizing a target cell when these issues occur. In general, U-Net did not Citation: Resente G, Gillert A, Trouillier M, attain the other algorithms’ performance, while ROXAS performed best for conifers, and Anadon-Rosell A, Peters RL, Mask-RCNN showed the highest accuracy in detecting target cells and segmenting von Arx G, von Lukas U and lumen areas of angiosperms. Our research demonstrates that future software tools for Wilmking M (2021) Mask, Train, Repeat! Artificial Intelligence QWA analyses would greatly benefit from using DCNNs, saving time during the analysis for Quantitative Wood Anatomy. phase, and providing a flexible approach that allows model retraining. Front. Plant Sci. 12:767400. doi: 10.3389/fpls.2021.767400 Keywords: artificial intelligence, wood anatomy, deep learning, lumen area, F1 score, ROXAS Frontiers in Plant Science | www.frontiersin.org 1 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy INTRODUCTION Peters et al., 2018). Despite the great advances in the procedures for wood sectioning and image acquisition, the actual feature In recent years, deep learning, as a subset of artificial intelligence, recognition phase still requires human supervision (Hwang and has proven to be the new key tool to investigate ecological Sugiyama, 2021). In fact, traditional image analysis is often not research questions (Christin et al., 2019). Hierarchically, deep able to overcome the artifacts generated by the sample processing: learning is a sub-field of machine learning, a modeling approach the great number of cells occurring in the sections, combined able to detect common patterns in datasets (Olden et al., 2008). with a non-optimal image quality, is the reason why automated The reason of deep learning suitability to ecological investigations image analysis is often followed by a manual editing phase. lies in its intrinsic characteristics: deep learning can automate the However, the effort taken to fix these issues by hand can be pattern interpolation processes from the provided data (LeCun very time-consuming. This is exactly where DCNNs show their et al., 2015). The step forward lies in the particular algorithm strength, as many of these issues can benefit from a DCNN architecture, which de-structures data features through different approach. Images showing excessive darkness, brightness or evaluation layers. This allows the machine to automatically blurred areas, for example, can be easily processed after a proper change internal parameters and fit the computational process neural network training. Moreover, DCNNs have the ability to according to the required task (Zhang et al., 2016). encode specific wood features, which is the key to accelerate data Overall, ecological investigations are enhanced by the production: fibers are less likely to be mistaken for conduits, flexibility of deep learning tools, especially when dealing with for example, or pit chambers will be recognized as such and large and complex datasets (Christin et al., 2019). This is the automatically excluded from the lumen area. case for image analysis tasks, where Deep Convolutional Neural In this study, we aimed to overcome these general QWA Networks (DCNNs) stand out by performance (Krizhevsky et al., challenges in transversal images using DCNNs. Specifically, we 2017). In this specialized architecture, the different layers are created a practical graphical user interface relying on a Mask- composed by artificial neurons (Zhang et al., 2016) and each RCNN algorithm architecture (He et al., 2017), that detects layer has a specific task, such as feature extraction, mathematical cells and quantifies the lumen area on four conifers and computation-based training, or dimensional adjustment, that three angiosperms. We also present the comparison on the makes DCNNs particularly suitable for image interpretation accuracy of cell instance (cell identification as an object) and (James and Bradshaw, 2020). lumen area detection with another neural network architecture Wood anatomical research is a field where DCNNs find (U-Net; Garcia-Pedrero et al., 2019), and ROXAS, one of an ideal application (Garcia-Pedrero et al., 2019). In the past, the most widely used programs for wood anatomical image machine learning methods have mainly been used for wood analyses (von Arx and Dietz, 2005; von Arx and Carrer, 2014; species identification (Luis et al., 2009; Mallik et al., 2011; Garcia-Pedrero et al., 2019). Ravindran et al., 2018; He et al., 2020; Wu et al., 2021). In contrast, quantitative wood anatomy (QWA), that refers to the broad set of analyses quantifying and interpreting the variation of MATERIALS xylem features in trees, shrubs, and herbaceous plants (von Arx et al., 2016), has just started being investigated with such tools. To perform classification analyses on wood anatomical Investigations are performed on wood anatomical images at a parameters, such as cell instance recognition (i.e., the microscopic level, to study number, distribution, and properties identification of the cell as an individual structure) and of the main cell types: conduits, parenchyma cells, and fibers lumen area detection (cell segmentation), the neural network (von Arx and Carrer, 2014). Wood anatomical analyses can has to undergo a training stage. During this training, the neural provide a higher temporal resolution than annual tree-ring network architecture is provided with wood anatomical images width measurements, and the wood anatomical structure is as well as the desired output, the ground truth – a map of the more directly linked to biological processes and tree functioning. original image where all the target cells have been manually This allows to link tree growth to the study of phenology, marked (segmented). Given the original and the segmented tree allometry, species physiological performance, and ecosystem images, the algorithm can learn to generalize the features that dynamics, among others (Fonti et al., 2010; Carrer et al., 2015; De are characteristic for a target cell. For this purpose, we chose four Micco et al., 2019; Castagneri et al., 2020). conifers: Norway spruce (Picea abies L. Karst), Scots pine (Pinus To obtain wood anatomical images, the wooden sample has sylvestris L.), White spruce (Picea glauca Moench), and European to undergo several steps. Standard procedures start with cutting larch (Larix decidua Mill); and three angiosperms: Black alder thin sections from the sample and mounting them on a glass slide, (Alnus glutinosa L.), European beech (Fagus sylvatica L.), and whereas, in case of damaged or particularly fragile material, the Sessile oak (Quercus petraea Liebl.). We will refer to these groups wood sample can be embedded in paraffin to stabilize the tissues as: conifers, alder, beech, and oak. Each of them represents a before the cutting. This stage is followed by the image acquisition typical wood anatomical structure: softwood for gymnosperms process, where images of the slides are taken with a camera and the three typologies of hardwood for angiosperms, a diffuse- installed on a microscope, or via specialized scanners. The porous species, a diffuse to semi-diffuse-porous species and a images are then analyzed with image analysis tools to perform ring-porous species. quantitative wood anatomical investigations (Gärtner et al., 2015; Conifers, beech, and oak are some of the most used species Yeung et al., 2015; von Arx et al., 2016; Prendin et al., 2017; for tree ring studies in general (Scharnweber et al., 2013; Frontiers in Plant Science | www.frontiersin.org 2 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy Príncipe et al., 2017; Lange et al., 2018; Janecka et al., 2020) and then fine-tuned on image patches of anatomical wood thin and specifically for wood anatomical analyses (Björklund et al., sections of size 1000 × 1000 pixels for all species except oak, for 2020; Pampuch et al., 2020; Peters et al., 2020). Images were which images of 2000 × 3000 pixels were used to safely include collected from several sources, to ensure variability in the the larger vessels in the tiles. Although COCO contains natural image quality and within the sample processing (Supplementary images that have little in common with wood anatomical thin Table 1). Conifer species were grouped due to the high similarity sections, this process is still beneficial as part of transfer learning. in wood anatomical structure, therefore it was possible to As we started algorithm development with alder, our training set train one single neural network for this group; whereas the consisted of 89 patches for this species, while only 31 patches were angiosperms remained separated per species, due to their less employed for conifers, 20 for beech and 20 for oak. uniform structural properties. Moreover, because it is more The images were annotated in the form of a semantic common to perform QWA analyses on gymnosperms due to segmentation map, the ground truth, which is an image file (in their homogeneous wood structure, having a broadly trained png format) created for every training image, containing the algorithm is of high value. Concerning gymnosperms images, the information related to the correct identification of the lumen provenance is more restricted and the quality is generally very area. This map was created using Gimp (Spencer et al., 2021) high. While for conifer images we managed to collect examples a free and open-source raster graphics editor, used to draw the of a wide quality range, the image acquisition process of all the lumen areas on an additional layer with transparent background. angiosperms slides was carried out by the high-end Zeiss Axio We converted this annotation into boxes by taking the Scan.Z1 slide scanner (Carl Zeiss AG, Germany), except part of minimum and maximum X and Y pixel coordinates of the alder samples. the connected components. During training we used data augmentation in the form of random horizontal and vertical flipping as well as 90◦ rotations to artificially enlarge the data METHODS set. The stochastic gradient descent (SGD) optimizer was used as the training algorithm, with a learning rate of 0.005, momentum Neural Network Architecture 0.9 and weight decay of 0.0005 for overall 20 epochs and a Our goal was to perform cell instance and lumen area detection batch size of 1. together in a single algorithm architecture to maximize the For each wood type a separate neural network was trained. utility for QWA analyses. We treated lumen area detection At the training stage, some modifications were required for the as an instance segmentation problem rather than a semantic different species. Particularly for oak, we trained two networks segmentation task as we see in Garcia-Pedrero et al. (2019) with that specialize in either the small or the large vessels. However, the U-Net neural network architecture. The difference between the networks belong to the same model in the graphical user these two is that with the U-Net algorithm every pixel is classified interface, therefore the analyses are run in parallel, providing a (as “cell” or “not-cell”) independently from each other, whereas in single output per picture. For the large vessel network, we used instance segmentation the objects (cells) are first identified and patches of half the resolution (but same patch size), thus doubling located as a whole, and then segmented to their estimated real the field of view. dimension in a following stage. In practice, this has the benefit of fewer spurious false detections because a larger field of view can Neural Network Evaluation be used for the object detection stage, allowing to put distance The testing phase was performed on patches cropped from wood between the image and the “observer” in order to focus better the anatomical images of the same dimensions as the ones included in objects themselves. the training dataset and completely new to the algorithm (i.e., not Specifically, we used the Mask-RCNN (He et al., 2017) neural present in the training dataset), 15 for each group. The patches network architecture for this task. This model employs a feature were extrapolated from images of seven different trees for conifer, pyramid network (FPN) (Lin et al., 2017) to extract visual features eight trees for alder, seven for beech, and six for oak. The aim from the input image at different levels of detail. These features of using this dataset was to cover all the problematic issues that are then forwarded to the next stages: first, a region proposal might hamper a smooth workflow and require large correction network (RPN) which identifies regions in the image that might efforts during the post-analysis editing phase. be objects of interest, and second, a classification head, which Sample processing is the most delicate step in QWA analyses. filters out undesired regions. In our case this can include ray When the tissue is sectioned, the fragile structure of the wooden cells, pits, or air bubbles. Finally, if the region is classified as a sample can be compromised, often resulting in broken vessel or target object, the third step performs a per-pixel segmentation. tracheid walls, and cell wall protrusion into the lumen area. The We refer to He et al. (2017) for a more detailed description of microslide preparation step is also critical as sections are very the used Mask-RCNN. thin and can overlap with themselves, if they are not positioned carefully. Moreover, depending on the accuracy used in the Neural Network Training following section processing, stains from coloring solutions, We used the version implemented in the PyTorch v1.6 library drops of paraffin or air bubbles can occur on the slide. If (Paszke et al., 2019) with a ResNet50 backbone. Weights (model these artifacts cannot be avoided in the image acquisition step parameters) were obtained from pre-training on the COCO with a tailored cropping, they have to be solved manually after dataset (Lin et al., 2014). They were used as a starting point the automated image analysis. Acquiring high quality images Frontiers in Plant Science | www.frontiersin.org 3 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy can be difficult as well, since artifacts from wrongly stitched from the output are counted as false positive instances (FP), that images, blurred areas due to uneven surfaces, dust spots, or is when the algorithm detected a cell that is not present in the inhomogeneous lighting can hamper a smooth analysis of the ground truth. On the other hand, unmatched cells of the ground image and consequently, of the whole the dataset. Moreover, truth are counted as false negative instances (FN), in this case cells even the species-specific structure can hamper a traditional are not present in the output and therefore they are counted as image analysis approach. In general, pits, fibers, apotracheal missed cells (Table 1). parenchyma, bark cells, vessels with scalariform perforation Matched target cells are then compared in terms of lumen area plates, resin canals and the related parenchyma cells constitute an accuracy by directly comparing individual pixels. Pixels that are issue. The testing dataset we created included at least one image positive in both predicted and ground truth cell count as true for every feature mentioned above, in detail: positive lumen area. Pixels that are positive only in the predicted cell are counted as FP lumen area and those that are positive - Overlaying pollution particles (dirt or dust); only in the ground truth cell are FN lumen area. These lumen - Overlapping/folded tissue; area metrics, along with the F1 score, an index to evaluate the - Stains from coloring solutions of variable intensity; algorithm performance, are computed for each cell individually - Drops of paraffin from embedding; and results are provided as Excel files. - Broken cell walls; Along with the computational data, an error map is given to - Reduced lumen area in the latewood hampering a proper visually interpret the graphical user interface results on every cell recognition; image of the dataset (Figure 1). These image files report all - Cells that are not conduits (resin canals, bark cells, fibers, the categories used to classify cell instance recognition and and parenchyma cells); lumen area detection, and three other specific cases: disconnected - Pit chambers connecting conifer tracheids; positive, a single cell that was detected as two or more (thus - Pith fleck in alder; counts as FP); merged negative, two or more cells that were - Scalariform perforation plate for alder and beech. detected as a single one (thus counts as FN); and incomplete cells, which are cut at the borders and ignored since they are irrelevant The evaluation procedure has been implemented in a web for the analysis. browser-based software via a graphical user interface, and is The testing dataset was analyzed with ROXAS, with the automated. Within the graphical user interface, four different Mask-RCNN algorithm, and with the U-Net algorithm. ROXAS models can be selected and applied to new images. One model program was run without any additional manual editing, but corresponds to gymnosperms and one for each angiosperm. employing a configuration file per group species, tailored to Furthermore, we implemented the possibility to upload ground the specific sub-datasets. Configurations are batches of settings truth references and previously computed prediction files. adjusted to specific image characteristics, with the purpose This facilitates testing and evaluating the algorithm, and also of improving the performance in the cell and lumen area comparing its accuracy to the output of other specialized recognition. Subsequently, the output provided by the three software such as the traditional image-analysis tool ROXAS approaches was compared to the ground truth, since it represents (von Arx and Carrer, 2014) running on Image-Pro Plus an unbiased reference (Figure 2). Results from the Mask- (Media Cybernetics, 2021, Rockville, MD, United States). RCNN segmentation approach have been compared to the For the cell instance metrics (cell detected: yes/no), the other two algorithms in terms of cell instance detection and procedure first matches the connected components (cells) of the lumen area detection accuracy (how accurately the cell area outputs with the corresponding ground truth maps. Two cells has been detected). Training and evaluation code can be found are matched if they have a high similarity (overlap) to each other in the online repository: https://github.com/alexander-g/Cell- and thus count as a true positive instance (TP). Unmatched cells Detection-for-Wood-Anatomy. TABLE 1 | Confusion matrix approach applied to cell instance detection. hhhh h hhhhPrediction Positive Negative Ground truth hhh hh Positive True positive (TP) False negative (FN) Recall It is a target cell, it was detected It is a target cell, it How many of the was not detected target cells are detected? Negative False positive (FP) True negative (TN) It is not a target cell, it was It is not a target cell, it detected was not detected Precision How many of the detected cells are target cells? Both recall and precision parameters are a benchmark of accuracy, respectively, they assess how many cells were missed (FN) and how many redundant cells were segmented (FP), considering the total amount of correctly detected cells (TP). See Equation 1 for reference. Frontiers in Plant Science | www.frontiersin.org 4 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy FIGURE 1 | Patch from an original beech thin section, error map, and related legend. The error map is the visual comparison between the algorithm computation and the ground truth, and it helps in the visual assessment of the algorithms’ performance. Cell Instance Detection and Lumen Area A general overview of the performance of the algorithm in cell Detection instance detection is provided by the F1 score. This index is the harmonic mean between precision and recall (Equation 3), We defined the cells masked in the ground truth as target for this reason it reflects both when the cell instance count is cells because they represent the optimal image analysis output, overestimated and/or when it is underestimated. in this case, they are represented by vessels for angiosperms and tracheids for gymnosperms. As a first step, we evaluated how many target cells were correctly identified; furthermore, we Precision ∗ Recall F1 = 2∗ (3) analyzed and compared the results with the other two algorithms: Precision + Recall ROXAS and U-Net. The latter is the same architecture used in Garcia-Pedrero et al. (2019). In this study, U-Net was employed with the same purpose but trained on ROXAS output as ground Computing TN for the cell instance analysis, does not apply in truth, while in our research the ground truth was manually this case, since there is no reference on the number of total created, allowing first, a consistent training of the neural network cells of all the typologies (vessels/tracheids, fibers, rays, and axial models, and second an unbiased reference for comparing the parenchyma) present in the images. The definite and important algorithms. For the same purpose, in our study, the U-Net neural value is the number of target cells shown by the patches, obtained network architecture was trained on the same training dataset via the ground truth mask. Overall, we calculated the confusion as the Mask-RCNN version. Comparing U-Net performance matrix for all the species and for all the segmenting approaches with Mask-RCNN should allow us to provide a more complete (Supplementary Table 2). overview on the topic and to highlight the improvements in After assessing how many cells were correctly identified, we this research field. analogously (i.e., with the same recall, precision, and F1 score Cell instance accuracy was assessed with the help of a scheme) evaluated the accuracy of the cell lumen area detection, confusion matrix (Table 1). The confusion matrix helps to in the following referred to as lumen area. In fact, parameters bring together and compare the results from the two sides: belonging to the cell instance classification can be applied to the algorithm (Mask-RCNN, ROXAS, or U-Net) and the ideal the pixel dimension as well: pixels correctly assigned to the cell output (ground truth). area are TP and those which are misclassified belong to the FP False positive and false negative values were used to analyze or FN categories. We used the F1 score to provide an overall recall, which estimates the missed cells numbers (FN) considering assessment of the algorithms’ performance, and subsequently the total TP detected; and precision, which gives an estimation of analyzed precision and recall to understand when the lumen area the redundant cells (FP) weighting the value with TP (Equation is overestimated and/or when it is underestimated. 1, 2). Moreover, an additional sub-dataset was created to increase variability of the original testing dataset, and to test the ability TP of the Mask-RCNN algorithm to handle the most insidious Recall = (1) TP + FN issues faced in QWA analyses (see list in section “Neural Network Evaluation”). This dataset consisted of five images per group (conifer, alder, beech, and oak) that were not analyzed TP with ROXAS, since they would have required a tailor-made Precision = (2) configuration, which requires expert knowledge. TP + FP Frontiers in Plant Science | www.frontiersin.org 5 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy FIGURE 2 | Flowchart of the comparison process. To obtain a meaningful result, the output from the algorithms has to be compared to the ground truth, a manually segmented image for every image of the groups investigated. Mask-RCNN output was then compared to the one of U-Net and ROXAS in terms of cell instance (cell detected: yes/no) and lumen area accuracy (how accurately the lumen area was detected). RESULTS AND DISCUSSION Cell Instance Detection First, performances on cell instance detection have been Result Structure calculated using the F1 score (Table 2). Since the values provide The relatively complex analysis structure used to highlight an overall assessment of the accuracy reached by the algorithms, different aspects of algorithm performance as described in section we could already infer that in general Mask-RCNN and ROXAS “Methods” is summarized in Figure 3 for convenience. records were very high and that these two approaches performed Frontiers in Plant Science | www.frontiersin.org 6 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy intelligence algorithms (0.96, 0.91, and 0.93 for Mask RCNN, and 0.96, 0.95, and 0.92 for U-Net, respectively). Slightly lower values were shown for ROXAS, where oak was the species with the lowest recall value (0.85). Furthermore, we investigated the characteristics of the FN instance within the cell size classes, to determine where the lack of cell detection was more pronounced (Figure 4). This assessment is useful for the future training of the DCNN, in order to fine-tune the cell instance detection process. Generally, the most affected size classes are the smaller ones, but wood anatomical type plays a consistent role in this evaluation. Oak as a ring-porous species shows great differences in size between the earlywood the latewood vessels. This size difference exists also in conifers, where latewood cells are distinctively smaller than the earlywood cells. However, in conifers the difference is smaller and the transition occurs less abruptly. In these two categories, the most affected size classes were the smallest, supporting the predictable trend that the smallest cells are more difficult to identify. In contrast, alder and beech, diffuse and semi-diffuse porous species, respectively, show the bias shifted to medium-small cells and more evenly distributed across size classes. This analysis demonstrates that, when the wood structure is more homogeneous, cell size has less effect on cell instance recognition. Since the testing dataset was built to include artifacts generated by sample preparation, we analyzed how the detection process is affected when an artifact occurs, comparing the Mask-RCNN segmentation approach with ROXAS. As a result, we observed that tackling FN issues from the segmentation methodology perspective highlights the benefit of using artificial intelligence for the feature recognition step. A visual comparison between Mask-RCNN output and the ROXAS output, involving the issues that might generate FN instances, is shown in Figure 5: blurred areas caused by various artifacts such as overlapping object (Figure 5A), paraffin drops (Figure 5B), and stains of coloring solutions (Figure 5C). To estimate how many non-target (redundant) cells got FIGURE 3 | Flowchart summarizing how performance of the considered recognized, we used the precision parameter: the closer to 1 the approaches was assessed. value, the lower is the overestimation in cell instance detection. As we expected, U-Net architecture provided the lowest values, therefore the worst performance. Mask-RCNN and very similarly for all the groups, while U-Net consistently ROXAS results showed the same general pattern: from the worst showed lower values. to the best precision rate we found alder (0.82, 0.84), conifers As the F1 score is the harmonic mean between precision and (0.89, 0.91), oak (0.94 for both), and beech (0.94, 0.96). Overall, recall, it raised interest in the investigation of the algorithms’ results on the precision values were very high and close for both trend about underestimation and overestimation of the cell approaches, although ROXAS demonstrated to be slightly more instance detection. The recall parameter was generally higher efficient in the task (Table 2). for the U-Net algorithm, followed by Mask-RCNN and ROXAS Precision values interpretation was performed on a visual (Table 2). High recall values indicate that, overall, fewer cells level, comparing the error maps provided by the different are missed compared to the total amount of cells correctly algorithms, to identify in which situations errors occurred more recognized. Although this might seem in contrast to the F1 score frequently and which cells were most susceptible. Since the results, the U-Net approach of recognizing cells – pixel per pixel – U-Net architecture proved not to be particularly meaningful seems to lose the perspective on the cell instance identification, in filtering target cells from non-target cells, we focused on generating many spurious cells detection, therefore rising the the comparison between ROXAS and Mask-RCNN outputs probability of segmenting the right ones. Conifer was the group (Supplementary Table 3). showing the best result for all algorithms (0.99 for U-Net, 0.97 The wood anatomical feature that produced the most FP for Mask-RCNN, and ROXAS); while alder, beech, and oak instances was the bark, with similar results for both approaches. vessels segmentation showed very similar results for the artificial In this respect, ROXAS provides the possibility to define an area Frontiers in Plant Science | www.frontiersin.org 7 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy TABLE 2 | Average values of F1 score, recall, and precision for cell instance detection using different segmenting approaches (Mask-RCNN, U-Net, and ROXAS) calculated for all anatomical groups. Conifer Alder Beech Oak Mask-RCNN U-Net ROXAS Mask-RCNN U-Net ROXAS Mask-RCNN U-Net ROXAS Mask-RCNN U-Net ROXAS F1 0.93 0.91 0.94 0.88 0.83 0.88 0.92 0.80 0.92 0.93 0.85 0.89 Recall 0.97 0.99 0.97 0.96 0.96 0.92 0.91 0.95 0.89 0.93 0.92 0.85 Precision 0.89 0.84 0.91 0.82 0.73 0.84 0.94 0.69 0.96 0.94 0.79 0.94 FIGURE 4 | Histograms of the missed cells (FN value) per groups: conifer, alder, beech, and oak. The count in the legend refers to the FN instances that were recorded in total per algorithm for each species, while the histograms show the respective size-frequency distributions. of interest and thus to manually exclude the bark. Nevertheless, included in the lumen area nor mistaken for a cell itself for every the comparison was done on images analyzed without any image of the dataset analyzed. manual editing (no tailored area of interest defined), and it was For the angiosperms, Mask-RCNN FPs included all those performed with the same methodology than with the Mask- small cells that could resemble a small vessel (our target), or a RCNN algorithm. The process could be further streamlined if the big fiber or apotracheal parenchyma; while ROXAS automatically algorithm training focused on bark/non-bark area recognition, filtered them out by their size thanks to the tailored configuration since the manual editing step of creating the area of interest files. Nonetheless, we believe that this challenging category could be skipped. cannot be clarified unambiguously without a closer look at Overall, the cell categories presenting FP issues coincide for the longitudinal sections of a sample. This highlights how the the Mask-RCNN algorithm and ROXAS on conifers. However, learning process of the DCNN approach really took place, and one advantage of the Mask-RCNN seems to be pit recognition. clearly had an effect on the image segmentation. Another example The high amount of target cells per unit area allowed the of FP included the scalariform perforation plates (Figure 6), algorithm to perfectly recognize this feature, and no pit was a feature abundantly present in alder and occasionally in Frontiers in Plant Science | www.frontiersin.org 8 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy FIGURE 5 | Output comparison between Mask-RCNN and ROXAS on examples of overlaying dust particle (A), paraffin drops (B), and stains of coloring solutions (C). Error legend can be found in Figure 1. The FN cell instance are marked in blue, and in ROXAS outputs they exactly correspond to the area interested by the (A–C) issue. beech. Here the algorithm, within certain limits, successfully the whole dataset is of average quality, sometimes has to be distinguished between adjacent vessels and individual vessels reconsidered as usable if this happens to be the only material sectioned at a scalariform perforation plate with thin bars, available, therefore as many cells as possible should be measured. which could be wrongly interpreted as two adjacent vessels. The In this testing dataset, the slide quality was very high and quite interpretation as one or two separate conduits influences the homogeneous, which explains why many high-quality cells were calculation of theoretical hydraulic conductivity of the specimen available and thus damaged and dubious cells were not segmented and therefore matters for studies dealing with water transport. in the ground truth. This sheds light on how FP evaluation The Mask-RCNN output presented some FP instances related is very case-specific regarding this issue. However, applied to to damaged cells. This happened because the algorithm training QWA analyses and specifically to ROXAS use, the FP error can aimed to consider every cell whose shape can be accurately be considered less time-consuming to handle, since eventually predicted, as long as it fulfills the requirements for a reliable requires deleting redundant cells, rather than drawing new ones measurement. What is usually a matter of exclusion when from scratch, as it happens in the case of FNs. Frontiers in Plant Science | www.frontiersin.org 9 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy FIGURE 6 | Output comparison on vessel identification. Original alder image from the testing dataset, Mask-RCNN error map, and ROXAS error map. When the perforation plate is strongly visible, there is a high chance that one single vessel is wrongly recognized as two separate ones. TABLE 3 | Average values of F1 score, recall, and precision for lumen area detection using different segmenting approaches (Mask-RCNN, U-Net, and ROXAS) calculated for all the groups. Conifer Alder Beech Oak Mask-RCNN U-Net ROXAS Mask-RCNN U-Net ROXAS Mask-RCNN U-Net ROXAS Mask-RCNN U-Net ROXAS F1 0.95 0.96 0.98 0.97 0.95 0.96 0.97 0.93 0.97 0.97 0.91 0.97 Recall 0.97 0.94 0.97 0.98 0.94 0.94 0.97 0.92 0.96 0.97 0.90 0.97 Precision 0.93 0.98 0.98 0.96 0.98 0.97 0.97 0.97 0.99 0.97 0.96 0.98 FIGURE 7 | Box plot showing the frequency distribution of the F1 score for lumen area, which allows a comparison of the three algorithms (Mask-RCNN, U-Net, and ROXAS) for each tree-species group. The blue values represent the fraction of cells reaching and surpassing the F1 score threshold of 0.9. Lumen Area Detection results for alder, beech, and, oak, all reported an F1 score Overall, all segmentation approaches showed very high F1 scores of 0.97. This value was the same for ROXAS with beech for lumen area (Table 3). For conifers, values varied between and oak, but it was slightly lower (0.96) for the ROXAS 0.98 (ROXAS) to 0.95 (Mask-RCNN algorithm). A different trend segmentation results on alder. U-Net algorithm did not cope characterized the angiosperms. The Mask-RCNN algorithm as well as the other approaches, and while the value was Frontiers in Plant Science | www.frontiersin.org 10 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy TABLE 4 | Example of parameters calculated for an underestimated lumen area TABLE 5 | Summary result on the comparison of the algorithms’ performances. and an overestimated lumen area. Cell instance detection Lumen area detection Area Prediction TP FP FN Precision Recall F1 Best Conifer * * performing Underestimated 1715 482 482 0 1233 1 0.28 0.44 Alder * * * algorithm (F1 lumen area score) Beech * * * * Overestimated 85 600 85 515 0 0.14 1 0.25 Oak * * * lumen area Detection Conifer + + + − + + accuracy trend When high precision is associated to low recall, then the area is underestimated. Alder + + + + − − (precision and When the values are low for precision and high for recall, then the area Beech − + − = − − is overestimated. recall) Oak − + − = − − Mask- U-Net ROXAS Mask- U-Net ROXAS RCNN RCNN The best performing algorithm was signaled with an asterisk (*). If the F1 score of a group type reported the same number for more than one approach, the star is represented twice. With respect to the detection accuracy trend, the overestimation both of the cell instance and the lumen area was reported with a plus sign (+), underestimation with a minus (−), and if there was no evident trend an equal symbol was noted (=). to 1, reaches its maximum, while recall is very low. In practice, what happened is that all the pixels that were recognized as belonging to the cell were indeed target pixels, but not all the target pixels were recognized, leading to an underestimation of the area (Figure 8A). The second row in Table 4 reports the opposite situation, recall reaches the maximum value, but precision is low. Figure 8B visually explains this case: all the pixels belonging to the cell were recognized, but redundant pixels around the area were included in the segmentation, resulting in an overestimated lumen area. Results for all the three approaches demonstrated a very high performance, even in terms of precision and recall of lumen area segmentation (Table 3). In the conifer group, we found that FIGURE 8 | (A) Example of lumen area underestimation, the dark green area ROXAS had the highest F1, precision, and recall values (0.98, represents the FN pixels. (B) Example of lumen area overestimation, the 0.98, 0.97, respectively). This resulted in very few redundant orange area represents the FP pixels. pixels and even less missed ones. Regarding the deep learning approaches, cells were more likely to be underestimated with U-Net (0.94 for recall and 0.98 for precision), while the opposite still very similar for alder (0.95), it dropped for beech held for Mask-RCNN (0.97 for recall and 0.93 for precision). (0.93), and oak (0.91). Analyses of alder samples were most precise when performed Overall, F1 scores were very high and results were close for by the Mask-RCNN algorithm. The advantage of this approach all the segmenting approaches, but generally ROXAS performed consists of a lower percentage of lumen area underestimated (0.98 slightly better. Nonetheless, since with artificial intelligence we for recall), and still a very good result on the overestimation aimed at very high accuracy levels to avoid manual editing as issue (0.96 for precision). ROXAS and U-Net, in contrast, tend much as possible, we additionally analyzed the percentage of cells to underestimate cell areas (0.94 for both approaches on recall) belonging to the highest accuracy class, that is when F1 ≥ 0.9 more than overestimating them (0.97 for ROXAS and 0.98 for (Figure 7, blue number). U-Net underperforms for beech and oak U-Net on precision). Beech and oak segmentation behaved very and to a lesser extent for alder. The Mask-RCNN algorithm and similarly in the three approaches. Mask-RCNN was the most ROXAS perform generally similarly well for the angiosperms, but stable of the three, where 0.97 was the value for both species and Mask-RCNN performs lower in the conifer category. for both parameters, meaning that there was no evident tendency The F1 score gives an overall idea of how well lumen in under- or over-estimating. ROXAS, which performs better area is detected. To understand if the algorithms are generally than U-Net, showed a strong precision both on beech (0.99) underestimating or overestimating the areas, we need to closely and oak (0.98), but generally underestimated lumen area. The analyze precision and recall parameters. In Table 4 we show two same trend was confirmed for U-Net, with a stronger tendency cell records from the conifer dataset generated by the Mask- in underestimating lumen area (0.92 for beech and 0.90 for oak). RCNN algorithm. Both show very low F1 scores, meaning that Since many aspects contribute to the evaluation process of the the segmentation process failed in accuracy for both cells. In algorithms’ performances, we include a general overview of the the first row, it is shown how precision, which ranges from 0 results to summarize the main outcomes of this analysis (Table 5). Frontiers in Plant Science | www.frontiersin.org 11 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy Mask-RCNN Results for the Sub-Dataset and size. Analogously, the homogeneous pattern of conifers is not The Mask-RCNN approach worked properly for all the species facilitating a proper detection and segmentation of the tracheids, and accurately segmented cells (Supplementary Figure 1). due to the small lumen of the latewood cells. The visual assessment revealed that conifers remain the main Another important aspect is the perspective we take weakness of the Mask-RCNN. The most occurring issue is to look at the data. A strict evaluation of numeric results represented by missed cells, especially small cells in the latewood. would suggest that Mask-RCNN accomplishes the best Regarding the lumen area detection, underestimation was more performance for the F1 score with three species categories likely to happen, but the algorithm coped particularly well with out of four; U-Net performed best for the recall parameter, problematic regions where the cell wall protrudes in the lumen very close to the Mask-RCNN results; and ROXAS recorded area or where stains occurred. Alder is one of the species the the best values for the precision parameter, still very close model worked best with: error maps showed few redundant to Mask-RCNN results (Table 2). However, the visual vessels and some broken ones wrongly segmented. This great interpretation of the error maps allowed us to draw additional performance is partially explained by the fact that the neural conclusions. Looking at the recall value on cell instances network could rely on a larger training dataset, but most likely by (i.e., missed cells) from the cell characteristic perspective, the fact that vessels have a distinctive shape and size compared to highlighted how the detection process benefits from the the surrounding fibers, and the diffuse porous organization of the neural network methodology. Many of the issues we selected, vessels make them quite consistent in shape along the ring. If the that hamper a smooth workflow with a traditional image larger training dataset would have had a major impact, we would analysis approach (i.e., ROXAS), were better handled with have also noticed a difference within the groups in the F1 scores the DCNNs. Both U-Net and Mask-RCNN showed not calculated for the main dataset. In general, for alder images, a very only the best results, but also a similar trend. At the same small portion of target cells were missed, in contrast to beech. time, visual interpretation of the error maps was also Beech presented very accurately segmented lumen areas but some important for the analysis of redundant cell instances (i.e., of them, especially when affected by very dark stains, were not precision). If on a first look, ROXAS and Mask-RCNN identified. The large oak earlywood vessels were almost perfectly seemed to behave similarly, a further analysis demonstrated recognized, with only a minor percentage of missing cells and the Mask-RCNN ability to encode species-specific features, some redundant fibers which were segmented in the latewood. thus avoiding certain undesirable cell categories that we In this smaller sample we also tested the running time of the previously classified as issues. Moving the focus to the Mask-RCNN model, using a 15-10210U CPU. By monitoring precision of the lumen area detection and the fraction of the process with a timer, we found out that the time needed for target cells reaching and surpassing a 0.9 threshold for analyzing cells per single image varied from a minimum of 7.76 s the F1 score, we obtained the highest values for Mask- to a maximum of 1.37 min depending on the species and the RCNN in all the angiosperm groups. Although Mask-RCNN complexity of the image. Running time is also dependent on the was not always the best performing, it demonstrated to task; when the comparison between other outputs is performed be the most stable concerning the underestimation and along with the cell detection, time can slightly increase. On overestimation of lumen area parameter. Overall, the most average, oak is the species that employs more time because of the frequent issue hampering the lumen area segmentation was the two models running on the same image. underestimation of lumen areas. As expected, the Mask-RCNN is best suited for the detection of a high numbers of objects in a single image. As previously stated, CONCLUSION the algorithm first detects all the possible target cells, therefore a consistent number of redundant predictions are avoided. Because Our results show that Mask-RCNN is highly suitable for the segmenting a higher number of cells makes it more likely to analysis of wood anatomical images. In all four wood-type identify all the target cell instances, recall values showed the groups, cells could be detected and segmented with high accuracy highest results for U-Net model. (i.e., high F1 score, precision, and recall). Overall, ROXAS performed very well, despite the traditional While ROXAS always performed better for conifers in all image analysis methodology. This is partially explained by the the different parameters analyzed, the Mask-RCNN was better characteristics of the testing dataset. The selected images already suited for angiosperms. We can thus infer that the wood belonged to a very high-quality standard, i.e., they were quite anatomical variability of the angiosperms does not hamper a homogeneous and tissue identification was generally very clear. proper segmentation process with the Mask-RCNN algorithm. Moreover, ROXAS configuration files used to analyze the images This is explained by the methodology employed by the Mask- were specifically created for each dataset, to obtain the best RCNN approach: the instance segmentation operated by the performance from the program. In contrast, we demonstrated algorithm first evaluates the context of a target cell and how the Mask-RCNN model can deal with bad quality samples then proceeds in the segmentation. Therefore, the more stable reaching an acceptable result, even with a rather small training the features of the target cells in the images, the more likely the dataset (at least 30 images per group), consisting of cropped Mask-RCNN is to succeed in the detection process, despite the images from original sections. The development of a very flexible diversity of the surrounding structures. Oak vessels, for example and user-friendly tool is particularly beneficial for future studies required two different algorithms, due to the difference in shape on various species. For this reason, our next aim is to implement Frontiers in Plant Science | www.frontiersin.org 12 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy the current version with the ability of retraining the models as a FUNDING permanent feature. Generally, the advantage of the Mask-RCNN approach does not rely in a high-speed processing of the images, GR, AG, MT, UL, and MW have been supported by the European but if the performance in detecting and segmenting target cell is Social Fund (ESF) and the Ministry of Education, Science high, then the manual editing phase afterward can be avoided or and Culture of Mecklenburg-Vorpommern, Germany under significantly reduced. the project “DigIT!” (ESF/14-BM-A55-0012/19 and ESF/14-BM- In summary, this study shows that future QWA analyses could A55-0015/19). AA-R was funded by a Postdoctoral Research greatly benefit from Mask-RCNN approaches, such as the one Fellowship by the Alexander von Humboldt Foundation. RP presented here, due to their high accuracy, stability, and ability acknowledges the support of the Swiss National Science to deal with artifacts, coupled with high usability. Moreover, a Foundation (SNSF), Grant P2BSP3_184475. GA was supported highly automatized approach, like Mask-RCNN, will allow the by the Swiss National Science Foundation SNSF (Grant No. processing of larger quantities of wood anatomical measurements 200021_182398, XELLCLIM). in a shorter time, opening the way for higher replicated studies on variability in wood anatomical features. ACKNOWLEDGMENTS DATA AVAILABILITY STATEMENT We are grateful to all the researchers providing data for the The raw data supporting the conclusions of this article will be algorithm training and testing steps. Namely: Angela Luisa made available by the authors, without undue reservation. Prendin, Timo Pampuch, and Jelena Lange. We also thank Alan Crivellaro for his contribution to the wood anatomical knowledge, and all the students that helped in the creation of the AUTHOR CONTRIBUTIONS training and testing datasets. GR, MT, and MW designed the study with the contribution of AA-R. AG and UL provided the user interface and the models for the algorithm. GR, GA, AA-R, RP, and MT contributed with SUPPLEMENTARY MATERIAL data. GR and MT performed the measurements and statistic assessment. GR wrote the manuscript with the contribution of The Supplementary Material for this article can be found all the co-authors. All authors contributed to the article and online at: https://www.frontiersin.org/articles/10.3389/fpls.2021. approved the submitted version. 767400/full#supplementary-material REFERENCES He, K., Gkioxari, G., Dollár, P., and Girshick, R. (2017). Mask R-CNN. Dubai: ICCV. Björklund, J., Seftigen, K., Fonti, P., Nievergelt, D., and von Arx, G. (2020). He, T., Marco, J., Soares, R., Yin, Y., and Wiedenhoeft, A. (2020). Machine learning Dendroclimatic potential of dendroanatomy in temperature-sensitive Pinus models with quantitative wood anatomy data can discriminate between sylvestris. Dendrochronologia 60:125673. doi: 10.1016/j.dendro.2020.125673 Swietenia macrophylla and Swietenia mahagoni. Forests 11:36. doi: 10.3390/ Carrer, M., von Arx, G., Castagneri, D., and Petit, G. (2015). Distilling f11010036 allometric and environmental information from time series of conduit size: the Hwang, S.-W., and Sugiyama, J. (2021). Computer vision-based wood standardization issue and its relationship to tree hydraulic architecture. Tree identification and its expansion and contribution potentials in wood Physiol. 35, 27–33. doi: 10.1093/treephys/tpu108 science: a review. Plant Methods 17:47. doi: 10.1186/s13007-021-00 Castagneri, D., Prendin, A. L., Peters, R. L., Carrer, M., von Arx, G., and Fonti, P. 746-1 (2020). Long-term impacts of defoliator outbreaks on larch xylem structure and James, K., and Bradshaw, K. (2020). Detecting plant species in the field with tree-ring biomass. Front. Plant Sci. 11:1078. doi: 10.3389/fpls.2020.01078 deep learning and drone technology. Methods Ecol. Evol. 11, 1509–1519. doi: Christin, S., Hervet, É, and Lecomte, N. (2019). Applications for deep learning in 10.1111/2041-210X.13473 ecology. Methods Ecol. Evol. 10, 1632–1644. doi: 10.1111/2041-210X.13256 Janecka, K., Harvey, J. E., Trouillier, M., Kaczka, R. J., Metslaid, S., Metslaid, De Micco, V., Carrer, M., Rathgeber, C. B., Julio Camarero, J., Voltas, J., Cherubini, M., et al. (2020). Higher winter-spring temperature and winter-spring/summer P., et al. (2019). From xylogenesis to tree rings: wood traits to investigate moisture availability increase scots pine growth on coastal dune microsites tree response to environmental changes. IAWA J. 40, 155–182. doi: 10.1163/ around the South Baltic Sea. Front. For. Glob. Change 3:578912. doi: 10.3389/ 22941932-40190246 ffgc.2020.578912 Fonti, P., von Arx, G., García-González, I., Eilmann, B., Sass-Klaassen, U., Gärtner, Krizhevsky, A., Sutskever, I., and Hinton, G. E. (2017). ImageNet classification with H., et al. (2010). Studying global change through investigation of the plastic deep convolutional neural networks. Commun. ACM 60, 84–90. doi: 10.1145/ responses of xylem anatomy in tree rings. New Phytol. 185, 42–53. doi: 10.1111/ 3065386 j.1469-8137.2009.03030.x Lange, J., Buras, A., Cruz-García, R., Gurskaya, M., Jalkanen, R., Kukarskih, Garcia-Pedrero, A., García-Cervigón, A. I., Olano, J. M., García-Hidalgo, M., Lillo- V., et al. (2018). Climate regimes override micro-site effects on the summer Saavedra, M., Gonzalo-Martín, C., et al. (2019). Convolutional neural networks temperature signal of scots pine at its northern distribution limits. Front. Plant for segmenting xylem vessels in stained cross-sectional images. Neural Comput. Sci. 9:1597. doi: 10.3389/fpls.2018.01597 Appl. 32, 17927–17939. doi: 10.1007/s00521-019-04546-6 LeCun, Y., Bengio, Y., and Hinton, G. (2015). Deep learning. Nature 521, 436–444. Gärtner, H., Cherubini, P., Fonti, P., von Arx, G., Schneider, L., Nievergelt, D., et al. doi: 10.1038/nature14539 (2015). A technical perspective in modern tree-ring research–how to overcome Lin, T.-Y., Dollár, P., Girshick, R., He, K., Hariharan, B., and Belongie, S. dendroecological and wood anatomical challenges. J. Vis. Exp. 97:52337. doi: (2017). Feature pyramid networks for object detection. arXiv [Preprint]. 10.3791/52337 arXiv:1612.03144 Frontiers in Plant Science | www.frontiersin.org 13 November 2021 | Volume 12 | Article 767400 Resente et al. Artificial Intelligence for Quantitative Wood Anatomy Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., et al. (2014). periodically waterlogged soils. Tree Physiol. 33, 425–437. doi: 10.1093/treephys/ “Microsoft COCO: common objects in context,” in Computer Vision – ECCV tpt020 2014, eds D. Fleet, T. Pajdla, B. Schiele, and T. Tuytelaars (Cham: Springer Spencer, K., Peter, M., and The GIMP Development Team (2021). GNU Image International Publishing), 740–755. Manipulation Program (GIMP). Berkeley: GIMP. Luis, G. E., Francisco, G. F., de Palacios de Palacios, P., Ruth, M. R., and Nieves, von Arx, G., and Carrer, M. (2014). ROXAS – a new tool to build centuries- N. C. (2009). Artificial neural network in wood identification the case of two long tracheid-lumen chronologies in conifers. Dendrochronologia 32, 290–293. Juniperus species from the Canary Islands. IAWA J. 30, 87–94. doi: 10.1163/ doi: 10.1016/j.dendro.2013.12.001 22941932-90000206 von Arx, G., Crivellaro, A., Prendin, A. L., Čufar, K., and Carrer, M. (2016). Mallik, A., Tarrío-Saavedra, J., Francisco-Fernández, M., and Naya, S. (2011). Quantitative wood anatomy-practical guidelines. Front. Plant Sci. 7:781. doi: Classification of wood micrographs by image segmentation. Chemometr. Intell. 10.3389/fpls.2016.00781 Lab. Syst. 107, 351–362. doi: 10.1016/j.chemolab.2011.05.005 von Arx, G., and Dietz, H. (2005). Automated image analysis of annual rings in the Media Cybernetics. (2021). Image-Pro Plus. Rockville, MD: Media Cybernetics, Inc. roots of perennial forbs. Int. J. Plant Sci. 166, 723–732. doi: 10.1086/431230 Olden, J. D., Lawler, J. J., and Poff, N. L. (2008). Machine learning methods Wu, F., Gazo, R., Haviarova, E., and Benes, B. (2021). Wood identification based without tears: a primer for ecologists. Q. Rev. Biol. 83, 171–193. doi: 10.1086/58 on longitudinal section images by using deep learning. Wood Sci. Technol. 55, 7826 553–563. doi: 10.1007/s00226-021-01261-1 Pampuch, T., Anadon-Rosell, A., Zacharias, M., von Arx, G., and Wilmking, M. Yeung, E. C. T., Stasolla, C., Sumner, M. J., and Huang, B. Q. (2015). Plant (2020). Xylem anatomical variability in white spruce at treeline is largely driven Microtechniques and Protocols. Cham: Springer International Publishing. by spatial clustering. Front. Plant Sci. 11:581378. doi: 10.3389/fpls.2020.581378 Zhang, L., Zhang, L., and Du, B. (2016). Deep learning for remote sensing data: Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., et al. a technical tutorial on the state of the art. IEEE Geosci. Remote Sens. Mag. 4, (2019). PyTorch: An Imperative Style, High-Performance Deep Learning Library. 22–40. doi: 10.1109/MGRS.2016.2540798 Vancouver, BC: NeurIPS 2019. Peters, R. L., Balanzategui, D., Hurley, A. G., von Arx, G., Prendin, A. L., Cuny, Conflict of Interest: The authors declare that the research was conducted in the H. E., et al. (2018). RAPTOR: row and position tracheid organizer in R. absence of any commercial or financial relationships that could be construed as a Dendrochronologia 47, 10–16. doi: 10.1016/j.dendro.2017.10.003 potential conflict of interest. Peters, R. L., von Arx, G., Nievergelt, D., Ibrom, A., Stillhard, J., Trotsiuk, V., et al. (2020). Axial changes in wood functional traits have limited net effects The reviewer AB declared a past collaboration with one of the authors MW to the on stem biomass increment in European beech (Fagus sylvatica). Tree Physiol. handling editor. 40, 498–510. doi: 10.1093/treephys/tpaa002 Prendin, A. L., Petit, G., Carrer, M., Fonti, P., Björklund, J., and von Arx, G. (2017). Publisher’s Note: All claims expressed in this article are solely those of the authors New research perspectives from a novel approach to quantify tracheid wall and do not necessarily represent those of their affiliated organizations, or those of thickness. Tree Physiol. 37, 976–983. doi: 10.1093/treephys/tpx037 the publisher, the editors and the reviewers. Any product that may be evaluated in Príncipe, A., van der Maaten, E., van der Maaten-Theunissen, M., Struwe, T., this article, or claim that may be made by its manufacturer, is not guaranteed or Wilmking, M., and Kreyling, J. (2017). Low resistance but high resilience in endorsed by the publisher. growth of a major deciduous forest tree (Fagus sylvatica L.) in response to late spring frost in southern Germany. Trees 31, 743–751. doi: 10.1007/s00468-016- Copyright © 2021 Resente, Gillert, Trouillier, Anadon-Rosell, Peters, von Arx, 1505-3 von Lukas and Wilmking. This is an open-access article distributed under Ravindran, P., Costa, A., Soares, R., and Wiedenhoeft, A. C. (2018). Classification the terms of the Creative Commons Attribution License (CC BY). The use, of CITES-listed and other neotropical Meliaceae wood images using distribution or reproduction in other forums is permitted, provided the original convolutional neural networks. Plant Methods 14:25. doi: 10.1186/s13007-018- author(s) and the copyright owner(s) are credited and that the original publication 0292-9 in this journal is cited, in accordance with accepted academic practice. No Scharnweber, T., Manthey, M., and Wilmking, M. (2013). Differential radial growth use, distribution or reproduction is permitted which does not comply with patterns between beech (Fagus sylvatica L.) and oak (Quercus robur L.) on these terms. Frontiers in Plant Science | www.frontiersin.org 14 November 2021 | Volume 12 | Article 767400