Abstract:In order to solve the recognition and detection of branches at the young leaves of mulberry trees in complex natural environments, overcome the current situation of relying on manual assisted positioning in the operation process of mulberry leaf harvesting equipment, and improve the problem of low recognition rate caused by diverse target postures and complex environments, a mulberry branch and trunk recognition model was proposed based on the improved YOLO v5 model (YOLO v5-mulberry) and combined it with the depth camera to construct a location system. Firstly, convolutional block attention module (CBAM) attention mechanism was added to the backbone network of YOLO v5 to improve the neural network’s attention to the mulberry branches;and a small target layer was added to enable the model to detect 4pixels×4pixels targets, which improved the model’s performance in detecting small targets. At the same time, the GIoU loss function was used to replace the IoU loss function in the original network, which effectively prevented the position relationship between the prediction box and the real box from being correctly reflected when the size of the prediction box and the real box was small. Subsequently, the pixel alignment of the depth map and the color map was completed, and the 3D coordinates of the mulberry tree trunk were obtained through the conversion of the coordinate system. The test results showed that the average accuracy of YOLO v5-mulberry detection model was 94.2%, which was 16.9 percentage points higher than that of the original model, and the confidence level was also 12.1% higher;the number of targets that should be detected by the model outdoor detection was 53, and the number of actually detected targets was 48, and the detection efficiency was 90.57%;the positioning error of the three-dimensional coordinate recognition and location system of the mulberry branch and trunk at the tender leaves was (9.4985mm,11.285mm,19.11mm), which met the requirements for use. The research result can achieve the recognition and positioning of branches and trunks at the tender leaves of mulberry trees, which can help to further promote the research, development and application of intelligent mulberry leaf picking robots.