AUTOMATED ASSESSMENT OF TOMATO RIPENESS: A YOLOv8 APPROACH FOR PRECISION
Keywords:
Algorithm; F1-score; Mean average precision; Object detection Tomato maturity; YOLOv8.Abstract
Tomatoes (Solanum lycopersicum) are important fruits globally and accurately assessing their ripeness is essential for optimizing harvesting processes and reducing food waste. Traditional farmers mostly depend on manual inspections, which are labour-intensive and prone to human error. This research employed the You Only Look Once version 8 (YOLOv8) algorithm to enhance detection accuracy and efficiency across various environmental conditions. A dataset of 8,579 images, consisting of both ripe and unripe tomatoes were curated, encompassing diverse lighting scenarios and backgrounds. Data augmentation and annotation were used to increase the model’s robustness. The developed model attained a mean average precision (mAP) of 0.955 at an Intersection over Union (IoU) threshold of 0.5, demonstrating precision and recall rates of 92% and 94% for both ripe and unripe tomatoes, respectively. YOLOv8 performed well in image processing and classification, minimizing false positives and negatives, at a 0.7 confidence threshold with an F1-score of 0.90. Implementation of YOLOv8 enhanced detection capabilities and also aligned with the principles of precision agriculture, facilitating data-driven decision-making for farmers. This research has contributed to the body of knowledge on automated fruit classification systems, offering method that can be adapted for other agricultural products. By establishing a reliable framework for detecting ripe and unripe tomatoes, the study emphasized the potential of deep learning to revolutionize agricultural methods, thereby fostering sustainability and improving food security in a progressively competitive international marketplace.
References
Ali, U., Ismail, M. A., Habeeb, R. A. A., S. R. A. Shah 2024. “Performance evaluation of YOLO models in plant disease detection”, Journal of Informatics and Web Engineering 3(2): 199-211.
Ali, M. L., Z. Zhang 2024. “The YOLO framework: A comprehensive review of evolution, applications, and benchmarks in object detection”. Computers 13(12): 336.
Chen, Z., Feng, J., Yang, Z., Wang, Y., M. Ren 2024. “YOLOv8-ACCW: Lightweight grape leaf disease detection method based on improved YOLOv8”, IEEE Access 12: 123595-123608.
Cheng, B., Girshick, R., Dollár, P., Berg, A. C., A. Kirillov 2021. “Boundary IoU: Improving object-centric image segmentation evaluation”, In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 15334-15342.
Giri, K. J. 2025. “SO-YOLOv8: A novel deep learning-based approach for small object detection with YOLO beyond COCO”. Expert Systems with Applications 280: 127447.
Jiang, H., Li, J., & H. Tian 2024. “Algorithm for Student Behavior Detection Based on YOLOv8”, In 2024 3rd International Conference on Cloud Computing, Big Data Application and Software Engineering (CBASE), 45-48. IEEE.
Joshi, A., Kumar, V., Patel, D., & R. Singh 2023. “Standardizing and centralizing datasets for efficient training of agricultural deep learning models”, Plant Phenomics 5: 0084.
Lawal, O. M., Zhu, S., K. Cheng 2023. “An improved YOLOv5s model using feature concatenation with attention mechanism for real-time fruit detection and counting”, Frontiers in Plant Science 14: 1153505. https://doi.org/10.3389/fpls.2023.1153505.
Li, H., Wu, A., Jiang, Z., Liu, F., M. Luo 2024. “Improving object detection in YOLOv8n with the C2f-f module and multi-scale fusion reconstruction”, In 2024 IEEE 6th Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC). 374-379. IEEE.
Li, H., Yin, Z., Zuo, Z., Pan, L., J. Zhang 2025. Precision citrus segmentation and stem picking point localization using improved YOLOv8n-seg algorithm. Frontiers in Plant Science 16: 1655093.
Liang, X., Jia, H., Wang, H., Zhang, L., Li, D., Wei, Z., M. Yang 2025. ASE-YOLOv8n: A method for cherry tomato ripening detection. Agronomy 15(5): 1088.
Liu, Y., Pu, H., & D.W. Sun (2021). “Efficient extraction of deep image features using convolutional neural network (CNN) for applications in detecting and analysing complex food matrices”. Trends in Food Science & Technology 113: 193-204.
Mbouembe, P. L. T., Liu, G., Sikati, J., Kim, S. C., J. H. Kim 2023. An efficient tomato-detection method based on improved YOLOv4-tiny model in complex environment”, Frontiers in Plant Science 14: 150958. https://doi.org/10.3389/fpls.2023.1150958.
Owoeye, S., Durodola, F., Adetoro, T., Adegbenro, Kehinde., B. Bisiriyu 2024. “Identification of Maize and Weed Using Machine Learning Model Implemented Via YOLOv5”, FULafia Journal of Science and Technology 8(2): 49- 55.
Panno, S., Davino, S., Caruso, A. G., Bertacca, S., Crnogorac, A., Mandić, A., & S. Matić 2021. “A review of the most common and economically important diseases that undermine the cultivation of tomato crop in the Mediterranean basin”, Agronomy 11(11): 2188.
Park, S. S., Tran, V. T., D. E. Lee 2021. “Application of various yolo models for computer vision-based real-time pothole detection”. Applied Sciences 11(23): 11229.
Pativada, P. K. 2024. “Real-time detection and classification of plant seeds using YOLOv8 object detection model”, Doctoral dissertation, Kansas State University.
Putra, M. R. H., Setiawan, D., Purnama, R. A., Apriana, V., Santoso, R. 2025. Implementation of YOLOv8 and DETR for Multi-Level Tomato Ripeness Detection with Real-Time Bounding Boxes. Jurnal Teknologi dan Open Source 8(2): 1045-1053.
Sharma, S., M. Vardhan 2024. “Advancing precision agriculture: Enhanced weed detection using the optimized YOLOv8t model”, Arabian Journal for Science and Engineering 1-18.
Solimani, F., Cardellicchio, A., Dimauro, G., Petrozza, A., Summerer, S., Cellini, F., & V. Renò (2024). “Optimizing tomato plant phenotyping detection: Boosting YOLOv8 architecture to tackle data complexity”, Computers and Electronics in Agriculture 218: 108728.
Wang, Z., Ling, Y., Wang, X., Meng, D., Nie, L., An. G., & X. Wang (2022). “An improved Faster R-CNN model for multi-object tomato maturity detection in complex scenarios”, Ecological Informatics 72; 101886.
Wei, J., Sun, Y., Luo, L., Ni, L., Chen, M., You, M., & Gong, H. (2025). Tomato ripeness detection and fruit segmentation based on instance segmentation. Frontiers in Plant Science 16: 1503256.
Xiao, F., Liu, J., Wang, H., Y. Zhang (2023). “Fruit Detection and Recognition Based on Deep Learning for Automatic Harvesting: An Overview and Review”, Agronomy 13(6): 1625–1625. https://doi.org/10.3390/agronomy13061625.
Xiong, L., He, Y., Lai, H., S. Wang 2025. “Intelligent Classroom Management System Based on YOLOv8”, In International Conference on Computer Engineering and Networks. 402-413. Springer, Singapore.
Zhang, S., Li, P., Yu, W., G. Zhang 2024. “Pedestrian Detection Algorithm of YOLOV8 Based on Feature Enhancement”, In: Proceedings of the 2024 3rd Asia Conference on Algorithms, Computing and Machine Learning. 90-95.
Zhao, Y., Sun, F., X. Wu 2024. “FEB-YOLOv8: A multi-scale lightweight detection model for underwater object detection”, PLOS ONE, 19(9), e0311173, 2024.
Zhong, J., Qian, H., Wang, H., Wang, W., & Y. Zhou (2025). “Improved real-time object detection method based on YOLOv8: a refined approach”. Journal of Real-Time Image Processing 22(1): 1-13.