watsonyanghx / CNN_LSTM_CTC_Tensorflow

CNN+LSTM+CTC based OCR implemented using tensorflow.
MIT License
362 stars 210 forks source link

IndexError: list index out of range #10

Closed LevinJ closed 6 years ago

LevinJ commented 6 years ago

Hi, Thanks for sharing the great work!

I downloaded the data based on the suggestion of this link.

Then I tried running the training script, but encountered below error,

    train_feeder = utils.DataIterator(data_dir=train_dir)
  File "/home/levin/workspace/snrprj/CNN_LSTM_CTC_Tensorflow/utils.py", line 73, in __init__
    code = image_name.split('/')[-1].split('_')[1].split('.')[0]
IndexError: list index out of range

It looks to me that the script expects to get label for each image from its filename. So to get the code run properly and train the model, we will have to first rename the image files based on the labels.txt file, is this correct?

LevinJ commented 6 years ago

Okay, just found out there is already a helper.py file in the project source codes that can be used to rename the files and split the train/eval set.

BerthaHsu commented 6 years ago

I have downloaded this code recently , and i tried to run the training script . i met some problems about the running. eg.I had no the datasets and i did not understand the label. Thankyou for your issues ,i got it more after looking your analysis!

luoqingyu commented 6 years ago

Thank you.