- The zip-archive with the code is available with the link.
Download it and unpack into your
PATH
. - Open terminal and go to your
PATH
:
cd /PATH/HTR_ru
- 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
- Install requirements and go to
model
directory:
pip install -r requirements.txt
cd ./model
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.
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.
Once you've done with your work with the code, type
deactivate
to deactivate python virtual environment.