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

numpy.random.randint gets [0,0) range in training #4

Closed
Parskatt opened this issue Sep 13, 2022 · 2 comments
Closed

numpy.random.randint gets [0,0) range in training #4

Parskatt opened this issue Sep 13, 2022 · 2 comments

Comments

@Parskatt
Copy link

y0 = np.random.randint(0, img1.shape[0] - self.crop_size[0])

The crop augmentation here introduces a bug when the crop size is equal to the image size. Then numpy.random.randint gets a [0,0) range and throws an exception. This happened for me with some images equal in size to the crop size. The solution seems to me to simply add a +1.

@Gsunshine
Copy link
Member

Hi @Parskatt,

Thank you for letting me know this! I'll fix it in the next release! Thanks!
If you have any questions, please feel free to post it!

Best regards,
Zhengyang

@Parskatt
Copy link
Author

@Gsunshine thanks for the quick response, great project :)

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