YOLOv8-Based Tomato Ripeness Detection with Color and Texture Features
Keywords:
Color Features, Deep Learning, GLCM Texture, Precision Agriculture, Tomato Ripeness, YOLOv8Abstract
The advancement of precision agriculture requires intelligent and automated solutions to enhance crop monitoring and post-harvest management. Accurate recognition of tomato ripeness is a critical stage in the agricultural supply chain, as misclassification can lead to quality degradation and significant economic losses. This study proposes a deep learning-based approach for tomato ripeness detection by integrating handcrafted color features and Gray Level Co-occurrence Matrix (GLCM)-based texture features with YOLOv8. The dataset comprises tomato images categorized into three final ripeness classes—green, semi-ripe, and fully ripe—obtained by grouping multiple physiological maturity stages into unified model classes to reduce visual ambiguity and collected under diverse lighting and background conditions. Candidate tomato regions are first localized by YOLOv8; HSV and CIELAB color descriptors and GLCM texture descriptors are then extracted from each region and fused with the corresponding deep representation for ripeness classification and confidence refinement. Experimental results based on five-fold cross-validation show that the proposed method achieves a mean Average Precision (mAP@0.5) of 96.7%, compared with 92.5% for standard YOLOv8. The results show improved discrimination between visually similar ripeness stages, particularly under non-uniform illumination. The study demonstrates the potential of domain-informed feature fusion for smart farming, automated sorting, and quality control systems.
Downloads
References
K. G. Liakos, P. Busato, D. Moshou, S. Pearson, and D. Bochtis, “Machine learning in agriculture: A review,” Sensors, vol. 18, no. 8, Art. no. 2674, 2018, doi: 10.3390/s18082674.
G. Mohyuddin, M. A. Khan, A. Haseeb, S. Mahpara, M. Waseem, and A. M. Saleh, “Evaluation of machine learning approaches for precision farming in smart agriculture system: A comprehensive review,” IEEE Access, vol. 12, pp. 60155–60184, 2024, doi: 10.1109/ACCESS.2024.3390581.
E. M. B. M. Karunathilake, A. T. Le, S. Heo, Y. S. Chung, and S. Mansoor, “The path to smart farming: Innovations and opportunities in precision agriculture,” Agriculture, vol. 13, no. 8, Art. no. 1593, 2023, doi: 10.3390/agriculture13081593.
G. Abera, A. M. Ibrahim, S. F. Forsido, and C. G. Kuyu, “Assessment on post-harvest losses of tomato (Lycopersicon esculentem Mill.) in selected districts of East Shewa Zone of Ethiopia using a commodity system analysis methodology,” Heliyon, vol. 6, no. 4, Art. no. e03749, 2020, doi: 10.1016/j.heliyon.2020.e03749.
Food and Agriculture Organization of the United Nations, “FAOSTAT: Crops and livestock products,” FAOSTAT, Rome, Italy, 2024. [Online]. Available: https://www.fao.org/faostat/en/#data/QCL
J. Famuyini, O. A. Patrick, and A. Sedara, “Effect of maturity stage on quality and shelf life of tomato (Lycopersicon esculentum Mill.) using refrigerator storage system,” Eurasian J. Agric. Res., vol. 4, no. 1, pp. 23–44, 2020. [Online]. Available: https://dergipark.org.tr/en/pub/ejar/article/766785
V. Thole et al., “Analysis of tomato post-harvest properties: Fruit color, shelf life, and fungal susceptibility,” Curr. Protoc. Plant Biol., vol. 5, no. 2, Art. no. e20108, 2020, doi: 10.1002/cppb.20108.
T. Khatun, A. Razzak, M. S. Islam, and M. S. Uddin, “An extensive real-world in field tomato image dataset involving maturity classification and recognition of fresh and defect tomatoes,” Data Brief, vol. 51, Art. no. 109688, 2023, doi: 10.1016/j.dib.2023.109688.
G. L. Tenorio and W. Caarls, “Automatic visual estimation of tomato cluster maturity in plant rows,” Mach. Vis. Appl., vol. 32, no. 4, Art. no. 78, 2021, doi: 10.1007/s00138-021-01202-9.
M. L. Ali and Z. Zhang, “The YOLO framework: A comprehensive review of evolution, applications, and benchmarks in object detection,” Computers, vol. 13, no. 12, Art. no. 336, 2024, doi: 10.3390/computers13120336.
N. Rane, “YOLO and Faster R-CNN object detection for smart Industry 4.0 and Industry 5.0: Applications, challenges, and opportunities,” SSRN Electron. J., 2023, doi: 10.2139/ssrn.4624206.
J.-W. Chen, W.-J. Lin, H.-J. Cheng, C.-L. Hung, C.-Y. Lin, and S.-P. Chen, “A smartphone-based application for scale pest detection using multiple-object detection methods,” Electronics, vol. 10, no. 4, Art. no. 372, 2021, doi: 10.3390/electronics10040372.
M. Hussain, “YOLO-v1 to YOLO-v8, the rise of YOLO and its complementary nature toward digital manufacturing and industrial defect detection,” Machines, vol. 11, no. 7, Art. no. 677, 2023, doi: 10.3390/machines11070677.
J. Liu, J. Sun, Y. Wang, X. Liu, Y. Zhang, and H. Fu, “Non-destructive detection of fruit quality: Technologies, applications and prospects,” Foods, vol. 14, no. 12, Art. no. 2137, 2025, doi: 10.3390/foods14122137.
Z. Yang, Y. Li, Q. Han, H. Wang, C. Li, and Z. Wu, “A method for tomato ripeness recognition and detection based on an improved YOLOv8 model,” Horticulturae, vol. 11, no. 1, Art. no. 15, 2025, doi: 10.3390/horticulturae11010015.
A. B. Kurina, A. E. Solovieva, I. A. Khrapalova, and A. M. Artemyeva, “Biochemical composition of tomato fruits of various colors,” Vavilov J. Genet. Breed., vol. 25, no. 5, pp. 514–527, 2021, doi: 10.18699/VJ21.058.
M. A. Abu Bakar, Z. Zulkifli, M. Mohamad, and S. Ahmad, “GLCM-based feature extraction and CNN approach for fruit freshness detection,” in Proc. 5th Int. Conf. Artificial Intelligence and Data Sciences (AiDAS), 2024, pp. 1–6, doi: 10.1109/AiDAS63860.2024.10730167.
D. Worasawate, P. Sakunasinha, and S. Chiangga, “Automatic classification of the ripeness stage of mango fruit using a machine learning approach,” AgriEngineering, vol. 4, no. 1, pp. 32–47, 2022, doi: 10.3390/agriengineering4010003.
J. Rajesh, M. S. Ashraf, L. Kaur, S. Rout, S. K. Nayak, G. Kaur, and D. R. K. Saikanth, “Application of fuzzy logic in smart agriculture to recognise tomato fruit ripeness,” Int. J. Food Nutr. Sci., vol. 11, Special Issue 1, pp. 2360–2367, 2022. [Online]. Available: https://ijfans.org/index.php/Journal/article/view/6468
C. Jiang, K. Miao, Z. Hu, F. Gu, and K. Yi, “Image recognition technology in smart agriculture: A review of current applications, challenges and future prospects,” Processes, vol. 13, no. 5, Art. no. 1402, 2025, doi: 10.3390/pr13051402.
A. Septiarini, A. Sunyoto, H. Hamdani, A. A. Kasim, F. Utaminingrum, and H. R. Hatta, “Machine vision for the maturity classification of oil palm fresh fruit bunches based on color and texture features,” Sci. Hortic., vol. 286, Art. no. 110245, 2021, doi: 10.1016/j.scienta.2021.110245.
N. Iqbal, R. Mumtaz, U. Shafi, and S. M. H. Zaidi, “Gray level co-occurrence matrix (GLCM) texture based crop classification using low altitude remote sensing platforms,” PeerJ Comput. Sci., vol. 7, Art. no. e536, 2021, doi: 10.7717/peerj-cs.536.
A. R. Zubair and O. A. Alo, “Grey level co-occurrence matrix (GLCM) based second order statistics for image texture analysis,” arXiv preprint arXiv:2403.04038, 2024. [Online]. Available: https://arxiv.org/abs/2403.04038
P. Sahu, A. P. Singh, A. Chug, and D. Singh, “A systematic literature review of machine learning techniques deployed in agriculture: A case study of banana crop,” IEEE Access, vol. 10, pp. 87333–87360, 2022, doi: 10.1109/ACCESS.2022.3199926.
A. Kamilaris and F. X. Prenafeta-Boldú, “Deep learning in agriculture: A survey,” Comput. Electron. Agric., vol. 147, pp. 70–90, 2018, doi: 10.1016/j.compag.2018.02.016.
J. E. Gallagher and E. J. Oughton, “Surveying You Only Look Once (YOLO) multispectral object detection advancements, applications and challenges,” IEEE Access, vol. 13, pp. 7366–7395, 2025, doi: 10.1109/ACCESS.2025.3526458.
Y. Safari, J. Nakatumba-Nabende, R. Nakasi, and R. Nakibuule, “A review on automated detection and assessment of fruit damage using machine learning,” IEEE Access, vol. 12, pp. 21358–21381, 2024, doi: 10.1109/ACCESS.2024.3362230.
S. Roy, “Fruit ripeness detection using deep learning,” 2025.
M. Bouni, B. Hssina, K. Douzi, and S. Douzi, “Synergistic use of handcrafted and deep learning features for tomato leaf disease classification,” Sci. Rep., vol. 14, Art. no. 26822, 2024, doi: 10.1038/s41598-024-71225-5.
A. Kamilaris and F. X. Prenafeta-Boldú, “A review of the use of convolutional neural networks in agriculture,” J. Agric. Sci., vol. 156, no. 3, pp. 312–322, 2018, doi: 10.1017/S0021859618000436.
Published
How to Cite
Issue
Section
Categories
Copyright (c) 2026 Luh Putu Ary Sri Tjahyanti, Made Santo Gitakarma

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.












