# GBCNet: In-Field Grape Berries Counting for Yield Estimation by Dilated CNNs
## 4 Results and Discussion
Figure 4: Example of application of GBCNet on a CR1 image (**a**), its associated ground truth (**b**) and model output (**c**). The CR1 dataset collects pictures of seven different varieties: the performances of the network for each variety is reported in Tables 5 and 6. The difference in performance reflects that having collected the pictures in the same days for all the varieties implies a non-uniform phenological state, yielding highly different visual features exemplified in Figure 6. Although this difference among varieties impacts the performances of GBCNet on single image prediction, the model is capable of obtaining a low MAE by aggregating the output predictions for almost all the varieties. Figure 5: Examples of CR1 background regions incorrectly highlighted as berry by GBCNet. Overestimation errors are usually associated to patterns with a high variability in brightness and contrast. Figure 6: CR1 images are collected during the same time period but with different phenological stages depending on the variety. Pictures are sorted by development stage, from less (**a**) to intermediately (**b**) to most (**c**) developed from left to right. Table 7 collects results for GBCNet tested on CR2 dataset with 3-CV. Considering single images predictions with an average of 1113.9 berries per picture, the model reaches a MAE of 117.36 berries for each validation fold (10.74%). The overall MAE obtained comparing the cumulative sum of predictions and ground truth (6288.3 berries in average for each fold) results in lower value, i.e., 466.53 (7.24%), benefiting from the balancing effect of over- and underestimation when aggregating predictions. In Figure 7 we graphically report the MAE(%) for all varieties and for all the experimental conditions: these results are fully comparable with what was obtained with the alternative methods available in the literature, but where the images are taken in a controlled environment or employing a capturing box to limit background interference. As stated in Section 2 (Preliminaries), the estimation of the number of berries is the crucial parameter for having an accurate prediction of the yield. Having proved that the error on counting berries is of the order of a few percentage points, we are allowed to use Equation (2) to arrive at the final goal of estimating the grape production. \begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline  & & \multicolumn{3}{c}{**Per Image**} & \multicolumn{3}{c}{**Overall**} \\  & \(n\) & **MAE** & **MAE (\%)** & **MSE** & \(N\) & **MAE** & **MAE (\%)** \\ \hline Chardonnay & 2 & 7.74 & 8.79\% & 8.38 & 169 & 6.38 & 3.77\% \\ Lagrein & 2 & 11.03 & 6.94\% & 11.88 & 328 & 22.05 & 6.72\% \\ Marzemino & 3 & 13.77 & 14.32\% & 16.99 & 301 & 35.31 & 11.73\% \\ Pinot Gris & 7 & 19.86 & 13.00\% & 22.98 & 1298 & 11.08 & 0.85\% \\ Pinot Noir & 4 & 10.36 & 7.80\% & 10.91 & 582 & 11.62 & 2.00\% \\ Sauvignon & 4 & 10.35 & 8.62\% & 12.79 & 483 & 12.54 & 2.60\% \\ Traminer & 4 & 10.95 & 9.31\% & 12.22 & 492 & 5.52 & 1.12\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Application of GBCNet on CR1 test dataset. Results are reported for each variety, with the number of images (_n_) and berries (_N_). \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & \(n\) & **MAE** & **MAE (\%)** & **MSE** \\ \hline Per Image & 5.7 & 117.36 \(\pm\) 14.07 & 10.74 \(\pm\) 1.15 & 137.81 \(\pm\) 18.19 \\ Overall & 6207.3 & 466.53 \(\pm\) 182.99 & 7.24 \(\pm\) 1.53 & \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Application of GBCNet on CR2 dataset with 3-CV. The \(n\) column refers to the average number of images and berries per fold respectively.