openfoodfacts-ai
openfoodfacts-ai copied to clipboard
Try to detect the name based on the size of the text
A simplistic assumption: the name of the product should be the largest text on the front of the product. Based on this, we could compute a ratio between the area of the bounding boxes (width by height) and the amount of letters inside it . Based on this ratio, we could have candidates for the product name
I was thinking a good pipeline also could be:
- get all text from front image
- look for brand candidates from barcode group
- remove labels ("fat free")
- remove quantity (360g/similar regexp)
- extract remaining sentences
- weight "x with y" or "x & y" heavily (perhaps a good list of title patterns)
... and provide these as autocomplete suggestions for the name field.
These steps might help (particularly brands) filter put false positives