journal article·2026-05-02Open access

Deep Learning-Based Multistage Peach Ripeness Detection with Data Leakage Mitigation and Real-World Validation

Salvador Castro-Tapia, Germán Díaz-Florez, Rafael Reveles-Martínez, Héctor A. Guerrero-Osuna, Luis F. Luque-Vega, Humberto Morales-Magallanes, Jorge Pablo Vega-Borrego, Gilberto Vázquez-García, Carlos A. Olvera-Olvera

Applied Sciences· Volume 16· Issue 9

Abstract

Accurate fruit ripeness assessment is essential for optimizing harvest timing and ensuring postharvest quality, particularly in climacteric fruits such as peaches, which exhibit rapid and heterogeneous ripening. This study proposes a deep learning-based approach for multistage peach ripeness classification across five maturity levels (green, green-blushed, blushed, yellow-blushed, and fully yellow). Four datasets were constructed using controlled image acquisition, segmentation, data augmentation, and perceptual hashing to mitigate data leakage. The performance of AlexNet, EfficientNet-B0, and three YOLO (You Only Look Once) architectures (YOLOv8, YOLOv11, and YOLOv12) was evaluated using standard metrics, including accuracy, precision, recall, F1 score, mAP, and inference speed. Results show that YOLO-based models significantly outperform classical networks, achieving accuracies between 95.25% and 98.3% and mAP@0.5 above 98.25%, while also reducing inference time to 8.1–12.7 ms compared with 722.23 ms for AlexNet and 171.87 ms for EfficientNet-B0. In a practical sorting experiment with 214 peaches, YOLOv12 achieved 92.06% accuracy, demonstrating robust real-world performance. Misclassifications were primarily observed between adjacent ripeness stages. These findings indicate that YOLO-based models provide an effective and scalable solution for real-time fruit sorting, while the use of perceptual hashing enhances dataset reliability and model generalization for deployment in agricultural quality control systems.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Smart Agriculture and AI · Postharvest Quality and Shelf Life Management · Food Supply Chain Traceability

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Instituto Tecnológico Superior de Jerez, Tecnológico Nacional de México, Zacatecas 99863, Mexico

Laboratorio de Invenciones Aplicadas a la Industria, Unidad Académica de Ingeniería Eléctrica, Universidad Autónoma de Zacatecas, Zacatecas 98160, Mexico

Instituto Politécnico Nacional, Unidad Profesional Interdisciplinaria de Ingeniería Campus Zacatecas (UPIIZ), Zacatecas 98160, Mexico

Posgrado en Ingeniería y Tecnología Aplicada, Unidad Académica de Ingeniería Eléctrica, Universidad Autónoma de Zacatecas, Zacatecas 98000, Mexico

Department of Technological and Industrial Processes, ITESO, Tlaquepaque 45604, Mexico

References (50)

Show source-provided references
1. Brezmes Llecha, J. (2002). Diseño de una Nariz Electrónica para la Determinación no Destructiva del Grado de la Maduración de la Fruta. [Ph.D. Thesis, Universitat Politècnica de Catalunya].
2. How Do We Increase Peach Consumption?10.17660/ActaHortic.2002.592.82 ↗
3. El color de fondo y la dureza como estimadores no destructivos de la firmeza de la pulpa en duraznos
4. A Simple Digital Imaging Method for Measuring and Analyzing Color of Food Surfaces10.1016/S0260-8774(03)00195-X ↗
5. Badui, S. (2006). Química de los Alimentos, Pearson Educación. [4th ed.].
6. Estudio durante la variación del Índice de Color la conservación de la piña variedad Cayena Lisa a temperatura ambiente
7. Colour measurements by computer vision for food quality control—A review10.1016/j.tifs.2012.08.004 ↗
8. Clasificación de frutas basadas en redes neuronales convolucionales
9. Factores de determinación de la oferta de frutas selectas en México 2001–2020
10. Food and Agriculture Organization of the United Nations (FAO) (2021). Fruit and Vegetables: Opportunities and Challenges for Small-Scale Sustainable Farming, FAO.
11. United States Department of Agriculture (USDA) (2026, March 20). U.S. Grade Standards for Fruits, Available online: https://www.ams.usda.gov/grades-standards/fruits.
12. El color en los alimentos un criterio de calidad medible10.4206/agrosur.2014.v42n2-07 ↗
13. Simonyan, K., and Zisserman, A. (2014). Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv.
14. ImageNet Classification with Deep Convolutional Neural Networks
15. ImageNet Large Scale Visual Recognition Challenge10.1007/s11263-015-0816-y ↗
16. Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S., Anguelov, D., Erhan, D., Vanhoucke, V., and Rabinovich, A. (2014). Going Deeper with Convolutions. arXiv.10.1109/CVPR.2015.7298594 ↗
17. Ren, S., He, K., Girshick, R., and Sun, J. (2015). Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. Advances in Neural Information Processing Systems, Curran Associates Inc.
18. Girshick, R. (2015). Fast R-CNN. Proceedings of the IEEE International Conference on Computer Vision (ICCV), IEEE.10.1109/ICCV.2015.169 ↗
19. Tan, M., and Le, Q. (2019, January 9–15). EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA.
20. Jing, J., Zhang, S., Sun, H., Ren, R., and Cui, T. (2024). YOLO-PEM: A Lightweight Detection Method for Young “Okubo” Peaches in Complex Orchard Environments. Agronomy, 14.10.3390/agronomy14081757 ↗
21. Peach Fruit Thinning Image Detection Based on Improved YOLOv8 and Data Enhancement Techniques
22. Jocher, G., Chaurasia, A., and Qiu, J. (2023). Ultralytics YOLOv8, Ultralytics. Available online: https://docs.ultralytics.com/models/yolov8/.
23. Jocher, G., and Qiu, J. (2024). Ultralytics YOLO11, Ultralytics. Available online: https://docs.ultralytics.com/models/yolo11/.
24. Tian, Y., Ye, Q., and Doermann, D. (2025). YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv.
25. Tian, Y., Ye, Q., and Doermann, D. (2025). YOLOv12: Attention-Centric Real-Time Object Detectors, GitHub. Available online: https://github.com/sunsmarterjie/yolov12.
26. Artificial Vision Techniques for Strawberry’s Industrial Classification10.1109/TLA.2016.7555221 ↗
27. Granados Giraldo, M.C., and Carrillo Hernández, J.A. (2021). Diseño y Construcción de una Máquina Clasificadora de Durazno de Tipo Exportación Utilizando Inteligencia Artificial. [Bachelor’s Thesis, Universidad Autónoma de Bucaramanga (UNAB)]. Available online: https://hdl.handle.net/20.500.12749/12154.
28. Automated Fruit Sorting in Smart Agriculture System: Analysis of Deep Learning-Based Algorithms
29. Multi-Fruit Classification and Grading Using a Same-Domain Transfer Learning Approach Based on EfficientNetV210.1109/ACCESS.2024.3379276 ↗
30. CAM-YOLO: Tomato detection and classification based on improved YOLOv5 using combining attention mechanism10.7717/peerj-cs.1463 ↗
31. Fruit quality identification and classification by convolutional neural network10.1007/s42979-022-01527-w ↗
32. Intelligent postharvest sorting of bananas using thermal imaging and deep neural network models10.1007/s11947-025-04173-1 ↗
33. Singh, S.K., Roy, P., Raman, B., and Nagabhushan, P. (2021). Crop Classification from UAV-Based Multi-spectral Images Using Deep Learning. Computer Vision and Image Processing, CVIP 2020, Springer. Communications in Computer and Information Science.
34. Assunção, E., Gaspar, P., Mesquita, R., Simões, M.P., Ramos, A., Proença, H., and Inácio, P. (2022). Peaches Detection Using a Deep Learning Technique—A Contribution to Yield Estimation, Resources Management, and Circular Economy. Climate, 10.10.3390/cli10020011 ↗
35. Peach Ripeness Classification Based on One-Stage Instance Segmentation Model10.1016/j.compag.2023.108369 ↗
36. Convolutional Neural Network Ensemble Learning for Hyperspectral Imaging-Based Blackberry Fruit Ripeness Detection in Uncontrolled Farm Environment10.1016/j.engappai.2024.107945 ↗
37. Fruitful Fusion: CNN-Random Forest Synergy in Banana Ripeness Detection
38. Development of Fig Fruit Ripeness Classification Using Convolutional Neural Network10.24191/esteem.v20iSeptember.1837.g1829 ↗
39. Deteksi Tingkat Kematangan Buah Pepaya Menggunakan Convolutional Neural Network dengan Metode Deep Learning
40. Maru, R., Kamat, A., Shah, M., Kute, P., Shrawne, S.C., and Sambhe, V. (2024). Improved Faster RCNN for Ripeness and Size Estimation of Mangoes with Multi-Label Output. Proceedings of the 2024 International Conference on Computational Intelligence and Network Systems (CINS), IEEE.10.1109/CINS63881.2024.10864434 ↗
41. Nguyen, D.-L., Vo, X.T., Priadana, A., Putro, M.D., and Jo, K.H. (2024). Fruit Ripeness Detector for Automatic Fruit Classification Systems. 2024 IEEE 33rd International Symposium on Industrial Electronics (ISIE), IEEE.10.1109/ISIE54533.2024.10595723 ↗
42. PdYOLO: A Lightweight Algorithm for Detecting Peach Fruits against a Peach Tree Background
43. Karegowda, A.G., D.U., H., and Sheela, S.J. (2024, January 7–9). Fruit Classification and Ripeness Estimation Using Deep Learning Models. Proceedings of the 2024 8th International Conference on Computational System and Information Technology for Sustainable Solutions (CSITSS), Bengaluru, India.10.1109/CSITSS64042.2024.10817041 ↗
44. INEGI (2025, June 22). Espacio y Datos de México/Sistema de Consulta. Available online: https://www.inegi.org.mx/app/mapa/espacioydatos/default.aspx?ag=320560001.
45. Tipología de Productores de Durazno en Zacatecas, México por Atributos de Calidad del Fruto
46. MathWorks (2019). MATLAB, MathWorks. Available online: https://www.mathworks.com.
47. Charikar, M. (2002). Similarity Estimation Techniques from Rounding Algorithms. Proceedings of the 34th Annual ACM Symposium on Theory of Computing, ACM.10.1145/509907.509965 ↗
48. Deep Learning10.1038/nature14539 ↗
49. Roboflow (2025). Everything You Need to Build and Deploy Computer Vision Applications, Roboflow. Available online: https://roboflow.com.
50. Google (2025, August 14). Google Colaboratory. Available online: https://colab.research.google.com/.