You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I actually created an OCR model for detecting Grantha scripts rendered in Noto Sans Grantha. This model can predict printed characters in multiple lines.
While I was doing the same for handwritten form of the same script. Initially I thought that training can be done for single line images, but I could train up to 4-line images without any segmentation fault. I actually synthesized those images by creating a blank and pasting each corresponding image saved locally line by line based on the text script created.
But after four lines, I created 5-line images which didn't work as well.
With paddings (only between each line):
I did the same with paddings to increase the space between characters in adjacent lines. Instead, it produced this error:
TESSDATA_PREFIX=../tesseract/tessdata make training MODEL_NAME=fourline START_MODEL=tam PSM=6 RANDOM_SEED=1234 TESSDATA=../tesseract/tessdata
You are using make version: 4.3
unicharset_extractor --output_unicharset "data/fourline/my.unicharset" --norm_mode 2 "data/fourline/all-gt"
Extracting unicharset from plain text file data/fourline/all-gt
Wrote unicharset file data/fourline/my.unicharset
merge_unicharsets data/tam/fourline.lstm-unicharset data/fourline/my.unicharset "data/fourline/unicharset"
Loaded unicharset of size 99 from file data/tam/fourline.lstm-unicharset
Loaded unicharset of size 37 from file data/fourline/my.unicharset
Wrote unicharset file data/fourline/unicharset.
tesseract "data/fourline-ground-truth/fourline_4.tif" data/fourline-ground-truth/fourline_4 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_3.tif" data/fourline-ground-truth/fourline_3 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_2.tif" data/fourline-ground-truth/fourline_2 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_1.tif" data/fourline-ground-truth/fourline_1 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_0.tif" data/fourline-ground-truth/fourline_0 --psm 6 lstm.train
python3 shuffle.py 1234 "data/fourline/all-lstmf"
python3 generate_eval_train.py data/fourline/all-lstmf 0.90
combine_lang_model
--input_unicharset data/fourline/unicharset
--script_dir data/langdata
--numbers data/fourline/fourline.numbers
--puncs data/fourline/fourline.punc
--words data/fourline/fourline.wordlist
--output_dir data
--lang fourline
Failed to read data from: data/fourline/fourline.wordlist
Failed to read data from: data/fourline/fourline.punc
Failed to read data from: data/fourline/fourline.numbers
Loaded unicharset of size 133 from file data/fourline/unicharset
Setting unichar properties
Setting script properties
Failed to load script unicharset from:data/langdata/Grantha.unicharset
Warning: properties incomplete for index 11 = ்
Warning: properties incomplete for index 16 = ்
Warning: properties incomplete for index 93 = ₹
Warning: properties incomplete for index 99 = 𑌳
Warning: properties incomplete for index 100 = 𑌝
Warning: properties incomplete for index 101 = 𑌶
Warning: properties incomplete for index 102 = 𑌥
Warning: properties incomplete for index 103 = 𑌖
Warning: properties incomplete for index 104 = 𑌤
Warning: properties incomplete for index 105 = 𑌙
Warning: properties incomplete for index 106 = 𑌮
Warning: properties incomplete for index 107 = 𑌯
Warning: properties incomplete for index 108 = 𑌰
Warning: properties incomplete for index 109 = 𑌪
Warning: properties incomplete for index 110 = 𑌸
Warning: properties incomplete for index 111 = 𑌵
Warning: properties incomplete for index 112 = 𑌜
Warning: properties incomplete for index 113 = 𑌘
Warning: properties incomplete for index 114 = 𑌛
Warning: properties incomplete for index 115 = 𑌣
Warning: properties incomplete for index 116 = 𑌡
Warning: properties incomplete for index 117 = 𑌬
Warning: properties incomplete for index 118 = 𑌗
Warning: properties incomplete for index 119 = 𑌦
Warning: properties incomplete for index 120 = 𑌢
Warning: properties incomplete for index 121 = 𑌲
Warning: properties incomplete for index 122 = 𑌞
Warning: properties incomplete for index 123 = 𑌠
Warning: properties incomplete for index 124 = 𑌭
Warning: properties incomplete for index 125 = 𑌷
Warning: properties incomplete for index 126 = 𑌟
Warning: properties incomplete for index 127 = 𑌚
Warning: properties incomplete for index 128 = 𑌕
Warning: properties incomplete for index 129 = 𑌹
Warning: properties incomplete for index 130 = 𑌨
Warning: properties incomplete for index 131 = 𑌫
Warning: properties incomplete for index 132 = 𑌧
Config file is optional, continuing...
Failed to read data from: data/langdata/fourline/fourline.config
Null char=2
Created data/fourline/fourline.traineddata
lstmtraining
--debug_interval 0
--traineddata data/fourline/fourline.traineddata
--old_traineddata ../tesseract/tessdata/tam.traineddata
--continue_from data/tam/fourline.lstm
--learning_rate 0.0001
--model_output data/fourline/checkpoints/fourline
--train_listfile data/fourline/list.train
--eval_listfile data/fourline/list.eval
--max_iterations 10000
--target_error_rate 0.01
2>&1 | tee -a data/fourline/training.log
Loaded file data/tam/fourline.lstm, unpacking...
Warning: LSTMTrainer deserialized an LSTMRecognizer!
Code range changed from 99 to 132!
Num (Extended) outputs,weights in Series:
1,36,0,1:1, 0
Num (Extended) outputs,weights in Series:
C3,3:9, 0
Ft16:16, 160
Total weights = 160
[C3,3Ft16]:16, 160
Mp3,3:16, 0
TxyLfys48:48, 12480
Lfx96:96, 55680
RxLrx96:96, 74112
Lfx192:192, 221952
Fc132:132, 25476
Total weights = 389860
Previous null char=2 mapped to 131
Continuing from data/tam/fourline.lstm
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_2.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_2.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_2.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
.........
Two questions.
If Tesseract couldn't perform OCR on multi line handwritten images, how did it succeed in 4 lines?
Even if the handwritten characters are arranged exactly in the same form as printed images, why did't it work.
I would really appreciate your help.
I could provide you further details if needed.
The text was updated successfully, but these errors were encountered:
I actually created an OCR model for detecting Grantha scripts rendered in Noto Sans Grantha. This model can predict printed characters in multiple lines.
While I was doing the same for handwritten form of the same script. Initially I thought that training can be done for single line images, but I could train up to 4-line images without any segmentation fault. I actually synthesized those images by creating a blank and pasting each corresponding image saved locally line by line based on the text script created.
But after four lines, I created 5-line images which didn't work as well.
With paddings (only between each line):
I did the same with paddings to increase the space between characters in adjacent lines. Instead, it produced this error:
TESSDATA_PREFIX=../tesseract/tessdata make training MODEL_NAME=fourline START_MODEL=tam PSM=6 RANDOM_SEED=1234 TESSDATA=../tesseract/tessdata
You are using make version: 4.3
unicharset_extractor --output_unicharset "data/fourline/my.unicharset" --norm_mode 2 "data/fourline/all-gt"
Extracting unicharset from plain text file data/fourline/all-gt
Wrote unicharset file data/fourline/my.unicharset
merge_unicharsets data/tam/fourline.lstm-unicharset data/fourline/my.unicharset "data/fourline/unicharset"
Loaded unicharset of size 99 from file data/tam/fourline.lstm-unicharset
Loaded unicharset of size 37 from file data/fourline/my.unicharset
Wrote unicharset file data/fourline/unicharset.
tesseract "data/fourline-ground-truth/fourline_4.tif" data/fourline-ground-truth/fourline_4 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_3.tif" data/fourline-ground-truth/fourline_3 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_2.tif" data/fourline-ground-truth/fourline_2 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_1.tif" data/fourline-ground-truth/fourline_1 --psm 6 lstm.train
tesseract "data/fourline-ground-truth/fourline_0.tif" data/fourline-ground-truth/fourline_0 --psm 6 lstm.train
python3 shuffle.py 1234 "data/fourline/all-lstmf"
python3 generate_eval_train.py data/fourline/all-lstmf 0.90
combine_lang_model
--input_unicharset data/fourline/unicharset
--script_dir data/langdata
--numbers data/fourline/fourline.numbers
--puncs data/fourline/fourline.punc
--words data/fourline/fourline.wordlist
--output_dir data
--lang fourline
Failed to read data from: data/fourline/fourline.wordlist
Failed to read data from: data/fourline/fourline.punc
Failed to read data from: data/fourline/fourline.numbers
Loaded unicharset of size 133 from file data/fourline/unicharset
Setting unichar properties
Setting script properties
Failed to load script unicharset from:data/langdata/Grantha.unicharset
Warning: properties incomplete for index 11 = ்
Warning: properties incomplete for index 16 = ்
Warning: properties incomplete for index 93 = ₹
Warning: properties incomplete for index 99 = 𑌳
Warning: properties incomplete for index 100 = 𑌝
Warning: properties incomplete for index 101 = 𑌶
Warning: properties incomplete for index 102 = 𑌥
Warning: properties incomplete for index 103 = 𑌖
Warning: properties incomplete for index 104 = 𑌤
Warning: properties incomplete for index 105 = 𑌙
Warning: properties incomplete for index 106 = 𑌮
Warning: properties incomplete for index 107 = 𑌯
Warning: properties incomplete for index 108 = 𑌰
Warning: properties incomplete for index 109 = 𑌪
Warning: properties incomplete for index 110 = 𑌸
Warning: properties incomplete for index 111 = 𑌵
Warning: properties incomplete for index 112 = 𑌜
Warning: properties incomplete for index 113 = 𑌘
Warning: properties incomplete for index 114 = 𑌛
Warning: properties incomplete for index 115 = 𑌣
Warning: properties incomplete for index 116 = 𑌡
Warning: properties incomplete for index 117 = 𑌬
Warning: properties incomplete for index 118 = 𑌗
Warning: properties incomplete for index 119 = 𑌦
Warning: properties incomplete for index 120 = 𑌢
Warning: properties incomplete for index 121 = 𑌲
Warning: properties incomplete for index 122 = 𑌞
Warning: properties incomplete for index 123 = 𑌠
Warning: properties incomplete for index 124 = 𑌭
Warning: properties incomplete for index 125 = 𑌷
Warning: properties incomplete for index 126 = 𑌟
Warning: properties incomplete for index 127 = 𑌚
Warning: properties incomplete for index 128 = 𑌕
Warning: properties incomplete for index 129 = 𑌹
Warning: properties incomplete for index 130 = 𑌨
Warning: properties incomplete for index 131 = 𑌫
Warning: properties incomplete for index 132 = 𑌧
Config file is optional, continuing...
Failed to read data from: data/langdata/fourline/fourline.config
Null char=2
Created data/fourline/fourline.traineddata
lstmtraining
--debug_interval 0
--traineddata data/fourline/fourline.traineddata
--old_traineddata ../tesseract/tessdata/tam.traineddata
--continue_from data/tam/fourline.lstm
--learning_rate 0.0001
--model_output data/fourline/checkpoints/fourline
--train_listfile data/fourline/list.train
--eval_listfile data/fourline/list.eval
--max_iterations 10000
--target_error_rate 0.01
2>&1 | tee -a data/fourline/training.log
Loaded file data/tam/fourline.lstm, unpacking...
Warning: LSTMTrainer deserialized an LSTMRecognizer!
Code range changed from 99 to 132!
Num (Extended) outputs,weights in Series:
1,36,0,1:1, 0
Num (Extended) outputs,weights in Series:
C3,3:9, 0
Ft16:16, 160
Total weights = 160
[C3,3Ft16]:16, 160
Mp3,3:16, 0
TxyLfys48:48, 12480
Lfx96:96, 55680
RxLrx96:96, 74112
Lfx192:192, 221952
Fc132:132, 25476
Total weights = 389860
Previous null char=2 mapped to 131
Continuing from data/tam/fourline.lstm
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_2.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_2.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_2.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_0.lstmf!
Compute CTC targets failed for data/fourline-ground-truth/fourline_3.lstmf!
.........
Two questions.
I would really appreciate your help.
I could provide you further details if needed.
The text was updated successfully, but these errors were encountered: