Live data from Hacker News

Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

github.com

11–20 of 22 posts

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#11

Awesome - I'm a dabbler, but any thoughts on best engines for PDF tables? I've got tons of PDFs with similar tables embedded deep in them, but all formatted slightly differently. Seems like it should be easy....but nope!

Thanks!

PDF -> Markdown looks like a pretty great use case

Just added box detection support -- maybe I'll start from here https://github.com/junhoyeo/BetterOCR#-box-detection

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#15
Wow, this is just up my alley. I started a side project recently using Tesseract to read book spines for inventory purposes and hooked it up to ChatGPT to clean up the text, having it "fill in the blanks" so to speak. I'll definitely give this a go, having using two OCR engines I should get better results.

Any plans to add other OCR engines?

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#16
post #15

Wow, this is just up my alley. I started a side project recently using Tesseract to read book spines for inventory purposes and hooked it up to ChatGPT to clean up the text, having it "fill in the blanks" so to speak. I'll definitely give this a go, having using two OCR engines I should get better results. Any plans to add other OCR engines?

Yup! But I'm still exploring options. (any recommendations would be welcomed!) Here are some candidates I'm considering:

- https://github.com/mindee/doctr

- https://github.com/open-mmlab/mmocr

- https://github.com/PaddlePaddle/PaddleOCR (honestly I don't know Mandarin so I'm a bit stuck)

- https://github.com/clovaai/donut -- While it's primarily an "OCR-free document understanding transformer," I think it's worth experimenting with. Think I can sort this out by letting the LLM reason through it multiple times (although this will impact performance)

- yesterday got a suggestion to consider https://github.com/kakaobrain/pororo -- don't think development is still active but the results are pretty great on Korean text

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#17

Awesome - I'm a dabbler, but any thoughts on best engines for PDF tables? I've got tons of PDFs with similar tables embedded deep in them, but all formatted slightly differently. Seems like it should be easy....but nope!

Tabula.

It does what you are looking for

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#18

Awesome - I'm a dabbler, but any thoughts on best engines for PDF tables? I've got tons of PDFs with similar tables embedded deep in them, but all formatted slightly differently. Seems like it should be easy....but nope!

I use popper pdftotext -layout flag, which preserves the shape of the tables. Gpt can then fix them up into whatever format.

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#19
post #7

Earlier quoted context omitted.

Similarly, is there any half decent general LLM that can run on consumer hardware?

Thinking to add LLaMA or other OSS LLM models soon

Please consider LLaMA.cpp (https://github.com/ggerganov/llama.cpp), which supports a lot of models and doesn't need an expensive GPU.

Re: Show HN: BetterOCR combines and corrects multiple OCR engines with an LLM

#20
post #9

Earlier quoted context omitted.

Are you able to highlight the text on the PDF? If so, I highly recommend PDF2TXT to extract text from PDFs. Would require some parsing work on your part to convert it back to a table, but zero chance of error from inference since it’s using text extraction. If you can’t highlight the text, it won’t work.

You can make any PDFs 'highlightable' with GitHub.com/ocrmypdf

It’s not perfect, unfortunately.
Post reply on HN