Belval / CRNN

A TensorFlow implementation of https://github.com/bgshih/crnn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

continuous repetition letters of the OCR

wqt2019 opened this issue · comments

hi Belval , when i retrain the crnn code ,i found that if there were continuous repetition letters of the OCR, the result offer missed the repetition letters and outputed the single letter . Such as the Ground truth of the OCR is '0870011' , '37075337' , and the Prediction is '08701' , '3707537' . If there were no continuous repetition letters ,the result was correct . My training data only include digital provide by your project https://github.com/Belval/TextRecognitionDataGenerator .
Is it the problem of the CTC ? How can i to solve this problem?
ths!

This is a known tradeoff with CTC. Usually researchers will use a lexicon to overcome this but it doesn't apply in your case.

In the meantime, you can use merge_repeated=False as an additional parameter in the ctc_beam_search_decoder op to prevent merging. Do note that this will probably duplicate some letters.

https://www.tensorflow.org/api_docs/python/tf/nn/ctc_beam_search_decoder

ths . solved