papermerge icon indicating copy to clipboard operation
papermerge copied to clipboard

[Feature] - Templates for OCR (Zonal OCR) using KULL

Open swissbyte opened this issue 5 years ago • 4 comments

Hi

I already saw your pinned post about automation. Looks great! I exactly need a solution which automatically sorts, and tags my PDFs accrding to their content.

Now i have a feature request: Many of the expensive solutions offers Zonal OCR. They implemented something called OCR-Templates. This is nothing else than just a file which defines several boxes where OCR searches for Text. One possibility to select such zones is this project:

https://jsoma.github.io/kull https://github.com/jsoma/kull

I have also recorded a short gif templateSelection

Now the trick: There are multiple zones defined

  • unamed0
  • unamed1 and so on.

If we have the possibility to do RegEx or any other StrComp function on every zone itself, we would have an extremly powerfull detection engine.

AND:

If we have the possibility to use some of the content of these fields as metadata, we would have one of the most powerfull intelligent classification engine out there...

What do you think? I have not looked through the code, but if possible, i would like to help to implement this feature. Maybe this feature could be implemented together with Milestone 1.5.0 ?

Thank you very much.

swissbyte avatar Oct 08 '20 18:10 swissbyte

very interesting idea! thanks for the tip!

ciur avatar Oct 08 '20 20:10 ciur

But be carefull... It looks like, that KULL outputs wrong coordinates. At least y1 and y2 are switched... I think the most efficient way would be to first OCR the document, overlay the text into the pdf and then search for text using pdfQuery... There is also a Project which can directly search using OCR. But i think this would be much more CPU-Heavy

swissbyte avatar Oct 09 '20 09:10 swissbyte

Maybe using ocrmypdf is an option here: Embeds the OCR result into the PDF and does document improvements on imports as well. Maybe #169 is relevant for this, too.

svenihoney avatar Oct 16 '20 07:10 svenihoney

Zonal OCR would be a HUGE feature to implement to this great DMS.

damirabal avatar Nov 17 '20 01:11 damirabal