-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
feat: #1070 - OCR for packaging #2383
feat: #1070 - OCR for packaging #2383
Conversation
New files: * `ocr_helper.dart`: OCR Helper, to be implemented for ingredients and packaging for instance. * `ocr_ingredients_helper.dart`: OCR Helper for ingredients. * `ocr_packaging_helper.dart`: OCR Helper for packaging. * `tmp_ocr_packaging_result.dart`: to be moved to off-dart. Impacted files: * `app_en.arb`: added 6 labels for packaging OCR. * `edit_ingredients_page.dart`: refactored around new class `OcrHelper`. * `edit_product_page.dart`: added access to edit OCR packaging; refactored. * `knowledge_panels_builder.dart`: refactored. * `product_query.dart`: added packaging fields to the product fields we get from the server.
Codecov Report
@@ Coverage Diff @@
## develop #2383 +/- ##
==========================================
- Coverage 8.86% 7.56% -1.31%
==========================================
Files 161 204 +43
Lines 6623 9719 +3096
==========================================
+ Hits 587 735 +148
- Misses 6036 8984 +2948
Continue to review full report at Codecov.
|
…revious version Impacted files: * `edit_ingredients_page.dart` * `ocr_helper.dart`
👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine factoring work @monsieurtanuki 👌
Thank you @teolemon for your review! Indeed I like to code in OOP. Not sure how it works with packaging though: on one hand the server says "Papier,Envelope" (for "Wasa Fibres"), on the other hand the OCR says something totally different. How is transformed on the server side? How relevant is it for the user to read different things in the same entry field, depending on the purpose - user-friendly or OCR codes? To be continued, probably... |
@monsieurtanuki The OCR-ized text is saved into the new per language field, which is parsed server side to feed the new packaging structure, which is used for Eco-Score computation. |
@teolemon I don't know what to do then if we have two different ways of describing packaging: old fashioned "papier,envelope" and new packaging structure. Two text input fields, with one that can be filled with the OCR result? |
New files:
ocr_helper.dart
: OCR Helper, to be implemented for ingredients and packaging for instance.ocr_ingredients_helper.dart
: OCR Helper for ingredients.ocr_packaging_helper.dart
: OCR Helper for packaging.tmp_ocr_packaging_result.dart
: to be moved to off-dart.Impacted files:
app_en.arb
: added 6 labels for packaging OCR.edit_ingredients_page.dart
: refactored around new classOcrHelper
.edit_product_page.dart
: added access to edit packaging OCR; refactored.knowledge_panels_builder.dart
: refactored.product_query.dart
: added packaging fields to the product fields we get from the server.What
Screenshot
Fixes bug(s)