Live data from Hacker News

EasyOCR: Ready-to-use OCR with 40 languages

github.com

31–40 of 73 posts

Re: EasyOCR: Ready-to-use OCR with 40 languages

#31
post #28
post #18

Earlier quoted context omitted.

Tesseract can be very accurate (>99%), especially when you train it for your particular data set. This does involve creating your own labeled data. I got this 99% accuracy by performing incremental training using latest Manheim model as a base. I added about 20k lines which is not really that much. https://github.com/tesseract-ocr/tesseract/wiki The hard part was crowd sourcing those 20k lines :) Tesseract might not…

Care to share resources/lessons learned for training tesseract with custom data? I'm using it for a side project and would love to hear about your insights.

I followed the resources here: https://github.com/tesseract-ocr/tessdoc/blob/master/Trainin...

Also this: https://github.com/UB-Mannheim/tesseract/wiki

The original data was here: https://github.com/tesseract-ocr/langdata_lstm

I did use another data source from Manheim but can't locate it right now.

Using vanilla Ubuntu 18.04

I looked at the example training files and made a small script to convert my own labeled data to fit the format that tesseract requires.

I did do a bit of pre-processing adjusting contrast.

All the data munging was done on Python (Pillow for image processing, Flask for collecting data into a simple SQLite DB before converting back to format that Tesseract requires).

Python was not necessary just something that felt most comfortable to me. I am sure someone could do it using bash scripts or node.js or anything else.

EDIT: To make life easier for my curators I did run Tesseract first to generate prelabeled data for my training set. It was about 90% accurate to start with.

So the process was: Tesseract OCR on some documents to be trained -> hand curation (2 months)-> train (took about 12 hours) -> 99% (on completely separate test set)

Re: EasyOCR: Ready-to-use OCR with 40 languages

#32

Earlier quoted context omitted.

> 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 (Tesserac…

I've been wondering this ever since I used Lens. My hobby applications doing OCR always fall way short of Len's magic.

Yeah! 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 :(

Re: EasyOCR: Ready-to-use OCR with 40 languages

#33
post #24
post #22

Earlier quoted context omitted.

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 no…

From 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.

I'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.

Re: EasyOCR: Ready-to-use OCR with 40 languages

#34

Earlier quoted context omitted.

I've been wondering this ever since I used Lens. My hobby applications doing OCR always fall way short of Len's magic.

Yeah! 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 :(

I’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.

Re: EasyOCR: Ready-to-use OCR with 40 languages

#36
post #22
post #13

From what I can tell (without having read the research papers) it looks like this is just an easy to use package for sparse scene text extraction. It seems to do okay if the scene has sparse text but it falls down for dense text detection. The results are going to be pretty bad if you try and do a task like "extract transactions from a picture of a receipt." Here's an example of input you might get for a production a…

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 no…

Why 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

Re: EasyOCR: Ready-to-use OCR with 40 languages

#37
post #3

Looking at the Chinese example, it’s kinda funny it managed to output Traditional Chinese characters when the image contains Simplified Chinese; the SC and TC versions look pretty different (园 vs 園, 东 vs 東).

They're rendering Unicode without any markup for language variant.

Re: EasyOCR: Ready-to-use OCR with 40 languages

#38
What are people using in mobile development (native iOS/native Android/Cross-platform e.g. React-Native) when you want accurate extraction from a fixed format-source?

E.g. poor-quality images of ID cards or credit cards, where the position of data is known.

Re: EasyOCR: Ready-to-use OCR with 40 languages

#39
post #38

What are people using in mobile development (native iOS/native Android/Cross-platform e.g. React-Native) when you want accurate extraction from a fixed format-source? E.g. poor-quality images of ID cards or credit cards, where the position of data is known.

OpenCV is excellent for this.

Re: EasyOCR: Ready-to-use OCR with 40 languages

#40
post #38

What are people using in mobile development (native iOS/native Android/Cross-platform e.g. React-Native) when you want accurate extraction from a fixed format-source? E.g. poor-quality images of ID cards or credit cards, where the position of data is known.

not on mobile but as a service -- Abbyy is the market leader in OCR from documents.
Post reply on HN