# Grapevine Branch Recognition and Pruning Point Localization Technology Based on Image Processing
## 5 Conclusions  
In this study, we innovatively propose a method that combines semantic segmentation and target detection to recognize small objects and ultimately combines them with pruning rules to obtain pruning points. The dataset used in this paper includes grapevine branches under different lighting conditions, which is more in line with the actual working scenario. In this study, we used three semantic segmentation methods and after processing the same dataset with three lighting conditions including front light, back light and shaded light, it was determined that the PSP-net was the most effective, with an mIoU value of 83.73%, an accuracy of 96.77% and an mPA of 90.32%; For bud detection, direct recognition is less efficient due to the smaller target and the higher complexity of the image background, but better results can be obtained after semantic segmentation and then target detection. We compare four target-detection algorithms here, in which YOLOv5 shows better results, with an mAP of up to 81.06%, a Recall of up to 77.78%, Precision reaching 83.05% and F\({}_{1}\) reaching 0.80; combined with the branch pruning rule, that is, pruning 1-2 cm above the second bud, the proposed processing of the bud coordinates accurately obtains the location of the pruning point and the detection rate of pruning point reaches 82.35%. The experiment results show that the method is characterized by a high detection rate and an accurate location of the pruning point. The pruning-point-localization method proposed in this paper for depth images and RGB images has high accuracy, which lays the foundation for our subsequent work, i.e., to obtain the 3D coordinates of the pickup point by combining the image depth information obtained from the depth camera. It also provides a reference for other bud-related pruning rules, such as intelligent pruning for long tip pruning and enhances the ability of intelligent pruning to recognize pruning points under different pruning rules. However, in this paper, some pruning points are still not recognized. In the subsequent research, we can focus on improving the semantic segmentation algorithm and the target-detection algorithm to optimize the segmentation effect of branch edges and improve the recognition accuracy of bud points, so as to improve the accuracy of pruning points. At the same time, extensive test experiments will be conducted on more varieties of grapevines to ensure the generalizability and reliability of the study.  
Conceptualization, Z.C. and F.K.; methodology, F.K., Z.C. and S.T.; software, Z.C. and C.C.; validation, Z.C. and C.C.; formal analysis, Z.C. and S.T.; investigation, F.K., S.T., Z.C. and Y.W.; resources, F.K. and Y.W.; data curation, Z.C.; writing--original draft preparation, Z.C. and F.K.; writing--review and editing, F.K. and Z.C.; supervision, F.K. and Y.W.; project administration, F.K. and Y.W.; funding acquisition, F.K. and Y.W. All authors have read and agreed to the published version of the manuscript. This research was funded by the Ningxia Hui Autonomous Region key research and development plan project, grant number 2022 BBF0002-02.  
All data generated or presented in this study are available upon request from the corresponding author. Furthermore, the models and code used during the study cannot be shared at this time as the data also form part of an ongoing study.  
The authors declare no conflicts of interest.