AventIQ-AI / Food-Classification-AI-Model

huggingface.co
Total runs: 4
24-hour runs: 0
7-day runs: 1
30-day runs: -9
Model's Last Updated: June 12 2025

Introduction of Food-Classification-AI-Model

Model Details of Food-Classification-AI-Model

๐Ÿง  Food-Image-Classification-AI-Model

A Food image classification model fine-tuned on the Food-101 dataset using the powerful facebook/deit-base-patch16-224 architecture. This model classifies images into one of 101 popular food categories such as pizza, ramen, pad thai, sushi, and more.


โœจ Model Highlights
  • ๐Ÿ“Œ Base Model: facebook/deit-base-patch16-224
  • ๐Ÿ“š Datasets: Food-101 Data
  • ๐ŸŒฟ Classes: 101 food categories (e.g., pizza, ramen, steak, etc.)
  • ๐Ÿ”ง Framework: Hugging Face Transformers + PyTorch

๐Ÿง  Intended Uses
  • โœ… Food image classification in apps/web
  • โœ… Educational visual datasets
  • โœ… Food blog/media categorization
  • โœ… Restaurant ordering support systems

๐Ÿšซ Limitations
  • โŒ May not perform well on poor-quality or mixed-food images
  • โŒ Not optimized for detecting multiple food items per image

๐Ÿ‹๏ธโ€โ™‚๏ธ Training Details
Attribute Value
Base Model facebook/deit-base-patch16-224
Dataset Food-101-Dataset
Task Type Image Classification
Epochs 3
Batch Size 16
Optimizer AdamW
Loss Function CrossEntropyLoss
Framework PyTorch + Transformers
Hardware CUDA-enabled GPU

๐Ÿ“Š Evaluation Metrics
Metric Score
Accuracy 0.97
F1-Score 0.98
Precision 0.99
Recall 0.97


๐Ÿš€ Usage

from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch
from torchvision.transforms import Compose, Resize, ToTensor, Normalize

# Load model and processor
model_name = "AventIQ-AI/Food-Classification-AI-Model"

model = AutoModelForImageClassification.from_pretrained("your-model-path")
processor = AutoImageProcessor.from_pretrained("your-model-path")

def predict(image_path):
    device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    model.to(device)

    image = Image.open(image_path).convert("RGB")
    transform = Compose([
        Resize((224, 224)),
        ToTensor(),
        Normalize(mean=processor.image_mean, std=processor.image_std)
    ])
    pixel_values = transform(image).unsqueeze(0).to(device)

    with torch.no_grad():
        outputs = model(pixel_values=pixel_values)
        logits = outputs.logits
        predicted_idx = logits.argmax(-1).item()
        predicted_label = model.config.id2label[predicted_idx]
    
    return predicted_label

# Example usage:
print(predict("Foodexample.jpg"))

  • ๐Ÿงฉ Quantization
  • Post-training static quantization applied using PyTorch to reduce model size and accelerate inference on edge devices.

๐Ÿ—‚ Repository Structure

.
beans-vit-finetuned/
โ”œโ”€โ”€ config.json               โœ… Model architecture & config
โ”œโ”€โ”€ pytorch_model.bin         โœ… Model weights
โ”œโ”€โ”€ preprocessor_config.json  โœ… Image processor config
โ”œโ”€โ”€ training_args.bin         โœ… Training metadata
โ”œโ”€โ”€ README.md                 โœ… Model card

๐Ÿค Contributing

Open to improvements and feedback! Feel free to submit a pull request or open an issue if you find any bugs or want to enhance the model.

Runs of AventIQ-AI Food-Classification-AI-Model on huggingface.co

4
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
-9
30-day runs

More Information About Food-Classification-AI-Model huggingface.co Model

Food-Classification-AI-Model huggingface.co

Food-Classification-AI-Model huggingface.co is an AI model on huggingface.co that provides Food-Classification-AI-Model's model effect (), which can be used instantly with this AventIQ-AI Food-Classification-AI-Model model. huggingface.co supports a free trial of the Food-Classification-AI-Model model, and also provides paid use of the Food-Classification-AI-Model. Support call Food-Classification-AI-Model model through api, including Node.js, Python, http.

Food-Classification-AI-Model huggingface.co Url

https://huggingface.co/AventIQ-AI/Food-Classification-AI-Model

AventIQ-AI Food-Classification-AI-Model online free

Food-Classification-AI-Model huggingface.co is an online trial and call api platform, which integrates Food-Classification-AI-Model's modeling effects, including api services, and provides a free online trial of Food-Classification-AI-Model, you can try Food-Classification-AI-Model online for free by clicking the link below.

AventIQ-AI Food-Classification-AI-Model online free url in huggingface.co:

https://huggingface.co/AventIQ-AI/Food-Classification-AI-Model

Food-Classification-AI-Model install

Food-Classification-AI-Model is an open source model from GitHub that offers a free installation service, and any user can find Food-Classification-AI-Model on GitHub to install. At the same time, huggingface.co provides the effect of Food-Classification-AI-Model install, users can directly use Food-Classification-AI-Model installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Food-Classification-AI-Model install url in huggingface.co:

https://huggingface.co/AventIQ-AI/Food-Classification-AI-Model

Url of Food-Classification-AI-Model

Food-Classification-AI-Model huggingface.co Url

Provider of Food-Classification-AI-Model huggingface.co

AventIQ-AI
ORGANIZATIONS

Other API from AventIQ-AI