-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Robotoff nutrition prediction route #738
Comments
@teolemon @raphael0202 Not really sure what we try to achieve here, but maybe I'm mislead by my unsuccessful tests. I get the following result with https://robotoff.openfoodfacts.org/api/v1/predict/nutrition?barcode=7300400481588&image_ids=55: {"predictions":[],"image_ids":["55"]} While the image 55 is something like that: Other points:
|
The current endpoint only works well on "text" nutrition tables. I would be in favor of waiting for a proper generic model for nutrition information extraction to be developed before its integration in Smoothie. |
|
@raphael0202 @monsieurtanuki We should integrate this route, which is now mature, and tested on Hunger Games. |
@teolemon @raphael0202 That feature is hard to test. The returned values are only the new/different values, and most of the time we get nothing. UX-wise it's not easy either, as we need to call the API (when?) and to overwrite whatever the user is typing. (how?) |
This is a valid point, what I fear if we have the current nutrient data saved in the insight is that it gets out of sync. Due to how Robotoff work, in case of massive updates, we can wait a long time before insights get refreshed. We can add the data on the fly when querying the insight, but it would considerably slow down the request, I'm not sure it's a good strategy here. |
@raphael0202 Misunderstanding alert! My assumptions were:
I don't assume that robotoff should be aware of the nutrition facts as current values at the product level. Therefore I don't understand your "out of sync" concerns. Out of sync with the nutrition facts image? Please tell me what's wrong with my assumptions and my analysis. |
Your assumptions are right, I didn't understand correctly this message of yours:
To make sure I understand your suggestion: by returning "all the values", you mean returning in The documentation about this model is here for the record: https://openfoodfacts.github.io/robotoff/references/predictions/nutrient-extraction/ |
@raphael0202 I just want all populated values. It's just that when I see this: {
"count": 0,
"insights": [],
"status": "no_insights"
} What triggers an OCR on your side? A new nutrition facts image? |
What
The text was updated successfully, but these errors were encountered: