tesseract-ocr / tesstrain

Train Tesseract LSTM with make
Apache License 2.0
637 stars 188 forks source link

Make training model failed with illegal line count -- 0 #45

Closed andymishra closed 5 years ago

andymishra commented 5 years ago

Hi!

I am trying to create a model with the data set given in the repo. I tried below command.

make training MODEL_NAME=name-of-the-resulting-mode Dependencies are already installed in my mac with help of homebrew, I am getting the following errors.

Unfortunately, when I try this command I get the following errors:

find data/ground-truth -name '*.box' -exec cat {} \; > "data/all-boxes"
unicharset_extractor --output_unicharset "data/unicharset" --norm_mode 1 "data/all-boxes"
Failed to read data from: data/all-boxes
Wrote unicharset file data/unicharset
find data/ground-truth -name '*.lstmf' -exec echo {} \; | sort -R -o "data/all-lstmf"
total=`cat data/all-lstmf | wc -l` \
       no=`echo "$total * 0.90 / 1" | bc`; \
       head -n "$no" data/all-lstmf > "data/list.train"
head: illegal line count -- 0
make: *** [data/list.train] Error 1

Thanks

andymishra commented 5 years ago

HI,

Thanks for such wonderful lib. I managed to generate the .traindata file.

Thanks