mathDR / reading-text-in-the-wild

A Keras/Theano implementation of "Reading Text in the Wild with Convolutional Neural Networks" by M Jaderberg et.al.
GNU General Public License v3.0
116 stars 30 forks source link

RuntimeError: 'list' must be None or a list, not <class 'str'> #19

Open guddulrk opened 7 years ago

guddulrk commented 7 years ago

Hi,

I am getting following error when running any file that uses from keras.models import model_from_json

RuntimeError: 'list' must be None or a list, not <class 'str'>

Any help please.

mathDR commented 7 years ago

Hey @guddulrk can you post a minimal example that replicates your error?

guddulrk commented 7 years ago

Thanks mathDR. I resolved the issue..

guddulrk commented 7 years ago

Hi mathDR, I want to train this model on my own dataset. Could you please tell me what is the purpose of 58805 after the name of the image in the annotations.txt file, such as? 1/1/1_pontifically_58805.jpg 58805

Thanks.

mathDR commented 7 years ago

@guddulrk That is the index to the training set corpus. So word[58805] = pontifically.

Also, if you get the training to work, I would love it if you could push a PR! (I never had the chance to implement full training). If this could happen, then we could eliminate both the matlab network AND the keras "hack" by training in keras fully from scratch.

Looking forward to it!

guddulrk commented 7 years ago

Thank you so much dear mathDR. I am getting following error when running train_charnet.py file.

Exception: The generator output must be a tuple. Found: <class 'NoneType'> at: model.fit_generator(datagen.flow(batch_size=batch_size), nb_epoch=nb_epoch, samples_per_epoch = 10000, verbose=1,callbacks=[early_stopping])