Bartzi / see

Code for the AAAI 2018 publication "SEE: Towards Semi-Supervised End-to-End Scene Text Recognition"
GNU General Public License v3.0
573 stars 147 forks source link

Ho do I make inference for textrec after training? #19

Open stasbel opened 6 years ago

stasbel commented 6 years ago

@Bartzi So I made my own dataset, do the training and then trying to make an inference for new image. How do I do that? It turns out that my log file lack of certain attributes if I trying to use text_recognition_demo.py:

Traceback (most recent call last): File "see/chainer/text_recognition_demo.py", line 150, in target_shape = Size._make(log_data['target_size']) KeyError: 'target_size'

Bartzi commented 6 years ago

That's odd... the log file should be created after the first 100 iterations and contain the necessary data. Is your dataset large enough for the training to still be in epoch 0 at iteration 100? This could be the reason why this information is not logged.

stasbel commented 6 years ago

Hi, thx you for the response! I use exact same data set you provided at https://bartzi.de/research/see. Training stage goes fine and creates train log afterwards at specified dir, but, unlike log at provided dataset, it lacks certain attributes and I don't know why.

Bartzi commented 6 years ago

Hmm, I did not provide a dataset for text recognition, as there is not enough space to host that data there. which dataset are you using? And did you check that you are still in epoch 0 after 100 iterations?

stasbel commented 6 years ago

I talk about text_recognition_model.zip at https://bartzi.de/research/see. No, after 100 iterations I already got 10 epochs, that's may be the problem. Gonna retrain it soon.

Bartzi commented 6 years ago

Ok, you can change this line to: if stats_cpu['iteration'] == args.log_interval: and it should work.

FelixSchwarz commented 6 years ago

That helped me too - would you mind updating the repo or should I create a pull request?

Bartzi commented 6 years ago

I'd be happy merging your PR =)