Abstract:Rapid and accurate detection of tomato fruits is an important prerequisite of intelligent harvesting. Aiming at deployment requirements and problems of complex background, branch and leaf occlusion, and overlapping of fruits, an improved detection method based on improved YOLO v8n was proposed. Firstly, FasterNet was selected as the backbone feature extraction network to improve the feature extraction capability of the model. Nextly, the small target detection layer and bidirectional feature pyramid network (BiFPN) structure were fused in the neck network, reducing the interference of the complex background to improve the detection accuracy of the model. Subsequently, the wise intersection over union (WIoU) loss function was used to improve the detection accuracy of the model in the presence of occlusion and overlap, enhancing the model’s convergence ability. Finally, the model was deployed to a mobile terminal based on the NCNN framework. Experimental results on the tomato public dataset showed that the precision, recall, mAP@0.5 and mAP@0.5:0.95 of the FPBW- YOLO v8 model reached 97.9%, 95.1%, 98.3% and 74.3%, respectively, all of which were higher than the results of Faster R-CNN, SSD, YOLO v8n, YOLO v7, YOLO v5n and Rt-Detr. The model brought forward in this research could obtain high detection accuracy on hardware devices with limited computational resources, which can effectively solve the problem of tomato fruit recognition in complex scenes and provide technical support for tomato picking robots.