weinman / cnn_lstm_ctc_ocr

Tensorflow-based CNN+LSTM trained with CTC-loss for OCR
GNU General Public License v3.0
498 stars 170 forks source link

Is there a script to test the model with one image? #12

Closed zhLawliet closed 6 years ago

zhLawliet commented 6 years ago

now, I have trained a model with dataset, how can I test the model with one image, which will output the result?

anushaGundapaneni commented 6 years ago

@zhLawliet Do you have a script to test the model with one image ?

zhLawliet commented 6 years ago

no,i just output the all results one by one.

anushaGundapaneni commented 6 years ago

results one by one means ?

i just want to load a text image as input and that model should print the text present in the image.

have you checked with one image and is it printing the output ?

zhLawliet commented 6 years ago

I am sorry,i also want to get the script.

weinman commented 6 years ago

@zhLawliet and @anushaGundapaneni, I also found such a script to be useful, so I pieced one together (much model loading is repeated from test.py, but the core loop and ops are sufficiently different). It's validate.py in the latest push (https://github.com/weinman/cnn_lstm_ctc_ocr/commit/cf64a7fba57479f001865193cc980577dc7e6d1c).

Let me know if you find this to work ok, and I will close this issue.

zhLawliet commented 6 years ago

that's ok, thanks very much