solivr / tf-crnn

TensorFlow convolutional recurrent neural network (CRNN) for text recognition
GNU General Public License v3.0
292 stars 98 forks source link

Error in generating sequential MNIST digits #22

Closed J-Escher closed 6 years ago

J-Escher commented 6 years ago

I noticed an error in generation of MNIST digit sequences - if the first element of the label sequence is a zero, then the label does not take this into account, but the zero is included in the digit string.

e.g. if the label sequence is 02139, the digits '02139' will be saved as a image sequence but the label will be 2139, this also works for multiple zeros, e.g. 002139 is labelled as 2139 as well.

I couldn't find a way to fix this so I just checked if the first element of the label sequence was a zero. If so, continue on in the for loop.

solivr commented 6 years ago

Do you experience this error with the file numbers_mnist_generator.py? I couldn't reproduce the error... Could you give an example of code ? If you're experiencing this when calling data_handler.py (which would then probably be caused by this line), I need to check it.

J-Escher commented 6 years ago

I can't reproduce it in a new aws instance, although iI upgraded scipy.misc.imsave to imageio.imwrite, so I'll close this for now...