## 2 Related Work
The algorithm uses ROIAlign bilinear interpolation to calculate the target area generated by the training feature map and achieves the detection and segmentation of ripe green tomatoes through the parallel actions of the ROI target category, bounding box regression, and mask. Because they only conducted experiments on green tomatoes, the model is still limited. [PERSON] et al. used a binocular vision camera based on the R-CNN algorithm [24] to obtain the position of mature tomatoes and estimate their size by combining an object detection network with a depth camera. [PERSON] et al. usedMaskR-CNN to detect tomato strings [25] and then used the detected clustering images to predict the harvest time of tomatoes. Due to the fact that the images of its test data were captured during the day, changes in ambient lighting affect the detection of maturity. References [26; 27; 28] apply Faster R-CNN to tomato ripeness detection. In 2022, [PERSON] et al. proposed an improved FasterR-CNN algorithm, MatDet, and used it for multi-target tomato ripeness detection in complex scenes [29]. The algorithm uses ResNet-50 as the backbone and RoIAlign to obtain more accurate bounding boxes. In addition, the model also uses Path Aggregation Network (PANet) to solve the difficulty of detecting tomato maturity in complex scenes. In 2020, [PERSON] [30] and others proposed an improved tomato detection model based on YOLOv3 [17]. This model incorporates dense architecture [31] into YOLOv3, making it easier for the model to reuse features and learn richer tomato feature representation. They also used C-Bbox instead of traditional R-Bbox to obtain more accurate IoU. The proposed model has significant improvements in the impact of lighting, but the occlusion problem is not well solved, and the accuracy is expected to be improved. In 2022, [PERSON] et al. [32] proposed an improved real-time tomato ripeness detection model based on YOLOv3. To improve the detection accuracy and speed, they used the K-means clustering algorithm [33] and the squeezing and incentive attention mechanism module [34], and their proposed model outperforms the traditional YOLOv3 and YOLOv5 in terms of detection speed and has a high detection accuracy. However, their approach does not address the problem of small tomato targets and the similarity of the fruit color to the background color, resulting in low detection accuracy. [PERSON] et al. [35] investigated a tomato ripeness detection method based on the YOLOv5 tomato model. They improved the performance of small target detection using a data augmentation method, and their method has a significant improvement in terms of improved model size and detection speed. However, the images used for their training were all from the same greenhouse, so further research is needed for tomato ripeness detection in complex environments. In 2023, [PERSON] et al. [36] proposed an automated ripening grading and counting model that improves the backbone network of YOLOv8 and enhances the network's ability to extract diverse features. The method provides good technical support for accurate grading, picking, and counting of tomato fruit. However, the model focuses mainly on the detection of large tomatoes and does not consider the detection of small target tomatoes, so the model still has limitations. Although many researchers have studied tomato maturity detection methods, there are still some research gaps and areas to be explored. For example, different types of data (such as images, spectra, temperature, and humidity) can be fused to improve the accuracy of maturity detection. Currently, most studies focus on a single data source, and multimodal data fusion can provide more comprehensive information. In addition, although deep learning performs well in image recognition, it consumes a lot of computing resources. Therefore, it is also an important direction to study lightweight tomato maturity detection models to adapt to mobile devices while maintaining high accuracy and meeting real-time detection.