Help to perform OCR

I want to make a model which can perform the task of OCR i.e reading the text inside an image. Is there some dataset which I can use and what architecture should I use

I found this can be useful: https://hackernoon.com/latest-deep-learning-ocr-with-keras-and-supervisely-in-15-minutes-34aecd630ed8

and some GitHub page: https://github.com/emedvedev/attention-ocr

You can also generate your dataset by putting text in the image. But I don’t know how it will work with real text and real photos.

from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw 

img = Image.open("sample_in.jpg")
draw = ImageDraw.Draw(img)
# font = ImageFont.truetype(<font-file>, <font-size>)
font = ImageFont.truetype("sans-serif.ttf", 16)
# draw.text((x, y),"Sample Text",(r,g,b))
draw.text((0, 0),"Sample Text",(255,255,255),font=font)
img.save('sample-out.jpg')
1 Like

thank you