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

Throw ValueError in draw bounding boxes for invalid boxes #6123

Merged
merged 4 commits into from
Jun 6, 2022

Conversation

oke-aditya
Copy link
Contributor

@oke-aditya oke-aditya commented Jun 2, 2022

Closes #5517

We also suggest users to convert the boxes, in case they are using some other format.

cc @NicolasHug

@oke-aditya
Copy link
Contributor Author

I can cherry pick this to release branch as well :) let me know if needed

torchvision/utils.py Outdated Show resolved Hide resolved
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oke-aditya !

@datumbox datumbox merged commit 738fa13 into pytorch:main Jun 6, 2022
@github-actions
Copy link

github-actions bot commented Jun 6, 2022

Hey @datumbox!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@oke-aditya oke-aditya deleted the fix_util branch June 6, 2022 11:37
facebook-github-bot pushed a commit that referenced this pull request Jun 9, 2022
…6123)

Summary:
* Fix the issue :)

* Intellij vs ufmt battle

* remove .item()

Reviewed By: YosuaMichael

Differential Revision: D37038115

fbshipit-source-id: 4948c747c0d2e0c9e795d7175b1330da8c8d5f60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

draw_bounding_boxes should check that (W, H) >= (xmax, ymax) >= (xmin, ymin) >= (0, 0)
4 participants