95 ms·
I'm just happy to see some advancement in open source OCR for Python. Last time I had a Python project that needed OCR, I found that the open-source options wer
by D13Fd 6y ago
I'm just happy to see some advancement in open source OCR for Python. Last time I had a Python project that needed OCR, I found that the open-source options were surprisingly limited, and it required some effort to achieve consistently good results even with relatively clean inputs.
Honestly I was kind of surprised that good basic OCR isn't a totally solved issue with an ecosystem of fully open-source solutions by now.
- dclusin 6y agoFrom my experience the algorithms & implementations seem to be pretty good but the caveat is that you the developer need to be aware of all the different approaches and when it is appropriate to apply them. There just doesn't seem to be a good general purpose library that stitches them all together and knows when to use which approach based analyzing the image.
- catalogia 6y agoI've found that often for tools related to natural language (ORC, text-to-speech, and speech-to-text) it feels like you need a PhD in the subject just to figure out how to anything done at all. I heartily welcome efforts to package these sort of things up in ready-to-use ways.
- dclusin 6y agoThis is good news if you have one of these PhD's. Your career probably isn't going anywhere any time soon :)
- vortex_ape 6y ago> Honestly I was kind of surprised that good basic OCR isn't a totally solved issue with an ecosystem of fully open-source solutions by now. Yes! Can anyone comment on why this is the case, since OCR is proclaimed to be a solved problem? I've always wondered why Google Lens works "out of the box" and shows great accuracy on extracting text from images taken using a phone camera, but open-source OCR software (Tesseract, Ocropy etc.) needs a lot of tweaking to extract text from standard documents with standard fonts, even after heavily pre-processing the images. PS: Has Google released any paper on Google Lens?
- craftinator 6y agoI've been wondering this ever since I used Lens. My hobby applications doing OCR always fall way short of Len's magic.
- vortex_ape 6y agoYeah! And Lens is not the only closed-source OCR solution that works. I've gotten great accuracy using ABBYY and docparser.com in the past. But one needs to pay per page after the free trial ends :(
- claudeganon 6y agoI’ve found that none of the open source stuff works well for Japanese language documents. Most of the time, I’ve just ran them through Adobe Acrobat’s OCR and dumped the results into a text file. There are still mistakes, but it at least returns a passable result compared to others.
- shiredude95 6y agoI was building an image search engine[0] a while back and faced the same issues you mentioned with OCR. What i realized is tesseract[1](one of the more popular ocr framework) works so long as you are able to provide it data similar to the one it was trained on. We were basically trying to transcribe message screenshots which should have been relatively straightforward given the homogeneity of the font. But this was not the case as tesseract was not trained in the layout of msg screenshots. The accuracy of raw tesseract on our test dataset was somehwere about 0.5-0.6 BLEU. Once we were able to isolate individual parts of the image and feed it to tesseract, we were able to get around 0.9 BLEU on the same dataset. TLDR;Some nifty image processing is required to make tesseract perform as expected. [0] (https://www.askgoose.com https://www.askgoose.com) [1] (https://github.com/tesseract-ocr/tesseract https://github.com/tesseract-ocr/tesseract)
- driverdan 6y agoWhy does it have to be Python based? You can call out to other processes or services. Tesseract[1], for example, is pretty easy to work with. 1: https://github.com/tesseract-ocr/tesseract https://github.com/tesseract-ocr/tesseract
- D13Fd 6y agoIt doesn't need to be Python. Tesseract is what I ended up using, IIRC. But I was looking for a turnkey package that would work from beginning to end. I wasn't doing anything unusual, and my app wasn't OCR-focused. I just wanted easy drop-in OCR for documents. Tesseract is more like getting a pretty good motor for free (recognizing text), but it's up to you to build the rest of the car around it (preprocessing images, handling errors, dealing with the output, potentially training it to your task, and various other issues).
- ramraj07 6y agoWow you weren't kidding. Went through the docs and the number of preprocess steps they demand is outrageous. Is there seriously no solution taking care of the preprocess steps??
- WalterBright 6y ago> isn't a totally solved issue I'm surprised, too. After all, if you can train an AI to recognize a cat, why can't it be trained to recognize a letter? Mine, for example, works well on clean laser-printed text. It fails on anything written with a typewriter, though. (My definition of "failure" is it's quicker to retype it from scratch than fix the OCR's errors.) I'd also love to have one that worked on cursive handwriting.
- deleted 6y ago[deleted]