Fruits and Vegetables Classification Using MobileNetV2


The classification of fruits and vegetables using computer vision is an important task in various industries, such as automated grocery checkout systems, farming, and nutrition tracking. In this study, we use the MobileNetV2 architecture, a lightweight convolutional neural network (CNN) optimized for mobile and edge devices, to classify different types of fruits and vegetables. The goal of this project is to achieve high classification accuracy while maintaining efficiency for real-time applications on mobile devices.


Dataset

Context This dataset encompasses images of various fruits and vegetables, providing a diverse collection for image recognition tasks. The included food items are: Fruits: Banana, Apple, Pear, Grapes, Orange, Kiwi, Watermelon, Pomegranate, Pineapple, Mango Vegetables: Cucumber, Carrot, Capsicum, Onion, Potato, Lemon, Tomato, Radish, Beetroot, Cabbage, Lettuce, Spinach, Soybean, Cauliflower, Bell Pepper, Chilli Pepper, Turnip, Corn, Sweetcorn, Sweet Potato, Paprika, Jalapeño, Ginger, Garlic, Peas, Eggplant Content The dataset is organized into three main folders: Train: Contains 100 images per category. Test: Contains 10 images per category. Validation: Contains 10 images per category. Each of these folders is subdivided into specific folders for each type of fruit and vegetable, containing respective images.


Results

The classification performance was evaluated using metrics such as precision, recall, F1-score, and support. Here is a summary of the results: Model Accuracy: Overall Accuracy: 97.7% The model achieved an impressive overall accuracy of 97.7%, demonstrating that MobileNetV2 is highly effective for this classification task. Precision, Recall, and F1-Score: The precision, recall, and F1-score for each class were computed. These metrics indicate how well the model is able to distinguish between different fruits and vegetables. Precision: The precision scores ranged from 0.75 (Jalapeno) to 1.00 for most of the other classes. Recall: The recall scores were mostly high, ranging from 0.70 (Garlic) to 1.00 for a majority of the classes. F1-Score: The F1-scores, which balance precision and recall, were similarly strong, ranging from 0.78 (Garlic) to 1.00 for many of the classes.










Contact

Contact With Me

contact-img

Ahmed Adel Sayed