Skip to content

About

Transfer learning-based food image classifier using EfficientNet-B0 to classify pizza, steak, and sushi with PyTorch.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🍕 FoodVision Mini – Transfer Learning with EfficientNet

📌 Overview

This project builds an image classification model to identify food items (Pizza, Steak, Sushi) using Transfer Learning with a pre-trained EfficientNet-B0 model.

Instead of training from scratch, we reuse knowledge from ImageNet to achieve high accuracy with limited data and faster training.


🎯 Problem Statement

Classify food images into:

  • Pizza 🍕
  • Steak 🥩
  • Sushi 🍣

🧠 Transfer Learning

  • Use pretrained EfficientNet-B0
  • Freeze feature extraction layers
  • Replace classifier head for 3 classes

🏗️ Model Architecture

model.classifier = nn.Sequential(
    nn.Dropout(p=0.2),
    nn.Linear(in_features=1280, out_features=3)
)

⚙️ Workflow

  1. Data preprocessing (resize, normalize, augment)
  2. Load pretrained model
  3. Freeze backbone layers
  4. Train classifier
  5. Evaluate on validation + custom images

📊 Results

  • Good performance on unseen images
  • Example predictions:
    • Pizza: ~49%
    • Steak: ~53%
    • Sushi: ~81%

📂 Project Structure

FoodVision_Mini_Transfer_Learning.ipynb
data/
models/
README.md

▶️ How to Run

pip install torch torchvision

Run notebook in Google Colab: FoodVision_Mini_Transfer_Learning.ipynb


💡 Key Learnings

  • Transfer learning reduces training time
  • EfficientNet provides strong feature extraction
  • Works well with small datasets

🚀 Future Work

  • Add more classes
  • Fine-tune full model
  • Deploy using Flask/FastAPI

🛠️ Tech Stack

  • Python
  • PyTorch
  • Torchvision
  • Google Colab

About

Transfer learning-based food image classifier using EfficientNet-B0 to classify pizza, steak, and sushi with PyTorch.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages