openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
786 stars 271 forks source link

Product addition (tracker) #1379

Open teolemon opened 2 years ago

teolemon commented 2 years ago

Who for

#### Product addition
- [ ] https://github.com/openfoodfacts/smooth-app/issues/4155
- [ ] #1399
- [ ] (Product Addition) We should take a photo of the scanned barcode right on barcode detection, and integrate it as a first photo in product addition
- [ ] #518 
- [ ] #519 
#### More substantial addition
- [ ] #2910
- [ ] #515
- [ ] #3298
- [ ] #1701
- [ ] #3297
- [ ] #3295
- [ ] #3279
- [ ] https://github.com/openfoodfacts/smooth-app/issues/517
- [ ] #511
- [ ] https://github.com/openfoodfacts/smooth-app/issues/3963
- [ ] https://github.com/openfoodfacts/smooth-app/issues/3985
- [ ] https://github.com/openfoodfacts/smooth-app/issues/3986
- [ ] https://github.com/openfoodfacts/smooth-app/issues/4068
#### Done
- [x] #1398
- [x] #2978
- [x] #2975
- [x] #2974
- [x] #2977
- [x] #2944
- [x] #1397
- [x] #1395
- [x] #1194
- [x] #1400
- [x] #1393
- [x] #1396

Video

https://photos.app.goo.gl/V1cwkaVEM9ArwJBL7

Part of

teolemon commented 1 year ago

We still have an issue on the road to scores, and a wizard product addition is needed. Thus all the open bugs @monsieurtanuki and this proposal for a wizard revamp: https://github.com/openfoodfacts/smooth-app/discussions/3270 image

monsieurtanuki commented 1 year ago

@teolemon To me, the thing would be to openly hack the nutriscore/ecoscore and focus on it.

The current "new product page" is a boring list of upload image buttons that provide no instant feedback to the user.

Assuming that the nutriscore is about category, ingredients and nutritional facts only, I guess it would be more fun (🥳 ) to show something like "Let's compute the nutriscore in 1-2-3 steps!" with 3 buttons. Then, more advanced users may weight individually clean and dry parts of the packaging, but it would make sense to prevent less advanced users from giving 1 star review.

teolemon commented 1 year ago

Screenshot_20230508-083757.png

monsieurtanuki commented 1 year ago

Was it a barcode search? A scan search with wrong barcode detection? A text search with the only 2 Romanian results for "snickers"?

teolemon commented 1 year ago

I'm very much aligned with the Nutri-Score and Eco-Score pipelines. We have those old issues

teolemon commented 1 year ago

@monsieurtanuki a quick and dirty fix would be one button per pipeline in the addition screen (plus two concatenations of editing sections) image

monsieurtanuki commented 1 year ago

@teolemon The pipelines (actions behind "help!" buttons) do not exist yet, right?

I would even put the "help!" buttons on top, as it's probably what users want first. I mean, 1 star users may want an answer quickly, rather than contribute with pictures that they already see (no added value for them) (plus the gamification: as a user I see that my first inputs already have an impact).

teolemon commented 1 year ago
monsieurtanuki commented 1 year ago
@teolemon Something like that? top bottom
Screenshot_2023-05-10-09-42-55 Screenshot_2023-05-10-09-42-59
teolemon commented 1 year ago

Looks reasonable. Perhaps being honest ? "Help compute the Nutri-Score in 2 minutes."

Bugs to open

teolemon commented 1 year ago
monsieurtanuki commented 1 year ago

@teolemon Something like that? Screenshot_2023-05-12-19-28-50

Regarding a short "add THE product category", it means that we'll have to maintain 3 labels:

Same for nutrition facts and ingredients, right?

teolemon commented 1 year ago

yes, much better 👍

teolemon commented 1 year ago

and the grey nutri-score is replaced by the actual one, as soon as we have it

raphael0202 commented 1 year ago

After discussing the issue with @teolemon, here is my opinion on implementing a new product addition pipeline. First, from an AI perspective, we need to ask the user to upload images first, as there image upload takes time (especially if the user network is slow) and as prediction extraction by Robotoff also takes time.

The idea is to assist the user with information predicted by Robotoff during the product addition process.

I would suggest to set up the following simple pipeline with the following screens:

  1. asking for most important images: front, nutrition, ingredient (in that order) + crops. I would drop the "packaging" and "additional photos" at this stage.
  2. asking for product name + weight. If we have product_weight insights from Robotoff at this stage, we pre-fill the field.
  3. asking to fill the nutritional information. At this step all Robotoff processing should be finished. We can ask Robotoff with the /predict/nutrition endpoint nutrition information and pre-fill the nutrient fields.
  4. asking user to extract ingredients. Currently, Robotoff cannot do it automatically, but there is an ongoing AI project to do this.
  5. asking user to provide the category. We should have a pretty good category prediction at this point with all the previously provided data (product name, nutrients, ingredients, images). We should provide Robotoff category insight as a category suggestion.
  6. (optional for a first pipeline version) Asking user to add labels, using Robotoff suggestions.
  7. (optional for a first pipeline version) Asking user to take packaging + additional pictures.

We should send data points as soon as the user submit the data at each pipeline stage, to be sure we get partial data in case the user drops the product addition.

I don't think it's valuable to talk about ecoscore or nutriscore at the beginning of the pipeline, as the user doesn't necessarily know what these scores are about. I think the user expect to have to provide some data to get information about the product, he/she just needs to be guided.

monsieurtanuki commented 1 year ago

I don't think it's valuable to talk about ecoscore or nutriscore at the beginning of the pipeline, as the user doesn't necessarily know what these scores are about. I think the user expect to have to provide some data to get information about the product, he/she just needs to be guided.

@raphael0202 I have no idea what users expect, but it would be fair to assume that at some point nutriscore and ecoscore mean something for them in the app, as:

We could dismiss the nutriscore / ecoscore input in the "add new product" page for users that say they don't care about those attributes.

That said, my point here was to code a quick fix (slightly better looking, more interactive) by adding a couple of buttons. Your suggestion is much more ambitious, and deserves a proper issue (if not several issues). And keep in mind that the images are uploaded in the background, which means some glitches in the pipeline.

raphael0202 commented 1 year ago

@monsieurtanuki My point about the ecoscore/nutriscore wasn't very clear, sorry for that. I was taking the perspective of a user in a country with low product coverage (such as Romania, where we're gaining some traction lately), where the user has a high chance of scanning a product not referenced by Open Food Facts. As such, his/her first "interaction" with nutriscore/ecoscore would be in the product addition page, and I find this a bit confusing. I think it's preferable that users learn more about what is the ecoscore and the nutriscore on the product page instead.

I think it's a good time to implement a first version of the pipeline, as it would bring more value than quick fixes (and it's something that we have been postponing for a long time, we already talked about this for the old android app).

It's not an issue if images are not uploaded on time, as ML predictions only come as a bonus, it should be possible to complete the pipeline without it.

This can be implemented step by step, we don't need to implement the full pipeline now. Just adding step (2) (asking for product name + weight + Robotoff weight prediction) could be a good start.

I'm also curious about your feedback on this proposal @teolemon @g123k

teolemon commented 1 year ago

Composite pipelines

Harder

Better Eco-Score and Nutri-Score onboarding

Be tougher on incomplete products / Towards personal pipelines