Skip to content

spoluan/food-101-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Food-101 Image Classification

Author: Sevendi Eldrige Rifki Poluan

A deep learning project for food image classification using transfer learning with EfficientNetB7.

Project Overview

This project focuses on image classification methods utilizing transfer learning techniques with the EfficientNetB7 model pre-trained on ImageNet. The model employs a hybrid approach where some layers are frozen while others are fine-tuned for weight updates during training.

Dataset

  • Name: Food-101
  • Classes: 101 food categories
  • Total Images: 101,000 images
  • Train/Test Split: 750 training images + 250 manually reviewed test images per class
  • Image Resolution: Maximum side length of 512 pixels (rescaled by dataset authors)
  • Dataset Source: ETH Food-101 Dataset

Requirements

  • Python 3.7+
  • TensorFlow 2.x
  • scikit-learn
  • NumPy
  • Matplotlib

Installation

  1. Clone the repository:
git clone <repository-url>
cd food-101-classification
  1. Create a virtual environment:
python -m venv .venv
  1. Activate the virtual environment:
# On macOS/Linux
source .venv/bin/activate

# On Windows
.venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Download the Food-101 dataset and extract it to the project root directory:
food-101-classification/
├── food-101/
│   └── images/
│       ├── apple_pie/
│       ├── baby_back_ribs/
│       └── ...

Usage

Training

Run the main training script:

python food-101.py

Jupyter Notebook

For interactive exploration and experimentation:

jupyter notebook Food-101.ipynb

Model Architecture

  • Base Model: EfficientNetB7 (pre-trained on ImageNet)
  • Input Size: 224×224 pixels
  • Batch Size: 16
  • Training Strategy: Fine-tuning with layer freezing/unfreezing

Results

Sample Food Image

Sample Food Image

Confusion Matrix

Confusion Matrix

Model Performance: Achieves up to 70% accuracy on the Food-101 test dataset with the basic EfficientNetB7 architecture.

References

About

This project utilizes transfer learning with the EfficientNetB7 model for image classification on a challenging food dataset consisting of 101 food categories and 101,000 images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors