Open abclution opened 3 months ago
Watching. Marker has adopt Surya-OCR and do have a better result.
It would be better if we can make the OCR engine pluggable and maybe we can add Azure OCR etc.
I submit an issue to Surya to see if they can support hOCR format.
Describe the proposed feature
@jbarlow83 First off, thanks for this excellent software.
I wanted to share this amazing AI OCR I came across today, surya https://github.com/VikParuchuri/surya
Its accuracy and speed were miles ahead of both Tesseract and EasyOCR.
I tried to use the EasyOCR plugin, but I had similar issues as reported on the plugin issues page as other users and was in the end unable to use it as part of the OCRmyPDF integrated workflow. This may be due to non Nvidia hardware, but I was able to use EasyOCR outside of OCRmyPDF.
First off, surya has the same problem as EasyOCR, no hOCR output built in for easy plug in play alignment of detected text. It does however export some clearly and simply defined json that I believe a surya json output to hOCR converter would be enough.
Installation of surya is painless enough. As well as it includes a streamlit demo gui to test it quickly. I will put some images here that I was unable to get Tesseract to find any text (red text on pink background, lol) even after pre-processing.
Scaled version of the image sent to surya
Detected text overlay as image
Surya Detected Reading Order
With EasyOCR I encountered errors in the first line of text detected
([[531, 46], [1359, 46], [1359, 90], [531, 90]], 'GENERAL INEQRMATION EQR TAXPAYERS (cont )', 0.4053220359982469)
and the rest of the output continued similarly.
Due to how surya detects the text correctly and the reading order correctly text can indexed for search and in databases more correctly.
Anyways, just thought I would share what I found.