Abstract:Considering the issue that the tomato-picking robot’s recognition algorithm has a complex network structure and a large number of parameters, which severely limit the detection model’s response speed, an improved lightweight YOLO v5(EDH ? YOLO) algorithm was proposed. To significantly reduce computational complexity and model size while maintaining high recognition accuracy, the lightweight EfficientNet?B0 network was introduced as the backbone of the YOLO v5 algorithm. To better locate target objects during training and improve detection accuracy, the DIoU loss function was introduced. To reduce the model’s computational complexity and enhance its expressive ability, the lightweight Hardswish activation function was introduced. Experimental results indicated that the EDH?YOLO model achieved accuracy, recall, and average precision of 95.9%,,93.1%, and 96.8%,,respectively, with minimal loss in recognition performance. The size of model was only 7.3 MB, and the detection speed reached 53.2 f/s. Compared with the original YOLO v5 model, the model size was reduced by 55.3%, and the detection speed of the EDH ? YOLO model was increased by 60.0%.Compared with Faster R?CNN, YOLO v7, and YOLO v8, the EDH?YOLO model demonstrated higher robustness under various lighting and occlusion conditions. Additionally, the EDH ?YOLO model was deployed on the Android platform through model conversion to optimize the inference process, meet real-time recognition requirements for tomato fruits in complex greenhouse environments, and provide technical support for robot target recognition and automatic harvesting operations based on mobile edge computing in facility environments.