## 4 Experimental Results and Discussion
### Vision Capabilities Implementation
#### 4.1.1 Dataset  
Rather than creating an image dataset from scratch by acquiring high-resolution images (as, for instance, in [23; 24]) or stereo images [25] directly on the field, the Embrapa Wine Grape Instance Segmentation Dataset (WGISD, [[https://github.com/thsant/wgisd](https://github.com/thsant/wgisd)]([https://github.com/thsant/wgisd](https://github.com/thsant/wgisd)), accessed on 22 April 2024) has been considered as the starting point for our investigation. This is an approach that guarantees reproducibility and, simultaneously, results that perform well in terms of effectiveness, especially in the field. The dataset has been augmented accordingly with this purpose, as shown below. The WGISD was purposefully created for use in tasks concerning image-based monitoring and robotics in a vinicultural setting (see, among others, [26]), and it provides visual instances of five different grape varieties. The dataset shows a good variance with respect to cluster pose, illumination, lens focus and it includes genetic and phenolic variations that impact the shape, the color and the compactness of the bunches. The original dataset contains 300 images with 4432 grape clusters identified by the same number of bounding boxes (object detection) and 2020 bunches identified by binary masks (semantic segmentation). The dataset subdivision between training, validation and testing for WGISD (for images and bounding boxes) is given in the first row of Table 2.  
Dataset Aggregation and Augmentation  
Following the current state of the art in the literature, the WGISD dataset has been aggregated with an additional general purpose dataset for the following reasons:  
* Radically avoiding overfitting problems, usually determined by the construction of neural networks for the recognition of a single class;
* To be able to follow an analysis strategy of the average precision percentage on the \"grapes\" class based on the average precision of other classes (in essence, check how well the trained neural network behaves with the new \"grapes\" class compared to all other recognizable classes);
* To exploit inference results of grape-unrelated classes and further empower the mechanism of obstacle avoidance (e.g., applying different security protocols based on the _nature_ of an obstacle--a person, another machine in the field and so on). In order not to create a neural network with overabundant knowledge that could excessively impact each training session, the choice fell to the PASCAL VOC 2007+2012 dataset ([[http://host.robots.ox.ac.uk/pascal/VOC/](http://host.robots.ox.ac.uk/pascal/VOC/)]([http://host.robots.ox.ac.uk/pascal/VOC/](http://host.robots.ox.ac.uk/pascal/VOC/)), accessed on 22 April 2024), which provides a catalog of 20 classes, varying from vehicles, to home decor items and animals. Table 3 shows the subdivision of training/validation and testing regarding images and bounding boxes in the PASCAL VOC 2007+2012 dataset. Given the clear mismatch between the number of images to train/validate on WGISD and the single class average on PASCAL VOC 2007+2012, the original WGISD dataset underwent an image augmentation process. Several strategies may be adopted in this regard, for instance, which simulate camera focus, noise or dirty lenses on randomly selected images in the source dataset [26], or by simply integrating additional images from \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & \multicolumn{2}{c}{**Images**} & \multicolumn{2}{c}{**Bounding Box**} \\  & **Train/Val** & **Test** & **Train/Val** & **Test** \\ \hline
**WGISD** & 242 & 58 & 3581 & 850 \\
**WA-WGISD** & 1694 & 58 & 25,067 & 850 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Dataset partition for grapes recognition. other datasets to obtain a balance for the specific class (like GrapeCS-ML added to the Open Image Dataset v6 restricted to the \"grapes\" class [27]).