A newer version of this model is available: timm/tf_efficientnetv2_s.in21k

Food Classifier (Food-101)

A deep learning–based food image classification project trained on the Food-101 dataset using PyTorch.
The model predicts food categories from images and is designed for real-world usage and future mobile deployment.


Project Overview

This project focuses on building a high-accuracy food image classifier by fine-tuning a pretrained convolutional neural network (CNN).
It serves as both a learning project and a foundation for future applications such as mobile food recognition apps.


🧠 Model Architecture

  • Base model: EfficientNetV2-S (pretrained on ImageNet)
  • Framework: PyTorch
  • Training strategy: Transfer learning with fine-tuning
  • Input size: 224 × 224 RGB images
  • Output: Food category probabilities (Softmax)

EfficientNetV2 was chosen for its strong balance between accuracy and computational efficiency.


Dataset

  • Dataset: Food-101
  • Number of classes: 101 food categories
  • Images per class: ~1,000
  • Total images: 101,000

The dataset contains diverse real-world food images with varying lighting, angles, and backgrounds.

🔗 Dataset source:
https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/


Training Details

  • Optimizer: Adam
  • Loss function: Cross-Entropy Loss
  • Data augmentation:
    • Random resize & crop
    • Horizontal flip
    • Normalization
  • Validation split: Used for model selection and checkpointing

Model Performance

Metric Result
Top-1 Accuracy 96% (validation)
Loss Low and stable

The final model achieved strong generalization performance on unseen validation images.


Pretrained Weights

Due to GitHub file size limits, the trained .pth model file is hosted externally.

👉 Download pretrained model:
https://huggingface.co/htetooyan/FoodClassifier/tree/main

After downloading, place the file in:

checkpoints/best_model.pth
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for htetooyan/FoodClassifier

Finetuned
(5)
this model

Dataset used to train htetooyan/FoodClassifier