Proposal: Transfer OCR generation to Robotoff #12125
Closed
raphael0202
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
There is also on demand OCR generation (for selected ingredients images) currently used by the website and mobile app. We probably should keep it as-is for the time being (and possibly create a new API on Robotoff that we can move to gradually). |
Beta Was this translation helpful? Give feedback.
3 replies
-
In Product Opener call, we decided to go for the new redis stream for now. We can move the feature to Robotoff (or another service) later if needed. Issue: #12256 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Every time an image is uploaded on Open Food Facts, Robotoff is (to my knowledge) the main user of OCR files.
Robotoff uses OCR files to:
Product Opener sends an event on Redis every time an image is uploaded. However, at the time Robotoff processes the event, the OCR file may not be available yet. OCR processing is indeed processed in the background using icron on the server where Product Opener is running.
It happens quite often: in the last 90 days, the insight generation from OCR failed 23k times due to missing OCR file, and ingredient extraction failed 6.4k times.
Because of this, we miss insights for some products.
Option 1: Transfer ownership of OCR generation to Robotoff
If Robotoff generates OCR files instead of Product Opener, we can run prediction tasks that require OCR files after the OCR processing.
Benefits
Shortcomings
Option 2 : publish
ocr_generated
event on a new redis streamCreate a new Redis event, on a new stream, when the OCR is ready. Robotoff can listen to this stream and launch jobs that require OCR when it receives the event.
Benefits
I'm personally in favor of option 1.
Beta Was this translation helpful? Give feedback.
All reactions