Abstract:The apple orchard with dwarf rootstock densification is a typical application scenario for future robotic picking, facing challenges such as complex light, fruit overlapping and branch and leaf shading, and accurate fruit detection is one of the key core technologies for apple picking robots. An enhanced apple detection model termed SDE-YOLO was proposed to improve detection accuracy and robustness in such environments. Initially, a comprehensive dataset encompassing various lighting conditions and occlusion states was constructed, with systematic categorization of occlusion patterns. The model architecture incorporated several key improvements: replacement of the last two C2f modules with Swin Transformer in the backbone network to enhance long-range dependency modeling and dense scene detection capabilities;integration of EMA attention mechanism in the backbone network, achieving pixel-level adaptive attention allocation through non-dimensional channel reconstruction to effectively suppress background interference;introduction of DCN v2 module in the feature fusion network to improve detection of apples with varying morphologies and poses. Experimental results demonstrated that SDE-YOLO achieved precision, recall, and the average precision of 88.9%, 86.6%, and 94.2% respectively, representing improvements of 2.0, 1.7, 3.3 percentage points over the baseline model, while reducing model parameters by 9.38%. Comparative analysis with mainstream detection models confirmed SDE-YOLO’s superior performance in handling illumination variations and occlusions, providing accurate fruit detection for robotic harvesting in dwarf rootstock orchards.