## 5 Discussion  
In this study, we propose an advanced deep learning model designed for tomato ripening detection with significant improvements in accuracy and processing speed. Traditional image processing techniques (e.g., [PERSON] et al. [11]) often struggle with computational complexity and slow processing speed. In contrast, our model exploits the power of deep learning to efficiently handle the tomato ripeness detection problem in a complex context. Our approach is especially suitable for scenarios with tomatoes of different sizes, as it accurately detects the ripeness of both large and small tomatoes. This is a key advantage over existing models, which usually focus only on large tomatoes or are limited to controlled environments such as greenhouses (e.g., [PERSON] et al. [36]). By using a more diverse dataset that includes tomatoes of various sizes, our model demonstrates high accuracy across a range of targets, addressing an important gap in the current literature. Furthermore, our model is designed for real-time performance, optimizing both detection accuracy and processing speed. This ensures that it can be effectively used in real-world applications that are time-sensitive.  
As can be seen from the experimental results, our model significantly outperforms traditional methods and existing deep learning models in several key areas. First, the accuracy of ripeness classification reaches 86.9%, which is 2.3% higher than the baseline method, indicating a significant improvement in classification accuracy. This result suggests that the improved model is more effective in capturing subtle changes in tomato ripeness, resulting in more accurate detection results. Second, our model is robust to occlusion and background changes. In various test scenarios, including the case where the tomato surface is occluded and the tomato color is similar to the background (e.g., Figure 9), our model is still able to detect the ripeness of tomatoes more accurately. This indicates that our model is less sensitive to occlusion and background interference and maintains stable performance under different environmental conditions. In addition, our improved model shows significant improvement in computational efficiency. Compared with the previous method, our model has an inference speed of 4.4 ms per image, which is faster than models such as YOLOv5n and YOLOv7-tiny (as shown in Table 5). These improvements make our model more suitable for real-time surveillance applications and large-scale production environments. By optimizing the network architecture and computational algorithms, we have reduced the consumption of computational resources, and the number of model parameters has been reduced from 11.13 M to 10.18 M, thus improving the overall processing power and efficiency.  
Overall, this study has made some progress in identifying tomato ripeness, but there are still some challenges and limitations. For example, tomato ripeness is not only affected by planting variety but is also closely related to environmental factors such as temperature and humidity, and these changes may affect the stability and accuracy of the model. Therefore, future research can further explore how to improve the adaptability of the model to environmental changes, including improving the generalisability of the model under different conditions through data enhancement and model optimization. By addressing these issues, we expect to further improve the usefulness of the model and expand its potential for application in agricultural automation, intelligent detection, and other fields.