-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Allow to auto-magically extract nutrition facts from a photo #4896
Comments
@rugk we plan to extract automatically nutrition next year using Robotoff (our machine learning system) |
@rugk Yes it's a project we would like to do in 2024! Is it something you would be interested in contributing to? |
Likely not technically, but testing for sure. |
@raphael0202 is actively working on this. More updates soon. |
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:
Nutrient values are in
|
|
No history, then.
How fast? like, 10 seconds?
Of course that'll make more sense for new products. |
I'm going to process the full image backlog in the coming weeks.
Yes, about 10s (we're still running on CPU)
Just to be clear, if the product has no nutrition values, we still generate an insight of course.
Yes, we currently only generate an insight if the model predicted nutrition values that are not present in the original product. Note that the model can extract both We discussed a bit the integration the other day with @teolemon, and we came to the conclusion that when clicking on this "extract" button, we could overwrite the product nutrient values that conflict (=because they are already present) with the model prediction. Also, we consider images from newest to oldest, which means that the image we're extracting nutrition values from are not necessarily ones from the selected image, as we can consider a more recent image. |
Here are some mockups done by @teolemon to illustrate the behaviour we discussed about :) Behaviour if no insight is available (greyed button): Behaviour if an insight is available: Behaviour once the user clicked on the button: The idea would be to perform the Before is maybe not the best idea, as the model could run in the meantime. If it's after, we should probably add a loader to the extract button to show we're performing the request. The idea of greying the button would be to avoid the user to be disappointed when the model failed to extract anything. |
Cool!
OK
OK
A bit confusing. Not clear what you do if in off the product has 10g of proteins and robotoff guesses it's 11g: the value is present but is different. Not focused on the UI/UX for the moment. |
Here we would overwrite the value of the nutrient.
A typo slipped in the URL (? instead of &) ;) |
Problem
I'm always frustrated when I have to enter the nutrition facts manually. 😉
Proposed solution
Especially given the recent developments of machine learning models getting more powerful, I guess an automatic OCR/ML recognition would be possible?
Could not you train a ML model based on your OpenFoodFacts data?
Additional context
Of course it has to be corrected manually, but it would already be a good starter.
Mockups
N/A
(likely just similar to the other OCR features for ingredients e.g.)
The text was updated successfully, but these errors were encountered: