4 ms·
Tesseract isn't very accurate, especially with text in photos. It works OK for scanned documents, but that's about it.
by jonatron 6y ago
Tesseract isn't very accurate, especially with text in photos. It works OK for scanned documents, but that's about it.
- yorwba 6y agoI didn't see any accuracy comparison in the EasyOCR repo.
- albertzeyer 6y agoThis depends on the model you use, right? As far as I know, Tesseract supports a couple of models, and you could also use a more powerful neural network in there. And if you have trained it well, it should be fine.
- vmarius 6y agoAFAIK Tesseract is trained to recognize characters and uses a bunch of steps to prepare image for recognition. Steps like removing noise, fixing contrast and resizing. It means that it performs not-so-good when for example image contains black text and white text on green background since this is not "normalized" through image preparation steps and it cannot detect white text on green background (but you can do it yourself)
- rexreed 6y agoAre there any OCR benchmarks?
- sireat 6y agoTesseract 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 https://github.com/tesseract-ocr/tesseract/wiki The hard part was crowd sourcing those 20k lines :) Tesseract might not be best for photos as you said but I did not have major problems. Of course some documents the source is so bad that a human can't achieve 99%. Tesseract used to be quite average before they moved onto LTSM models a few years ago.
- dclusin 6y agoCare 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.
- sireat 6y agoI followed the resources here: https://github.com/tesseract-ocr/tessdoc/blob/master/TrainingTesseract-4.00.md https://github.com/tesseract-ocr/tessdoc/blob/master/Trainin... Also this: https://github.com/UB-Mannheim/tesseract/wiki https://github.com/UB-Mannheim/tesseract/wiki The original data was here: https://github.com/tesseract-ocr/langdata_lstm 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)