7 ms·
OCR4all
- cdrini 2y agoWhat differentiates this from other tools? Eg tesseract, EasyOcr?
- jasonhemann 2y agoI was going to say, isn't tesseract /already/ OCR for everyone?
- rkagerer 2y agoI played with Tesseract a long time ago. Has the accuracy and success rate improved a lot in the last eg. decade?
- MassPikeMike 2y agoI maintain a searchable archive of historical documents for a nonprofit, OCR'd with Tesseract over several years. Tesseract 4 was a big improvement over previous versions, but since then its accuracy has not improved at the same rate as other free solutions. These days, just uploading a PDF of scanned documents (typeset ones, not handwriting) to Google Drive and opening with Google Docs results in a text document generated with impressive quality OCR. But this is not scriptable, and doesn't provide access position information, which is needed so we can highlight search results as color overlays on the original PDF. Tesseract's hOCR mode was great for that. For the next version, we're planning to use one of the command-line wrappers to Apple's Vision framework, which is included free in MacOS. A nice one that provides position information is at https://github.com/bytefer/macos-vision-ocr https://github.com/bytefer/macos-vision-ocr
- thenthenthen 2y agoI asked this question yesterday but did not enough votes. I need to OCR and then translate thousands of pages from historical documents and was wondering if you knew a scriptable app/technique or technology that includes ‘layout recovery’, aka overlaying translated text over the original, like the Safari browser etc. does (not sure the apple vision framework wrapper does this?).
- wahnfrieden 2y agoFYI the Apple one is best inside the Live Text API which is Swift-only and so some old Python and CLI tools which wrap the older Obj-C APIs may have worse quality (though Live Text doesn't really provide bounding boxes - so what I do is combine its output with bounding box APIs like the old iOS/macOS ones)
- MassPikeMike 2y agoApple Vision and its wrappers provide bounding boxes for each line of text. That's slightly less convenient than Tesseract which can give you a bounding box for each word, but more than compensated by Apple Vision's better accuracy. I am planning to fudge the word boxes by assuming fixed-width letters and dividing up the overall width so that each word's width is proportional to its share of the total letters on the line. Once you have those bounding boxes, it's pretty simple to use a library like [1] (Python) or [2] (JavaScript) to add overlay text in the right place. For example, see how [3] does it. [1] https://pymupdf.readthedocs.io/en/latest/recipes-text.html#how-to-insert-text https://pymupdf.readthedocs.io/en/latest/recipes-text.html#h... [2] https://github.com/foliojs/pdfkit https://github.com/foliojs/pdfkit [3] https://github.com/eloops/hocr2pdf https://github.com/eloops/hocr2pdf
- thenthenthen 2y agoThank you, I will take a look at hocr2pdf to see how they overlay text!
- llm_trw 2y agoTesseract has had a near 100% success rate since the first time I used it in 2008 _when you read the manual_. Black letters on white background, xheight of between 10 to 30 px, tiff format, mono column layout, etc., etc., etc.. People get terrible results because they treat it like a phone app and drop a barely legible colored jpg of a bent page and wonder why it's garbage.
- tjoff 2y agoReading the manual to actually tune it or reading the manual to know the limitations? All I've ever tried it for is pixel perfect super high contrast text but still the results doesn't exactly impress.
- poulpy123 2y agowhat you are saying is that tesseract works perfectly if you don't need to use it with real world stuff
- 9rx 2y agoMy read is that he is saying that Tesseract is intended for OCR, not an entire image pipeline, so there is an expectation that you will preprocess those real world images into a certain form rather than throwing an image straight off the sensor at it.
- criddell 2y agoThey wonder why it's garbage because modern apps have set people's expectations much higher. A barely legible colored jpg of a bent page shouldn't be a problem anymore.
- llm_trw 2y agoIt works better than those apps when you know what you are doing. Not everything needs to be made for a chimp.
- rcxdude 2y agoSure, if you're generating the input to be machine readable, then it's not very surprising that it's machine readable withough much effort. But then you could also use a QR code. Most people who want to OCR stuff are doing it because they don't have control over the input.
- krick 2y agoYes' anecdotally, it's a bit better now. Still nowhere near actually usable OCR software though, unless your use-case is scanning clear hi-res screenshots in conventional fonts and popular langues, without tables or complicated formatting.
- pininja 2y agoThis tool says it includes a workflow GUI and refinement tools, like creating work-specific text recognition models - maybe the others do too? tesseract isn’t packaged with a GUI, but is wrapped by many. This project seems focused on making tools more accessible and helping the user be more efficient and organized
- jackbravo 2y agoor https://ds4sd.github.io/docling/ https://ds4sd.github.io/docling/ from IBM.
- abrichr 2y agoFrom https://www.ocr4all.org/guide/user-guide/introduction https://www.ocr4all.org/guide/user-guide/introduction : > OCR4all is a software which is primarily geared towards the digital text recovery and recognition of early modern prints, whose elaborate printing types and mostly uneven layout challenge the abilities of most standard text recognition software. Looks like it's built on https://github.com/Calamari-OCR/calamari https://github.com/Calamari-OCR/calamari
- miles 2y agoAs this project is geared toward "early modern prints", any recommendations for the best OCR/LLM solution for poor-quality typed manuscripts?
- ngai_aku 2y agoIf we’re doing recommendations I’d like to know what everyone is using for handwriting
- juliendorra 2y agoResearchers use Transkribus
- sandreas 2y agoYou could try MiniCPM 2.6.
- ikbdsk 2y agoI was playing with PaddleOCR a while ago, it seemed to work quite well. It seems to be geared to Chinese, but it also works with other languages in my experience.
- GutenYe 2y agoI created a wrapper of PaddleOCR: https://github.com/gutenye/ocr https://github.com/gutenye/ocr
- manmal 2y agoIf cloud options are ok, Gemini has been getting a good rep lately, as it’s good at OCR and cheaper than the rest.
- jaffa2 2y agoOcr 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.
- fny 2y agoRun Tesseract on a screenshot and you'll be underwhelmed.
- danpla 2y agoWith proper image pre-processing, Tesseract can recognize even tiny text (5-7 px high).
- kergonath 2y ago> 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.
- sandreas 2y agoYou could try OCRmyPDF (https://github.com/ocrmypdf/OCRmyPDF https://github.com/ocrmypdf/OCRmyPDF)
- jaffa2 2y agoThanks for the message. Im talking about MRC ( https://en.m.wikipedia.org/wiki/Mixed_raster_content 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
- 2y ago
- mometsi 2y ago> How is this different from tesseract and friends? The workflow is for digitizing historical printed documents. Think conserving old announcements in blackletter typesetting, not extracting info from typewritten business documents.
- bonefolder 2y agoTangentially related, but does someone know a resource for high-quality scans of documents in blackletter / fraktur typesetting? I'm trying to convert documents to look fraktury in latex and would like any and all documents I can lay my hands on.
- amelius 2y agoI didn't have good results in tesseract, so I hope this is really different ;) I was surprised that even scraped screen text did not work 100% flawlessly in tesseract. Maybe it was not made for that, but still, I had a lot of problems with high resolution photos also. I did not try scanned documents, though.
- Moto7451 2y agoI have never had to handle handwriting professionally but I have had great success with Tesseract in the past. I’m sure it’s no longer the best free/cheap option but with a little bit of image pre-processing to ensure the text pops from the background and isn’t unnecessarily large (I.e. that 1200dpi scan is overkill) you can have a pretty nice pipeline with good results. In the mid 2010s I put Tesseract, OCRad (which is decidedly not state of the art), and aspell into a pretty effective text processing pipeline to transform resumes into structured documents. The commercial solutions we looked at (at the time) were a little slower and about as good. If the spellcheck came back with too low of a success rate I ran the document through OCRad which, while simplistic, sometimes did a better job. I expect the results today with more modern projects to be much better so I probably wouldn’t go that path again. However as all of it runs nicely on slow hardware, it likely still has a place on low power/hobby grade IoT boards and other niches.
- spigottoday 2y ago
- pogue 2y agoI've been looking for a project that would have an easy free/extremely cheap way to do OCR/image recognition for generating ALT text automatically for social media. Some sort of embedded implementation that looks at an image and is either able to transcribe the text, or (preferably) transcribe the text AND do some brief image recognition. I generally do this manually with Claude and it's able to do it lightning fast, but a small dev making a third party Bluesky/Mastodon/etc client doesn't have the resources to pay for an AI API.
- vladxyz 2y agoMaybe relevant, mozilla is working on building AI alt text generation into firefox: https://blog.mozilla.org/en/mozilla/ai/help-us-improve-our-alt-text-generation-model/ https://blog.mozilla.org/en/mozilla/ai/help-us-improve-our-a...
- gostsamo 2y agoSuch an approach moves the cost of accessibility to each user individually. It is not bad as a fallback mechanism, but I hope that those who publish won't decide that AI absolves them of the need to post accessible content. After all, if they generate the alt text on their side, they can do it only once and it would be accessible to everyone while saving multiple executions of the same recognition task on the other end. Additionally, they have more control how the image would be interpreted and I hope that this really would matter.
- krick 2y agoWow. Setup took 12 GB of my disk. First impression: nice UI, but no idea what to do with it or how to create a project. Tells me "session expired" no matter what I try to do. Definitely not batteries-included kind of stuff, will need to explore later.
- Krasnol 2y ago> Designed with usability in mind Create complex OCR workflows through the UI without the need of interacting with code or command line interfaces. [...] https://www.ocr4all.org/guide/setup-guide/windows https://www.ocr4all.org/guide/setup-guide/windows ------------------ I'm sorry. I suppose this is great but, an .exe-File is designed for usability. A docker container may be nice for techy people, but it is not "4all" this way and I do understand that the usability starts after you've gone through all the command line interface parts, but those are just extra steps compared to other OCR programs which work out of the box.
- alexnewman 2y agoHow does this compare quality wise to Gemini flash
- vintermann 2y agoThe big complicated segmentation pipeline is a legacy from the time you had to do that, a few years ago. It's error prone, and even at it's best it robs the model of valuable context. You need that context if you want to take the step to handwriting. If you go to a group of human experts to help you decipher historical handwriting, the first thing they will tell you is that they need the whole document for context, not just the line or word you're interested in. We need to do end to end text recognition. Not "character recognition", it's not the characters we care about. Evaluating models with CER is also a bad idea. It frustrates me so much that text recognition is remaking all the mistakes of machine translation from 15+ years ago.
- modeless 2y agoVLMs seem to render traditional OCR systems obsolete. I'm hearing lately that Gemini does a really good job on tasks involving OCR. https://news.ycombinator.com/item?id=42952605 https://news.ycombinator.com/item?id=42952605 Of course there are new models coming out every month. It's feeling like the 90s when you could just wait a year and your computer got twice as fast. Now you can wait a year and whatever problem you have will be better solved by a generally capable AI.
- tcascais 2y agoI just used Gemini as an OCR a couple of hours ago because all the OCR apps I tried on android failed at the task lol Wild seeing this commment right after waking up
- bayindirh 2y agoThe problem with doing OCR with LLMs is hallucination. It creates character replacements like Xerox's old flawed compression algorithm. At least this my experience with Gemini 2.0 Flash. It was a screenshot of a webpage, too. Graybeards like Tessaract has moved to neural network based pipelines, and they're re-inventing and improving themselves. I was planning to train Tessaract with my own hand writing, but if OCR4All can handle that, I'll be happy.
- 2y ago
- axegon_ 2y agoI've been using tesseract for a few years on a personal project, I'd be interested to know how they compare in terms of system resources, given that I am running it on a dell optiplex micro with 8 gigs of ram and 6-th gen i5 - tesseract is barely noticeable so it's just my curiosity at this point, I don't have any reasons to even consider switching over. I do however have a large dataset of several hundred gbs of scanned pdfs which would be worth digitalizing when I find some time to spare.
- jdthedisciple 2y agoWhat is this? A new SOTA OCR engine (which would be very interesting to me) or just a tool that uses other known engines (which would be much less interesting to me). A movement? A socio-political statement? If only landing pages could be clearer about wtf it actually is ...
- mdp2021 2y ago[Top menu] > About > What is OCR4all? https://www.ocr4all.org/about/ocr4all https://www.ocr4all.org/about/ocr4all
- ur-whale 2y agoNot the landing page
- jdthedisciple 2y agoEven there after reading a cple of paragraphs, all I know is that it "combines" and it "addresses". Could be a software? Library? Module? OSS? Api? Downloadable tool? Script? Wrapper? Paid service?... Could also be some dude behind a counter named OCR4all?
- seu 2y agoLooks like a great project, and I don't want to nitpick, but... https://www.ocr4all.org/about/ocr4all https://www.ocr4all.org/about/ocr4all > Due to its comprehensible and intuitive handling OCR4all explicitly addresses the needs of non-technical users. https://www.ocr4all.org/guide/setup-guide/quickstart https://www.ocr4all.org/guide/setup-guide/quickstart > Quickstart > Open a terminal of your choice and enter the following command if you're running Linux (followed by a 6 line docker command). How is that addressing the needs of non-technical users?
- einpoklum 2y agos/non-technical users/technical users who are into docker and don't mind filling their computers with large files for no good reason/
- lionkor 2y agoThose are called "tech enthusiasts"
- 7bit 2y agoAny end-user application that uses docker is not an end-user application. It does not matter if the end-user knows how to use docker or not. End-user applications should be delivered as SaaS/WebUi or a local binary (GUI or CLI). Period.
- lupusreal 2y ago"Silicate chemistry is second nature to us geochemists, so it's easy to forget that the average person probably only knows the formulas for olivine and one or two feldspars."
- teddyh 2y ago<https://www.xkcd.com/2501/ https://www.xkcd.com/2501/>
- pbhjpbhj 2y agoApplication installation isn't a user level task. The application being ready for a user to use, and being easy to install are separate. You get your IT literate helper to install for you, then, if the program is easy for users to use you're golden.
- einpoklum 2y agoThey lost me when they suggested I install docker. Now, I wouldn't mind if they suggested that as an _option_ for people whose system might exhibit compatibility problems, but - come on! How lazy can you get? You can't be bothered to cater to anything other than your own development environment, which you want us to reproduce? Then maybe call yourself "OCR4me", not "OCR4all".
- danso 2y ago> How lazy can you get?" Genuine question: What would the ideal docker-free solution look like in your opinion? That is, something that is accessible to the average university student, researcher, and faculty member? What installation tool/package manager would this hypothetical common user use? How many hoops would they have to jump through? The hub page lists the various dependencies [0], which on their own are pretty complicated packages. [0] https://hub.docker.com/r/uniwuezpd/ocr4all https://hub.docker.com/r/uniwuezpd/ocr4all
- jjuliano 2y agoIf you are interested, I also made an AI assisted OCR API - https://github.com/kdeps/examples https://github.com/kdeps/examples It combines Tesseract (for images) and Poppler-utils (PDF). A local open-source LLMs will extract document segments intelligently. It can also be extended to use one or multiple Vision LLM models easily. And finally, it outputs the entire AI agent API into a Dockerized container.
- fny 2y agoA little secret: Apple’s Vision Framework has an absurdly fast text recognition library with accuracy that beats Tesseract. It consumes almost any image format you can think of including PDFs. I wrote a simple CLI tool and more featured Python wrapper for it: https://github.com/fny/swiftocr https://github.com/fny/swiftocr
- criddell 2y agoJust about everything beats Tesseract.
- Moto7451 2y agoThis has been one of my favorite features Apple added. When I’m in a call and someone shares a page I need the link to, rather than interrupt the speaker and ask them to share the link it’s often faster to screengrab the url and let Apple OCR the address and take me to the page/post it in chat.
- eigenvalue 2y agoI basically wrapped this in a simple iOS app that can take a PDF, turn it into images, and applies the native OCR to the images. It works shockingly well: https://apps.apple.com/us/app/super-pdf-ocr/id6479674248 https://apps.apple.com/us/app/super-pdf-ocr/id6479674248 I probably should have just made it a free app so it would have gotten very popular, but oh well.
- jjice 2y agoAfter getting an iPhone and exploring some of their API documentation after being really impressed with system provided features, I'm blown away by the stuff that's available. My app experience on iOS vs Android is night and day. The vision features alone have been insane, but their text recognition is just fantastic. Any image and even my god awful handwriting gets picked up without issue. That said, I do love me a free and open source option for this kind of thing. I can't use it much since I'm not using Apple products for my desktop computing. Good on Apple though - they're providing some serious software value.
- 2y ago
- amai 2y ago„OCR4all combines various open-source solutions to provide a fully automated workflow for automatic text recognition of historical printed (OCR) and handwritten (HTR) material.“ It seems to be based on OCR-D, which itself is based on - https://github.com/tesseract-ocr/tesseract https://github.com/tesseract-ocr/tesseract - https://kraken.re/main/index.html https://kraken.re/main/index.html - https://github.com/ocropus-archive/DUP-ocropy https://github.com/ocropus-archive/DUP-ocropy - https://github.com/Calamari-OCR/calamari https://github.com/Calamari-OCR/calamari See - https://ocr-d.de/en/models https://ocr-d.de/en/models It seems to be an open-source alternative to https://www.transkribus.org/ https://www.transkribus.org/ ( which uses amongst others https://atr.pages.teklia.com/pylaia/pylaia/ https://atr.pages.teklia.com/pylaia/pylaia/ ) Another alternative is https://escriptorium.inria.fr/ https://escriptorium.inria.fr/ ( which uses kraken)
- khaki54 2y agoThis looks promising, not sure how it stacks up to Transkribus which seems to be the leader in the space since it has support for handwritten and trainable ML for your dataset.
- eigenvalue 2y agoI think the current sweet-spot for speed/efficiency/accuracy is to use Tesseract in combination with an LLM to fix any errors and to improve formatting, as in my open source project which has been shared before as a Show HN: https://github.com/Dicklesworthstone/llm_aided_ocr https://github.com/Dicklesworthstone/llm_aided_ocr This process also makes it extremely easy to tweak/customize simply by editing the English language prompt texts to prioritize aspects specific to your set of input documents.
- sgc 2y agoHave you used your project on classical languages like Latin / Ancient Greek / Hebrew etc? Will the LLM fall flat in those cases, or be able to help?
- eigenvalue 2y agoI haven’t, but I bet it would work pretty well, particularly if you tweaked the prompts to explain that it’s dealing with Ancient Greek or whatever and give a couple examples of how to handle things.
- TheNovaBomb 2y agoWhat kind of accuracy have you reached with this pipeline of Tesseract+LLM? I imagine that there would be a hard limit as to what level the LLM could improve the OCR extract text from Tesseract, since its far from perfect itself. Haven't seen many people mention it, but have just been using the PaddleOCR library on it's own and has been very good for me. Often achieving better quality/accuracy than some of the best V-LLM's, and generally much better quality than other open-source OCR models I've tried like Tesseract for example. That being said, my use case is definitely focused primarily on digital text, so if you're working with handwritten text, take this with a grain of salt. https://github.com/PaddlePaddle/PaddleOCR/blob/main/README_en.md https://github.com/PaddlePaddle/PaddleOCR/blob/main/README_e... https://huggingface.co/spaces/echo840/ocrbench-leaderboard https://huggingface.co/spaces/echo840/ocrbench-leaderboard
- klaussilveira 2y agoTraining a model exclusively on written material from specific time periods would be a fascinating way to explore history, specially at schools.
- vagab0nd 2y agoIt's cool but is there any doubt that this will be very obsolete very soon? This is like how image recognition worked pre-CNN. (It looks like the project started in 2022. So maybe it wasn't obvious at the time)
- registeredcorn 2y agoI don't wish to speak out of turn, but it doesn't look like this project has been active for about 1 year. I checked GitHub and the last update was in Feb 2024. Their last post to X was 25 OCT 2023. :(