Abstract:Aiming to address the issue of overlapping occlusion caused by the varying sizes and large quantities of dragon fruit, a multi-scale weighted feature fusion network (MBS-YOLO v8) was proposed based on the YOLO v8 model. Firstly, the squeeze-and-excitation attention (SEAttention) mechanism was incorporated into the feature extraction module to enhance the network’s ability to capture critical details, thereby addressing the challenge of small object detection. Secondly, a multi-scale weighted fusion network (MWConv) was introduced to generate feature maps with varying receptive fields, improving the capture of global features within images. Finally, experimental results demonstrated that MBS-YOLO v8 achieved an accuracy of 92.5%, a recall rate of 90.1%, and a mean average precision (mAP50) of 94.7%. Compared with the YOLO v8n algorithm, MBS-YOLO v8 showed improvements of 2.1 percentage points, 5.9 percentage points, and 2 percentage points in accuracy, recall, and mAP50, respectively. The proposed MBS-YOLO v8 model exhibited high robustness, effectively integrating global feature information with low-dimensional local features to enhance the model’s understanding of image content. This approach effectively addressed challenges related to overlapping occlusion and small object detection, providing an improved methodology for detecting dragon fruit and other similar targets.