# Vineyard Gap Detection by Convolutional Neural Networks Fed by Multi-Spectral Images
## 5 Discussion  
After training all networks with each dataset and analyzing the results from the regression-based networks, it was concluded that the best network was Tiny-YOLOv4, as a possible solution for depletion in a UAV. The weights of Tiny-YOLO were the best as starting weights for Mask-RCNN, which also performed well in detecting the different polygon regions that encapsulated the different gaps, after the second stage of training. The different networks also were able to detect additional gaps beside the ones in ground truth boxes, which were not found in the test images of a predicted box encapsulating vegetation. More common were false positives where the networks identified roads, and spaces between the crops and trees as gaps in the plantation. The best dataset was the RGB dataset, although it is important to note that the datasets were not balanced. It is not possible to conclusively say that this is the best dataset, since it is also the biggest of all of them, sometimes with thousands more images than some of the others. This severely affects the end results, since this dataset also has more training data, so the networks can better approximate in those cases. A comment must be made about the labeling of the different polygons, since the labeling was entirely done by one person. This is not ideal, since it leads to fewer ground truth boxes being identified due to time constraints and human error. These situations are better avoided with more than one person being responsible for identifying ground truth boxes. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Method** & **Train** & \(\mathbf{AP_{10}}\) & \(\mathbf{AP_{50}}\) & \(\mathbf{AP_{75}}\) \\ \hline YOLO + Mask-RCNN & RGB & 66.12\% & 56.55\% & 9.64\% \\ Tiny-YOLO + Mask-RCNN & RGB & 67.98\% & 60.88\% & 12.81\% \\ Tiny-YOLOv2 + Mask-RCNN & RGB & 66.42\% & 59.10\% & 15.33\% \\ Tiny-YOLOv3 + Mask-RCNN & RGB & 63.25\% & 57.46\% & 11.50\% \\ Tiny-YOLOv4 + Mask-RCNN & RGB & 64.07\% & 57.69\% & 9.18\% \\ \hline YOLO + Mask-RCNN & CIR & 65.37\% & 52.56\% & 12.38\% \\ Tiny-YOLO + Mask-RCNN & CIR & 59.92\% & 53.69\% & 13.90\% \\ Tiny-YOLOv2 + Mask-RCNN & CIR & 61.90\% & 52.74\% & 8.46\% \\ Tiny-YOLOv3 + Mask-RCNN & CIR & 62.83\% & 52.14\% & 11.01\% \\ Tiny-YOLOv4 + Mask-RCNN & CIR & 63.53\% & 52.88\% & 5.86\% \\ \hline YOLO + Mask-RCNN & NDRE & 43.76\% & 24.16\% & 2.07\% \\ Tiny-YOLO + Mask-RCNN & NDRE & 42.67\% & 23.60\% & 2.02\% \\ Tiny-YOLOv2 + Mask-RCNN & NDRE & 44.77\% & 25.22\% & 3.27\% \\ Tiny-YOLOv3 + Mask-RCNN & NDRE & 35.89\% & 21.17\% & 0.16\% \\ Tiny-YOLOv4 + Mask-RCNN & NDRE & 42.17\% & 24.19\% & 1.17\% \\ \hline YOLO + Mask-RCNNCNN & NDWI & 56.24\% & 34.98\% & 2.98\% \\ Tiny-YOLO + Mask-RCNN & NDWI & 58.21\% & 40.93\% & 7.57\% \\ Tiny-YOLOv2 + Mask-RCNN & NDWI & 52.19\% & 40.43\% & 2.38\% \\ Tiny-YOLOv3 + Mask-RCNN & NDWI & 59.69\% & 50.98\% & 8.30\% \\ Tiny-YOLOv4 + Mask-RCNN & NDWI & 55.05\% & 43.10\% & 7.17\% \\ \hline YOLO + Mask-RCNN & NDVI & 51.06\% & 40.49\% & 5.43\% \\ Tiny-YOLO + Mask-RCNN & NDVI & 55.12\% & 41.92\% & 5.39\% \\ Tiny-YOLOv2 + Mask-RCNN & NDVI & 58.69\% & 47.08\% & 3.91\% \\ Tiny-YOLOv3 + Mask-RCNN & NDVI & 57.50\% & 48.31\% & 3.26\% \\ Tiny-YOLOv4 + Mask-RCNN & NDVI & 60.63\% & 49.64\% & 10.46\% \\ \hline YOLO + Mask-RCNN & GS & 56.43\% & 53.75\% & 15.08\% \\ Tiny-YOLO + Mask-RCNN & GS & 60.30\% & 56.67\% & 12.40\% \\ Tiny-YOLOv2 + Mask-RCNN & GS & 54.90\% & 46.00\% & 5.20\% \\ Tiny-YOLOv3 + Mask-RCNN & GS & 56.94\% & 46.45\% & 7.72\% \\ Tiny-YOLOv4 + Mask-RCNN & GS & 61.93\% & 57.94\% & 13.28\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Mask-RCNN ’all’ layers training for 50 epochs. Method: weights used + Mask-RCNN; Train: dataset used in training; \(AP_{10}\): average precision with an IoU of 0.10; \(AP_{50}\): average precision with an IoU of 0.5; \(AP_{75}\): average precision with an IoU 0.75. Analyzing Table 6 showed that the best overall result was the solution with Tiny-YOLOv4 and an RGB dataset.