Open Access iconOpen Access



Fruits and Vegetables Freshness Categorization Using Deep Learning

Labiba Gillani Fahad1, Syed Fahad Tahir2,*, Usama Rasheed1, Hafsa Saqib1, Mehdi Hassan2, Hani Alquhayz3

1 Department of Computer Science, National University of Computer and Emerging Sciences, Islamabad, 44000, Pakistan
2 Department of Computer Science, Air University, Islamabad, 44000, Pakistan
3 Department of Computer Science and Information, College of Science in Zulfi, Majmaah University, Al-Majmaah, 11952, Kingdom of Saudi Arabia

* Corresponding Author: Syed Fahad Tahir. Email: email

Computers, Materials & Continua 2022, 71(3), 5083-5098.


The nutritional value of perishable food items, such as fruits and vegetables, depends on their freshness levels. The existing approaches solve a binary class problem by classifying a known fruit\vegetable class into fresh or rotten only. We propose an automated fruits and vegetables categorization approach that first recognizes the class of object in an image and then categorizes that fruit or vegetable into one of the three categories: pure-fresh, medium-fresh, and rotten. We gathered a dataset comprising of 60K images of 11 fruits and vegetables, each is further divided into three categories of freshness, using hand-held cameras. The recognition and categorization of fruits and vegetables are performed through two deep learning models: Visual Geometry Group (VGG-16) and You Only Look Once (YOLO), and their results are compared. VGG-16 classifies fruits and vegetables and categorizes their freshness, while YOLO also localizes them within the image. Furthermore, we have developed an android based application that takes the image of the fruit or vegetable as input and returns its class label and its freshness degree. A comprehensive experimental evaluation of proposed approach demonstrates that the proposed approach can achieve a high accuracy and F1score on gathered FruitVeg Freshness dataset. The dataset is publicly available for further evaluation by the research community.


Cite This Article

L. Gillani Fahad, S. Fahad Tahir, U. Rasheed, H. Saqib, M. Hassan et al., "Fruits and vegetables freshness categorization using deep learning," Computers, Materials & Continua, vol. 71, no.3, pp. 5083–5098, 2022.

cc This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 2148


  • 1193


  • 0


Share Link