Efficient Camellia oleifera fruit detection in complex orchard environments is one of the most crucial technologies for automated picking and is significant for reducing labor costs. At present, Camellia oleifera fruit detection remains challenging due to the influence of fruit trait differences, cultivar differences, orchard environment differences, complex illumination, and occlusion. To address these challenges, a modified YOLOv7 model SDF-YOLO (SKConv-Decoupled Head-Focal EIoU-YOLOv7) has been developed. In SDF-YOLO, the selective kernel convolution (SKConv) is introduced to detect fruits of different sizes resulting from trait difference and occlusion with high performance, which utilizes multiple branches with different kernel sizes to fully extract and fuse the multi-scale information. To fully extract feature information of occlusion fruits, the decoupled head is used as the head network of SDF-YOLO to enhance the generalization performance of SDF-YOLO to cultivar differences and orchard environment differences. In addition, focal efficient intersection over union (Focal EIoU) loss is introduced to focus on high-quality bounding boxes, which can deal with positive and negative sample imbalance problems caused by occlusion and complex illumination. Experiment results demonstrate that SDF-YOLO can effectively detect Camellia oleifera fruits in complex orchard environments. Compared with eight mainstream models shows that SDF-YOLO achieves the highest precision of 94.91 %, recall of 93.01 %, F1 score of 93.95 %, and mAP of 96.65 % with an encouraging mean detection time of 36.57 ms. Moreover, SDF-YOLO exhibits robust adaptability to fruit trait differences, cultivar differences, orchard environment differences, complex illumination, and occlusion. These results indicated that SDF-YOLO is feasible for Camellia oleifera fruit detection in complex orchard environments, which provided a technical foundation for the automated picking of commercial orchards.