Downloads · 30 days
0
openfoodfacts/front_image_classification
front_image_classification is a machine learning model from openfoodfacts. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as agpl-3.0.
This model classifies Open Food Facts images into two classes:
Downloads · 30 days
0
Access
Public
Updated Oct 22, 2025
Repo size
23.9 MB
Likes
0
Public
Click a slice to open those files.
.pt6.4 MB · 34%
From the Hugging Face model README
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).
This model is intended to be used on Open Food Facts images only (images of food packaged products).
v1.0 of the front_image_classification dataset was used to train the model.
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.
accuracy: 0.9525
An ONNX export can be found in weights/model.onnx.