## 2 Related Work  
With the rapid development of artificial intelligence, image processing and computer vision systems have been widely applied in the recognition, classification, grading, and quality evaluation of agriculture. In recent years, many studies have been conducted on fruit ripeness detection using computer vision, and certain achievements have been made. But many methods are still in the research stage and cannot be applied in practical applications [8]. Therefore, further exploration is needed in terms of maturity detection. In 2015, [PERSON] et al. [9] developed an automated method based on color features to assess the ripeness of tomatoes. They achieved automated classification of tomatoes at different ripeness levels by transforming the images into color space and then combining support vector machines (SVMs), linear discriminant analysis (LDA), and principal component analysis (PCA) for feature extraction and classification. The method demonstrated the accuracy of maturity assessment using image data. However, due to the limitations of the dataset, the method has some limitations in practical application and is difficult to be widely disseminated. The accuracy of maturity assessment using image data was demonstrated. To solve the interference of light changes and overlapping objects, [PERSON] et al. [10] developed a tomato detection algorithm based on multi-feature image fusion. The method consists of extracting two key feature images: an a* component image from the Lab* color space and an I component image from the YIQ color space. They use wavelet transform to fuse the feature information of the two images and then use the adaptive thresholding technique to segment the tomato from the background and use the morphological operation pass to eliminate a small amount of noise. To further address the effects of illumination and occlusion, [PERSON] et al. [11] proposed a fruit detection algorithm based on multi-feature combination that uses color images and employs HOG descriptors and SVM classifiers for tomato detection. The detection accuracy is improved by a coarse-to-fine scanning framework and a false positive removal (FCR) method. Their method achieved better results with the majority of tomatoes being detected, but the method has limited applicability as the data used in the experiments were near-red tomatoes that were already ripe. With the rapid development of artificial intelligence technology, deep learning has been widely used and has made significant breakthroughs in fruit detection. Deep learning algorithms are capable of automatically learning and extracting complex features in images, which makes them particularly suitable for tasks such as fruit identification and ripeness estimation. For example, [PERSON] et al. proposed a deep neural network-based tomato ripeness estimation method that uses cross-entropy loss and mean-variance loss to train a model to accurately estimate the ripeness of tomatoes [12]. The continuous innovation of deep learning methods has led to a growing variety of fruit detection algorithms, of which the two most common categories are two-stage detection algorithms and single-stage detection algorithms. Two-stage algorithms, such as FasterR-CNN [13] and maskR-CNN [14], provide high accuracy by first generating candidate regions and then performing fine processing, while single-stage algorithms, such as the YOLO series [15; 16; 17; 18; 19; 20], provide faster detection speed through end-to-end processing, which is suitable for real-time detection requirements. The application of these technologies is driving the continuous development of fruit inspection technology towards higher accuracy and efficiency. For example, [PERSON] et al. applied the MaskR-CNN algorithm to tomato detection in greenhouses [21]. [PERSON] et al. proposed a method that uses fuzzy c-means combined with Hough transform to detect tomato ripeness [22]. In 2021, [PERSON] et al. used Mask R-CNN with a RestNet50-FPN backbone network to detect and segment green tomatoes in the greenhouse [23].