githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.98k stars 890 forks source link

editdistance #112

Closed zico-1 closed 3 years ago

zico-1 commented 3 years ago

Hi after downloading the zip model file. I moved it to the SRC file and ran the main file using pycharm. The issue i have is related to the editdistance module,

  1. Tried installing it using pycharm and pip install editdistance, it has refused to install so i came across another one which is edit_distance which i replaced in the code and ran it again. It did work but it does seem like it was not made use of of in the code because i can't find anywhere in the code it was used in the main file.
  2. I downloaded the line model but the result i got after running the code was that of the word model. what would i need to do. Thank you
githubharald commented 3 years ago

1: I think editdistance package gets shipped only as C++ code, so you need a C++ compiler installed. On Linux install g++, and on Windows I usually use Visual Studio. Then "pip install editdistance" should work.

But it is only needed for validation, so if you only want to infer, you can just ignore it and not install it.

2: if it's a single word, then both models should read the same. What's your input image?

zico-1 commented 3 years ago

Alright will try with visual studio. Input image is snapshot 13

githubharald commented 3 years ago

image != snapshot

jjsr commented 3 years ago

Adding to sir's comment , I have used pycharm to run this repository and have not faced any editdistance issue idea is you may use Anaconda at the background and try both " pip install editdistance " or " conda install -c conda -forge editdistance" , pycharm is highly compatible with Anaconda give it a try