Downloads · 30 days
8
3% of all-time downloads
Maheentouqeer1/food-classifier-efficientnet
food-classifier-efficientnet is a image classification model from Maheentouqeer1. Use it when you need a label for an image. It is set up for transformers.
This model classifies 61 Pakistani dishes from images and serves as the food recognition component of GlycoCare+, an AI-powered nutrition and glucose insight app for diabetes, BP, and heart health management.
Downloads · 30 days
8
3% of all-time downloads
All-time downloads
300
Public
Parameters
4.1M
33.1 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.6 MB · 100%
From the Hugging Face model README
This model classifies 61 Pakistani dishes from images and serves as the food recognition component of GlycoCare+, an AI-powered nutrition and glucose insight app for diabetes, BP, and heart health management.
This model uses EfficientNet-B0 architecture fine-tuned on a dataset of 61 Pakistani dishes (approx. 50 images per class).
It detects the type of food in an image and outputs a class label used to estimate nutrition, glucose impact, and personalized health advice.
google/efficientnet-b0Used to identify food items from images to power nutrition and glucose prediction systems for GlycoCare+.
Integrated into:
Not designed for:
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch
processor = AutoImageProcessor.from_pretrained("Maheentouqeer1/food-classifier-efficientnet")
model = AutoModelForImageClassification.from_pretrained("Maheentouqeer1/food-classifier-efficientnet")
image = Image.open("biryani.jpg")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
pred = outputs.logits.softmax(1)
label = pred.argmax(-1).item()
print(model.config.id2label[label])
Training Details
Training Data
Dataset: 61 Pakistani dishes (50 images/class)
Source: Kaggle Indian Food Images Dataset
Total Images: 3050 (Train 2440 | Validation 610)
Augmentation: RandomRotation, HorizontalFlip, Normalization
Training Procedure
Framework: PyTorch + Hugging Face Transformers
Precision: FP32
Epochs: 5
Optimizer: AdamW (lr=5e-5)
Loss: CrossEntropyLoss
Scheduler: StepLR
Training Hyperparameters
Parameter Value
Batch Size 32
Learning Rate 5e-5
Epochs 5
Optimizer AdamW
Precision FP32
Evaluation
Testing Data
Validation split (610 images) from the same dataset.
Metrics
Accuracy
Precision
Recall
F1-score
Results
Metric Value
Train Accuracy 95.0%
Validation Accuracy 87.5%
Best Epoch 5
Loss (val) 0.36
Summary
The model achieved strong generalization with consistent validation accuracy and no significant overfitting. Further fine-tuning (10–12 epochs, unfreezing more layers) can improve validation accuracy beyond 90%.
Environmental Impact
Hardware Type: NVIDIA Tesla T4
Training Time: ~3 minutes per epoch × 5 epochs
Compute Provider: Google Colab
Region: Asia-South1
Estimated Carbon Emitted: < 0.02 kg CO₂eq
Technical Specifications
Model Architecture
Base Model: EfficientNet-B0
Layers Fine-tuned: Last 3 convolutional blocks + classifier head
Output Dimension: 61 classes
Activation: Softmax
Compute Infrastructure
Hardware: Google Colab GPU (Tesla T4, 16GB RAM)
Software: PyTorch 2.1, Transformers 4.40, TorchVision 0.18
Citation
BibTeX:
@misc{maheentouqeer2025foodclassifier,
title={GlycoCare+ Food Classifier (EfficientNet)},
author={Touqeer, Maheen},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/Maheentouqeer1/food-classifier-efficientnet}}
}