CNN_LSTM_CTC_Tensorflow icon indicating copy to clipboard operation
CNN_LSTM_CTC_Tensorflow copied to clipboard

Helper.py error

Open prolaser opened this issue 7 years ago • 3 comments

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'

prolaser avatar May 29 '18 09:05 prolaser

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.

jsn5 avatar Jun 04 '18 06:06 jsn5

Thanks for the reply @jsn5 .

prolaser avatar Jun 04 '18 08:06 prolaser

Thank you! @jsn5

Chester-CS avatar Jul 13 '19 10:07 Chester-CS