openfoodfacts / hunger-games

One click Mini-Games for Open Food Facts
https://hunger.openfoodfacts.org
23 stars 39 forks source link

Use Robotoff to prefill some nutrition fields #74

Open alexfauquette opened 2 years ago

alexfauquette commented 2 years ago

What

Here is the PR that introduced it first time. All the useful information can be found here

Part of

raphael0202 commented 1 month ago

The nutrient extraction model was deployed and integrated to Robotoff. For every new image, we run the model on it and generate a prediction. An insight is generated if in the extracted nutrient values, at least one value is not present in the current nutrients.

To get the insights:

GET https://robotoff.openfoodfacts.org/api/v1/insights?insight_types=nutrient_extraction&order_by=popularity

~There are currently no ordering on this endpoint, but I plan to add a order_by={random,popularity} option.~ Added and deployed

Nutrient values are in insight.data. It contains:

teolemon commented 1 month ago

@alexfauquette @raphael0202 since we now have the Nutrition prediction route, I'm bumping this one to P0 (let's be a bit dramatic ;)

teolemon commented 1 month ago

Also, here's another route pour single barcode insights: https://github.com/openfoodfacts/openfoodfacts-server/issues/10950