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

error in generate_bounding_box_from_annotation #25

Open
priyashkla opened this issue Aug 23, 2018 · 1 comment
Open

error in generate_bounding_box_from_annotation #25

priyashkla opened this issue Aug 23, 2018 · 1 comment

Comments

@priyashkla
Copy link

File "/home/priya/Downloads/detection-2016-nipsws-master/scripts/parse_xml_annotations.py", line 56, in generate_bounding_box_from_annotation
masks[annotation[i, 3]:annotation[i, 4], annotation[i, 1]:annotation[i, 2], i] = 1

TypeError: slice indices must be integers or None or have an index method

@Kage18
Copy link

Kage18 commented Jun 10, 2019

typecast annotations to int
masks[int(annotation[i, 3]):int(annotation[i, 4]), int(annotation[i, 1]):int(annotation[i, 2]), i] = 1
it worked for me

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

2 participants