Model Card for GlycoCare+ Food Classifier (EfficientNet)
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.
Model Details
Model Description
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.
- Developed by: Maheen Touqeer
- Model type: Image Classification
- Language(s): N/A (Computer Vision Model)
- License: Apache 2.0
- Finetuned from:
google/efficientnet-b0
Model Sources
- Repository: https://huggingface.co/Maheentouqeer1/food-classifier-efficientnet
- Dataset: Custom 61 Pakistani Dishes Dataset (Kaggle Source: “Indian Food Images Dataset”)
Uses
Direct Use
Used to identify food items from images to power nutrition and glucose prediction systems for GlycoCare+.
Downstream Use
Integrated into:
- Health and diet assistant apps
- Glucose prediction and nutrition insight modules
- Personalized meal recommendation systems
Out-of-Scope Use
Not designed for:
- Non-Asian or international food recognition
- Medical diagnosis or prescription generation
- Non-nutritional image recognition tasks
Bias, Risks, and Limitations
- The dataset is limited to Pakistani/Indian cuisine; performance may degrade for other cuisines.
- Lighting, image quality, and portion occlusion can reduce accuracy.
- Model does not account for cooking variations (e.g., oil quantity, recipe changes).
Recommendations
- Use high-quality images with clear view of food.
- Fine-tune further for additional cuisines or real-world photos.
How to Get Started with the Model
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}}
}
- Downloads last month
- 36