I'm working on a project where I need to extract text from grocery discount flyers like the Costco announcement below (retrieved in a random google search, Costco is not the deal here):
If I just run OCR (like with Tesseract in python):
import cv2 import pytesseract img = cv2.imread('costco.jpg') text = pytesseract.image_to_string(img) print(text)
variety pack packet
ere $12.99 i rom hagst 31026 2012 > > Je laa > + a > > Wrigley’s Excel Gum variety > > Backol 24 > > $13.79 fom agus 26.202
Solon Extra virgin olive oil [...]
Which is a lot noisy.
My guess is that splitting the image to its base squares enchances the recognition.
However, I'm confused on how to do it. I can classify images using a CNN, but am not sure about object recognition.
Should I have a sliding window and train several "grid box" objects on a generic CNN and then provide this window data to be classified? How to adapt to distinct object window sizes?