/HTR_ru

Handwritten Text Recognition model for russian 19th century text

Primary LanguagePython

HTR_ru

Handwritten Text Recognition model for russian 19th century text

Installation

  1. The zip-archive with the code is available with the link. Download it and unpack into your PATH.
  2. Open terminal and go to your PATH:
cd /PATH/HTR_ru
  1. Create python virtual environment and activate it:
python -m venv env
  • On Windows, run:
env\Scripts\activate.bat
  • On Unix or MacOS, run:
source env/bin/activate
  1. Install requirements and go to model directory:
pip install -r requirements.txt
cd ./model

How to use

Once you've done with all preparation, you can run the program typing in the command:

python htr.py --input INPUT_PATH --output OUTPUT_PATH

where INPUT_PATH - the path to the image which you want to translate and OUTPUT_PATH - the path with the *.txt file where you want to save the translation.

For example:

python htr.py --input ../demo/demo1.jpg --output ../translate.txt

Also, you have 3 demo pictures in PATH/HTR_ru/demo directory to test the program.

Finish

Once you've done with your work with the code, type

deactivate

to deactivate python virtual environment.