← Back to research

Bangladeshi Vegetable Classification with VGG16, Random Forest & XGBoost

Abstract

A comparative study of hand-crafted ML (SVM, Random Forest, XGBoost, Logistic Regression) against transfer-learning CNNs (VGG16, VGG19, ResNet50, DenseNet-121, MobileNet) on a balanced 15-class vegetable dataset for supermarket and farm automation.

Introduction

Vegetables are central to daily life, yet identifying, sorting, and pricing produce still leans on manual work at farms, markets, and shops. Many vegetables share similar colour, shape, and texture, so telling them apart by eye is slow and error-prone.

Image software can recognise a vegetable from a single photo, helping speed up checkout, sort produce on farms, and even teach people about local produce. This project builds a system that identifies a range of common vegetables from images.

Problem Statement

Sorting vegetables by hand runs into trouble when:

  1. Different vegetables look alike under different lighting.
  2. Cashiers must memorise codes or flip through booklets: slowing checkout.
  3. Picking: sorting: and labelling on farms take a lot of effort.
  4. Ready-made local datasets are scarce: so local produce is under-represented.
  5. Powerful hardware is not always available: so lighter methods deserve a fair look too.

Objectives

  1. Recognise a range of commonly eaten vegetables from photos.
  2. Compare a simpler: feature-based approach against modern image models.
  3. Train and test everything on the same balanced image set.
  4. Judge the approaches on clear: side-by-side measures.
  5. Weigh which approach best fits real settings like shops and farms.

Dataset

The work is built around a balanced set of vegetable images covering many common types. Depending on the client, this can be a public produce dataset, licensed or private photos from farms and markets, images from other trusted sources, or a custom set gathered for the project. The images are cleaned, balanced across categories, and prepared for both a lighter feature-based approach and modern image models.

Methodology

The project follows two tracks on the same data. On the classic side: SVM, Random Forest, XGBoost, and Logistic Regression using hand-crafted colour, texture, and shape features. On the deep side: VGG16, VGG19, ResNet50, DenseNet-121, and MobileNet, which learn directly from the pictures. Both tracks are trained and tested the same way for a fair comparison.

The value here is the honest, two-track comparison. Rather than assuming the heaviest model always wins, it checks whether a lighter, feature-based approach can hold its own against modern image models, important guidance for places where powerful hardware is scarce but reliable results are still needed.

More research work