Sustainable Wastewater Management in Agriculture: A Deep Learning-based Olive Classification for Resource Efficiency in Water-Scarce Regions
Received: 21 February 2025 | Revised: 28 March 2025, 08 April 2025, and 10 April 2025 | Accepted: 12 April 2025 | Online: 16 May 2025
Corresponding author: Walid Karamti
Abstract
Efficient sustainable wastewater management combined with resource recovery represents a critical challenge for water-deprived areas, such as the Qassim region in Saudi Arabia. The effective integration of wastewater reuse into agricultural practices, particularly olive cultivation, requires advanced technological solutions to maximize yield, quality, and resource efficiency. This research investigates Deep Learning (DL)-based automatic olive classification systems as a vital component for optimizing post-harvest sorting operations, directly contributing to improved water efficiency by ensuring the appropriate allocation of wastewater resources to different olive varieties. The You Only Look Once (YOLO) object detection models—YOLOv5, YOLOv7, and YOLOv8—were employed to enhance accuracy and operational efficiency by classifying olives based on physical characteristics, including color, shape, and texture. A dataset of 2,025 images covering seven olive varieties was collected from publicly available sources, annotated using Roboflow, and preprocessed by resizing, rotation, scaling, and color adjustments. The YOLOv8 model achieved the best results, with a Recall of 99%, Precision of 99.1%, and mean Average Precision (mAP) of 99.4%, computed across thresholds [0.5:0.95] and [0.5:0.85]. These findings underscore the role of AI-powered classification in facilitating sustainable wastewater management, supporting more efficient water usage, and enhancing agricultural sustainability in arid regions.
Keywords:
ANNs, sustainable wastewater management, deep learning in agriculture, YOLO, Object Detection, olive classification, sorting, resource efficiency in water-scarce regionsDownloads
References
V. Uylaşer and G. Yildiz, “The historical development and nutritional importance of olive and olive oil constituted an important part of the Mediterranean diet,” Critical Reviews in Food Science and Nutrition, vol. 54, no. 8, pp. 1092–1101, 2014.
J. Mendes, J. Lima, L. Costa, N. Rodrigues, and A. I. Pereira, “Deep learning networks for olive cultivar identification: A comprehensive analysis of convolutional neural networks,” Smart Agricultural Technology, vol. 8, Aug. 2024, Art. no. 100470.
M. Brake, H. Migdadi, M. Al-Gharaibeh, S. Ayoub, N. Haddad, and A. E. Oqlah, “Characterization of Jordanian olive cultivars (Olea europaea L.) using RAPD and ISSR molecular markers,” Scientia Horticulturae, vol. 176, pp. 282–289, Sep. 2014.
A. Pasqualone, C. Montemurro, V. di Rienzo, C. Summo, V. M. Paradiso, and F. Caponio, “Evolution and perspectives of cultivar identification and traceability from tree to oil and table olives by means of DNA markers,” Journal of the Science of Food and Agriculture, vol. 96, no. 11, pp. 3642–3657, 2016.
R. Peeriga et al., “Real-Time Rain Prediction in Agriculture using AI and IoT: A Bi-Directional LSTM Approach,” Engineering, Technology & Applied Science Research, vol. 14, no. 4, pp. 15805–15812, Aug. 2024.
V. di Rienzo et al., “Genetic flow among olive populations within the Mediterranean basin,” PeerJ, vol. 6, Jul. 2018, Art. no. e5260.
A. Almutairi, J. Alharbi, S. Alharbi, H. F. Alhasson, S. S. Alharbi, and S. Habib, “Date Fruit Detection and Classification Based on Its Variety Using Deep Learning Technology,” IEEE Access, vol. 12, pp. 190666–190677, 2024.
A. Fritscher-Ravens and C. P. Swain, “The Wireless Capsule: New Light in the Darkness,” Digestive Diseases, vol. 20, no. 2, pp. 127–133, Jan. 2003.
R. Huang, J. Pedoeem, and C. Chen, “YOLO-LITE: A Real-Time Object Detection Algorithm Optimized for Non-GPU Computers,” presented at the 2018 IEEE International Conference on Big Data (Big Data), pp. 2503–2510, Dec. 2018.
K. Albarrak, Y. Gulzar, Y. Hamid, A. Mehmood, and A. B. Soomro, “A Deep Learning-Based Model for Date Fruit Classification,” Sustainability, vol. 14, no. 10, Jan. 2022, Art. no. 6339.
C. Liu, J. Han, B. Chen, J. Mao, Z. Xue, and S. Li, “A Novel Identification Method for Apple (Malus domestica Borkh.) Cultivars Based on a Deep Convolutional Neural Network with Leaf Image Input,” Symmetry, vol. 12, no. 2, Feb. 2020, Art. no. 217.
S. Al-Rahbi, A. Manickavasagan, R. Al-Yahyai, L. Khriji, P. Alahakoon, “Detecting Surface Cracks on Dates Using Color Imaging Technique,” Food Science and Technology Research, vol. 19, no. 5, pp. 795-804, 2013.
S. Habib, I. Khan, S. Aladhadh, M. Islam, και S. Khan, ‘External Features-Based Approach to Date Grading and Analysis with Image Processing’, Emerging Science Journal, vol. 6, no. 4, May 2022, Art. no. 4.
A. Sundaresan Geetha, M. Al Rabbani Alif, M. Hussain and P. Allen, “Comparative Analysis of YOLOv8 and YOLOv10 in Vehicle Detection: Performance Metrics and Model Efficacy,” Vehicles, vol. 6, no. 3, pp. 1364-1382, Aug. 2024.
O. Kıvrak and M. Z. Gürbüz, “Performance Comparison of YOLOv3,YOLOv4 and YOLOv5 algorithms : A Case Study for Poultry Recognition,” Avrupa Bilim ve Teknoloji Dergisi, no. 38, pp. 392–397, Aug. 2022.
S. P. Garofalo, V. Giannico, L. Costanza, S. Alhajj Ali, S. Camposeo, G. Lopriore, F. Salcedo, and G. Alessandro Vivaldi, “Prediction of Stem Water Potential in Olive Orchards Using High-Resolution Planet Satellite Images and Machine Learning Techniques,” Agronomy, vol. 14, no. 1, Jan. 2024, Art. no. 1.
P. Christias και M. Mocanu, “A Machine Learning Framework for Olive Farms Profit Prediction”, Water, vol. 13, no. 23, Jan. 2021, Art. no. 23.
M. I. Ramos, J. J. Cubillas, R. M. Córdoba, and L. M. Ortega, “Improving early prediction of crop yield in Spanish olive groves using satellite imagery and machine learning,” PLOS ONE, vol. 20, no. 1, Jan. 2025, Art. no. e0311530.
B. Abdelwahed, A. Harchay, A. Massaoudi, M. Ben Ayed, and H. Belmabrouk. “GMLP-IDS: A Novel Deep Learning-Based Intrusion Detection System for Smart Agriculture,” Computers, Materials and Continua, vol. 77, no. 1, pp. 379–402, Oct. 2023.
A. Massaoudi, A. Berguiga, A. Harchay, M. Ben Ayed, and H. Belmabrouk, “Spectral and Energy Efficiency Trade-Off in UAV-Based Olive Irrigation Systems,” Applied Sciences, vol. 13, no. 19, Jan. 2023, Art. no. 10739.
A. Massaoudi, A. Berguiga, and A. Harchay, “Secure Irrigation System for Olive Orchards Using Internet of Things,” Computers, Materials & Continua, vol. 72, no. 3, pp. 4663–4673, 2022.
N. Mamat, M. F. Othman, R. Abdulghafor, A. A. Alwan, and Y. Gulzar, “Enhancing Image Annotation Technique of Fruit Classification Using a Deep Learning Approach,” Sustainability, vol. 15, no. 2, Jan. 2023.
J. Redmon and A. Farhadi, “YOLO9000: Better, Faster, Stronger”, στο 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6517–6525, Jul. 2017.
A. Bochkovskiy, C.-Y. Wang, και H.-Y. M. Liao, “YOLOv4: Optimal Speed and Accuracy of Object Detection”, 23 April 2020, arXiv: arXiv:2004.10934.
Downloads
How to Cite
License
Copyright (c) 2025 Walid Karamti, Salim El Khediri, Tarek Moulahi

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.