watsonyanghx / CNN_LSTM_CTC_Tensorflow

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

Helper.py error #19

Open prolaser opened 6 years ago

prolaser commented 6 years ago

Hey guys

Recently i have been trying to work with this network but when i want to prepare the data using helper.py i encounter some errors. I have not done any modifications on this file except the images and label paths, and that's all. Here is the error i get after running the script. I would appreciate if anyone could help me with this: Traceback (most recent call last): File "helper.py", line 116, in image_path_list = load_img_path(images_path) File "helper.py", line 68, in load_img_path tmp.sort(key=lambda x: int(x.split('.')[0])) File "helper.py", line 68, in tmp.sort(key=lambda x: int(x.split('.')[0])) ValueError: invalid literal for int() with base 10: 'labels'

jsn5 commented 6 years ago

I had the same error. It's because you have labels.txt in the same folder as the images. so it is splitting the filename 'labels.txt' with a '.' and trying to evaluate int('label'). Keep labels.txt in a different folder and change label_path in helper.py accordingly.

prolaser commented 6 years ago

Thanks for the reply @jsn5 .

Chester-CS commented 5 years ago

Thank you! @jsn5