High-Precision Phenotyping of Grape Bunch Architecture Using Fast 3D Sensor and Automation

Wine growers prefer cultivars with looser bunch architecture because of the decreased risk for bunch rot. As a consequence, grapevine breeders have to select seedlings and new cultivars with regard to appropriate bunch traits. Bunch architecture is a mosaic of different single traits which makes phenotyping labor-intensive and time-consuming. In the present study, a fast and high-precision phenotyping pipeline was developed. The optical sensor Artec Spider 3D scanner (Artec 3D, L-1466, Luxembourg) was used to generate dense 3D point clouds of grapevine bunches under lab conditions and an automated analysis software called 3D-Bunch-Tool was developed to extract different single 3D bunch traits, i.e., the number of berries, berry diameter, single berry volume, total volume of berries, convex hull volume of grapes, bunch width and bunch length. The method was validated on whole bunches of different grapevine cultivars and phenotypic variable breeding material. Reliable phenotypic data were obtained which show high significant correlations (up to r2 = 0.95 for berry number) compared to ground truth data. Moreover, it was shown that the Artec Spider can be used directly in the field where achieved data show comparable precision with regard to the lab application. This non-invasive and non-contact field application facilitates the first high-precision phenotyping pipeline based on 3D bunch traits in large plant sets.


Introduction
Grapevine (Vitis vinifera L. subsp. vinifera) is one of the most profitable crops worldwide. It is used for the production of wine grapes, table grapes and raisins [1]. Grapevine production is endangered from several fungal diseases (powdery mildew, downy mildew and Botrytis) that may cause severe economic losses. In particular, humid and warm conditions during the ripening period increase the risk for bunch rot infestations which are caused by the necrotrophic fungus Botrytis cinerea [2][3][4][5]. Botrytis can result in considerable yield and quality losses of grapes (a literature overview is given by Herzog et al. [6]). However, several studies have demonstrated that a dense bunch structure (i.e., bunch compactness) favors the infestation of grapes with Botrytis [2][3][4][5]. As a consequence, clonal selection and grapevine breeding focuses on the selection of genotypes revealing a loose bunch structure [6,7] which is known as one of the best strategies to increase resilience against Botrytis bunch rot.

Sensor and Plant Material
In this study the 3D scanner Artec Spider (Artec 3D, L-1466, Luxembourg,) was used. The sensor technology is based on blue LED structured light. The dense point clouds have a mesh resolution of up to 0.1 mm and point accuracy of up to 0.05 mm. Artec Spider is controlled by the Artec Studio 10 firmware. First, handling and accuracy of the 3D sensor was tested by the repeated  ). In order to test the transferability of the novel method as proof-of-principle, 39 dense bunches (Riesling as white and Pinot noir as red cultivar) and 35 looser bunches (Calardis blanc as white and Dornfelder as red cultivar) were scanned. The selected cultivars show high variability in berry color, bunch/berry size, shape, and bunch compactness (Figure 1a). Further, robustness and reliability of received 3D bunch data were tested by applying the phenotyping pipeline on the highly variable F1 progeny of the crossing population of GF.GA-47-42 × "Villard Blanc" [21] (Figure 1b). Therefore, 222 bunches of 41 genotypes (at least three bunches per genotype, Supplementary Table S1) were used. Finally, 48 grapes of Dornfelder, Pinot Noir, Calardis Blanc and Riesling (12 per cultivar, BBCH 89) were scanned directly in the field and further, under standardized lab conditions with the aim to validate precision and reliability of the received phenotypic data under field conditions. . In order to test the transferability of the novel method as proof-of-principle, 39 dense bunches (Riesling as white and Pinot noir as red cultivar) and 35 looser bunches (Calardis blanc as white and Dornfelder as red cultivar) were scanned. The selected cultivars show high variability in berry color, bunch/berry size, shape, and bunch compactness ( Figure 1a). Further, robustness and reliability of received 3D bunch data were tested by applying the phenotyping pipeline on the highly variable F1 progeny of the crossing population of GF.GA-47-42 × "Villard Blanc" [21] (Figure 1b). Therefore, 222 bunches of 41 genotypes (at least three bunches per genotype, Supplementary   Phenotyping pipeline: data acquisition and data analysis to phenotype 3D bunch traits. Bunches were fixed on a motorized hook and scanned 360° (or from the front) resulting in a dense point cloud of the bunch. Data analysis was conducted with 3D-Bunch-Tool (3D-BT). In a first step, the point cloud is segmented and characterized in its visible parameters. The output data are number of berries, berry diameter, berry volume, bunch length, bunch width and convex hull volume.  . In order to test the transferability of the novel method as proof-of-principle, 39 dense bunches (Riesling as white and Pinot noir as red cultivar) and 35 looser bunches (Calardis blanc as white and Dornfelder as red cultivar) were scanned. The selected cultivars show high variability in berry color, bunch/berry size, shape, and bunch compactness ( Figure 1a). Further, robustness and reliability of received 3D bunch data were tested by applying the phenotyping pipeline on the highly variable F1 progeny of the crossing population of GF.GA-47-42 × "Villard Blanc" [21] (Figure 1b). Therefore, 222 bunches of 41 genotypes (at least three bunches per genotype, Supplementary Table S1) were used. Finally, 48 grapes of Dornfelder, Pinot Noir, Calardis Blanc and Riesling (12 per cultivar, BBCH 89) were scanned directly in the field and further, under standardized lab conditions with the aim to validate precision and reliability of the received phenotypic data under field conditions.  Bunches were fixed on a motorized hook and scanned 360° (or from the front) resulting in a dense point cloud of the bunch. Data analysis was conducted with 3D-Bunch-Tool (3D-BT). In a first step, the point cloud is segmented and characterized in its visible parameters. The output data are number of berries, berry diameter, berry volume, bunch length, bunch width and convex hull volume. Bunches were fixed on a motorized hook and scanned 360 • (or from the front) resulting in a dense point cloud of the bunch. Data analysis was conducted with 3D-Bunch-Tool (3D-BT). In a first step, the point cloud is segmented and characterized in its visible parameters. The output data are number of berries, berry diameter, berry volume, bunch length, bunch width and convex hull volume.

3D Data Acquisition
Under lab conditions (standard ceiling illumination and room temperature 20 • C), grape bunches were fixed on a hook and scanned from the visible side (partial scan). For phenotyping the entire bunch architecture, bunches were hooked on a motorized device with controllable rotation speed and the whole bunch was scanned (360 • scan) with up to 7.5 frames per second. During spinning, the scanner recorded geometry and color data of the grape and transformed it into detailed 3D point clouds ( Figure 2). Data were saved for further analysis in Polygon File format (PLY).

"3D-Bunch-Tool" with Graphical User Interface
The 3D-Bunch-Tool (3D-BT) is a modified algorithm as described by [20] and consists of a three-step workflow as shown in Figure 2: Step (1) Pre-processing step: Reduction of high-resolution point cloud to reduce computing time.
Step (2) Segmentation step: all points of the point cloud are segmented into smoothly connected regions using a region growing approach ( Figure 2). Most of these regions contain one berry, but due to irregularities and occlusion in the data, it is possible that more than one berry is included in a region (undersegmentation) or a berry is split into several regions (oversegmentation).
Step (3) Berry detection step: We use a RANSAC-based approach to fit sphere models into the data, taking care of undersegmentation by extracting the inliers for each sphere from the region and reusing the remaining data until the number of points contained in the region fall below the minimal number of inliers or no model could be found ( Figure 2). Only sphere models showing a radius in the range between minimal and maximal berry radius and a sufficient number of inliers, i.e., points lying close to the surface of the model, are kept. A post-processing step is used to deal with oversegmentation: all sphere models with significant overlap (more than 25%) are compared to each other and only the one with the most inliers is considered to be a detected berry.
Finally, an intuitive Graphical User Interface (GUI) was developed consisting of a viewport (left) and a settings field (right) in order to provide easy access and fast overview over the berry detection process ( Figure 3).
After import of a 3D point cloud, the current state of berry detection, the segmented cloud (every region shown in a different color as visible in Figure 2-"Clustered point cloud") to the finally reconstructed berries, represented as spheres ( Figure 2-"Berry detection") is shown on the viewport. The settings field shows the current parameters and provides the possibility to adjust them if necessary ( Figure 3). We used parameters slightly adjusted from [20], as the minimal and maximal berry radius available in the data is greater (between 1 mm and 9 mm, respectively) and the point density achieved with the Artec Spider Scanner higher, therefore the minimal supporter number had to be set to a different value (100) and we are able to use a larger resolution of 0.4 mm. For fast processing of a high number of point clouds, we provide an option to select a folder including several scans in PLY format. In this mode, the processing workflow is automatically applied to all point clouds using the current settings and the detected berries and their respective output data are stored. As shown in [20], few erroneous sphere models can remain after the post-processing step in critical areas, like the hook. While the GUI provides the possibility to manually remove such erroneously detected spheres, we can expect that they will only lead to a minimal discrepancy in the statistically generated output data. Therefore, we decided not to include this manual and therefore time consuming step.
Finally, the software exports the following 3D bunch traits (.txt): (1) Maximal bunch length and bunch width, i.e., maximal diameter of the grape bunch parallel to the y-axis (length) and the maximal diameter parallel to x-or z-axis (width). (2) Volume of the convex hull of all points lying inside a detected berry.

Ground Truth Data and Statistics
Objective ground truth data of bunch phenotypes were acquired by using established image-based methods as described by [13,22]. Therefore, images were captured from the front side of the bunch, every single berry from the bunch was removed and berries were manually distributed on a perforated plate and a second image was captured [13]. The images were automatically analyzed with MATLAB based tools [13,22]: length and width of grapes were determined by the Trait-Size-Tool (TST) [22], the number of berries, berry size and berry volumes were acquired by the Berry-Analysis-Tool (BAT; [13]). Statistical analysis was conducted with R (Version 3.4.1). One-way-ANOVA analysis with Duncan multiple range test, Pearson correlation coefficient and for factor analysis, Spearman's rank correlation coefficient were implemented in order to validate 3D bunch traits with ground truth data.

Establishment of Artec Spider 3D Scanner
Grapevine bunches differ widely in shape and form from their phenotype. First of all, the Artec Spider 3D scanner was used to scan 10 table grapes 10 times respectively with different rotation speeds [five times fast (0.5 s −1 ) and five times slow (0.16 s −1 )]. The different rotation speeds result in point clouds with different point densities. The point clouds were analyzed with 3D-BT. Obtained results showed no significant differences between the investigated scanning variants. Thus, we

Ground Truth Data and Statistics
Objective ground truth data of bunch phenotypes were acquired by using established image-based methods as described by [13,22]. Therefore, images were captured from the front side of the bunch, every single berry from the bunch was removed and berries were manually distributed on a perforated plate and a second image was captured [13]. The images were automatically analyzed with MATLAB based tools [13,22]: length and width of grapes were determined by the Trait-Size-Tool (TST) [22], the number of berries, berry size and berry volumes were acquired by the Berry-Analysis-Tool (BAT; [13]). Statistical analysis was conducted with R (Version 3.4.1). One-way-ANOVA analysis with Duncan multiple range test, Pearson correlation coefficient and for factor analysis, Spearman's rank correlation coefficient were implemented in order to validate 3D bunch traits with ground truth data.

Establishment of Artec Spider 3D Scanner
Grapevine bunches differ widely in shape and form from their phenotype. First of all, the Artec Spider 3D scanner was used to scan 10 table grapes 10 times respectively with different rotation speeds [five times fast (0.5 s −1 ) and five times slow (0.16 s −1 )]. The different rotation speeds result in point clouds with different point densities. The point clouds were analyzed with 3D-BT. Obtained results showed no significant differences between the investigated scanning variants. Thus, we assumed that the Artec Spider provides valid data for reliable characterization of bunch architecture determining traits (Table 1). Table 1. Comparison between fast (0.5 s −1 ) and slow (0.16 s −1 ) scanning method. p-values from the One-way-ANOVA results for the 3D-BT estimated traits number of berries, berry diameter, berry volume, total volume convex hull volume (Convex Hull), grape width and grape length. Different letters indicate significant differences.

Proof-of-Principle on Selected Grapevine Cultivars
In the next step, the application of the phenotyping pipeline was tested on four selected grapevine cultivars. Received 3D bunch traits were correlated to ground truth data. Correlation plot based on all phenotypic data is shown in Figure 4 (bunch structure-and cultivar-specific results are given in Supplementary Table S2).
The results showed that berry number, berry diameter and the berry volume achieved very high correlation coefficient values. Correlation values for the total berry volume (Figure 4d, r 2 = 0.83, p < 0.001) can be explained by the summation of the 3D-BT underestimation of the berry number and its related berry volume. Convex Hull showed r 2 value of 0.79 (p < 0.001) compared to the total berry volume, measured with the image-based BAT (Figure 4e). The convex hull regards the volume of the whole bunch. That means that not just the area taken by berries but also the area between the berries and the area which is taken by the skeleton structure is considered. Therefore, the value for the convex hull will always be higher compared to the total berry volume. Moreover, it can be assumed that values for bunches with a big secondary bunch or a high number of interior berries, will lead to increasing values for the convex hull compared with BAT total berry volume. For the bunch width, r 2 -value was the lowest (r 2 = 0.54, p < 0.001) compared to 2D based TST reference measurements (Figure 4f). From a geometrical point of view, TST calculates grape bunch width as the longest distance between two berries with respect to x-and y-coordinate. 3D-BT extended this three dimensional and can also detect berries among the z-axis to take distance measurements. Thus, single measurement values vary stronger between the 2D and the 3D method. According to OIV 202, the length of the bunch is measured between the first and the last berry of the bunch in a vertical way. Adapted on OIV 202, the algorithm of 3D-BT detects the two most distant berries vertically and estimates the distance between them. For the bunch length correlation coefficient of 0.84 with corresponding p < 0.001, was detected compared to measurements taken with the TST 2D tool. (Figure 4g). Data analysis using BAT and TST requires lot of manual work, e.g., removal of every single berry from the bunch, manual distribution of all berries on a perforated plate [13]. According to the size of the bunch and the total number of berries, the whole procedure needs on average 10 min per bunch. Thus, it is very labor-intensive and invasive. In comparison, acquisition of point clouds by using the Artec Spider and data storage, need on average one minute and therefore this represents an up to 10-times faster, robust and non-invasive method. In addition, it enables the investigation of the bunch architecture in its natural 3D structure. In summary, obtained 3D bunch traits show slight differences on a cultivar /bunch structure level (Supplementary Table S2), i.e., 40 out of 42 calculated correlations are significant. Detected differences between received mean 3D bunch traits in comparison to mean ground truth data were also small (except for convex hull), e.g., mean berry diameter differs on average by 0.36 mm or mean berry number differs on average by 15 berries. The results indicate that precision and correlation values, especially the number of berries or berry diameter/volume, are more affected by the whole bunch architecture (sum of berry and bunch parameter as cultivar characteristics) as by structure of investigated bunches (loose-in comparison to dense bunch structure). In conclusion, the developed phenotyping pipeline (Figure 2) and precision of obtained 3D-BT phenotypic data are valid and reliable with regard to potential applications, i.e., breeding purposes and (breeding) research.

Test of Reliability: Application of the Workflow on High Varying Breeding Material
For breeding purposes, the developed pipeline must be robust enough to phenotype high varying breeding material, i.e., seedlings, progenies and grapevine accessions with different bunch characteristics (e.g., very loose up to very dense architecture, different bunch volume, berry size as well as different berry number). Therefore, segregating crossing progeny of GF.GA-47-42 × "Villard Blanc" [21] was used to test the efficiency of the phenotyping pipeline. Calculated correlations ( Table 2) were very high (except for the traits of grape width/length). Differences were observed between 3D-BT and ground truth data with the number of detected berries (Table 2). This can be explained due to the amount of inner layer berries of compact bunches. These inner components are not externally visible and therefore cannot be detected non-invasively. However, the correlation coefficient was very high (r 2 = 0.95, p < 0.001) ( Table 2). Correlation coefficient values (Table 2) were also comparable to results given in Figure 4 and Supplementary Table S2, although berry diameter is slightly different. Higher correlations could be explained by higher number and variability of investigated bunches, e.g., berry sizes range from 9.2-16.9 mm (Figure 4: 10.2-15.5 mm). Convex hull and total berry volume ( Table 2) showed similar r 2 -values compared to the results achieved in Section 3.2. Lower correlation values were observed for the grape width and grape length (r 2 = 0.59-0.57, p < 0.001) ( Table 2). As observed on selected cultivars (Figure 4), 3D-BT overestimates the bunch width/length in comparison to ground truth data. Overestimation means a deviation of the average 5.2 mm for grape width and the average 23.9 mm for grape length. Contrary to the investigated bunches in Section 3.2, bunches of segregating F1 progeny contain frequently large secondary bunches and bunch phenotypes vary strongly from genotype to genotype. However, the results from Sections 3.2 and 3.3 indicate that the phenotyping pipeline is robust and expedient for valid bunch trait characterization of breeding material.

Factor Analysis for an Objective Assessment of Bunch Compactness
Based on the findings of Pommer et al. [23] and previous experiments (unpublished), correlations between bunch compactness and bunch volume, number of berries and berry volume were detected. Thus, in the present study five quantitative factors were tested for an objective assessment of bunch compactness (Figure 5a). A subset of 100 bunches from the F1 progeny were analyzed and compactness was classified according to the optical descriptor OIV 204 [8]. The samples represent the OIV 204 classes 1-7. The factor values were correlated with OIV 204 classification ( Figure 5).
The highest correlation values were observed for Factor B and Factor C (0.71-0.7, p < 0.001) (Figure 5b). Those factors consider the total berry volume, grape length and further grape width (Figure 5b). Factor A [23] achieved a slightly lower value (0.66, p < 0.001). Factor D and E showed the lowest correlation values (0.25-0.34, p < 0.001) including the convex hull volume of bunches (Figure 5a,b). This result indicates that the 3D convex hull volume seems to be inexact for representing the volume of the whole bunch structure. This includes the total berry volume but also the volume of the empty space between the berries, which increases in loose and decreases in compact bunches. The result indicates that bunch architecture parameters like total berry volume, grape length and grape width might play an important role in bunch compactness. Moreover, the 3D bunch traits and the calculation of Factor B is usable for an objective, non-destructive assessment of bunch compactness with high-precision and high-throughput and provides a valid basis for further studies.
volume of the whole bunch structure. This includes the total berry volume but also the volume of the empty space between the berries, which increases in loose and decreases in compact bunches. The result indicates that bunch architecture parameters like total berry volume, grape length and grape width might play an important role in bunch compactness. Moreover, the 3D bunch traits and the calculation of Factor B is usable for an objective, non-destructive assessment of bunch compactness with high-precision and high-throughput and provides a valid basis for further studies.

Proof-of-Principle: Field Application Test for Non-Invasive, High-Precision Phenotyping
Applications of the Artec Spider to scan bunches directly in the field facilitates the opportunity to acquire 3D bunch traits non-invasively and fast. The major challenge is the limited view on bunches; i.e., only partial scans are possible under field conditions resulting in incomplete 3D point clouds with lack of information between artificial background and visual side of the bunch (illustrated in Figure 6).
Randomly chosen sides of 10 table grape bunches were scanned 10 times in the lab (partial scan). 3D bunch traits were compared to the results of full scans (360° scan). 3D bunch traits based on partial scans (Table 3) show high, significant correlations to those received from 360° scans. Partial scans reveal only half berry numbers and thus, half total volume/convex hull in comparison to the phenotypes acquired from 360° scans. If traits like grape width/length were determined from partial scans, determined phenotypic data can differ more or less slightly, i.e., on average 15 mm for grape width and 12.7 mm for grape length (Table 3). One explanation might be the fact that geometry of bunches differs between varying perspectives and thus grape length/width depend on scanned side. Finally, these results were rated as reliable enough to assume that non-invasive, partial scans of

Proof-of-Principle: Field Application Test for Non-Invasive, High-Precision Phenotyping
Applications of the Artec Spider to scan bunches directly in the field facilitates the opportunity to acquire 3D bunch traits non-invasively and fast. The major challenge is the limited view on bunches; i.e., only partial scans are possible under field conditions resulting in incomplete 3D point clouds with lack of information between artificial background and visual side of the bunch (illustrated in Figure 6).
Randomly chosen sides of 10 table grape bunches were scanned 10 times in the lab (partial scan). 3D bunch traits were compared to the results of full scans (360 • scan). 3D bunch traits based on partial scans (Table 3) show high, significant correlations to those received from 360 • scans. Partial scans reveal only half berry numbers and thus, half total volume/convex hull in comparison to the phenotypes acquired from 360 • scans. If traits like grape width/length were determined from partial scans, determined phenotypic data can differ more or less slightly, i.e., on average 15 mm for grape width and 12.7 mm for grape length (Table 3). One explanation might be the fact that geometry of bunches differs between varying perspectives and thus grape length/width depend on scanned side. Finally, these results were rated as reliable enough to assume that non-invasive, partial scans of grapes in the field are promising for contactless, fast and precise phenotyping of grape bunch architecture.
For that reason, the sensor was applied to scan grape bunches non-invasively in the field with three major objectives: (1) Sensor test under field conditions; (2) Test of automated program 3D-BT by analyzing 3D point clouds of incomplete, partial scanned grapes; and (3) Precision of 3D bunch traits derived from partial scans and corresponding 360 • scans. Therefore, 48 bunches of the selected cultivars Dornfelder, Pinot Noir, Calardis Blanc and Riesling (12 represent bunches per cultivar) were scanned in the field contact-free and non-invasive (field scan). Sensor handling and acquisition of 3D point clouds was comparably easy to apply under lab conditions. One challenge was scanning during windy conditions because of slightly moving vines and bunches. This can be lead to an interruption or complete loss of the scanner's tracking process. In order to prevent signal loss due to airstream, artificial background was used. Prior to the scanning process, interfering leaves were removed and an artificial background was used to avoid the overlap of adjacent bunches. Afterwards, scanned bunches were harvested and partial and full scans (360 • ) were conducted in lab as reference (an overview is given in Supplementary Table S3).  Table 4 shows statistics of the three types of scans. The number of berries showed significant differences between 360 • and partial/field scans but not between the partial scan in the lab and the field scan. Berry numbers of partial and field scans were approximately half of the total berry number obtained from 360 • scans (Table 4). The calculated values for the parameters berry diameter and volume showed no significant differences between all three types of scans (Table 4). Total berry volume of the field-, front scan was slightly more than half compared to 360 • values and as expected with statistically significant differences compared to 360 • scans (Table 4). Strong significant differences were observed for the convex hull volume between all three methods (Table 4). This is a result of the fact that the convex hull is calculated by the connection of the most outer berry points, which are detected in the point cloud. This can differ widely with respect to the scanned side of the bunch as described previously. However, deviation of determined grape width based on field scans in comparison to 360 • scan is only 7.2 mm. Table 4. Comparison of 3D bunch traits obtained from three different types of grape scans: fast and non-invasive field scans vs. invasive partial/360 • scans in the lab. Different letters indicate significant differences. One-way-ANOVA with α < 0.001. n = 48. The results show that 3D scans under field conditions provide high precision and reliable point clouds to determine different 3D bunch traits. The data can also be used to extrapolate total number of berries and thus, total berry volume. The results show that 3D scans under field conditions provide high precision and reliable point clouds to determine different 3D bunch traits. The data can also be used to extrapolate total number of berries and thus, total berry volume.

Conclusions
Grape bunch architecture, which defines bunch structure, relies on a mosaic of different single traits which could be acquired with the developed phenotyping pipeline in an objective, accurate and high-throughput manner. The phenotyping pipeline is open to all kind of users due to simple-to-handle unharmed sensor technology, analysis software with an intuitive graphical user interface and further, minor necessity of user interaction due to automated data analysis. These are the most convenient advantages of the developed method. Furthermore, acquisition and analysis of sensor data takes approximately one minute and is thus much faster compared to comparable precise methods [13]. Further, field applications can be used for repeatable screenings and comparable evaluations of large experimental plots of high varying breeding material or genetic repositories, e.g., in order to conduct comparative genetic association studies or to develop genetic markers for marker-assisted selection. This kind of phenotypic objectivity enables monitoring purposes in order to track bunch development under different environmental conditions, e.g., soil composition, water and nutrient availability.
Supplementary Materials: The supplementary materials are available online at www.mdpi.com/xxx/s1.