Coder Social home page Coder Social logo

penguindevs / tesstrain-windows-gui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from buliasz/tesstrain-windows-gui

0.0 1.0 0.0 21.35 MB

Train Tesseract LSTM with GUI on Windows

License: Apache License 2.0

Python 66.36% AutoHotkey 22.55% Makefile 11.00% Batchfile 0.09%

tesstrain-windows-gui's Introduction

Tesseract train GUI for Windows

Tesseract language training Windows GUI v5.12 for Tesseract 4+. Both Windows executable and source AutoHotKey script files are provided.

Donate a cup of coffee

Buy Me A Coffee

Please don't forget this fork is for Windows GUI implementation developed by only one developer (so far). The Tesseract and Tesstrain projects for which this GUI is created are much larger open source projects.

Install

The GUI executable is portable. You can copy the tesstrain_gui.exe file to any directory and execute it.

Requirements

You will need version 4 or newer of Tesseract executables (that include the training tools and matching leptonica bindings).

You can download executables built from the latest code version using the zdenop's AppVeyor.

You will also need a copy of 'traineddata' which you can find for example on the official Tesseract website. Make sure you will download the model marked as 'best' if you want to use it as a 'Start model' for your new model (the 'fast' one cannot be used as a 'Start model').

If you prefer, you can also build and install binaries on your own. More information can be found in the Tesseract User Manual.

Python

You need a recent version of Python 3.x. For image processing the Python library Pillow is used. If you don't have a global installation, the GUI will try to install Pillow and other required Python modules on the first run. 'python' or 'python3' command must be working from the project's directory (Python's executable folder should be in your PATH environment variable).

Language data

Tesseract expects some configuration data (a file radical-stroke.txt). It will be downloaded automatically by the GUI when needed from this address and placed in the configurable "Output data directory".

Choose model name

Tesstrain GUI will ask you for a name for your model. By convention, Tesseract stack models including language-specific resources use (lowercase) three-letter codes defined in ISO 639 with additional information separated by underscore. E.g., chi_tra_vert for traditional Chinese with vertical typesetting. Language-independent (i.e. script-specific) models use the capitalized name of the script type as identifier. E.g., Hangul_vert for Hangul script with vertical typesetting. In the following, the model name is referenced by MODEL_NAME.

Provide ground truth

Place ground truth consisting of line images and transcriptions in a folder of your choice (default: data/MODEL_NAME-ground-truth). GUI will generate list of those files, and split into training and evaluation data, the ratio can be defined in the GUI.

Images must be in .tif, .png, .bin.png, .nrm.png or .bmp format.

Transcriptions must be single-line plain text and have the same name as the line image but with the image extension replaced by .gt.txt. If any supported image file won't have corresponding .gt.txt file, you will be asked for content on the start of training, and it will be saved in a proper file.

The repository contains a folder with sample ground truth, see ocrd-testset.

NOTE: If you want to generate line images for transcription from a full page, see tips in issue 7 and in particular @Shreeshrii's shell script.

Train

Execute the tesstrain_gui.exe and follow the displayed instructions.

License

Software is provided under the terms of the Apache 2.0 license.

Sample training data provided by Deutsches Textarchiv is in the public domain.

tesstrain-windows-gui's People

Contributors

stweil avatar kba avatar buliasz avatar shreeshrii avatar wrznr avatar zdenop avatar m3ssman avatar bertsky avatar blu3train avatar zhuangzhuang avatar songzy12 avatar bharatr21 avatar mikylucky avatar nagadomi avatar abhishekthanki avatar akash-akya avatar armyke avatar arlaf avatar jertlok avatar zuphilip avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.