Danish Food Classification Models

This repository contains pre-trained models for classifying Danish food text descriptions into standard food categories. These models are designed to be used with the EIR prediction framework.

Available Models

  1. Major Category Model (majorcateg_run3jseq)

    • Classifies food into 17 major categories (e.g., Dairy, MeatPoultry, Grains, Fruit).
  2. Subcategory Model (subcateg_run3jseq)

    • Classifies food into 63 detailed subcategories (e.g., Low-fat Milk, Red Meat, Whole Grains).

Usage

These models require the eirpredict tool.

Quick Start

Install the tool

uv pip install git+https://github.com/arnor-sigurdsson/EIR.git@0.13.x-maintenance

Download the models

from huggingface_hub import snapshot_download

model_path = snapshot_download(
    repo_id="arnorsig/danish-food-classification",
    allow_patterns="majorcateg_run3jseq/*"
)
print(f"Model downloaded to: {model_path}")

model_path = snapshot_download(
    repo_id="arnorsig/danish-food-classification",
    allow_patterns="subcateg_run3jseq/*"
)
print(f"Model downloaded to: {model_path}")

Run prediction (example for subcategory model):

eirpredict \
  --global_configs predict_global_config.yaml \
  --input_configs predict_input_config.yaml \
  --output_configs predict_output_config.yaml \
  --model_path subcateg_run3jseq/training_output/saved_models/output_model_6300_perf-average=0.9312.pt \
  --output_folder my_predictions

For full documentation and configuration files, please visit the GitHub Repository.

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