Skip to content

A script to partially automate the training of new fonts/languages with Tesseract 3.02

License

Notifications You must be signed in to change notification settings

jfyu/python-tesseract-3.02-training

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

python-tesseract-3.02-training

A script to partially automate the training of new fonts/languages with Tesseract 3.02 - part of the Open ICR Project: https://opensource.newmediaist.com/open-source-icr.html

The Tesseract OCR Engine is a powerful open source text recognition engine, designed specifically for machine-printed text (fonts). Tesseract can be trained to both improve recognition accuracy, as well as teach it new languages. Training Tesseract is just another way of saying adding new fonts to tesseract. Training Tesseract 3.02 can be difficult for the novice though, as the official instructions are long and complex. We built a simple Python script to somewhat automate the Tesseract 3.02 language file build process.

How to use

Usage of this script assumes Python and Tesseract are both installed correctly on computer, and also that you have already generated your training text and box files. If you have not generated your training text yet, here is one of the simplest methods to do so:

  1. Collect image of text in TIF format - scan a sample document printed in the desired font, or create a new sample document
  2. Upload TIF to this online box editor, and correct any errors in character detection. Select the box file information from the right side of the tool, copy it to your clipboard, and paste it into a new blank text file. Save the textfile with the same name as the document image, but with a .box extension - for example, "scanned-image.box".
Save your training image and box file into the same directory as the training script, then running the following command:

python traininscript.py language fontname

Code licensed under Apache License v2.0

About

A script to partially automate the training of new fonts/languages with Tesseract 3.02

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%