Calamari-OCR / calamari

Line based ATR Engine based on OCRopy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Model very sensitive on PNG input

junyizhao04 opened this issue · comments

I tried multiple size and source (photo from screen, paper, screenshot etc) and attempted to run it in Calamari OCR using the given model. However, the model is very sensitive towards input and only around 5% works. What is the expected PNG input size?

I don't think the input size matters that much. Please note that calamari is line based, it does not include code or models for segmentation tasks. As long as your images is cropped nicely around a single line or you provide coordinates via PAGE XML, it should work.

I don't think the input size matters that much. Please note that calamari is line based, it does not include code or models for segmentation tasks. As long as your images is cropped nicely around a single line or you provide coordinates via PAGE XML, it should work.

then I believe image like this may work, but it does not.

11

The uw3 dataset the model uw3-modern-english was trained on contains only binarised data, therefore the model struggles with colour or grayscale images. If you convert your image to monochrome, e.g. via convert online.png -monochrome online.bin.png, it's recognised perfectly.