Deep Learning-based Classifications of Fresh and Rotten Fruits using Convolutional Neural Network
Article Information
Abstract
Global food waste has increased due to inefficiencies in production, processing, and distribution, making food security an increasingly critical issue. Rising global food demand and substantial losses along the food supply chain emphasize the need to optimize available resources for effective food management. Spoilage detection matters because a rotten fruit left among sound ones can spread decay and cause further losses. Sorting is still largely done by hand, which is slow, costly, and inconsistent between inspectors. This study proposes a deep learning method that identifies the fruit type and classifies it as fresh or rotten from a single image, aiming to reduce manual sorting effort and cost. Convolutional Neural Networks (CNNs), with their ability to automatically extract hierarchical features from images, are well-suited for distinguishing between fresh and rotten fruits. In our approach, convolutional layers detect patterns and edges, while pooling layers reduce feature dimensionality to improve classification efficiency. The enhanced CNN, trained with data augmentation on 13,568 images of fresh and rotten apples, bananas, and oranges (six classes), identifies the fruit type and predicts its freshness in one pass. Experimental results show a validation accuracy of 99.03% and a training accuracy of 99.46%, demonstrating the effectiveness of the proposed method. The results highlight the potential of deep learning-based automated systems in agricultural and retail settings, where they can improve fruit quality assessment, ensure consumer safety, and reduce operational costs. This work underscores the importance of integrating machine learning technologies into food production and supply chains to enhance efficiency and sustainability.
Graphical Abstract
Keywords
Data Availability Statement
Funding
Conflicts of Interest
AI Use Statement
Ethical Approval and Consent to Participate
References
- Khaing, Z. M., Naung, Y., & Htut, P. H. (2018, January). Development of control system for fruit classification based on convolutional neural network. In 2018 IEEE conference of russian young researchers in electrical and electronic engineering (EIConRus) (pp. 1805-1807). IEEE.
[CrossRef] [Google Scholar] - Mukhiddinov, M., Muminov, A., & Cho, J. (2022). Improved classification approach for fruits and vegetables freshness based on deep learning. Sensors, 22(21), 8192.
[CrossRef] [Google Scholar] - Naranjo-Torres, J., Mora, M., Hernández-García, R., Barrientos, R. J., Fredes, C., & Valenzuela, A. (2020). A review of convolutional neural network applied to fruit image processing. Applied Sciences, 10(10), 3443.
[CrossRef] [Google Scholar] - Zhang, Y., & Wu, L. (2012). Classification of fruits using computer vision and a multiclass support vector machine. sensors, 12(9), 12489-12505.
[CrossRef] [Google Scholar] - Wang, L., Li, A., & Tian, X. (2013, November). Detection of fruit skin defects using machine vision system. In 2013 Sixth International Conference on Business Intelligence and Financial Engineering (pp. 44-48). IEEE.
[CrossRef] [Google Scholar] - Wu, A., Zhu, J., & Ren, T. (2020). Detection of apple defect using laser-induced light backscattering imaging and convolutional neural network. Computers & Electrical Engineering, 81, 106454.
[CrossRef] [Google Scholar] - Kamilaris, A., & Prenafeta-Boldú, F. X. (2018). Deep learning in agriculture: A survey. Computers and electronics in agriculture, 147, 70-90.
[CrossRef] [Google Scholar] - Amin, U., Shahzad, M. I., Shahzad, A., Shahzad, M., Khan, U., & Mahmood, Z. (2023). Automatic fruits freshness classification using CNN and transfer learning. Applied Sciences, 13(14), 8087.
[CrossRef] [Google Scholar] - Sahu, D., & Dewangan, C. (2017). Identification and classification of mango fruits using image processing. International Journal of Scientific Research in Computer Science, Engineering and Information Technology, 2(2), 203-210. https://ijsrcseit.com/CSEIT172271
[Google Scholar] - Dubey, S. R., & Jalal, A. S. (2015). Application of image processing in fruit and vegetable analysis: a review. Journal of Intelligent Systems, 24(4), 405-424.
[CrossRef] [Google Scholar] - Alegbeleye, O. O., Singleton, I., & Sant'Ana, A. S. (2018). Sources and contamination routes of microbial pathogens to fresh produce during field cultivation: A review. Food Microbiology, 73, 177-208.
[CrossRef] [Google Scholar] - Palakodati, S. S. S., Chirra, V. R. R., Yakobu, D., & Bulla, S. (2020). Fresh and Rotten Fruits Classification Using CNN and Transfer Learning. Rev. d'Intelligence Artif., 34(5), 617-622.
[CrossRef] [Google Scholar] - LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. nature, 521(7553), 436-444.
[CrossRef] [Google Scholar] - Voulodimos, A., Doulamis, N., Doulamis, A., & Protopapadakis, E. (2018). Deep learning for computer vision: A brief review. Computational intelligence and neuroscience, 2018(1), 7068349.
[CrossRef] [Google Scholar] - Gu, J., Wang, Z., Kuen, J., Ma, L., Shahroudy, A., Shuai, B., ... & Chen, T. (2018). Recent advances in convolutional neural networks. Pattern recognition, 77, 354-377.
[CrossRef] [Google Scholar] - Ha, J. G., Moon, H., Kwak, J. T., Hassan, S. I., Dang, M., Lee, O. N., & Park, H. Y. (2017). Deep convolutional neural network for classifying Fusarium wilt of radish from unmanned aerial vehicles. Journal of Applied Remote Sensing, 11(4), 042621-042621.
[CrossRef] [Google Scholar] - Ma, J., Du, K., Zheng, F., Zhang, L., Gong, Z., & Sun, Z. (2018). A recognition method for cucumber diseases using leaf symptom images based on deep convolutional neural network. Computers and electronics in agriculture, 154, 18-24.
[CrossRef] [Google Scholar] - Lu, Y., Yi, S., Zeng, N., Liu, Y., & Zhang, Y. (2017). Identification of rice diseases using deep convolutional neural networks. Neurocomputing, 267, 378-384.
[CrossRef] [Google Scholar] - Liu, B., Zhang, Y., He, D., & Li, Y. (2017). Identification of apple leaf diseases based on deep convolutional neural networks. Symmetry, 10(1), 11.
[CrossRef] [Google Scholar] - Mohanty, S. P., Hughes, D. P., & Salathé, M. (2016). Using deep learning for image-based plant disease detection. Frontiers in plant science, 7, 1419.
[CrossRef] [Google Scholar] - Tran, T. T., Choi, J. W., Le, T. T. H., & Kim, J. W. (2019). A comparative study of deep CNN in forecasting and classifying the macronutrient deficiencies on development of tomato plant. Applied Sciences, 9(8), 1601.
[CrossRef] [Google Scholar] - Fuentes, A., Yoon, S., Kim, S. C., & Park, D. S. (2017). A robust deep-learning-based detector for real-time tomato plant diseases and pests recognition. Sensors, 17(9), 2022.
[CrossRef] [Google Scholar] - Wang, G., Sun, Y., & Wang, J. (2017). Automatic image‐based plant disease severity estimation using deep learning. Computational intelligence and neuroscience, 2017(1), 2917536.
[CrossRef] [Google Scholar] - Wolfert, S., Ge, L., Verdouw, C., & Bogaardt, M. J. (2017). Big data in smart farming – A review. Agricultural Systems, 153, 69-80.
[CrossRef] [Google Scholar] - Tian, Y., Yang, G., Wang, Z., Wang, H., Li, E., & Liang, Z. (2019). Apple detection during different growth stages in orchards using the improved YOLO-V3 model. Computers and electronics in agriculture, 157, 417-426.
[CrossRef] [Google Scholar] - Bargoti, S., & Underwood, J. P. (2017). Image segmentation for fruit detection and yield estimation in apple orchards. Journal of Field Robotics, 34(6), 1039-1060.
[CrossRef] [Google Scholar] - Xue, G., Liu, S., & Ma, Y. (2023). A hybrid deep learning-based fruit classification using attention model and convolution autoencoder. Complex & Intelligent Systems, 9(3), 2209-2219.
[CrossRef] [Google Scholar] - Rojas-Aranda, J. L., Nunez-Varela, J. I., Cuevas-Tello, J. C., & Rangel-Ramirez, G. (2020, June). Fruit classification for retail stores using deep learning. In Mexican Conference on Pattern Recognition (pp. 3-13). Cham: Springer International Publishing.
[CrossRef] [Google Scholar] - Pouyanfar, S., Sadiq, S., Yan, Y., Tian, H., Tao, Y., Reyes, M. P., ... & Iyengar, S. S. (2018). A survey on deep learning: Algorithms, techniques, and applications. ACM computing surveys (CSUR), 51(5), 1-36.
[CrossRef] [Google Scholar] - Thi Phuong Chung, D., & Van Tai, D. (2019, October). A fruits recognition system based on a modern deep learning technique. In Journal of physics: conference series (Vol. 1327, No. 1, p. 012050). IOP Publishing.
[CrossRef] [Google Scholar] - Sangeetha, K., & Raja, P. V. (2024, March). Classification of fruits and its quality prediction using deep learning. In 2024 5th International Conference on Intelligent Communication Technologies and Virtual Mobile Networks (ICICV) (pp. 342-346). IEEE.
[CrossRef] [Google Scholar] - Wang, W., Zhu, A., Wei, H., & Yu, L. (2024). A novel method for vegetable and fruit classification based on using diffusion maps and machine learning. Current Research in Food Science, 8, 100737.
[CrossRef] [Google Scholar] - Gulzar, Y. (2023). Fruit image classification model based on MobileNetV2 with deep transfer learning technique. Sustainability, 15(3), 1906.
[CrossRef] [Google Scholar] - Taner, A., Mengstu, M. T., Selvi, K. Ç., Duran, H., Gür, İ., & Ungureanu, N. (2024). Apple varieties classification using deep features and machine learning. Agriculture, 14(2), 252.
[CrossRef] [Google Scholar] - Han, Z., Liu, J., Zhao, Y., & Li, Y. (2012, May). Grading system of pear's appearance quality based on computer vision. In 2012 International Conference on Systems and Informatics (ICSAI2012) (pp. 184-188). IEEE.
[CrossRef] [Google Scholar] - Hossain, M. S., Al-Hammadi, M., & Muhammad, G. (2019). Automatic fruit classification using deep learning for industrial applications. IEEE transactions on industrial informatics, 15(2), 1027-1034.
[CrossRef] [Google Scholar] - Parfitt, J., Barthel, M., & Macnaughton, S. (2010). Food waste within food supply chains: quantification and potential for change to 2050. Philosophical Transactions of the Royal Society B: Biological Sciences, 365(1554), 3065-3081.
[CrossRef] [Google Scholar] - Godfray, H. C. J., Beddington, J. R., Crute, I. R., Haddad, L., Lawrence, D., Muir, J. F., Pretty, J., Robinson, S., Thomas, S. M., & Toulmin, C. (2010). Food security: The challenge of feeding 9 billion people. Science, 327(5967), 812-818.
[CrossRef] [Google Scholar] - Fountas, S., Mylonas, N., Malounas, I., Rodias, E., Hellmann Santos, C., & Pekkeriet, E. (2020). Agricultural robotics for field operations. Sensors, 20(9), 2672.
[CrossRef] [Google Scholar] - Karakaya, D., Ulucan, O., & Turkan, M. (2019, October). A comparative analysis on fruit freshness classification. In 2019 innovations in intelligent systems and applications conference (ASYU) (pp. 1-4). IEEE.
[CrossRef] [Google Scholar] - Mureşan, H., & Oltean, M. (2018). Fruit recognition from images using deep learning. Acta Universitatis Sapientiae, Informatica, 10(1), 26-42.
[CrossRef] [Google Scholar] - Tapia-Mendez, E., Cruz-Albarran, I. A., Tovar-Arriaga, S., & Morales-Hernandez, L. A. (2023). Deep learning-based method for classification and ripeness assessment of fruits and vegetables. Applied Sciences, 13(22), 12504.
[CrossRef] [Google Scholar] - Zhang, Y. D., Dong, Z., Chen, X., Jia, W., Du, S., Muhammad, K., & Wang, S. H. (2019). Image based fruit category classification by 13-layer deep convolutional neural network and data augmentation. Multimedia Tools and Applications, 78(3), 3613-3632.
[CrossRef] [Google Scholar] - Hou, L., Wu, Q., Sun, Q., Yang, H., & Li, P. (2016, August). Fruit recognition based on convolution neural network. In 2016 12th International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD) (pp. 18-22). IEEE.
[CrossRef] [Google Scholar] - Lu, S., Lu, Z., Aok, S., & Graham, L. (2018, November). Fruit classification based on six layer convolutional neural network. In 2018 IEEE 23rd International conference on digital signal processing (DSP) (pp. 1-5). IEEE.
[CrossRef] [Google Scholar] - Bhargava, A., & Bansal, A. (2021). Fruits and vegetables quality evaluation using computer vision: A review. Journal of King Saud University Computer and Information Sciences, 33(3), 243-257.
[CrossRef] [Google Scholar] - Marimuthu, S., & Roomi, S. M. M. (2017). Particle swarm optimized fuzzy model for the classification of banana ripeness. IEEE Sensors Journal, 17(15), 4903-4915.
[CrossRef] [Google Scholar] - Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., & Salakhutdinov, R. (2014). Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1), 1929-1958. https://www.cs.toronto.edu/~hinton/absps/JMLRdropout.pdf
[Google Scholar] - Sakib, S., Ashrafi, Z., & Siddique, M. A. B. (2019). Implementation of fruits recognition classifier using convolutional neural network algorithm for observation of accuracies for various hidden layers. arXiv preprint arXiv:1904.00783.
[CrossRef] [Google Scholar] - Nwankpa, C., Ijomah, W., Gachagan, A., & Marshall, S. (2018). Activation functions: Comparison of trends in practice and research for deep learning. arXiv preprint arXiv:1811.03378.
[CrossRef] [Google Scholar] - Szandała, T. (2020). Review and comparison of commonly used activation functions for deep neural networks. In Bio-inspired neurocomputing (pp. 203-224). Singapore: Springer Singapore.
[CrossRef] [Google Scholar] - Sharma, S., Sharma, S., & Athaiya, A. (2020). Activation functions in neural networks. International Journal of Engineering Applied Sciences and Technology, 4(12), 310-316.
[CrossRef] [Google Scholar] - Kalluri, S. R. (2018). Fruits fresh and rotten for classification [Data set]. Kaggle. Retrieved from https://www.kaggle.com/sriramr/fruits-fresh-and-rotten-for-classification
[Google Scholar] - Oltean, M. (2017). Fruits-360 dataset [Data set]. Kaggle. Retrieved from https://www.kaggle.com/datasets/moltean/fruits
[Google Scholar] - Bird, J. J., Barnes, C. M., Manso, L. J., Ekárt, A., & Faria, D. R. (2022). Fruit quality and defect image classification with conditional GAN data augmentation. Scientia horticulturae, 293, 110684.
[CrossRef] [Google Scholar] - Femling, F., Olsson, A., & Alonso-Fernandez, F. (2018, November). Fruit and vegetable identification using machine learning for retail applications. In 2018 14th International Conference on Signal-Image Technology & Internet-Based Systems (SITIS) (pp. 9-15). IEEE.
[CrossRef] [Google Scholar] - Kathepuri, S. (2020). Recognition and classification of fruits using deep learning techniques [Doctoral dissertation, National College of Ireland]. https://norma.ncirl.ie/4448/1/shubhamkathepuri.pdf
[Google Scholar]
Cite This Article
TY - JOUR AU - Idrees, Muhammad AU - Hussain, Altaf AU - Hussain, Nasir AU - Wushishi, Usman J. AU - Imran, Muhammad AU - Wagan, Atif Ali PY - 2026 DA - 2026/11/15 TI - Deep Learning-based Classifications of Fresh and Rotten Fruits using Convolutional Neural Network JO - ICCK Transactions on Advanced Computing and Systems T2 - ICCK Transactions on Advanced Computing and Systems JF - ICCK Transactions on Advanced Computing and Systems VL - 2 IS - 4 SP - 272 EP - 290 DO - 10.62762/TACS.2025.384927 UR - https://www.icck.org/article/abs/tacs.2025.384927 KW - fresh and rotten fruits KW - feature extraction KW - fruit KW - neural network KW - deep learning KW - convolution neural network (CNN) KW - fruit classification AB - Global food waste has increased due to inefficiencies in production, processing, and distribution, making food security an increasingly critical issue. Rising global food demand and substantial losses along the food supply chain emphasize the need to optimize available resources for effective food management. Spoilage detection matters because a rotten fruit left among sound ones can spread decay and cause further losses. Sorting is still largely done by hand, which is slow, costly, and inconsistent between inspectors. This study proposes a deep learning method that identifies the fruit type and classifies it as fresh or rotten from a single image, aiming to reduce manual sorting effort and cost. Convolutional Neural Networks (CNNs), with their ability to automatically extract hierarchical features from images, are well-suited for distinguishing between fresh and rotten fruits. In our approach, convolutional layers detect patterns and edges, while pooling layers reduce feature dimensionality to improve classification efficiency. The enhanced CNN, trained with data augmentation on 13,568 images of fresh and rotten apples, bananas, and oranges (six classes), identifies the fruit type and predicts its freshness in one pass. Experimental results show a validation accuracy of 99.03% and a training accuracy of 99.46%, demonstrating the effectiveness of the proposed method. The results highlight the potential of deep learning-based automated systems in agricultural and retail settings, where they can improve fruit quality assessment, ensure consumer safety, and reduce operational costs. This work underscores the importance of integrating machine learning technologies into food production and supply chains to enhance efficiency and sustainability. SN - 3068-7969 PB - Institute of Central Computation and Knowledge LA - English ER -
@article{Idrees2026Deep,
author = {Muhammad Idrees and Altaf Hussain and Nasir Hussain and Usman J. Wushishi and Muhammad Imran and Atif Ali Wagan},
title = {Deep Learning-based Classifications of Fresh and Rotten Fruits using Convolutional Neural Network},
journal = {ICCK Transactions on Advanced Computing and Systems},
year = {2026},
volume = {2},
number = {4},
pages = {272-290},
doi = {10.62762/TACS.2025.384927},
url = {https://www.icck.org/article/abs/tacs.2025.384927},
abstract = {Global food waste has increased due to inefficiencies in production, processing, and distribution, making food security an increasingly critical issue. Rising global food demand and substantial losses along the food supply chain emphasize the need to optimize available resources for effective food management. Spoilage detection matters because a rotten fruit left among sound ones can spread decay and cause further losses. Sorting is still largely done by hand, which is slow, costly, and inconsistent between inspectors. This study proposes a deep learning method that identifies the fruit type and classifies it as fresh or rotten from a single image, aiming to reduce manual sorting effort and cost. Convolutional Neural Networks (CNNs), with their ability to automatically extract hierarchical features from images, are well-suited for distinguishing between fresh and rotten fruits. In our approach, convolutional layers detect patterns and edges, while pooling layers reduce feature dimensionality to improve classification efficiency. The enhanced CNN, trained with data augmentation on 13,568 images of fresh and rotten apples, bananas, and oranges (six classes), identifies the fruit type and predicts its freshness in one pass. Experimental results show a validation accuracy of 99.03\% and a training accuracy of 99.46\%, demonstrating the effectiveness of the proposed method. The results highlight the potential of deep learning-based automated systems in agricultural and retail settings, where they can improve fruit quality assessment, ensure consumer safety, and reduce operational costs. This work underscores the importance of integrating machine learning technologies into food production and supply chains to enhance efficiency and sustainability.},
keywords = {fresh and rotten fruits, feature extraction, fruit, neural network, deep learning, convolution neural network (CNN), fruit classification},
issn = {3068-7969},
publisher = {Institute of Central Computation and Knowledge}
}
Article Metrics
Publisher's Note
ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and Permissions
Copyright © 2026 by the Author(s). Published by Institute of Central Computation and Knowledge. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.
Portico