Volume 10 • Issue 1 • PP: 08–19 • 2025
Apple Quality Classification Using a Metaheuristic-Optimized Machine Learning Framework
Open Access & Copyright
© 2025 The Author(s). Published by ASPG. This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Abstract
This study presents a comprehensive evaluation of metaheuristic-optimized machine learning models for automated apple quality classification, addressing the critical need for accurate and consistent fruit grading systems in agricul-tural applications. The research integrates four bio-inspired optimization algorithms—Whale Optimization Algorithm (WOA), Salp Swarm Algorithm (SSA), Cuckoo Search (CS), and Bat Algorithm (BAT)—with Multi-Layer Percep-tron (MLP) classifiers to enhance fruit quality assessment performance. Experimental validation was conducted using a comprehensive apple quality dataset containing seven key attributes: size, weight, sweetness, crunchiness, juiciness, ripeness, and acidity. The results demonstrate that WOA-MLPClassifier achieves superior performance with 95.37%accuracy, 95.99% sensitivity, and balanced effectiveness across all evaluation metrics including specificity, positive predictive value, negative predictive value, and F1 Score. Statistical validation through one-way ANOVA and Wilcoxon signed-rank tests confirms significant performance improvements over baseline models and alternative optimization approaches, with p-values less than 0.001. The proposed framework exhibits remarkable consistency across multiple evaluation runs, with perfect positive rank sums indicating reliable optimization behavior. These findings establish a new benchmark for automated fruit quality classification systems and provide valuable insights for deploying bio-inspired optimization techniques in agricultural machine learning applications where both accuracy and reliability are essential for commercial viability.
Keywords
References
[1] M. Agarla, P. Napoletano, and R. Schettini, “Quasi real-time apple defect segmentation using deep learning,” Sensors, 2023.
[2] W. Ji, J. Wang, B. Xu, and T. Zhang, “Apple grading based on multi-dimensional view processing and deep learning,” Foods, 2023.
[3] F. Yu, T. Lu, and C. Xue, “Deep learning-based in-telligent apple variety classification system and model interpretability analysis,” Foods, 2023.
[4] J. F. I. Nturambirwe, E. A. Hussein, M. Vaccari, C. Thron, W. J. Perold, and U. L. Opara, “Feature re-duction for the classification of bruise damage to apple fruit using contactless ft-nir spectroscopy with machine learning,” Foods, 2023.
[5] M. Anastasiadi, F. Mohareb, S. P. Redfern, M. Berry, M. S. J. Simmonds, and L. A. Terry, “Biochemical pro-file of heritage and modern apple cultivars and applica-tion of machine learning methods to predict usage, age, and harvest season,” Journal of Agricultural and Food Chemistry, 2017.
[6] B. Liu, H. Fan, Y. Zhang, J. Cai, and H. Cheng, “Deep learning architectures for diagnosing the severity of ap-ple frog-eye leaf spot disease in complex backgrounds,” Frontiers in Plant Science, 2024.
[7] M. Li et al., “Label-free raman microspectroscopic imaging with chemometrics for cellular investigation of apple ring rot and nondestructive early recognition us-ing near-infrared reflection spectroscopy with machine learning,” Talanta, 2023.
[8] U. E. Prechsl, A. Mejia-Aguilar, and C. B. Cullinan, “In vivo spectroscopy and machine learning for the early detection and classification of different stresses in apple trees,” Scientific Reports, 2023.
[9] Z. Zhao, J. Wang, and H. Zhao, “Research on apple recognition algorithm in complex orchard environment based on deep learning,” Sensors, 2023.
[10] O. E. Apolo-Apolo, M. Pérez-Ruiz, J. Martínez-Guanter, and J. Valente, “A cloud-based environment for gener-ating yield estimation maps from apple orchards using uav imagery and a deep learning technique,” Frontiers in Plant Science, 2020.
[11] S. Jang et al., “Estimation of apple leaf nitrogen concen-tration using hyperspectral imaging-based wavelength selection and machine learning,” Horticulturae, vol. 10, no. 1, p. 35, 2023.
[12] D. Kasperek, P. Antonowicz, M. Baranowski, M. Sokolowska, and M. Podpora, “Comparison of the usability of apple m2 and m1 processors for various machine learning tasks,” Sensors, 2023.
[13] A. Bonkra et al., “Apple leaf disease detection using collaborative ml/dl and artificial intelligence methods: Scientometric analysis,” International Journal of Envi-ronmental Research and Public Health, 2023.
[14] D. Kasperek, M. Podpora, and A. Kawala-Sterniuk, “Comparison of the usability of apple m1 processors for various machine learning tasks,” Sensors, 2022.
[15] V. R. Sharabiani, S. Sabzi, R. Pourdarbani, M. Szy-manek, and S. Michalek, “Inner properties estimation of gala apple using spectral data and two statistical and artificial intelligence based methods,” Foods, 2021.
[16] Y. Tian, E. Li, Z. Liang, M. Tan, and X. He, “Diagnosis of typical apple diseases: A deep learning method based on multi-scale dense classification network,” Frontiers in Plant Science, 2021.
[17] M. Lashgari, A. Imanmehr, and H. Tavakoli, “Fusion of acoustic sensing and deep learning techniques for apple mealiness detection,” Journal of Food Science and Technology, 2020.
[18] J. W. McGrath, J. Neville, T. Stewart, H. Clinning, B. Thomas, and J. Cronin, “Quantifying cricket fast bowling volume, speed and perceived intensity zone using an apple watch and machine learning,” Journal of Sports Sciences, 2021.
[19] O. Thamsuwan and P. W. Johnson, “Machine learning methods for electromyography error detection in field research: An application in full-shift field assessment of shoulder muscle activity in apple harvesting workers,” Applied Ergonomics, 2021.
[20] S. Samiei, P. Rasti, P. Richard, G. Galopin, and D. Rousseau, “Toward joint acquisition-annotation of images with egocentric devices for a lower-cost machine learning application to apple detection,” Sensors, 2020.
[21] Q. Zhang and W.-H. Su, “Real-time recognition and localization of apples for robotic picking based on struc-tural light and deep learning,” Smart Cities, vol. 6, no. 6, pp. 3393–3410, 2023.
[22] L. Gao, X. Zhao, X. Yue, Y. Yue, X. Wang, H. Wu, and X. Zhang, “A lightweight YOLOv8 model for apple leaf disease detection,” Applied Sciences, vol. 14, no. 15, p. 6710, 2024.
[23] S. Zhang, J. Wang, K. Yang, and M. Guan, “YOLO-ACT: An adaptive cross-layer integration method for apple leaf disease detection,” Frontiers in Plant Science, vol. 15, p. 1451078, 2024.
[24] B. Liu, X. Huang, L. Sun, X. Wei, Z. Ji, and H. Zhang, “MCDCNet: Multi-scale constrained deformable convo-lution network for apple leaf disease detection,” Comput-ers and Electronics in Agriculture, vol. 222, p. 109028, 2024.
[25] H. Wang, J. Zhang, Z. Yin, L. Huang, J. Wang, and X. Ma, “A deep evidence fusion framework for apple leaf disease classification,” Engineering Applications of Artificial Intelligence, vol. 136, p. 109011, 2024.
[26] Z. Wang, Y. Feng, H. Wang, X. Liu, and Z. Zhao, “Ef-fects of different pre-harvest bagging times on fruit quality of apple,” Foods, vol. 13, no. 8, p. 1243, 2024.
[27] Z. Liu and X. Li, “An improved YOLOv5-based ap-ple leaf disease detection method,” Scientific Reports, vol. 14, no. 1, p. 17508, 2024.
[28] C. Yan and K. Yang, “FSM-YOLO: Apple leaf disease detection network based on adaptive feature capture and spatial context awareness,” Digital Signal Processing, vol. 155, p. 104770, 2024.
[29] M. A. Kirmani and Y. Afaq, “Developments in deep learning approaches for apple leaf alternaria disease identification: A review,” Computers and Electronics in Agriculture, vol. 227, p. 109593, 2024.
[30] T. Li, L. Zhang, and J. Lin, “Precision agriculture with YOLO-Leaf: Advanced methods for detecting apple leaf diseases,” Frontiers in Plant Science, vol. 15, p. 1452502, 2024.
[31] E. Ropelewska and M. Lewandowski, “The changes in color and image parameters and sensory attributes of freeze-dried clones and a cultivar of red-fleshed apples,” Foods, 2024.
[32] M. U. Ali, M. Khalid, M. Farrash, H. F. M. Lahza, A. Zafar, and S.-H. Kim, “Appleleafnet: A lightweight and efficient deep learning framework for diagnosing apple leaf diseases,” Frontiers in Plant Science, 2024.
[33] C. Zhan et al., “Detection of apple sucrose concentration based on fluorescence hyperspectral image system and machine learning,” Foods, 2024.
[34] J. Wang, C. Qin, B. Hou, Y. Yuan, Y. Zhang, and W. Feng, “Lcgsc-yolo: A lightweight apple leaf dis-eases detection method based on lcnet and gsconv mod-ule under yolo framework,” Frontiers in Plant Science, 2024.
[35] Z. Guo et al., “Dynamic nondestructive detection mod-els of apple quality in critical harvest period based on near-infrared spectroscopy and intelligent algorithms,” Foods, 2024.
[36] J. Wang, J. Jia, Y. Zhang, H. Wang, and S. Zhu, “Raawc-unet: An apple leaf and disease segmentation method based on residual attention and atrous spatial pyramid pooling improved unet with weight compression loss,” Frontiers in Plant Science, 2024.
[37] A. A. Yatoo and A. Sharma, “An indigenous dataset for the detection and classification of apple leaf diseases,” Data in Brief, 2024.
[38] M. Lv and W.-H. Su, “Yolov5-cbam-c3tr: An optimized model based on transformer module and attention mech-anism for apple leaf disease detection,” Frontiers in Plant Science, 2024.
Cite This Article
Choose your preferred format
Publisher's Note
The statements, opinions, and data presented in this article are solely those of the author(s) and do not necessarily represent those of ASPG, the journal, or its editors. ASPG and the editors disclaim responsibility for any harm arising from the use of any ideas, methods, instructions, or products described in this article, to the fullest extent permitted by applicable law.