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 while using sequence #7

Open
aymenmir94 opened this issue Dec 20, 2018 · 1 comment
Open

Error while using sequence #7

aymenmir94 opened this issue Dec 20, 2018 · 1 comment

Comments

@aymenmir94
Copy link

I am using a sequence of transforms - randomHSV, randomscale, randomsheer, randomrotate and at the end I get a strange error

I am not sure what the problem is
corners = np.hstack((corners, np.ones((corners.shape[0],1), dtype = type(corners[0][0])))) IndexError: index 0 is out of bounds for axis 0 with size 0

@vavassoriluca
Copy link

I think the error is due to the fact that previous transformations have produced an image that as no bounding boxes in it (the object is now out of the image or truncated at the point the bbox has been deleted). So the get_corners function returns an empty array and in the rotate_box function there is no check for an empty set of bboxes.

A solution I found avoiding to edit the code is to put RandomRotate as the first transformation in the sequence.

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