Abstract:Green pepper picking-point localization remains challenging because complex backgrounds and similarities between fruit stalks and branches make targets difficult to distinguish, while frequent occlusions also hinder reliable occlusion assessment and, consequently, precise localization. To address these challenges, this study proposes a cascaded localization method based on YOLO v8 and SP-UNet. A multi-scenario dataset covering diverse lighting conditions and occlusion scenarios was constructed, and data augmentation was applied to increase sample diversity. In the SP-UNet semantic segmentation model, the original downsampling structure was replaced with the SPNet feature extraction network to improve feature extraction efficiency. A dual-branch feature fusion attention mechanism (DAM) was incorporated to strengthen the model's focus on fruit regions. A large-kernel convolution module (LSKBlock) was used to refine boundary features, and a multi-resolution feature fusion module (MRFF) was introduced to integrate features across multiple scales. The cascaded strategy uses YOLO v8 detection to guide SP-UNet segmentation, calculates centroid coordinates using spatial moments, and assesses occlusion based on the structural similarity index (SSIM). Experimental results show that SP-UNet achieves 87.59% mIoU, 5.08 percentage points higher than UNet, while reducing parameters by 40.38%. At deployment, it achieves an average frame rate of 40.22 f/s and a per-image inference time of 24.9 ms. In validation experiments, average localization accuracy reaches 91.12%, with an average time of 184.5 ms.