Skip to content

Thakshana22/Image-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fruits and Vegetables Image Classification

This project uses a dataset of fruit and vegetable images for classification using deep learning.

Dataset Information

The dataset contains images of 36 different classes of fruits and vegetables, organized into training, validation, and test sets.

Dataset Source: Vegetable Image Dataset on Kaggle

How to Download the Dataset

  1. Install Kaggle CLI (if not already installed):
pip install kaggle
  1. Set up Kaggle API Credentials:

    • Go to your Kaggle account settings (https://www.kaggle.com/settings)
    • Scroll to "API" section and click "Create New API Token"
    • This will download a kaggle.json file
    • Create a .kaggle directory in your user home:
      • Windows: C:\Users\<Windows-username>\.kaggle
      • Linux/Mac: ~/.kaggle
    • Move the downloaded kaggle.json file to this directory
  2. Download the Dataset:

kaggle datasets download misrakahmed/vegetable-image-dataset
  1. Extract the Dataset:
# Windows PowerShell
Expand-Archive -Path vegetable-image-dataset.zip -DestinationPath Fruits_Vegetables

# Linux/Mac
unzip vegetable-image-dataset.zip -d Fruits_Vegetables

Dataset Structure

Fruits_Vegetables/
├── train/
│   ├── apple/
│   ├── banana/
│   ├── beetroot/
│   └── ...
├── validation/
│   ├── apple/
│   ├── banana/
│   ├── beetroot/
│   └── ...
└── test/
    ├── apple/
    ├── banana/
    ├── beetroot/
    └── ...

Classes in the Dataset

  • Fruits: apple, banana, grapes, kiwi, lemon, mango, orange, pear, pineapple, pomegranate, watermelon
  • Vegetables: beetroot, bell pepper, cabbage, capsicum, carrot, cauliflower, chilli pepper, corn, cucumber, eggplant, garlic, ginger, jalepeno, lettuce, onion, paprika, peas, potato, raddish, soy beans, spinach, sweetcorn, sweetpotato, tomato, turnip

Project Setup

  1. Clone this repository:
git clone https://github.com/Thakshana22/Image-Classification.git
cd Image-Classification
  1. Install required Python packages:
pip install -r requirements.txt
  1. Make sure the dataset is extracted in the correct directory structure as shown above.

Notes

  • The dataset is already split into training, validation, and test sets
  • Images are in various resolutions and formats
  • Make sure you have enough disk space (~2GB) before downloading the dataset

License

Please refer to the dataset's Kaggle page for licensing information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published