Downloads · 30 days
4
8% of all-time downloads
Vinay507/food-recognition-model
food-recognition-model is a image classification model from Vinay507. Use it when you need a label for an image. The card lists the license as mit.
A comprehensive deep learning system for food recognition, object detection, and calorie estimation using TensorFlow, YOLO, and EfficientNet.
Downloads · 30 days
4
8% of all-time downloads
All-time downloads
50
Public
Repo size
121 B
Likes
0
Public
Click a slice to open those files.
.json17.4 KB · 78%
From the Hugging Face model README
A comprehensive deep learning system for food recognition, object detection, and calorie estimation using TensorFlow, YOLO, and EfficientNet.
This model combines multiple deep learning approaches to provide accurate food recognition and calorie estimation:
| Metric | Value |
|---|---|
| Classification Accuracy | >85% |
| Object Detection mAP | >0.75 |
| Calorie Estimation Accuracy | ±20% |
| Inference Speed | <2 seconds/image |
from transformers import pipeline
# Load the model
classifier = pipeline("image-classification", model="BinhQuocNguyen/food-recognition-model")
# Analyze a food image
result = classifier("path/to/food_image.jpg")
print(f"Detected foods: {result}")
import torch
from transformers import AutoModel, AutoImageProcessor
from PIL import Image
# Load model and processor
model = AutoModel.from_pretrained("BinhQuocNguyen/food-recognition-model")
processor = AutoImageProcessor.from_pretrained("BinhQuocNguyen/food-recognition-model")
# Process image
image = Image.open("food_image.jpg")
inputs = processor(images=image, return_tensors="pt")
# Get predictions
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
The model was trained on:
The model includes nutritional information for 101 food categories with:
@misc{food-recognition-model,
title={Food Recognition and Calorie Estimation Model},
author={BinhQuocNguyen},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/BinhQuocNguyen/food-recognition-model}}
}
This model is licensed under the MIT License.
For questions or issues, please contact: