## 1 Introduction  
Tomatoes not only meet the daily nutritional needs of humans but also hold substantial economic value, making significant contributions to the economies of many regions and countries. As one of the most important vegetables globally, accurate yield detection of tomatoes is crucial for farmers and food processing enterprises. Tomato target detection technology can precisely monitor the growth status and yield of tomatoes. This technology not only enhances production efficiency and fruit quality but also effectively protects the agricultural ecological environment, playing a critical role in ensuring crop safety and the smooth progress of agricultural production. Traditional tomato target detection methods typically rely on manual sampling and visual judgment. Workers usually estimate tomato yields based on characteristics such as size and density. However, this approach is not only time-consuming and labor-intensive but also prone to subjective biases, potentially leading to erroneous decisions [1, 2]. These issues have become bottlenecks restricting the sustainable development of the tomato industry. Currently, machine vision has matured and is applied in both traditional and modern industries, such as express sorting [3] and road vehicle detection [4]. To address the inefficiencies of manual observation, many researchers have applied machine vision to tomato target detection. For instance, [PERSON] et al. [5] combined pixel-based segmentation and blob-based segmentation strategies for tomato detection, employing decision tree and random forest classifiers, achieving a recall rate of 80% and a precision rate of 88%. [PERSON] et al. [6] used an AdaBoost classifier combined with color analysis for tomato detection, employing Haar-like features to train the classifier. Although this method yields reasonable results, its speed is relatively low, failing to meet the real-time requirements of harvesting robots. [PERSON] et al. [7] also proposed a grape clustering detection framework based on AdaBoost and color features. Their experimental results indicated that this method could partially mitigate the effects of weather conditions, leaf occlusion, and lighting changes. [PERSON] et al. [8] proposed a coarse-to-fine framework for ripe tomato detection, using support vector machines and pseudo-color removal methods, achieving recall and precision rates of 90.00% and 94.41%, respectively. However, this method is unsatisfactory for overlapping and occluded tomatoes. Traditional tomato detection methods suffer from long detection times and poor robustness. In recent years, deep learning technology has achieved significant breakthroughs in the field of computer vision, particularly in object detection. Deep learning-based object detection offers the advantages of short detection times and high accuracy, greatly meeting the requirements for real-time detection in complex environments. Currently, mainstream deep learning models include a series of YOLO models such as YOLOv6 [9], YOLOv7 [10], and YOLOv8. However, there are still some shortcomings in the specific field of tomato detection: due to design trade-offs, their performance in detecting small objects is not as good as models specifically optimized for small object detection; in tomato fields, where tomatoes grow densely and occlude each other, YOLO models may experience issues with missed detections or inaccurate detection of overlapping targets; tomatoes often grow in complex natural environments with leaves, stems, and other plants, which can interfere with target detection; finally, in resource-constrained environments, models need further optimization to meet computational and storage limitations. RE-DETR offers a balance between speed and accuracy, allowing direct object prediction from images without the need for predefined anchor boxes or candidate boxes. This approach reduces computational costs and avoids misdetections and missed detections caused by incorrect box selection.