# GBCNet: In-Field Grape Berries Counting for Yield Estimation by Dilated CNNs  
[PERSON]  
1 Fondazione Bruno Kessler, 38123 Trento, Italy; [EMAIL_ADDRESS] (L.C. ); [EMAIL_ADDRESS] (M.C. ); [EMAIL_ADDRESS] (C.F.) 2  
[PERSON]  
1 Fondazione Bruno Kessler, 38123 Trento, Italy; [EMAIL_ADDRESS] (L.C. ); [EMAIL_ADDRESS] (M.C. ); [EMAIL_ADDRESS] (C.F.) 2  
[PERSON]  
1 Fondazione Bruno Kessler, 38123 Trento, Italy; [EMAIL_ADDRESS] (L.C. ); [EMAIL_ADDRESS] (M.C. ); [EMAIL_ADDRESS] (C.F.) 2  
[PERSON]  
1 Fondazione Bruno Kessler, 38123 Trento, Italy; [EMAIL_ADDRESS] (L.C. ); [EMAIL_ADDRESS] (M.C. ); [EMAIL_ADDRESS] (C.F.) 2  
Footnote 1: email: [EMAIL_ADDRESS]; Tel. : +39-0461-314-523  
Footnote 2: email: [EMAIL_ADDRESS]; Tel. : +39-0461-314-523  
Footnote 3: email: [EMAIL_ADDRESS]; Tel. : +39-0461-314-523  
Footnote 4: email: [EMAIL_ADDRESS]; Tel. : +39-0461-314-523  
+++ ==WARNING: Truncated because of repetitions==  
++  
by [PERSON] and colleagues in [15; 16], that can help in increasing their productivity, even if sometimes specific setups are required [17]. Such gain is boosted by the coupling of the hardware technological advancement with the simultaneous scientific leap in mathematics and computer sciences. The result is the seamless integration of the image acquisition systems into analytics workflow powered by either deterministic algorithms from computer vision [14; 18; 19; 20] or predictive models from stochastic learning approaches, as the basis for estimating yield as well as controlling quality. In particular, the evolution of machine learning theory in the last decade reflects on precision agriculture, too. While a number of classical shallow machine learning methods have been implemented targeting yield estimation and similarly crucial tasks [21], even in unsupervised (clustering) mode [12; 22], leading to the deploy of fully functional operative solutions [23], the recent introduction of the Deep Learning (DL) paradigm strongly impacted the sector. Different network architecture and training solutions have been proposed in the literature, from early attempts [24] to the use of LeNet [25], or AlexNet [26] or data augmentation with simulated training [27] aiming at different tasks such as grape variety identification. However, Convolutional (CNN) architectures and their several variants such as Mask R-CNN [28] have become the _de facto_ standard for yield estimation [13; 29], also enhanced by companion techniques like semantic segmentation [5], transfer learning [30] and three-dimensional association to integrate and spatialize the detection results [31] to overcome multiple counting and occlusions, and even extending to generic fruit detection [32] or integrating with non-imaging approaches, for instance, using historical data [33]. Here, we introduce the Grape Berry Counting Network (GBCNet), an application of Deep Learning to enable a precision agriculture approach by using fixed-focus small aperture wide angle optical systems, available in many smartphones. In particular, we demonstrate that using everyday technologies like smartphones, in combination with the adaptation of recent deep neural networks for crowd and object counting [34; 35; 36; 37; 38; 39], will lead to a non-destructive yield estimation in the context of wine production, through an automatic estimate of the number of berries forming a grape bunch. A major advantage of GBCNet with respect to the standard procedures is the possibility to make the estimate immediately after the fruit set. As model performance metrics we use Mean Absolute Error (MAE) and Mean Squared Error (MSE), the most common measures for both agricultural yield estimation and crowd-counting. The Mean Average Error (MAE) obtained on the two original datasets varies from 0.85% for Pinot Gris to 11.73% for Marzemino, representing a good compromise between minimal device cost, in-field efficiency and yield estimate reliability.