Fresh foods are essential products in the global food industry, offering consumers vital nutrients and health benefits worldwide. Despite advancements in freshness classification using image-based data, the literature lacks exploration of quantitative data in this field. In this study, we collected a real-world sensor dataset for food freshness classification during runtime by monitoring and recording environmental and chemical variables that affect food quality, using bananas as a case study. The collected dataset was pre-processed and used to train and test six machine learning models: logistic regression, random forest, support vector machine, K-Nearest Neighbor, decision tree, and gradient boosting. These models were employed for the automatic classification of banana freshness into three health classes: fresh, ripening, and spoiled. The results revealed that the random forest model outperforms other models in predicting banana health class, achieving an average accuracy of 95%. Additionally, we critically analyzed the collected data and provided actionable insights for stakeholders and professionals in the food industry, enabling them to make informed decisions that maintain product quality and reduce food waste.
Citation: Asmaa Seyam, May El Barachi, Sujith Samuel Mathew, Jun Shen. Real-time monitoring and freshness classification of fresh bananas: practical insights[J]. Applied Computing and Intelligence, 2025, 5(2): 301-314. doi: 10.3934/aci.2025017
Fresh foods are essential products in the global food industry, offering consumers vital nutrients and health benefits worldwide. Despite advancements in freshness classification using image-based data, the literature lacks exploration of quantitative data in this field. In this study, we collected a real-world sensor dataset for food freshness classification during runtime by monitoring and recording environmental and chemical variables that affect food quality, using bananas as a case study. The collected dataset was pre-processed and used to train and test six machine learning models: logistic regression, random forest, support vector machine, K-Nearest Neighbor, decision tree, and gradient boosting. These models were employed for the automatic classification of banana freshness into three health classes: fresh, ripening, and spoiled. The results revealed that the random forest model outperforms other models in predicting banana health class, achieving an average accuracy of 95%. Additionally, we critically analyzed the collected data and provided actionable insights for stakeholders and professionals in the food industry, enabling them to make informed decisions that maintain product quality and reduce food waste.
| [1] | M. Mallegowda, R. Sanskar, N. Vishveshwara, G. Safwan, J. Vivek, Fruit classification based on freshness, Proceedings of International Conference on Emerging Techniques in Computational Intelligence (ICETCI), 2024,373–381. https://doi.org/10.1109/ICETCI62771.2024.10704151 |
| [2] |
T. Liu, N. Zheng, Y. Ma, Y. Zhang, H. Lei, X. Zhen, et al., Recent advancements in chitosan-based intelligent food freshness indicators: categorization, advantages, and applications, Int. J. Biol. Macromol., 275 (2024), 133554. https://doi.org/10.1016/j.ijbiomac.2024.133554 doi: 10.1016/j.ijbiomac.2024.133554
|
| [3] | A. Seyam, M. Ei Barachi, C. Zhang, B. Du, J. Shen, S. Mathew, Enhancing resilience and reducing waste in food supply chains: a systematic review and future directions leveraging emerging technologies, Int. J. Logist. -Res. Appl., in press. https://doi.org/10.1080/13675567.2024.2406555 |
| [4] |
S. Wu, M. Zhang, Q. Yu, A. Mujumdar, C. Yang, Fresh food quality deterioration detection and labeling: a review of recent research and application in supply chain, Food Bioprocess Technol., 17 (2024), 1706–1726. https://doi.org/10.1007/s11947-023-03197-9 doi: 10.1007/s11947-023-03197-9
|
| [5] |
D. Wang, M. Zhang, Q. Jiang, A. Mujumdar, Intelligent system/equipment for quality deterioration detection of fresh food: recent advances and application, Foods, 13 (2024), 1662. https://doi.org/10.3390/foods13111662 doi: 10.3390/foods13111662
|
| [6] |
K. Hameed, D. Chai, A. Rassau, A comprehensive review of fruit and vegetable classification techniques, Image Vision Comput., 80 (2018), 24–44. https://doi.org/10.1016/j.imavis.2018.09.016 doi: 10.1016/j.imavis.2018.09.016
|
| [7] |
M. Rizzo, M. Marcuzzo, A. Zangari, A. Gasparetto, A. Albarelli, Fruit ripeness classification: a survey, Artificial Intelligence in Agriculture, 7 (2023), 44–57. https://doi.org/10.1016/j.aiia.2023.02.004 doi: 10.1016/j.aiia.2023.02.004
|
| [8] |
L. Zhu, P. Spachos, Support vector machine and YOLO for a mobile food grading system, Internet of Things, 13 (2021), 100359. https://doi.org/10.1016/j.iot.2021.100359 doi: 10.1016/j.iot.2021.100359
|
| [9] |
A. Banwari, R. Joshi, N. Sengar, M. Dutta, Computer vision technique for freshness estimation from segmented eye of fish image, Ecol. Inform., 69 (2022), 101602. https://doi.org/10.1016/j.ecoinf.2022.101602 doi: 10.1016/j.ecoinf.2022.101602
|
| [10] |
X. Liu, D. Zhao, W. Jia, W. Ji, Y. Sun, A detection method for apple fruits based on color and shape features, IEEE Access, 7 (2019), 67923–67933. https://doi.org/10.1109/ACCESS.2019.2918313 doi: 10.1109/ACCESS.2019.2918313
|
| [11] | G. Mudaliar, B. Rashmi Priyadarshini, A machine learning approach for predicting fruit freshness classification, IRJET, 8 (2021), 2979–2983. |
| [12] |
Y. Fu, M. Nguyen, W. Yan, Grading methods for fruit freshness based on deep learning, SN Comput. Sci., 3 (2022), 264. https://doi.org/10.1007/s42979-022-01152-7 doi: 10.1007/s42979-022-01152-7
|
| [13] |
A. Kazi, S. Panda, Determining the freshness of fruits in the food industry by image classification using transfer learning, Multimed. Tools Appl., 81 (2022), 7611–7624. https://doi.org/10.1007/s11042-022-12150-5 doi: 10.1007/s11042-022-12150-5
|
| [14] |
M. Mukhiddinov, A. Muminov, J. Cho, Improved classification approach for fruits and vegetables freshness based on deep learning, Sensors, 22 (2022), 8192. https://doi.org/10.3390/s22218192 doi: 10.3390/s22218192
|
| [15] |
J. Astill, R. Dara, M. Campbell, J. Farber, E. Fraser, S. Sharif, et al., Transparency in food supply chains: a review of enabling technology solutions, Trends Food Sci. Tech., 91 (2019), 240–247. https://doi.org/10.1016/j.tifs.2019.07.024 doi: 10.1016/j.tifs.2019.07.024
|
| [16] |
R. Singh, C. Nickhil, R. Nisha, K. Upendar, B. Jithender, S. Deka, A comprehensive review of advanced deep learning approaches for food freshness detection, Food Eng. Rev., 17 (2025), 127–160. https://doi.org/10.1007/s12393-024-09385-3 doi: 10.1007/s12393-024-09385-3
|
| [17] | A. Hassanien, M. Soliman, Artificial intelligence: a real opportunity in the food industry, Cham: Springer, 2023. https://doi.org/10.1007/978-3-031-13702-0 |
| [18] |
J. de Matos Fonseca, M. dos Santos Alves, L. Soares, R. Moreira, G. Valencia, A. Monteiro, A review on TiO2-based photocatalytic systems applied in fruit postharvest: set-ups and perspectives, Food Res. Int., 144 (2021), 110378. https://doi.org/10.1016/j.foodres.2021.110378 doi: 10.1016/j.foodres.2021.110378
|
| [19] |
M. Firouz, K. Mohi-Alden, M. Omid, A critical review on intelligent and active packaging in the food industry: research and development, Food Res. Int., 141 (2021), 110113. https://doi.org/10.1016/j.foodres.2021.110113 doi: 10.1016/j.foodres.2021.110113
|
| [20] |
H. Feng, M. Zhang, P. Liu, Y. Liu, X. Zhang, Evaluation of IoT-enabled monitoring and electronic nose spoilage detection for salmon freshness during cold storage, Foods, 9 (2020), 1579. https://doi.org/10.3390/foods9111579 doi: 10.3390/foods9111579
|
| [21] |
R. Torres-Sánchez, M. Martínez-Zafra, N. Castillejo, A. Guillamón-Frutos, F. Artés-Hernández, Real-time monitoring system for shelf life estimation of fruit and vegetables, Sensors, 20 (2020), 1860. https://doi.org/10.3390/s20071860 doi: 10.3390/s20071860
|
| [22] |
W. Huang, X. Wang, J. Zhang, J. Xia, X. Zhang, Improvement of blueberry freshness prediction based on machine learning and multi-source sensing in the cold chain logistics, Food Control, 145 (2023), 109496. https://doi.org/10.1016/j.foodcont.2022.109496 doi: 10.1016/j.foodcont.2022.109496
|
| [23] | M. Kuhn, K. Johnson, Applied predictive modeling, New York: Springer, 2013. https://doi.org/10.1007/978-1-4614-6849-3 |