emedvedev / attention-ocr

A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
MIT License
1.08k stars 256 forks source link

Missing test on over 500 images, help! #121

Closed kulkarnivishal closed 5 years ago

kulkarnivishal commented 6 years ago

Hi @emedvedev

I have 2534 images in total for testing, and while inspecting the generated tfrecords I could see 2534 images as well image

But when I test these images the, code logs only 1980 steps. I checked whether any images are being skipped in data_gen.py but that is not that case either. Could you help, where might the issue be? image

Looking forward to your reply.

Best, Vishal

docastage commented 6 years ago

The default max-width is 160. You might have to include max-width and max-height parameters in order to include all the images. I faced the same issue and adding these two parameters solved it.

emedvedev commented 6 years ago

They could be dropped for max-width or max-height as @docastage has pointed out, or for corrupted images. I would actually appreciate a PR with extra logging for dropped images. :)

kulkarnivishal commented 5 years ago

Thank you, I figured it out. Well, ideally shouldn't the image be resized to max-height * max-width as a pre-processing step? I have noticed that there's no proper logging in data_gen.py as well.