Skip to content

Conversation

@PrimaelQuemerais
Copy link
Member

@PrimaelQuemerais PrimaelQuemerais commented Feb 9, 2025

What

Users can now get nutrition edit suggestions from Robotoff

After doing some tests with popular products we usually get between 2 and 3 suggestions per product.

Screenshot

Screen.Recording.2025-02-09.at.4.41.37.PM.mov

Part of

#4896

@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 190 lines in your changes missing coverage. Please review.

Project coverage is 5.84%. Comparing base (4d9c7fc) to head (53b6305).
Report is 778 commits behind head on develop.

Files with missing lines Patch % Lines
...nutrition_page/widgets/nutrition_facts_editor.dart 0.00% 54 Missing ⚠️
...b/pages/product/nutrition_page/nutrition_page.dart 0.00% 45 Missing ⚠️
...mooth_app/lib/generic_lib/widgets/smooth_card.dart 0.00% 40 Missing ⚠️
...ition_page/widgets/nutrition_container_helper.dart 0.00% 20 Missing ⚠️
...pp/lib/generic_lib/widgets/smooth_sliver_card.dart 0.00% 17 Missing ⚠️
...kages/smooth_app/lib/helpers/analytics_helper.dart 0.00% 7 Missing ⚠️
...ckages/smooth_app/lib/widgets/smooth_dropdown.dart 0.00% 6 Missing ⚠️
...trition_page/widgets/nutrition_serving_switch.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6366      +/-   ##
==========================================
- Coverage     9.54%   5.84%   -3.71%     
==========================================
  Files          325     490     +165     
  Lines        16411   29249   +12838     
==========================================
+ Hits          1567    1710     +143     
- Misses       14844   27539   +12695     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teolemon
Copy link
Member

@PrimaelQuemerais Have you tackled the behaviour with no values at all, or some values ? If so can you make another short video of it ?

@PrimaelQuemerais
Copy link
Member Author

Here's what it looks like with all fields empty

Screen.Recording.2025-02-10.at.11.29.52.AM.mov

@teolemon teolemon linked an issue Feb 10, 2025 that may be closed by this pull request
@teolemon teolemon requested a review from g123k February 10, 2025 12:34
@teolemon
Copy link
Member

@PrimaelQuemerais small conflict to solve

@github-actions github-actions bot added the 📈 Analytics We use Sentry and Matomo, with an opt-in system label Feb 15, 2025
@PrimaelQuemerais
Copy link
Member Author

Reworked interface :

Screen.Recording.2025-02-15.at.11.38.53.AM.mov

@PrimaelQuemerais
Copy link
Member Author

I've added analytics for the number of new suggestions Robotoff is able to find, however I'm not sure how to track the number of accepted suggestions as AnalyticsHelp.trackEvent() only accepts an integer as eventValue.

Is it okay to only track the number of accepted suggestions regardless of the number of suggestions for a specific product? Or do we need to keep count of : accepted / suggested ?

@teolemon
Copy link
Member

We have various ways to monitor efficiency of nutrition extraction.

I'm not sure what @raphael0202 would need from the client if anything.
In doubt, I'd be tempted to apply the old saying, when in doubt, log everything, that is to say nutrient name/barcode/accepted-rejected status.
But we also have to bear in mind that Server side can look at ground truth to see what happened of the prediction, and replay the extraction on problematic cases, so a proxy might be enough.

@PrimaelQuemerais
Copy link
Member Author

I changed the analytics to send an event for each nutrient extracted and each insight accepted.
I'm not fully understanding how Matomo should be used, are we able to log custom values? Say for example we want to track the value with which an insight was rejected how should this information be passed?

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A ground breaking change, even if we leave out Matomo for the time being.

@teolemon
Copy link
Member

little merge conflict regarding app_en.arb indentation @PrimaelQuemerais
After that I suggest we merge and iterate @PrimaelQuemerais @g123k

gemini-code-assist[bot]

This comment was marked as resolved.

@openfoodfacts openfoodfacts deleted a comment from gemini-code-assist bot Feb 26, 2025
@openfoodfacts openfoodfacts deleted a comment from gemini-code-assist bot Feb 26, 2025
@teolemon teolemon merged commit e93f069 into openfoodfacts:develop Mar 2, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this to In progress in Nutri-Sight Oct 10, 2025
@teolemon teolemon moved this from In progress to Done in Nutri-Sight Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Allow to auto-magically extract nutrition facts from a photo

3 participants