imatge-upc / detection-2016-nipsws

Hierarchical Object Detection with Deep Reinforcement Learning
http://imatge-upc.github.io/detection-2016-nipsws/
MIT License
423 stars 129 forks source link

error in generate_bounding_box_from_annotation #25

Open priyashkla opened 6 years ago

priyashkla commented 6 years ago

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 commented 5 years ago

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