# GBCNet: In-Field Grape Berries Counting for Yield Estimation by Dilated CNNs
## 2 Preliminaries  
Measuring grape weight is a crucial task for wine producers also in view of quality control aspects, for example, to decide whether to thin the cluster or defoliate the shoot. As the amount of nutrients present in the ground and transmitted to the grapes is substantially constant [40], regulating the grape weight has a critical impact on wine quality. The standard procedure estimates yield as a function of the number of vines per surface unit \(N_{v}\), the number of grape bunches per vine \(N_{b}\) and the average weight of the bunch \(P_{b}\), combined as follows to obtain the yield:  
\[Y=N_{v}\cdot N_{b}\cdot P_{b}\;. \tag{1}\]  
Clearly, the method has practical limitations, in particular connected to the possibility of obtaining long term forecasts. In fact, the average weight of the clusters \(P_{b}\) can be accurately determined only closer to the harvest phase and estimation based only on historical data is difficult because the weight of the clusters can significantly change from year to year. For the varieties considered in this study the cluster's weights collected in the last five years by the CAVIT s.c. laboratory are presented in Table 1. From there we see that there are cases where the relative deviation ([[https://mathworld.wolfram.com/RelativeDeviation.html](https://mathworld.wolfram.com/RelativeDeviation.html)]([https://mathworld.wolfram.com/RelativeDeviation.html](https://mathworld.wolfram.com/RelativeDeviation.html))) \(V=\frac{\overline{|x-\overline{x}|}}{\overline{x}}\) through the years can reach 10%. Last but not least, this is a destructive sampling technique. In Table 2, the average weight of single berries is reported: comparing Table 1 with Table 2 we can see that in most of the cases, the average berry's weight is more stable through the years than cluster's weight. We have unified the nomenclature throughout the manuscript using \"weight\", in order to conform to the literature on the subject, both for berries and clusters. This suggests that combining the historical series of berry's weight with accurate berry counting, we can deliver better results than using clusters weight alone. Moreover, the use of the historical data opens the possibility to have a yield estimate immediately after the fruit sets. Following this approach, Equation (1) becomes:  
\[Y=N_{v}\cdot N_{b}\cdot N_{a}\cdot P_{a}\, \tag{2}\]  
with \(N_{a}\) the average number of berries per bunch and \(P_{a}\) the average berry's weight. In this work, we seek non-destructive approaches for grape yield estimation, applicable immediately after the fruit set. GBCNet is based on the use of images taken with standard smartphones and application of deep learning algorithms to count the number of berries in the images. With our solution, the agronomist can have a prediction of the yield by simply taking pictures in the field with a smartphone. The production estimate will be then obtained by processing the images with GBCNet and deriving the value for \(N_{a}\)--the average number of berries per bunch--in Equation (2) as a function of the GBCNet output of GBCNet. Counting is the core step for yield estimation for fruit; for grapes, automatic image analysis used 3D bunch reconstruction or artificial illumination at night [41; 42], while other Android based solutions used a capturing box as a synthetic background [43]. GBCNet does not require particular preparation for image acquisition, enabling an easier and faster AI-based yield estimation system. This opens the possibility of testing two different strategies for the yield estimation: the first is based on the evaluation of the average number of grape per bunch