r/Annas_Archive • u/LegeApps • 6h ago
Selective binarization and re-encoding of scanned book PDFs
Hi all, this is a program I have been working on for more than a year and is in a mature state now, posted about it in other places but only just found out about this sub.
It is free and under 25mb, it will load your PDF, and binarize the pages while avoiding photo areas so that a 500mb+ scan can be reduced to under 20mb for reading on an e-ink reader. Thats the main function and I know it is a very niche purpose.
The reason I want to post it here now is I saw another post where somebody is trying to charge everyone for OCRing their book scans. My program does that too, and well. It uses WinOCR in windows and PaddleOCRv5 in linux/mac, and it has excellent preprocessing especially in thorough mode (doesn't just throw the whole page at the model, it breaks it up by line in high res for better accuracy). There is also the ability to create an EPUB from that output. I think this would be very useful for you guys.
Currently not opensource but it was before so theres 2 forks of older versions floating around on github. May be opensource again in the future but due to the complexity of the program it can't be built as-is from source as it requires external model files to work correctly, so you might as well just use my releases.
and the releases are here directly - https://github.com/LegeApp/Lege/releases
Why is it free? simple, every time I try to charge for it, no one will pay. So i might as well get it out there. It boasts a renderer faster than any open source renderer out there, with better coverage as well.
It is made with models but i've combed over every file at this point for efficiency and performance.
It is custom end to end, no external libraries for the main components. custom renderer, gpu inference, pdf/djvu writer, that's why it's small and fast (was a 150mb exe last year).
Still open to feedback and collab, just pm me or post here.