Revolutionizing Smart Agriculture: Enhancing Apple Quality with Machine Learning
DOI:
https://doi.org/10.56294/dm2024.592Keywords:
Agriculture 4.0, Artificial Intelligence, Convolutional Neural Network, Image Processing, EfficientNet, QualityAbstract
Agriculture 4.0 is a field that has spread widely around the world in this century, as it has undergone an exceptionally rapid evolution, especially when it comes to fruit recognition.
Decisions about their quality are crucial to maximize profits and meet customer expectations. In the past, apples or even other fruits were based solely on visual assessments by experts, which led to errors. These old methods no longer consider the genetic evolution of apples, as they only consider their size, color, and skin imperfections. Digitizing this process saves energy and reduces costs and human error as well. Recent technological advances, which combine AI and CAO at the same time for fruit sorting, make it possible to achieve high levels of quality and meet the growing challenges of food safety on a global scale. This study proposes a machine learning-based multiclass model to improve the accuracy and efficiency of apple quality assessment. The model is trained on a large image dataset of three apple varieties: Gala, Fuji, and Golden Delicious (G.D). The model automatically classifies apples based on attributes such as color, shape, and imperfections, and evaluates their conformity. Experimental results demonstrate the effectiveness of this model, which achieves 97% accuracy in identifying apple varieties and assessing their quality. This approach significantly reduces inspection time and errors, optimizing operations in the production chain.
References
1. cycles T text provides general information S assumes no liability for the information given being complete or correct D to varying update, Text SCDM up to DDTR in the. Statista. [cited 2024 Feb 16]. Topic: Smart agriculture. Available from: https://www.statista.com/topics/4134/smart-agriculture/
2. ICT Initiative of SAARC Agriculture Centre in the SAARC Region | IEEE Conference Publication | IEEE Xplore [Internet]. [cited 2024 Feb 16]. Available from: https://ieeexplore.ieee.org/abstract/document/4625002
3. Phosphates et secteur automobile en tête des ventes nationales à l’export [Internet]. [cited 2024 Feb 16]. Available from: https://fr.hespress.com/326757-phosphates-et-secteur-automobile-plafonnent-en-tete-des-ventes-nationales-a-lexport.html
4. Morocco: Production of apples – Agronomist [Internet]. [cited 2024 Nov 21]. Available from: https://agronomist.pl/artykuly/morocco-production-of-apples
5. Apple production, 1961 to 2021 [Internet]. [cited 2023 Nov 8]. Available from: https://ourworldindata.org/grapher/apple-production?tab=table
6. List of apple cultivars - Wikipedia [Internet]. [cited 2024 Feb 23]. Available from: https://en.wikipedia.org/wiki/List_of_apple_cultivars
7. Le 360 Français [Internet]. [cited 2024 Feb 16]. Festival national des pommes d’Ifrane: Fès-Meknès concentre près de 38% de la production nationale. Available from: https://fr.le360.ma/economie/festival-national-des-pommes-difrane-fes-meknes-concentre-pres-de-38-de-la-production-nationale-139775/
8. Filière Pommier | Ministère de l’agriculture [Internet]. [cited 2024 Feb 16]. Available from: https://www.agriculture.gov.ma/fr/filieres-regions/pomme-dt
9. Coskun M, Ucar A, Yildirim O, Demir Y. Face recognition based on convolutional neural network. In: 2017 International Conference on Modern Electrical and Energy Systems (MEES) [Internet]. Kremenchuk: IEEE; 2017 [cited 2024 Feb 15]. p. 376–9. Available from: http://ieeexplore.ieee.org/document/8248937/
10. Pramudhita DA, Azzahra F, Arfat IK, Magdalena R, Saidah S. Strawberry Plant Diseases Classification Using CNN Based on MobileNetV3-Large and EfficientNet-B0 Architecture. J Ilm Tek Elektro Komput Dan Inform. 2023;9(3):522–34.
11. Taji K, Ghanimi F. Enhancing Plant Disease Classification through Manual CNN Hyperparameter Tuning. Data Metadata. 2023 Jan 20;2:112.
12. New generation farmers: Rediscovering the peasantry - ScienceDirect [Internet]. [cited 2024 May 14]. Available from: https://www.sciencedirect.com/science/article/abs/pii/S074301671830559X
13. An interval valued Pythagorean fuzzy AHP integrated quality function deployment methodology for hazelnut production in Turkey - ScienceDirect [Internet]. [cited 2024 May 14]. Available from: https://www.sciencedirect.com/science/article/abs/pii/S0957417423012101
14. Si W, Xiong J, Huang Y, Jiang X, Hu D. Quality Assessment of Fruits and Vegetables Based on Spatially Resolved Spectroscopy: A Review. Foods. 2022 Apr 20;11(9):1198.
15. Palumbo M, Attolico G, Capozzi V, Cozzolino R, Corvino A, de Chiara MLV, et al. Emerging Postharvest Technologies to Enhance the Shelf-Life of Fruit and Vegetables: An Overview. Foods. 2022 Jan;11(23):3925.
16. Fruit Maturity - an overview | ScienceDirect Topics [Internet]. [cited 2024 May 19]. Available from: https://www.sciencedirect.com/topics/agricultural-and-biological-sciences/fruit-maturity
17. Phenotypic techniques and applications in fruit trees: a review | Plant Methods | Full Text [Internet]. [cited 2024 May 20]. Available from: https://plantmethods.biomedcentral.com/articles/10.1186/s13007-020-00649-7
18. Mohr BC. The Mohr Digi-Test (MDT) Computerized Agricultural Penetrometer as an Apple Maturity Tool.
19. What is a Brix Refractometer, and how do they work? [Internet]. [cited 2023 Nov 8]. Available from: https://www.instrumentchoice.com.au/news/what-is-a-brix-refractometer-and-how-do-they-work
20. (5) Fruit Classification Using Traditional Machine Learning and Deep Learning Approach | Request PDF [Internet]. [cited 2024 Mar 12]. Available from: https://www.researchgate.net/publication/338414015_Fruit_Classification_Using_Traditional_Machine_Learning_and_Deep_Learning_Approach
21. Rizzo M, Marcuzzo M, Zangari A, Gasparetto A, Albarelli A. Fruit ripeness classification: A survey. Artif Intell Agric. 2023 Mar 1;7:44–57.
22. Important Considerations When Choosing Your Supplier of Wholesale Fruits and Vegetables - Fruitique Wholesale [Internet]. 2019 [cited 2024 May 20]. Available from: https://fruitiquewholesale.com.au/important-considerations-when-choosing-your-supplier-of-wholesale-fruits-and-vegetables/
23. Lai JW, Ramli HR, Ismail LI, Wan Hasan WZ. Oil Palm Fresh Fruit Bunch Ripeness Detection Methods: A Systematic Review. Agriculture. 2023 Jan;13(1):156.
24. da Silveira F, Lermen FH, Amaral FG. An overview of agriculture 4.0 development: Systematic review of descriptions, technologies, barriers, advantages, and disadvantages. Comput Electron Agric. 2021 Oct 1;189:106405.
25. Abbasi R, Martinez P, Ahmad R. The digitization of agricultural industry – a systematic literature review on agriculture 4.0. Smart Agric Technol. 2022 Dec;2:100042.
26. Hassan SI, Alam MM, Illahi U, Al Ghamdi MA, Almotiri SH, Su’ud MM. A Systematic Review on Monitoring and Advanced Control Strategies in Smart Agriculture. IEEE Access. 2021;9:32517–48.
27. Sustainability | Free Full-Text | Fruit Image Classification Model Based on MobileNetV2 with Deep Transfer Learning Technique [Internet]. [cited 2024 May 19]. Available from: https://www.mdpi.com/2071-1050/15/3/1906
28. K B M, R R. Classification of Fruits using Deep Learning Algorithms. 2022.
29. Towards making the fields talks: A real-time cloud enabled IoT crop management platform for smart agriculture - PMC [Internet]. [cited 2024 May 20]. Available from: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9846789/
30. A Bibliometric Network Analysis of Recent Publications on Digital Agriculture to Depict Strategic Themes and Evolution Structure - PMC [Internet]. [cited 2024 May 20]. Available from: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8659853/
31. Monteiro A, Santos S, Gonçalves P. Precision Agriculture for Crop and Livestock Farming—Brief Review. Animals. 2021 Aug 9;11:2345.
32. Wolfert S, Ge L, Verdouw C, Bogaardt MJ. Big Data in Smart Farming – A review. Agric Syst. 2017 May 1;153:69–80.
33. Washington P, Park N, Srivastava P, Voss C, Kline A, Varma M, et al. Data-Driven Diagnostics and the Potential of Mobile Artificial Intelligence for Digital Therapeutic Phenotyping in Computational Psychiatry. Biol Psychiatry Cogn Neurosci Neuroimaging. 2020 Aug 1;5(8):759–69.
34. Blasco J, Aleixos N, Moltó E. Machine Vision System for Automatic Quality Grading of Fruit. Biosyst Eng. 2003 Aug 1;85(4):415–23.
35. Sri VS, Sailu VH, Pradeepthi U, Sai PM, Kavitha M. Disease Detection using Region-Based Convolutional Neural Network and ResNet. Data Metadata. 2023 Jan 20;2:135.
36. Zhang R, Sarmientor J, Ocampo ALD, Hernandez R. Fruit and vegetable self-billing system based on image recognition. Data Metadata. 2024 Jan 1;3:.397.
37. (PDF) Implementation of artificial intelligence in agriculture for optimisation of irrigation and application of pesticides and herbicides [Internet]. [cited 2024 Mar 13]. Available from: https://www.researchgate.net/publication/340869105_Implementation_of_artificial_intelligence_in_agriculture_for_optimisation_of_irrigation_and_application_of_pesticides_and_herbicides
38. (8) (PDF) Machine Vision based Fruit Classification and Grading - A Review [Internet]. [cited 2024 Apr 8]. Available from: https://www.researchgate.net/publication/318486455_Machine_Vision_based_Fruit_Classification_and_Grading_-_A_Review
39. Bhargava A, Bansal A. Fruits and vegetables quality evaluation using computer vision: A review. J King Saud Univ - Comput Inf Sci. 2021 Mar 1;33(3):243–57.
40. kavdır I, Guyer DE. Apple grading using fuzzy logic. Turk J Agric For. 2003 Jan 1;27:375–82.
41. Mulyani EDS, Susanto JP. Classification of maturity level of fuji apple fruit with fuzzy logic method. In: 2017 5th International Conference on Cyber and IT Service Management (CITSM) [Internet]. Denpasar, Bali, Indonesia: IEEE; 2017 [cited 2023 Oct 18]. p. 1–4. Available from: http://ieeexplore.ieee.org/document/8089294/
42. Automated fruit recognition using EfficientNet and MixNet - ScienceDirect [Internet]. [cited 2024 Feb 17]. Available from: https://www.sciencedirect.com/science/article/abs/pii/S0168169919319787
43. Srinidhi VV, Sahay A, Deeba K. Plant Pathology Disease Detection in Apple Leaves Using Deep Convolutional Neural Networks : Apple Leaves Disease Detection using EfficientNet and DenseNet. In: 2021 5th International Conference on Computing Methodologies and Communication (ICCMC) [Internet]. Erode, India: IEEE; 2021 [cited 2023 Nov 13]. p. 1119–27. Available from: https://ieeexplore.ieee.org/document/9418268/
44. Albarrak K, Gulzar Y, Hamid Y, Mehmood A, Soomro AB. A Deep Learning-Based Model for Date Fruit Classification. Sustainability. 2022 May 23;14(10):6339.
45. Apple quality identification and classification by image processing based on convolutional neural networks | Scientific Reports [Internet]. [cited 2024 Apr 10]. Available from: https://www.nature.com/articles/s41598-021-96103-2
46. Wang J jing, Zhao D an, Ji W, Tu J jun, Zhang Y. Application of support vector machine to apple recognition using in apple harvesting robot. In: 2009 International Conference on Information and Automation [Internet]. 2009 [cited 2024 Mar 13]. p. 1110–5. Available from: https://ieeexplore.ieee.org/document/5205083
47. Zhou H, Wang Y, Lei X, Liu Y. A Method of Improved CNN Traffic Classification. In: 2017 13th International Conference on Computational Intelligence and Security (CIS) [Internet]. 2017 [cited 2024 Apr 8]. p. 177–81. Available from: https://ieeexplore.ieee.org/abstract/document/8288468
48. Agriculture | Free Full-Text | Apple Varieties Classification Using Deep Features and Machine Learning [Internet]. [cited 2024 Mar 13]. Available from: https://www.mdpi.com/2077-0472/14/2/252
49. Xu B, Cui X, Ji W, Yuan H, Wang J. Apple Grading Method Design and Implementation for Automatic Grader Based on Improved YOLOv5. Agriculture. 2023 Jan;13(1):124.
50. Morshed MS, Ahmed S, Ahmed T, Islam MU, Rahman ABMA. Fruit Quality Assessment with Densely Connected Convolutional Neural Network [Internet]. arXiv; 2022 [cited 2024 Mar 13]. Available from: http://arxiv.org/abs/2212.04255
51. Adige S, Kurban R, Durmuş A, Karaköse E. Classification of apple images using support vector machines and deep residual networks. Neural Comput Appl. 2023 Jun 1;35(16):12073–87.
52. Shape-based Fruit Recognition and Classification | SpringerLink [Internet]. [cited 2024 Mar 13]. Available from: https://link.springer.com/chapter/10.1007/978-981-10-6430-2_15
53. Liu YH. Feature Extraction and Image Recognition with Convolutional Neural Networks. J Phys Conf Ser. 2018 Sep;1087(6):062032.
54. Alzubaidi L, Zhang J, Humaidi AJ, Al-Dujaili A, Duan Y, Al-Shamma O, et al. Review of deep learning: concepts, CNN architectures, challenges, applications, future directions. J Big Data. 2021 Mar 31;8(1):53.
55. Raju A, Thirunavukkarasu S, Raju A, Thirunavukkarasu S. Convolutional Neural Network Demystified for a Comprehensive Learning with Industrial Application. In: Dynamic Data Assimilation - Beating the Uncertainties [Internet]. IntechOpen; 2020 [cited 2023 Nov 23]. Available from: https://www.intechopen.com/chapters/72480
56. Sangeetha R, Rani MMS. Tomato leaf disease prediction using convolutional neural network. Int J Innov Technol Explor Eng. 2019;9(1):1348–52.
57. Pröve PL. Medium. 2018 [cited 2023 Dec 8]. MobileNetV2: Inverted Residuals and Linear Bottlenecks. Available from: https://towardsdatascience.com/mobilenetv2-inverted-residuals-and-linear-bottlenecks-8a4362f4ffd5
58. Islam MT, Karim Siddique BMN, Rahman S, Jabid T. Food Image Classification with Convolutional Neural Network. In: 2018 International Conference on Intelligent Informatics and Biomedical Sciences (ICIIBMS) [Internet]. 2018 [cited 2024 Jan 7]. p. 257–62. Available from: https://ieeexplore.ieee.org/document/8550005
59. Enhanced Skin Condition Prediction Through Machine Learning Using Dynamic Training and Testing Augmentation | IEEE Journals & Magazine | IEEE Xplore [Internet]. [cited 2023 Dec 19]. Available from: https://ieeexplore.ieee.org/document/9007729
60. Powers DMW. Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation [Internet]. arXiv; 2020 [cited 2024 Jul 2]. Available from: http://arxiv.org/abs/2010.16061
61. Huang J, Chen B, Yao B, He W. ECG Arrhythmia Classification Using STFT-Based Spectrogram and Convolutional Neural Network. IEEE Access. 2019;7:92871–80.
62. Andreieva V, Shvai N. Generalization of cross-entropy loss function for image classification. [cited 2024 Oct 16]; Available from: https://ekmair.ukma.edu.ua/items/b4a5dc04-247b-403f-88cb-4fe23e7e03bb
63. Godoy D. Medium. 2022 [cited 2024 Jun 9]. Understanding binary cross-entropy / log loss: a visual explanation. Available from: https://towardsdatascience.com/understanding-binary-cross-entropy-log-loss-a-visual-explanation-a3ac6025181a
64. Interpretation of Loss and Accuracy for a Machine Learning Model | Baeldung on Computer Science [Internet]. 2021 [cited 2024 Jun 25]. Available from: https://www.baeldung.com/cs/ml-loss-accuracy
65. Goodfellow I, Bengio Y, Courville A. Deep Learning. MIT Press; 2016. 801 p.
Published
Issue
Section
License
Copyright (c) 2025 El Mehdi IYOUBI , EL BOQ Raja, Kenza IZIKKI , TETOUANI Samir, Omar CHERKAOUI , Aziz SOULHI (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.
The article is distributed under the Creative Commons Attribution 4.0 License. Unless otherwise stated, associated published material is distributed under the same licence.