# Vineyard Gap Detection by Convolutional Neural Networks Fed by Multi-Spectral Images
## 6 Conclusions  
In this paper, multiple regression-based networks--YOLO, Tiny-YOLO, Tiny-YOLOv2, Tiny-YOLOv3, and Tiny-YOLOv4--were trained with different datasets comprised of maps made from different multi-spectral indexes, in order to determine which combination resulted in the best network to be employed in a drone for detection of gaps in a vine plantation. Besides the regression-based networks mentioned, Mask-RCNN was trained with the weights resulting from the regression-based training sessions, with the respective datasets. This study was an initial attempt at resolving the issue of plantation gap detection using UAV imagery. One issue that still is unresolved is the false positives detected in paths, which are very similar to gaps. The false positives can be diminished by training the networks for a longer period but, since not every gap was labeled, this would teach the networks to ignore smaller or low-vegetation gaps most of the time. Future improvements include a better dataset with all data labeled correctly, which can be achieved using the final weights in this study, and later removing any incorrect identification. Having this dataset would mean that the networks could be trained for longer periods of time without learning to ignore less obvious gaps. With this research, the work presented can continue by generalizing these networks to detect more than gaps. By using multi-spectral images, the system can also be trained into detecting parts of the crops where the vegetation is drier and use that information to control the irrigation system in order to avoid watering gaps and places where the plants and soil still have acceptable levels of humidity. The supervision of humidity in a certain field can be done with NDWI and NDVI images with the help of UAV imagery, as seen in [71]. Further studies could be made where the different variables are diminished or erased, or new studies focused on different types of agricultural issues could continue from here, where the best multi-spectral indexes, image formats, and networks can be determined and employed into a drone as solutions. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Method** & **Train** & \(\mathbf{AP_{50}}\) & \(\mathbf{AP_{75}}\) \\ \hline Tiny-YOLOv4 & RGB & 61.47\% & 19.62\% \\ \hline YOLO + Mask-RCNN (just ’head’ layers) & NDVI & 45.65\% & 6.88\% \\ \hline Tiny-YOLOv3 + Mask-RCNN (just ’head’ layers) & GS & 46.48\% & 6.48\% \\ \hline Tiny-YOLO + Mask-RCNN (full) & RGB & 60.88\% & 12.81\% \\ \hline Tiny-YOLOv2 + Mask-RCNN (full) & RGB & 59.10\% & 15.33\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The best results in each AP from each round of training and testing (Tables 3–5). **Author Contributions:** Conceptualization, S.S. and J.P.M.-C.; methodology, S.S., J.P.M.-C. and D.P. ; software, S.S.; validation, S.S., D.P., F.M. and S.D.C. ; formal analysis, S.S., J.P.M.-C. and F.M. ; investigation, S.S. and J.P.M.-C.; resources, D.P. ; data curation, D.P. and S.D.C. ; writing--original draft preparation, S.S.; writing--review and editing, F.M. and S.D.C. ; visualization, S.S. and J.P.M.-C.; supervision, J.P.M.-C. All authors have read and agreed to the published version of the manuscript. **Funding:** This research was partially funded by Fundacao para a Ciencia e a Tecnologia under Projects UIDB/00066/2020, UIDB/04111/2020, foRESTER PCIF/SSI/0102/2017, and IF/00325/2015; Instituto Lusofono de Investigacao e Desenvolvimento (ILIND) under Project COFAC/ILIND/COPELABS/1/2020; Project \"(Link4S)ustainability--A new generation connectivity system for creation and integration of networks of objects for new sustainability paradigms [POCI-01-0247-FEDER-046122! LISBOA-01-0247-FEDER-046122]\" is financed by the Operational Competitiveness and Internationalization Programmes COMPETE 2020 and LISBOA 2020, under the PORTUGAL 2020 Partnership Agreement, and through the European Structural and Investment Funds in the FEDER component; and also IEOT: Intelligent Edge of Things under under Project LISBOA-01-0247-FEDER-069537.