## 3 Results  
Table 1 shows the total precision of the model, recall, F1-Score and just the cluster precision of the results from the final iteration described in Section 2.2.2. The difference between \"Precision\" and \"Cluster Precision\" in the two tables is that \"Precision\" also includes the \"Tree\" class, whereas, like the name suggests, \"Cluster Precision\" is the precision of the model when detecting fruit flower clusters. After 6000 iterations of training, the cluster precision for the training phase was 0.98 or 98% and when testing the trained  
Figure 10: General structure of YOLOv4. model with new data, the result was 0.88 or 88%. As expected, all 4 results decrease during the testing phase. Though, lower precision could be considered a bad result, running the model on a brand-new dataset gives a more accurate idea of the actual performance of the model to make sure no severe overfitting/underfitting is occurring. When comparing the results in Table 1 with existing research, the performance of the YOLOv4 is similar to the experience such as in [35], where [35] obtained an F1-Score of 77.3% and 83.3% from two different apple tree datasets. The authors in [36] conducted research on the kiwi tree but also produced a similar F1-Score ranging from 80% to 84.1% depending on datasets. Additional information on how to calculate these parameters may be found in [27]. Figure 11 shows an example of the resulting detections of the right side compared to the hand-counted result side-by-side and Figure 12 shows all detected and counted clusters for the 106 trees. In almost all the cases, the detector predicted less fruit flower clusters than what was there. The percentage error, maximum difference, minimum difference and average difference were calculated for each side of the trees and shown below in Table 2. For the detection of fruit flower clusters on the right side, the percentage error averaged to \(-14.52\%\), which is similar to the result for the left side, which is \(-13.49\%\). The minimum difference and the average difference were also similar between the right and left side with 0 to 1 and 21 to 20. The maximum difference between the detection of the fruit flower clusters and the counted clusters for the right and left side had a difference of 15 clusters, though this does not mean that the maximum difference were obtained from the same tree. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Precision** & **Recall** & **F1-Score** & **Cluster Precision** \\ \hline
**Training** & 0.95 & 0.85 & 0.89 & 0.98 \\ \hline
**Testing** & 0.90 & 0.72 & 0.80 & 0.88 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training and testing results for YOLOv4. Figure 11: Comparison of the first 20 trees from the ‘right side’ of the row. The average results of both the right and left sides of the tree are shown in Table 3. This table takes the average of the four values in the previous tables as well as the average number of clusters considering all results from both sides of the tree, the most and least number of clusters detected, as well as the counted and the average standard deviation. Similar to the maximum difference values in the previous tables, the most and least clusters detected and counted may not be obtained from the same tree. Figure 13 present a snapshot from the resulting detection video. This is an example of the final results and how the data such as, number of detected clusters were obtained. Looking at the top left of the figure a number can be seen which is used to keep track of the current number of trees detected in the frame. There are also numbers located in the center of the bounding boxes of the trees which are used to identify the tree position. This was crucial as the objective was to combine the right and left results to find the average as well as the difference between the two sides. Therefore, centroid tracking was implemented to keep track of the bounding boxes for the trees only and update the number of clusters with the respective tree.