ONNX Model Zoo

openfoodfacts/front_image_classification

By openfoodfacts · ↓ 0 · ♥ 0 · Updated 2025-10-22

What's in this repo

This page lists the files in openfoodfacts/front_image_classification, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 22 files, including 12 .jpg, 3 .png, 2 .pt, 1 .md, 1 .yaml, 1 .csv
  • Last updated 2025-10-22

ONNX files

File Size Download
weights/model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Front image classification model

This model classifies Open Food Facts images into two classes:

  • front (ID 0)
  • other (ID 1)

Front images are the "default" image of a product, displayed on Open Food Facts product page. A front image is most of the time a photo of the front side of the product packaging. It's useful to be able to detect front images so that we can update the front image with a newer version (when the packaging changes for example).

Model Details

Model Description

  • Developed by: Raphaël Bournhonesque
  • Model type: Image Classification
  • License: AGPL 3.0
  • Finetuned from model [optional]: Yolo11n-cls

Uses

This model is intended to be used on Open Food Facts images only (images of food packaged products).

Training Details

Training Data

v1.0 of the front_image_classification dataset was used to train the model.

Training Procedure

  • Epochs: 100
  • Image size: 448
  • Albumentation augmentation

This script was used for training the model.

The augmentation pipeline used for prediction:

A.Compose(
        [
            A.LongestMaxSize(max_size=max_size, p=1.0),
            A.PadIfNeeded(min_height=max_size, min_width=max_size, p=1.0),
            A.Normalize(mean=DEFAULT_MEAN, std=DEFAULT_STD, p=1.0),
            ToTensorV2(p=1.0),
        ]
    )

For optimal performance, it is advised to keep the same preprocessing pipeline during inference.

Evaluation

accuracy: 0.9525

Export

An ONNX export can be found in weights/model.onnx.

Model info

onnx dataset:openfoodfacts/front_image_classification base_model:Ultralytics/YOLO11 base_model:quantized:Ultralytics/YOLO11 license:agpl-3.0 region:us
↓ 0 ♥ 0

Created: 2025-10-16

Updated: 2025-10-22

View on Hugging Face

Files (22)

.gitattributes
README.md
args.yaml
confusion_matrix.png
confusion_matrix_normalized.png
results.csv
results.png
train_batch0.jpg
train_batch1.jpg
train_batch1440.jpg
train_batch1441.jpg
train_batch1442.jpg
train_batch2.jpg
val_batch0_labels.jpg
val_batch0_pred.jpg
val_batch1_labels.jpg
val_batch1_pred.jpg
val_batch2_labels.jpg
val_batch2_pred.jpg
weights/best.pt
weights/last.pt
weights/model.onnx ONNX

Related models