Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
31–40 of 178 posts
Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#32Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#33I'm curious if a multimodal model would be better at the OCR step than tesseract? Probably would increase the cost but I wonder if that would be offset by needing less post processing.
Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#34Have you tried using other OCR packages? I had to give up on Tesseract after every mode and model I tried read a quite plain image of "77" as "7" (and interestingly the javascript port reads it as "11"). Pic related: https://i.postimg.cc/W3QkkhCK/speed-roi-thresh.png
Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#35Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#36Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#37Having tried this in the past, it can work pretty well 90% of the time. However, there are still some areas it will struggle. Imagine you are trying to read a lease contract. The two areas which the LLM may be useless are numbers and names (names of people or places/addresses). There’s no way for your LLM to accurately know what the rent should be, or to know about the name of a specific person.
Where it's most useful to me personally is when I want to read some old book from the 1800s about the history of the Royal Navy [0] or something like that which is going to look really bad on my Kindle Oasis as a PDF, and the OCR version available from Archive.org is totally unreadable because there are 50 typos on each page. The ability to get a nice Markdown file that I can turn into an epub and read natively is really nice, and now cheap and fast.
[0] https://archive.org/details/royalnavyhistory02clowuoft/page/...
Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#38I think Gemini Flash 1.5 is the best closed-source model for this. Very cheap. Particularly compared to GPT4o-mini, which is priced the same as GPT4 for image input tokens. Performance and speed is excellent. I convert each pdf page to an image and send one request per page to Flash (asynchronously). The prompt asks for markdown output with specific formatting guidelines. For my application (mainly pdf slideshows wit…
Why convert? Flash 1.5 accepts whole PDFs just fine. It will also increase the models response accuracy.
Context: I have found Flash 1.5 is excellent and stable for this kind of use-case. Even at a non-EA price-point it's incredibly cheap, especially when utilizing Batch Prediction Jobs (50% discount!).
Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#39Have you tried using other OCR packages? I had to give up on Tesseract after every mode and model I tried read a quite plain image of "77" as "7" (and interestingly the javascript port reads it as "11"). Pic related: https://i.postimg.cc/W3QkkhCK/speed-roi-thresh.png
Most issues related to Tesseract will have to do with input DPI, often you need to crank that setting way up from its default.
Re: Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
#40Earlier quoted context omitted.
You know, I’ve really looked hard at what’s out there and haven’t been able to find anything else that’s totally free/open, that runs well on CPU, and which has better quality output than Tesseract. I found a couple Chinese projects but had trouble getting them to work and the documentation wasn’t great. If you have any leads on others to try I’d love to hear about them. One of the benefits of this project is that it…
macOS Live Text is incredible. Mac only though