Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper.py error #19

Open
prolaser opened this issue May 29, 2018 · 3 comments
Open

Helper.py error #19

prolaser opened this issue May 29, 2018 · 3 comments

Comments

@prolaser
Copy link

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
Copy link

jsn5 commented Jun 4, 2018

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
Copy link
Author

prolaser commented Jun 4, 2018

Thanks for the reply @jsn5 .

@Chester-CS
Copy link

Thank you! @jsn5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants