This Research proposes an intelligent pruning method based on the improved Mask R-CNN (Mask Region-based Convolutional Neural Network) model to address the shortcomings of intelligent pruning technology for Sichuan pepper trees. Utilizing ResNeXt-50 as the backbone network, the algorithm optimizes the anchor boxes in the RPN (Region Proposal Network) layer to adapt to the complex morphology of pepper tree branches, thereby enhancing target detection and segmentation performance. Further reducing the quantization error of the RoI (Region of Interest) Align layer through bilinear interpolation, the algorithm innovatively introduces edge loss (Ledge) into the loss function to address the issue of blurred edge features caused by the overlap between retained and pruned branches. Experimental results demonstrate the outstanding performance of the improved Mask R-CNN model in segmenting and identifying pepper tree branches, achieving recognition accuracies of 92.2%, 96.3%, and 85.6% for Upright branches, Centripetal branches, and Competitive branches, respectively, while elevating the recognition accuracy of retained branches to 94.4%. Compared to the original Mask R-CNN, the enhanced model exhibits a 6.7% increase in the recognition rate of retained branches and a decrease of 0.12 in loss value, significantly enhancing recognition effectiveness. The research findings not only provide an effective tool for the precise pruning of pepper trees but also offer valuable insights for implementing intelligent pruning strategies for other fruit trees.