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

Index error with 'get_bbox()' #1

Closed
GeorgeSeif opened this issue Apr 9, 2018 · 2 comments
Closed

Index error with 'get_bbox()' #1

GeorgeSeif opened this issue Apr 9, 2018 · 2 comments

Comments

@GeorgeSeif
Copy link

Hi there,

First off awesome repo and paper!

I was trying to run the demo code and kept getting the following error:

Traceback (most recent call last):
  File "demo.py", line 42, in <module>
    bbox = helpers.get_bbox(image, points=extreme_points_ori, pad=pad, zero_pad=True)
  File "/home/george/Documents/DEXTR-KerasTensorflow/helpers/helpers.py", line 160, in get_bbox
    if inds[0].shape[0] == 0:
IndexError: index 0 is out of bounds for axis 0 with size 0

This happened with both of the example images (dog-cat.jpg and bear.jpg). I tried clicking the points in different orders to see if that was the problem but no luck. Any ideas?

Also, I believe the from networks import resnet line in classifiers.py should be changed to import resnet since those two files are in the same folder. I had to change that to run the demo code.

Cheers and thanks very much!

@scaelles
Copy link
Owner

scaelles commented Apr 9, 2018

Hello,
Thanks for your comments!
Another user reported us a similar error and in his case the problem was that he was using Python 2.7 instead of Python 3.6 (which is the one that we use). Could you check the Python version that you are using?
Cheers

@GeorgeSeif
Copy link
Author

Ah yes, it works great with Python 3.6! I don't get the error with imports anymore and the segmentation runs cleanly.

Thanks @scaelles !

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