News for hackers. Stuff that matters.
Re:OCR4all by jaffa2 on Thursday February 13, 2025 @10:53PM (#43044653)
Ocr is well and good, i thought it was mostly solved with tesseract what does this bring? But, what I’m looking for is a reasonable library or usable implementation of MRC compression for the resulting pdfs. Nothing i have tried comes anywhere near the commercial offerings available, which cost $$$$ . It seems to be a tricky problem to solve, that is detecting and separating the layers of the image to compress separately and then binding them Back togethr into a compatible pdf.
Re:OCR4all by kergonath on Friday February 14, 2025 @01:14AM (#43045409)
> Ocr is well and good, i thought it was mostly solved with tesseract what does this bring?

Tesseract is nice, but not good enough that there is no opportunity for another, better solution.

Re:OCR4all by sandreas on Friday February 14, 2025 @01:57AM (#43045632)
You could try OCRmyPDF (https://github.com/ocrmypdf/OCRmyPDF)
Re:OCR4all by jaffa2 on Friday February 14, 2025 @04:32AM (#43046571)
Thanks for the message. Im talking about MRC ( https://en.m.wikipedia.org/wiki/Mixed_raster_content ) not just invisible text layer over image.

You can achieve colour PDFs smaller than group4 binary compression of the same images. And 10x smaller than a Jpeg compressed PDF

I handle many scanned documents so my source data is typically a 300ppi image of a book/document/newspaper etc

Re:OCR4all by joecool1029 on Friday February 14, 2025 @02:13AM (#43045717)
Cheap network locked iphone SE2's on ebay seem to be a cost effective way with good accuracy: https://findthatmeme.com/blog/2023/01/08/image-stacks-and-ip...
Re:OCR4all by jjice on Friday February 14, 2025 @10:02AM (#43049010)
Very interesting article. I'd be interested to know if a M-series Mac Mini (this article was early 2023, so there should've been M1 and M2) would have also filled this role just fine.

> My preliminary speed tests were fairly slow on my MacBook. However, once I deployed the app to an actual iPhone the speed of OCR was extremely promising (possibly due to the Vision framework using the GPU).

I don't know a lot about the specifics of where (hardware-wise) this gets run, but I'd assume any semi-modern Mac would also have an accelerated compute for this kind of thing. Running it on a Mac Mini would ease my worries about battery and heat issues. I would've guessed that they'd scale better as well, but I have no idea if that's actually the case. Also, you'd be able to run the server as a service for automatic restarts and such.

All that said, a rack of iPhones is pretty fun.

Re:OCR4all by fny on Friday February 14, 2025 @07:13AM (#43047592)
Run Tesseract on a screenshot and you'll be underwhelmed.
Re:OCR4all by danpla on Monday February 17, 2025 @05:29AM (#43077323)
With proper image pre-processing, Tesseract can recognize even tiny text (5-7 px high).
Re:OCR4all by aidenn0 on Friday February 14, 2025 @12:59PM (#43051099)
The internet archive generates MRC pdfs and have open-sourced their tooling: https://github.com/internetarchive/archive-pdf-tools
Re:OCR4all by jaffa2 on Thursday February 20, 2025 @07:21PM (#43122446)
Thank you
Re:OCR4all by aidenn0 on Friday February 14, 2025 @01:01PM (#43051133)
> Ocr is well and good, i thought it was mostly solved with tesseract what does this bring?

This is specifically for historic documents that tesseract will handle poorly. It also provides a good interface for retraining models on a specific document set, which will help for documents that are different from the training set.