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

Fix for warning raised if model outputs no box predictions #988

Merged
merged 2 commits into from
Dec 30, 2022

Conversation

ashnair1
Copy link
Collaborator

draw_bounding_boxes raises a warning if no boxes are passed. PR fixes this by calling the function only if sample["prediction_boxes"] has non zero elements.

@github-actions github-actions bot added datasets Geospatial or benchmark datasets testing Continuous integration testing labels Dec 29, 2022
@github-actions github-actions bot removed the testing Continuous integration testing label Dec 29, 2022
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

This is the same thing we do for IDTReeS so should be correct.

torchgeo/datasets/nasa_marine_debris.py Outdated Show resolved Hide resolved
@adamjstewart adamjstewart added this to the 0.3.2 milestone Dec 29, 2022
@adamjstewart adamjstewart enabled auto-merge (squash) December 30, 2022 17:37
@adamjstewart adamjstewart merged commit 40e8326 into microsoft:main Dec 30, 2022
@ashnair1 ashnair1 deleted the predbox-fix branch January 3, 2023 07:17
@adamjstewart adamjstewart modified the milestones: 0.3.2, 0.4.0 Jan 23, 2023
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
…#988)

* Fix for warning when no predictions are made

* Same thing for boxes

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasets Geospatial or benchmark datasets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants