ayumiymk / aster.pytorch

ASTER in Pytorch
MIT License
670 stars 169 forks source link

How to print out predicted sequence in inference time? #19

Closed tumbleintoyourheart closed 5 years ago

tumbleintoyourheart commented 5 years ago

Dear @ayumiymk, Thank you for this repo, In inference time, the script prints out the accuracy, so I want it to print out also the actual predicted sequence. Is it stored in lib/evaluators.py pred_list variable?

ayumiymk commented 5 years ago

Yes, you are right!

tumbleintoyourheart commented 5 years ago

In main.py there is an evaluation right before the training loop: evaluator.evaluate(). So from your answer, the predicted sequence output at this step is supposed to be garbage, right? (In my case it outputs all random Latin characters in a Japanese/Chinese text recognition problem)

I have done some Japanese/Chinese ocr with CRNN+CTC and the outputs at the very first steps were all blank characters (which is reasonable when using CTC loss). When we are using the Attention decoder, is the above-mentioned phenomenon normal?

ayumiymk commented 5 years ago

For attention-based methods, it is normal to output random characters at the very first steps.

tumbleintoyourheart commented 5 years ago

I really appreciate the support. Thank you @ayumiymk.