## 4 Conclusions  
In this study, the two state-of-the-art object detection models for use on TPU devices were trained to detect the tree trunk in a vineyard. The best performance on PC in terms of  
Figure 16: The result of the model in the complex environment. Figure 14: The left images are the detection results of the model, and the left side is the ground truth. The model has found the trunks in the image that are not marked as tree trunks. Figure 15: Two trunks are close together and the model cannot detect both. accuracy was achieved by the SSD with MobileDet Edge TPU model compared to the SSD with MobileNet Edge TPU, MobileNet-V1, and MobileNet-V2. However, the degradation of the accuracy of MobileNet Edge TPU was less when the model was transferred to the RaspberryPi with TPU and performed the best on this device. Therefore, the accuracy of the model should be measured on the edge devices to ensure the performance of the model on these devices. This work also examined the relationship between input size and accuracy and inference time on edge devices. By changing the model input from 320 \(\times\) 320 to 640 \(\times\) 480, the accuracy and inference time increased simultaneously. Therefore, the model input size should be considered as a trade-off factor for training the model. In addition, this work investigated how the size of the training dataset and the number of thermal images in the training dataset affect the detection results. When the size of the training dataset was reduced to 20%, the performance of the model decreased by 8%, and when thermal images were excluded from the training set, the performance of the model decreased by 2%. The analysis of the detection of the model on the test set shows that the wrong labeling, the complex environment, the fused trunk, or the trunk far away from the camera can lead to false detection of the model. The limitation of DL models is that the output of the trained model depends on the training dataset. According to this work, a model trained on images without leaves is often unable to detect a tree trunk with leaves. To avoid this drawback, the training model data should be collected at different seasons and under real conditions. When using DL models, updating and re-training the model with new data collected in the field should also be considered an important step. The fact that the models from DL require a large amount of training data is another drawback that makes it difficult to use these models in agriculture. However, sharing the dataset in research projects such as VineSet helps to advance the research field. K.A. : investigation; methodology; writing--review, software. E.A. : methodology; software. P.D.G. : supervision, writing review, and project administration and Funding acquisition. V.N.G.J.S. : funding acquisition, reviewing and editing. J.M.L.P.C. : funding acquisition, reviewing and editing. All authors have read and agreed to the published version of the manuscript. This research received no external funding. **Data Availability Statement:** Not applicable, the study does not report any data. **Acknowledgments:** K.A. and P.D.G. acknowledge the R&D Project BioDAG- istema operacional inteligente de informacao e suporte a decisao em AgroBiodiversidade, project PD20-00011, promoted by Fundacao La Caixa and Fundacao para a Ciencia e a Tecnologia, taking place at the C-MAST-Centre for Mechanical and Aerospace Sciences and Technology, Department of Electromechanical Engineering of the University of Beira Interior, Covilha, Portugal. P.D.G. and E.A. acknowledges the PrunusBot project--Autonomous controlled spraying aerial robotic system and fruit production forecast, Operation No. PDR2020-101-031358 (leader), Consortium No. 340, Initiative No. 140, promoted by PDR2020 and co-financed by the EAFRD and the European Union under the Portugal 2020 program. P.D.G. also acknowledges Fundacao para a Ciencia e a Tecnologia (FCT--MCTES) for its financial support via project UIDB/00151/2020 (C-MAST). V.N.G.J.S. and J.M.L.P.C.